:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --ink: #1f2329;
  --text: #677788;
  --heading: #1f2329;
  --muted: #7d8795;
  --line: #edf0f5;
  --accent: #2f7df6;
  --accent-2: #24c6a8;
  --warning: #ffb84d;
  --danger: #ec4f78;
  --notice-bg: #e5e7ec;
  --notice-ink: #27334a;
  --topbar-bg: rgba(255, 255, 255, 0.96);
  --logo-core: #ffffff;
  --shadow: 0 10px 30px rgba(31, 36, 48, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

body.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(47, 125, 246, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(36, 198, 168, 0.12), transparent 36%),
    var(--surface-2);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
}

body[data-theme="dark"],
.app-shell[data-theme="dark"] {
  --bg: #0f1726;
  --surface: #182235;
  --surface-2: #101827;
  --ink: #f4f7fb;
  --text: #b3bdcc;
  --heading: #f4f7fb;
  --muted: #a6afc0;
  --line: #2e3a50;
  --accent: #4d8dff;
  --accent-2: #35d4ba;
  --danger: #ff6b97;
  --notice-bg: #273247;
  --notice-ink: #e9eef7;
  --topbar-bg: rgba(15, 23, 38, 0.94);
  --logo-core: #182235;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 0 28px 18px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--heading);
  cursor: pointer;
  line-height: 1;
}

.sidebar-close i {
  display: block;
  font-size: 16px;
  line-height: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 0 22px;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: none;
}

.side-nav {
  display: grid;
  gap: 5px;
}

.nav-group {
  margin: 30px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  color: var(--heading);
  padding: 0 0;
  font-size: 14px;
  font-weight: 500;
}

.nav-item span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.nav-icon {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  font-weight: 400;
  min-width: 18px;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  color: var(--accent);
  background: transparent;
}

