:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f8f6;
  color: #13231c;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background: #f5f8f6;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("/media/bg.gif") center / cover no-repeat;
  filter: saturate(1.08) brightness(0.9);
  opacity: 0.58;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 247, 235, 0.55) 0, rgba(245, 248, 246, 0.62) 220px, rgba(245, 248, 246, 0.78) 100%);
}

button,
input,
select {
  font: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 14px 14px 92px;
}

.admin-shell {
  width: min(100%, 980px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 2px 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.app-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(55, 31, 6, 0.18);
}

.hero-copy {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
}

.sub {
  max-width: 340px;
  margin-top: 8px;
  color: #4d665b;
  font-size: 14px;
  line-height: 1.5;
}

.sub:empty {
  display: none;
}

.hint,
#planText {
  color: #64756f;
  font-size: 13px;
  line-height: 1.5;
}

.eyebrow {
  color: #b85d09;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.panel,
.status-card {
  border: 1px solid #d8e6df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 10px 28px rgba(38, 85, 66, 0.1);
  backdrop-filter: blur(8px);
}

.tab-panel {
  animation: fadeIn 0.14s ease;
}

.auth-panel {
  margin-top: 4px;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-card {
  border-color: #cfe5da;
  background: rgba(255, 255, 255, 0.72);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.admin-filters label:first-child {
  grid-column: 1 / -1;
}

.admin-filters select,
.admin-filters input {
  width: 100%;
}

.metric {
  min-width: 0;
  border: 1px solid #d8e6df;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(8px);
}

.metric span {
  display: block;
  color: #64756f;
  font-size: 12px;
  margin-bottom: 4px;
}

.metric strong {
  display: block;
  overflow: hidden;
  color: #13231c;
  font-size: 19px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  padding: 10px;
  color: #51615b;
  background: rgba(255, 255, 255, 0.58);
}

.tab.active {
  color: #ffffff;
  background: #f28a18;
}

.form,
.compact,
.domain-form {
  display: grid;
  gap: 10px;
}

.domain-form {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: #51615b;
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  border: 1px solid #ccdcd5;
  border-radius: 8px;
  padding: 12px;
  color: #13231c;
  background: rgba(255, 255, 255, 0.74);
  outline: none;
}

select {
  width: 150px;
  border: 1px solid #ccdcd5;
  border-radius: 8px;
  padding: 11px 34px 11px 12px;
  color: #13231c;
  background: rgba(255, 255, 255, 0.74);
  outline: none;
}

input:focus,
select:focus {
  border-color: #f28a18;
  box-shadow: 0 0 0 3px rgba(242, 138, 24, 0.18);
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.primary {
  padding: 12px 14px;
  color: #ffffff;
  background: #f28a18;
  box-shadow: 0 8px 20px rgba(242, 138, 24, 0.2);
}

.primary:hover {
  background: #d97812;
}

.secondary,
.ghost {
  padding: 9px 12px;
  color: #225e65;
  background: #eaf4f2;
}

.secondary:hover {
  background: #deeeeb;
}

.ghost {
  color: #92332e;
  background: #fdecea;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head .secondary {
  flex: 0 0 auto;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0e6840;
  background: #e1f5eb;
  font-size: 12px;
  font-weight: 850;
}

.badge.warn {
  color: #8b5e08;
  background: #fbf0d7;
}

.badge.bad {
  color: #9b2b27;
  background: #fde7e5;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.domain-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  color: #8b4c0b;
  background: rgba(255, 240, 219, 0.92);
  font-size: 12px;
  line-height: 1.3;
  word-break: break-all;
}

.admin-metric {
  margin-bottom: 0;
}

.domain-card {
  border: 1px solid #d8e6df;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(6px);
}

.domain-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.domain-name {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.domain-meta {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  color: #51615b;
  font-size: 13px;
  line-height: 1.45;
}

.danger {
  justify-self: end;
  margin-top: 9px;
  padding: 8px 10px;
  color: #9b2b27;
  background: #fdecea;
}

.feature-grid {
  display: grid;
  gap: 10px;
}

.feature-card {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid #d8e6df;
  border-radius: 8px;
  padding: 15px;
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(7px);
}

.feature-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: #b85d09;
  background: #fff0db;
  font-size: 12px;
  font-weight: 850;
}

.feature-card strong {
  font-size: 18px;
}

.feature-card p {
  color: #64756f;
  font-size: 13px;
  line-height: 1.45;
}

.disabled-feature {
  opacity: 0.68;
  cursor: not-allowed;
}

.disabled-feature span {
  color: #8b5e08;
  background: #fbf0d7;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.info-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf3f0;
  padding-top: 10px;
}

.info-list span {
  color: #64756f;
  font-size: 13px;
}

.info-list strong {
  min-width: 0;
  overflow: hidden;
  color: #13231c;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buy-link {
  display: block;
  margin-top: 10px;
  border-radius: 8px;
  padding: 11px 12px;
  color: #b85d09;
  background: #fff0db;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.highlight-panel {
  border-color: #f3c07a;
}

.lock-hint {
  margin-bottom: 12px;
  border: 1px solid #f3c07a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #8b4c0b;
  background: rgba(255, 244, 222, 0.94);
  font-size: 13px;
  line-height: 1.5;
}

input:disabled,
select:disabled {
  color: #89958f;
  background: rgba(239, 243, 241, 0.86);
}

.disabled-setting {
  opacity: 0.78;
}

.empty-text {
  padding: 10px 2px 2px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: min(calc(100% - 24px), 520px);
  padding: 8px;
  border: 1px solid #d8e6df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(38, 85, 66, 0.18);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.nav-item {
  min-width: 0;
  padding: 9px 5px;
  color: #64756f;
  background: transparent;
  font-size: 12px;
}

.nav-item.active {
  color: #ffffff;
  background: #f28a18;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  max-width: 512px;
  margin: 0 auto;
  padding: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #13231c;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, padding 0.16s ease;
  pointer-events: none;
}

.toast.show {
  padding: 11px 12px;
  opacity: 0.96;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

@media (min-width: 480px) {
  .domain-form {
    grid-template-columns: 1fr 160px auto;
  }
}

@media (max-width: 720px) {
  .admin-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filters {
    grid-template-columns: 1fr 1fr;
  }

  .admin-filters label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .admin-overview {
    grid-template-columns: 1fr;
  }

  .admin-filters {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 380px) {
  .setting-row {
    align-items: stretch;
    flex-direction: column;
  }

  select {
    width: 100%;
  }
}