.badge {
  border-radius: 999px;
  background: #16c7d7;
  color: #fff;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.theme-btn,
.ghost-btn,
.primary-btn,
.danger-btn,
.icon-btn,
.user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0 15px;
  font-size: 13px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.theme-btn {
  width: 100%;
  color: var(--muted);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  padding: 0 24px;
  backdrop-filter: blur(8px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-btn {
  border: 0;
  color: var(--heading);
  font-weight: 800;
}

.user-menu {
  position: relative;
}

.user-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
}

.user-popover strong,
.user-popover small,
.user-popover a,
.user-popover button {
  display: block;
}

.user-popover small {
  margin: 4px 0 10px;
  color: var(--muted);
}

.user-popover a,
.user-popover button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  padding: 0;
  text-align: left;
}

.user-support-note {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding: 12px 0 8px;
}

.user-support-note strong {
  margin-bottom: 4px;
  color: var(--heading);
  font-size: 13px;
}

.user-support-note small {
  margin: 0;
  line-height: 1.5;
}

.user-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.content {
  max-width: 1720px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.page-title h1 {
  margin: 0;
  color: var(--heading);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.page-title p {
  display: none;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.page-title .action-row {
  align-items: stretch;
}

.page-title .action-row > a,
.page-title .action-row > button {
  min-height: 40px;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 16px rgba(47, 125, 246, 0.18);
}

.theme-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.danger-btn:hover,
.icon-btn:hover,
.user-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:hover {
  box-shadow: 0 10px 22px rgba(47, 125, 246, 0.24);
}

.danger-btn {
  border-color: rgba(242, 95, 92, 0.35);
  color: var(--danger);
}

.grid {
  display: grid;
  gap: 16px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  color: var(--heading);
  isolation: isolate;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(47, 125, 246, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(36, 198, 168, 0.08), transparent 38%);
  opacity: 0;
  content: "";
  transition: opacity 180ms ease;
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover,
.card:focus-within {
  border-color: rgba(47, 125, 246, 0.24);
  box-shadow: 0 14px 34px rgba(31, 36, 48, 0.08);
  transform: translateY(-1px);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

body[data-theme="dark"] .card::before,
.app-shell[data-theme="dark"] .card::before {
  background:
    linear-gradient(135deg, rgba(77, 141, 255, 0.12), transparent 44%),
    linear-gradient(315deg, rgba(53, 212, 186, 0.1), transparent 38%);
}

.card h2,
.card h3,
.card h4 {
  margin: 0 0 10px;
}

.card h2 {
  font-size: 20px;
  line-height: 1.25;
}

.card h3 {
  font-size: 15px;
  line-height: 1.3;
}

.muted {
  color: var(--muted);
}

.metric {
  min-height: 116px;
}

.metric strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--heading);
  font-size: 26px;
}

.metric-actions {
  margin-top: 12px;
}

.home-support {
  display: grid;
  gap: 14px;
}

.home-support-head {
  display: grid;
  gap: 8px;
}

.support-kicker {
  width: fit-content;
  border-radius: 999px;
  background: rgba(47, 125, 246, 0.14);
  color: var(--accent);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-support-head h2 {
  margin: 0;
  font-size: 20px;
}

.home-support-head p {
  margin: 0;
  line-height: 1.7;
}

.home-support-grid,
.support-channel-grid,
.ticket-detail-grid {
  display: grid;
  gap: 10px;
}

.home-support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-support-item,
.support-channel,
.ticket-summary,
.ticket-detail-grid > div,
.ticket-description {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.home-support-item,
.support-channel {
  padding: 12px 14px;
}

.home-support-item strong,
.support-channel strong,
.ticket-summary strong,
.ticket-detail-grid strong,
.ticket-description strong {
  display: block;
  color: var(--heading);
  font-size: 13px;
}

.home-support-item p,
.support-channel span,
.ticket-summary p,
.ticket-detail-grid p,
.ticket-description p {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.home-support-actions {
  margin-top: 2px;
}

.empty-state {
  display: grid;
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.empty-state strong {
  color: var(--heading);
  font-size: 18px;
}

.empty-state p {
  max-width: 360px;
  margin: 0;
  line-height: 1.7;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.notice {
  border: 0;
  background: var(--notice-bg);
  box-shadow: none;
  color: var(--notice-ink);
}

.notice h2 {
  color: var(--notice-ink);
}

.shop-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
}

.shop-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(47, 125, 246, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(36, 198, 168, 0.18), transparent 46%);
  content: "";
}

.shop-hero-copy h2 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.shop-hero-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--notice-ink);
  line-height: 1.7;
}

.shop-hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.shop-hero-tags span {
  border: 1px solid rgba(47, 125, 246, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--notice-ink);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
}

.shop-grid {
  margin-top: 18px;
}

.plan-card {
  display: grid;
  min-height: 438px;
  align-content: start;
  gap: 14px;
}

.plan-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background:
    linear-gradient(135deg, rgba(47, 125, 246, 0.12), transparent 44%),
    linear-gradient(315deg, rgba(255, 184, 77, 0.16), transparent 48%);
  transition: opacity 180ms ease;
  content: "";
}

.plan-card:hover,
.plan-card.recommended {
  border-color: rgba(47, 125, 246, 0.28);
  box-shadow: 0 18px 42px rgba(31, 36, 48, 0.1);
}

.plan-card:hover::before,
.plan-card.recommended::before {
  opacity: 1;
}

.plan-card.recommended .badge {
  background: var(--warning);
  color: #27334a;
}

.plan-head {
  display: grid;
  gap: 10px;
}

.plan-head h2 {
  min-height: 56px;
  margin: 0;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.4;
}

.price {
  color: var(--heading);
  font-size: 28px;
  font-weight: 800;
}

.price span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.plan-card > .primary-btn {
  width: 100%;
  min-height: 42px;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.feature-list li::before {
  color: var(--accent-2);
  content: "✓ ";
}

.plan-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.plan-specs div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
}

.plan-specs strong,
.plan-specs span {
  display: block;
}

.plan-specs strong {
  overflow-wrap: anywhere;
  color: var(--heading);
  font-size: 14px;
}

.plan-specs span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

body[data-theme="dark"] .shop-hero-tags span,
.app-shell[data-theme="dark"] .shop-hero-tags span,
body[data-theme="dark"] .plan-specs div,
.app-shell[data-theme="dark"] .plan-specs div {
  background: rgba(16, 24, 39, 0.72);
}

.table-wrap {
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(36, 198, 168, 0.12);
  color: var(--accent-2);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status.off {
  background: rgba(242, 95, 92, 0.12);
  color: var(--danger);
}

.status.pending {
  background: rgba(255, 184, 77, 0.16);
  color: #b87900;
}

.invite-list-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.doc-card {
  display: flex;
  min-height: 150px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.doc-card p {
  min-height: 48px;
}

.download-hero {
  max-width: 1160px;
  margin: 0 auto 14px;
}

.download-grid {
  max-width: 1160px;
  margin: 0 auto;
}

.client-card {
  min-height: 220px;
  padding: 0;
}

.download-card {
  display: grid;
  height: 100%;
  align-content: start;
  gap: 10px;
  padding: 26px;
}

.download-card h2 {
  margin: 12px 0 0;
  font-size: 24px;
}

.download-card strong {
  color: var(--heading);
  font-size: 15px;
}

.download-card small {
  color: var(--muted);
  line-height: 1.7;
}

.source-tag {
  width: fit-content;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.guide-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.guide-article h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.guide-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
}

.guide-block {
  border-top: 1px solid var(--line);
  padding: 24px 0 4px;
}

.guide-block h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.guide-notice {
  border-top: 0;
  border-radius: 8px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  margin-bottom: 14px;
  padding: 22px;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.8;
}

.guide-notice .guide-list {
  color: var(--notice-ink);
}

.guide-links {
  display: grid;
  gap: 10px;
}

.guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px 16px;
}

.guide-link span {
  color: var(--muted);
}

.guide-link strong {
  color: var(--accent);
  text-align: right;
}

.admin-table {
  margin-top: 22px;
}

.read-btn {
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
}

.section-label {
  max-width: 1160px;
  margin: 54px auto 20px;
  color: var(--notice-ink);
  font-size: 13px;
  font-weight: 700;
}

.node-grid {
  max-width: 1160px;
  margin: 0 auto;
}

.node-card {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.node-card h3 {
  margin: 0;
  color: var(--heading);
  font-size: 22px;
}

.node-tags {
  min-height: 17px;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-notice {
  display: grid;
  max-width: 1160px;
  min-height: 76px;
  margin: 0 auto;
  padding-left: 106px;
  position: relative;
}

.status-notice::before {
  position: absolute;
  left: 28px;
  top: 22px;
  color: var(--notice-ink);
  content: "📣";
  font-size: 42px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.48);
  padding: 18px;
}

.modal-layer[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(100%, 620px);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(18, 24, 38, 0.18);
  padding: 24px;
}

.modal-head {
  padding-right: 38px;
}

.modal-head h2 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 22px;
}

.modal-head p {
  margin: 0 0 18px;
  line-height: 1.7;
}

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

.modal-list-item,
.setting-row,
.quick-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--heading);
  padding: 13px 14px;
  text-align: left;
}

button.modal-list-item,
button.setting-row,
button.quick-card {
  cursor: pointer;
}

.modal-list-item p,
.support-status p,
.subscribe-info p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal-list-item small {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.modal-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(47, 125, 246, 0.1);
  color: var(--accent);
  font-size: 16px;
}

.subscribe-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 14px;
}

.qr-box {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.qr-box i {
  color: var(--heading);
  font-size: 54px;
}

.subscribe-info {
  min-width: 0;
}

.subscribe-info strong,
.support-status strong {
  display: block;
  color: var(--heading);
}

.copy-box {
  overflow: hidden;
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 11px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-code-box {
  color: var(--heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.invite-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px 14px;
}

.invite-limit strong {
  color: var(--heading);
  font-size: 20px;
}

.invite-limit span {
  color: var(--muted);
  font-size: 13px;
}

.modal-form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  line-height: 1.5;
}

.modal-form-message[data-type="info"] {
  color: var(--muted);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quick-card {
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.quick-card i {
  color: var(--accent);
  font-size: 20px;
}

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

.setting-row {
  justify-content: space-between;
}

.setting-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.setting-row.active {
  border-color: rgba(47, 125, 246, 0.45);
  background: rgba(47, 125, 246, 0.08);
  color: var(--accent);
}

.support-panel,
.support-status {
  display: grid;
  gap: 14px;
}

.contact-support-panel {
  gap: 16px;
}

.support-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  padding: 16px;
}

.support-channel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.support-channel:hover,
.support-channel:focus-visible {
  border-color: rgba(47, 125, 246, 0.26);
  box-shadow: 0 10px 24px rgba(31, 36, 48, 0.06);
  transform: translateY(-1px);
}

.ticket-summary {
  padding: 14px 16px;
}

.ticket-summary strong {
  margin-bottom: 4px;
}

.ticket-detail {
  display: grid;
  gap: 16px;
}

.ticket-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-detail-grid > div,
.ticket-description {
  padding: 12px 14px;
}

.ticket-description p {
  margin-top: 6px;
}

.ticket-sub-meta {
  margin: 4px 0 0;
  font-size: 12px;
}

.modal-metrics {
  margin-bottom: 16px;
}

.modal-actions {
  margin-top: 16px;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(31, 36, 48, 0.1);
  padding: 30px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand span,
.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: var(--heading);
  font-size: 18px;
}

.auth-brand small {
  color: var(--muted);
  font-size: 12px;
}

.auth-copy h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 26px;
}

.auth-copy p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  line-height: 1.5;
}

.auth-message[data-type="success"] {
  color: var(--accent-2);
}

.auth-message[data-type="info"] {
  color: var(--muted);
}

.auth-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
}

.modal {
  position: relative;
  width: min(620px, 100%);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.promo-box {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.promo-box > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px 16px;
}

.promo-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
}

.promo-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 18px 24px 28px;
  font-size: 13px;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
}

.admin-sidebar {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 0 20px 20px;
}

.admin-brand {
  padding-top: 18px;
}

.admin-brand-text {
  display: block;
}

.admin-brand-text strong,
.admin-brand-text small {
  display: block;
}

.admin-brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.admin-workspace {
  min-width: 0;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.admin-kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 18px 0;
}

.admin-kv dt {
  color: var(--muted);
}

.admin-kv dd {
  margin: 0;
  color: var(--heading);
}

.admin-state-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.admin-detail-grid {
  margin-top: 22px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 84px minmax(0, 1fr);
}

body.sidebar-collapsed .brand span:last-child,
body.sidebar-collapsed .nav-item small,
body.sidebar-collapsed .nav-group,
body.sidebar-collapsed .sidebar-footer {
  display: none;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: fixed;
    z-index: 30;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 20px 0 46px rgba(18, 24, 38, 0.12);
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar .brand {
    flex: 1;
    padding-right: 12px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
  }

  .top-actions > a {
    display: none;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }

  .page-title {
    display: grid;
  }

  .page-title h1 {
    font-size: 28px;
  }

  .shop-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-hero-tags {
    justify-content: flex-start;
  }

  .plan-card {
    min-height: auto;
  }

  .plan-head h2 {
    min-height: 0;
  }

  .modal {
    width: min(100%, 360px);
    padding: 22px 18px;
  }

  .subscribe-panel,
  .modal-grid,
  .modal-metrics,
  .home-support-grid,
  .support-channel-grid,
  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-list-item {
    align-items: flex-start;
  }
}
