:root {
  --brand: #19bc9c;
  --brand-dark: #08796f;
  --brand-soft: #e9fbf7;
  --ink: #14231f;
  --muted: #65756f;
  --line: #dce8e4;
  --surface: #ffffff;
  --canvas: #f4f8f7;
  --charcoal: #102a25;
  --danger: #dc4f5f;
  --warning: #d88a18;
  color-scheme: light;
}

* { box-sizing: border-box; }
.jd-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { border: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.hidden, [hidden] { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 0 4px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.brand-mark, .command-icon, .dialog-icon, .mini-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}
.brand-mark svg, .command-icon svg, .dialog-icon svg, .mini-icon svg,
.nav-icon svg, .tab-icon svg, .button-icon svg, .note-icon svg,
.smart-tool-icon svg, .smart-tools-icon svg, .smart-tool-group-icon svg,
.drop-icon svg, .plus svg, .chevron svg { width: 20px; height: 20px; }
.brand strong { display: block; font-size: 17px; font-weight: 900; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 800; }

.nav { display: grid; gap: 6px; margin-top: 32px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 8px;
  background: transparent;
  color: #52615c;
  font-weight: 800;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}
.nav-item:hover { background: #f2f7f5; color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-icon { display: grid; place-items: center; width: 22px; height: 22px; }

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid #cfeee7;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  text-decoration: none;
}
.sidebar-note:hover { border-color: var(--brand); }
.sidebar-note.disabled { pointer-events: none; opacity: .55; }
.note-icon { display: grid; place-items: center; }
.sidebar-footer { margin-top: 10px; padding: 0 2px; font-size: 11px; line-height: 1.5; }
.sidebar-footer a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.sidebar-footer a:hover { color: var(--brand-dark); }

.main { min-width: 0; padding: 18px 22px 36px; }
.site-footer {
  display: flex;
  justify-content: center;
  padding: 30px 12px 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.site-footer-icp { color: inherit; text-decoration: none; }
.site-footer-icp:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
body.admin-route .site-footer { display: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto 16px;
}
.quick-tabs, .top-actions { display: flex; align-items: center; gap: 8px; }
.quick-tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.quick-tabs button { flex: 0 0 auto; }
.quick-tabs::-webkit-scrollbar { display: none; }
.quick-tabs button, .ghost-button, .text-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.quick-tabs button:hover, .ghost-button:hover, .text-button:hover, .icon-button:hover { border-color: #a9dacf; color: var(--brand-dark); }
.icon-button { width: 38px; padding: 0; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #caeee6;
  border-radius: 999px;
  background: #f1fcf9;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.status-pill.checking { border-color: var(--line); background: #fff; color: var(--muted); }
.status-pill.checking::before { background: #9eaaa6; }
.status-pill.error { border-color: #f2c9ce; background: #fff5f6; color: #b93242; }
.status-pill.error::before { background: var(--danger); }

.view { display: none; max-width: 1500px; margin: 0 auto; }
.view.active { display: block; }

.hero-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  min-height: 238px;
  padding: 30px 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.eyebrow { color: var(--brand); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.hero-copy h1, .section-head h1 {
  margin: 10px 0 10px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
}
.hero-copy h1 { color: var(--ink); }
.hero-copy p { max-width: 680px; margin-bottom: 16px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #c9eee6;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}
.hero-tags span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.site-announcement { margin: 0 0 14px; padding: 9px 11px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--brand-dark) !important; }

.upload-orbit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 210px;
  height: 164px;
  padding: 18px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}
.upload-orbit:hover { border-color: var(--brand); }
.upload-orbit .plus {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 11px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
}
.upload-orbit strong { font-size: 16px; font-weight: 900; }
.upload-orbit small { margin-top: 4px; color: rgba(255,255,255,.82); font-size: 11px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 14px; margin-top: 14px; }
.work-panel, .task-panel, .auth-panel, .profile-panel, .data-list, .admin-card, .tool-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.work-panel, .task-panel { padding: 18px; }
.command-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #bce7dd;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f8fffd;
  color: var(--ink);
  text-align: left;
}
.command-card:hover { border-color: var(--brand); }
.command-card .chevron {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 0 0 1px #d9eee9;
}
.command-copy { display: grid; gap: 2px; min-width: 0; }
.command-copy small { color: var(--brand-dark); font-size: 10px; font-weight: 900; }
.command-copy strong { font-size: 16px; font-weight: 900; }
.command-copy em { color: var(--muted); font-size: 11px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { display: grid; place-items: center; margin-left: auto; color: var(--muted); }

.mode-control, .segmented-small { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7f6; }
.mode-control button, .segmented-small button { min-height: 34px; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 800; }
.mode-control button.active, .segmented-small button.active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(16,42,37,.08); }
.segmented-small { grid-template-columns: repeat(2, 1fr); margin: 0 0 16px; }

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 126px;
  margin-top: 12px;
  padding: 18px;
  border: 1px dashed #9fd9cc;
  border-radius: 8px;
  background: #f8fcfb;
  text-align: center;
}
.drop-zone.dragging { border-color: var(--brand-dark); background: var(--brand-soft); }
.drop-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; color: var(--brand-dark); }
.drop-zone button { max-width: 100%; background: transparent; color: var(--ink); font-weight: 800; }
.drop-zone p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.file-list { display: grid; gap: 7px; margin-top: 10px; }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; }
.file-chip > span { display: grid; min-width: 0; margin-right: auto; }
.file-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-chip small { color: var(--muted); font-size: 10px; }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}
.primary-button:hover { background: #13a98c; }
.primary-button.compact { width: auto; min-height: 38px; margin-top: 0; }
.danger { min-height: 34px; padding: 0 11px; border: 1px solid #f0c8cd; border-radius: 6px; background: #fff5f6; color: #b72f40; font-weight: 800; }

.panel-title, .section-head, .smart-tools-head, .dialog-head, .admin-section-head, .admin-card-head, .admin-form-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-title h2, .smart-tools-head h2 { margin: 0; font-size: 15px; font-weight: 900; }
.task-list { display: grid; gap: 8px; margin-top: 12px; }
.task-item { padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.task-head, .task-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-head strong { font-size: 12px; }
.task-meta { margin-top: 7px; }
.task-meta small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.progress { height: 4px; margin-top: 9px; border-radius: 4px; background: #eaf1ef; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); }
.empty { margin: 0; padding: 22px 12px; color: var(--muted); text-align: center; }

.smart-tools-section { margin-top: 22px; }
.smart-tools-head { justify-content: flex-start; margin-bottom: 10px; }
.smart-tools-icon { display: grid; place-items: center; width: 28px; height: 28px; color: var(--brand-dark); }
.smart-tools-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.smart-tool-group { min-width: 0; border-top: 2px solid var(--brand); background: #fff; }
.smart-tool-group-title { display: flex; align-items: center; gap: 7px; padding: 12px 10px 8px; }
.smart-tool-group-title strong { font-size: 12px; }
.smart-tool-group-icon { display: grid; place-items: center; color: var(--brand-dark); }
.smart-tool-list { display: grid; }
.smart-tool-row { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 10px; border-top: 1px solid #edf2f0; background: #fff; color: var(--ink); text-align: left; }
.smart-tool-row:hover, .smart-tool-row.active { background: var(--brand-soft); }
.smart-tool-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 6px; background: #eff9f6; color: var(--brand-dark); }
.smart-tool-copy { display: grid; min-width: 0; }
.smart-tool-copy strong { font-size: 12px; }
.smart-tool-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-tool-arrow { margin-left: auto; color: #97a7a2; }

.section-head { margin-bottom: 14px; }
.section-head h1 { margin-bottom: 0; font-size: 28px; }
.data-list { overflow: hidden; }
.data-row, .member-order-row, .system-row, .tool-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #edf2f0; }
.data-row:last-child, .member-order-row:last-child, .system-row:last-child, .tool-toggle:last-child { border-bottom: 0; }
.data-row > span:first-child, .system-row > span:first-child { display: grid; gap: 3px; min-width: 0; }
.data-row strong, .system-row strong { font-size: 12px; }
.data-row small, .system-row small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions a { color: var(--brand-dark); font-size: 12px; font-weight: 900; text-decoration: none; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; background: #edf3f1; color: var(--muted); font-size: 10px; font-weight: 900; white-space: nowrap; }
.badge.completed, .badge.paid { background: var(--brand-soft); color: var(--brand-dark); }
.badge.failed, .badge.refunded { background: #fff0f2; color: #b72f40; }
.badge.processing, .badge.pending, .badge.queued { background: #fff7e8; color: #a9690a; }

.account-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr); gap: 12px; }
.auth-panel, .profile-panel { padding: 18px; }
.auth-panel { grid-row: span 2; }
.auth-panel label, .settings-row label, .app-settings-grid label, .admin-form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25,188,156,.1); }
.auth-panel label + label { margin-top: 10px; }
.profile-panel h2 { margin-bottom: 8px; font-size: 15px; }
.profile-panel p { margin-bottom: 12px; color: var(--muted); line-height: 1.6; }
.membership-panel { grid-column: 2; }
.member-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.member-plan-card { display: flex; flex-direction: column; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.member-plan-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.member-plan-card p { min-height: 40px; margin: 10px 0; font-size: 11px; }
.member-plan-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.member-plan-meta span { padding: 3px 6px; border-radius: 4px; background: #f1f6f4; color: #4f615b; font-size: 9px; font-weight: 800; }
.member-plan-meta span:first-child { background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; }
.renewal-note { display: block; margin-top: 8px; color: #8a651f; font-size: 9px; line-height: 1.45; }
.member-orders { margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; }
.member-order-row { font-size: 11px; }
.member-order-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.member-order-row small { color: var(--muted); font-size: 9px; }

.tool-dialog { width: min(900px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); padding: 0; color: var(--ink); }
.tool-dialog::backdrop { background: rgba(12,27,23,.5); }
.dialog-head { padding: 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 2px 0 0; font-size: 18px; }
.tool-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; overflow: auto; }
.tool-group { min-width: 0; }
.tool-group h3 { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tool-grid button { min-height: 58px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); text-align: left; }
.tool-grid button:hover, .tool-grid button.active { border-color: var(--brand); background: var(--brand-soft); }
.tool-grid strong, .tool-grid small { display: block; }
.tool-grid strong { font-size: 11px; }
.tool-grid small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; max-width: min(380px, calc(100vw - 32px)); padding: 11px 13px; border-radius: 7px; background: var(--charcoal); color: #fff; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 120ms ease, transform 120ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Admin */
body.admin-route { background: #f3f6f5; }
body.admin-route .sidebar, body.admin-route .topbar { display: none; }
body.admin-route .app-shell { display: block; }
body.admin-route .main { padding: 0; }
body.admin-route .view { max-width: none; }
.admin-page { min-height: 100vh; }
.admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 30px; background: var(--charcoal); color: #fff; }
.admin-hero h1 { margin: 6px 0 5px; font-size: 26px; }
.admin-hero p { margin: 0; color: #bdcec9; }
.admin-actions, .admin-toolbar, .task-filters, .orders-toolbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.admin-login { display: grid; grid-template-columns: minmax(220px, 1fr) 260px 260px auto; align-items: end; gap: 10px; max-width: 980px; margin: 80px auto; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.admin-login h2 { margin: 4px 0 0; }
.admin-dashboard { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 107px); }
.admin-rail { padding: 16px 12px; border-right: 1px solid var(--line); background: #fff; }
.admin-rail-title { display: grid; gap: 3px; padding: 8px 10px 14px; }
.admin-rail-title small { color: var(--muted); font-size: 10px; }
.admin-rail button { display: grid; gap: 2px; width: 100%; padding: 10px; border-radius: 7px; background: transparent; color: #53645e; text-align: left; }
.admin-rail button.active { background: var(--brand-soft); color: var(--brand-dark); }
.admin-rail button small { font-size: 9px; opacity: .72; }
.admin-workspace { min-width: 0; padding: 22px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-section-head { align-items: flex-end; margin-bottom: 14px; }
.admin-section-head h2 { margin: 4px 0 4px; font-size: 22px; }
.admin-section-head p { margin: 0; color: var(--muted); }
.metric-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.metric { padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.metric strong, .metric small { display: block; }
.metric strong { font-size: 20px; }
.metric small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-card { min-width: 0; padding: 15px; }
.admin-card-head { justify-content: flex-start; margin-bottom: 12px; }
.admin-card-head > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; font-weight: 900; }
.admin-card-head h2 { margin: 0; font-size: 15px; }
.admin-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.settings-row, .app-settings-grid, .admin-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wide-field { grid-column: 1 / -1; }
.switch-row { display: flex !important; align-items: center; gap: 7px; min-height: 39px; }
.switch-row input { width: 18px; min-height: 18px; accent-color: var(--brand); }
.compact-switch { padding: 0 5px; white-space: nowrap; }
.admin-form-list { display: grid; gap: 10px; }
.admin-form-card { padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.admin-form-card-head { margin-bottom: 10px; }
.admin-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.admin-tools-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; }
.tool-toggles { display: grid; gap: 10px; }
.tool-summary, .admin-summary-line, .admin-sync-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 6px; background: #f3f7f5; color: var(--muted); font-size: 11px; }
.admin-tool-group h3 { margin: 0 0 5px; font-size: 11px; }
.admin-tool-group-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.tool-toggle input { width: 18px; min-height: 18px; accent-color: var(--brand); }
.user-row { align-items: flex-start; }
.user-controls { display: grid; grid-template-columns: 130px 100px 170px 130px auto auto auto; gap: 6px; width: min(980px, 74%); }
.user-controls input, .user-controls select { min-height: 34px; }
.order-row { align-items: flex-start; }
.compact-list { overflow: visible; }

@media (max-width: 1180px) {
  .smart-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
  .user-row { display: grid; }
  .user-controls { width: 100%; grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .membership-panel { grid-column: 1; }
  .admin-dashboard { grid-template-columns: 1fr; }
  .admin-rail { display: flex; gap: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-rail-title { display: none; }
  .admin-rail button { flex: 0 0 116px; }
  .admin-overview-grid, .admin-tools-layout { grid-template-columns: 1fr; }
  .admin-login { grid-template-columns: 1fr 1fr; margin: 30px 16px; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; min-height: 100vh; }
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: block;
    width: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--line);
  }
  .brand, .sidebar-note, .sidebar-footer { display: none; }
  .nav { grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
  .nav-item { flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 4px; font-size: 10px; text-align: center; }
  .nav-icon { width: 21px; height: 21px; }
  .main { padding: 10px 10px 20px; }
  .topbar { gap: 8px; margin-bottom: 10px; }
  .quick-tabs { gap: 5px; }
  .quick-tabs button { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .status-pill { display: none; }
  .ghost-button { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .hero-workbench { grid-template-columns: 1fr; gap: 18px; min-height: auto; padding: 22px 18px; background-size: 24px 24px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-copy p { margin-bottom: 13px; font-size: 13px; line-height: 1.55; }
  .hero-tags span { min-height: 26px; font-size: 10px; }
  .upload-orbit { justify-self: stretch; width: 100%; height: 88px; flex-direction: row; gap: 10px; }
  .upload-orbit .plus { width: 38px; height: 38px; margin: 0; }
  .upload-orbit small { margin: 2px 0 0; }
  .workspace-grid { margin-top: 10px; }
  .work-panel, .task-panel { padding: 12px; }
  .command-card { min-height: 60px; }
  .drop-zone { min-height: 106px; padding: 13px; }
  .smart-tools-section { margin-top: 18px; }
  .smart-tools-grid { grid-template-columns: 1fr; }
  .smart-tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-tool-row { min-height: 58px; }
  .section-head { align-items: flex-start; }
  .section-head h1 { font-size: 23px; }
  .account-layout, .member-plans { grid-template-columns: 1fr; }
  .auth-panel, .profile-panel { padding: 14px; }
  .data-row, .member-order-row { align-items: flex-start; }
  .row-actions { width: 100%; justify-content: flex-start; }
  .member-order-row { display: grid; grid-template-columns: 1fr auto; }
  .tool-groups { grid-template-columns: 1fr; padding: 12px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .toast { right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); }
  body.admin-route { padding-bottom: 0; }
  .admin-hero { align-items: flex-start; padding: 18px 14px; }
  .admin-hero h1 { font-size: 20px; }
  .admin-hero p { display: none; }
  .admin-actions { justify-content: flex-end; }
  .admin-login, .admin-section-head, .settings-row, .app-settings-grid, .admin-form-grid { grid-template-columns: 1fr; }
  .admin-login { display: grid; }
  .admin-workspace { padding: 12px; }
  .admin-section-head { display: grid; align-items: start; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: 1; }
  .user-controls { grid-template-columns: 1fr 1fr; }
  .task-filters, .admin-toolbar, .orders-toolbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .task-filters input, .admin-toolbar input, .orders-toolbar input { grid-column: 1 / -1; }
}

/* 2026-08 operations dashboard, file retention and mobile account access */
#filesView { max-width: 1180px; }
.file-retention-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid #bfe7dd;
  border-radius: 12px;
  background: linear-gradient(135deg, #effbf8, #f9fffd);
  color: #31534a;
}
.file-retention-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; }
.file-retention-icon svg { width: 21px; height: 21px; }
.file-retention-banner > span:last-child { display: grid; gap: 4px; }
.file-retention-banner strong { font-size: 16px; }
.file-retention-banner small { color: #58746d; font-size: 13px; line-height: 1.55; }
#userTaskList { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
#userTaskList .data-row { min-height: 82px; padding: 16px 18px; }
#userTaskList .data-row strong { font-size: 15px; }
#userTaskList .data-row small { font-size: 12px; }
.file-expiry { color: #327b6c !important; font-weight: 800; }
.file-expiry.expired { color: #b44650 !important; }
.badge.expired { background: #fff0f2; color: #b72f40; }

.membership-usage { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 12px; margin: 14px 0; padding: 13px 15px; border: 1px solid #bfe7dd; border-radius: 10px; background: #fff; }
.membership-usage-label { color: #58746d; font-size: 13px; font-weight: 800; }
.membership-usage strong { color: var(--brand-dark); font-size: 23px; }
.membership-usage small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 1.55; }

body.admin-route { color: #19312b; font-size: 15px; }
body.admin-route .admin-hero { align-items: center; padding: 28px 34px; }
body.admin-route .admin-hero h1 { font-size: 30px; }
body.admin-route .admin-hero p { font-size: 15px; line-height: 1.6; }
body.admin-route .admin-dashboard { grid-template-columns: 240px minmax(0, 1fr); }
body.admin-route .admin-rail { padding: 20px 14px; }
body.admin-route .admin-rail-title strong { font-size: 16px; }
body.admin-route .admin-rail-title small { font-size: 12px; line-height: 1.5; }
body.admin-route .admin-rail button { min-height: 58px; padding: 11px 13px; border-radius: 10px; }
body.admin-route .admin-rail button strong { font-size: 15px; }
body.admin-route .admin-rail button small { font-size: 12px; }
body.admin-route .admin-workspace { padding: 28px; }
body.admin-route .admin-section-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
body.admin-route .admin-section-head h2 { font-size: 27px; }
body.admin-route .admin-section-head p { font-size: 14px; line-height: 1.65; }
body.admin-route .admin-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(16, 42, 37, .04); }
body.admin-route .admin-card-head { gap: 12px; margin-bottom: 18px; }
body.admin-route .admin-card-head > span { width: 34px; height: 34px; border-radius: 8px; font-size: 12px; }
body.admin-route .admin-card-head h2 { font-size: 18px; }
body.admin-route .admin-card-head p { font-size: 13px; line-height: 1.5; }
body.admin-route input,
body.admin-route select,
body.admin-route textarea { min-height: 46px; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
body.admin-route textarea { min-height: 100px; }
body.admin-route .settings-row label,
body.admin-route .app-settings-grid label,
body.admin-route .admin-form-grid label { gap: 8px; font-size: 13px; }
body.admin-route .primary-button.compact,
body.admin-route .ghost-button.compact,
body.admin-route button.danger { min-height: 42px; padding: 0 15px; border-radius: 8px; font-size: 14px; }
body.admin-route .data-list { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
body.admin-route .data-row,
body.admin-route .system-row,
body.admin-route .tool-toggle { min-height: 64px; padding: 15px 17px; }
body.admin-route .data-row strong,
body.admin-route .system-row strong { font-size: 14px; }
body.admin-route .data-row small,
body.admin-route .system-row small { font-size: 12px; line-height: 1.55; }
body.admin-route .badge { min-height: 28px; padding: 0 10px; font-size: 12px; }

.admin-operation-block { margin-bottom: 18px; }
.admin-operation-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.admin-operation-heading h3 { margin: 0 0 4px; font-size: 19px; }
.admin-operation-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.admin-operation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-operation-card { min-width: 0; padding: 17px; border: 1px solid #dce9e5; border-radius: 13px; background: #fff; box-shadow: 0 7px 20px rgba(16, 42, 37, .035); }
.admin-operation-card[data-platform="total"] { border-color: #8fd8c9; background: linear-gradient(145deg, #effbf8, #fff); }
.operation-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.operation-card-head > span { font-size: 17px; font-weight: 900; }
.operation-card-head small { color: var(--muted); font-size: 11px; }
.operation-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
.operation-values > span { display: grid; gap: 4px; min-width: 0; }
.operation-values small { color: var(--muted); font-size: 12px; }
.operation-values strong { overflow: hidden; color: #173c34; font-size: 20px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }

.admin-trend-card { margin: 0 0 20px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(16, 42, 37, .04); }
.trend-selector { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.trend-selector select { width: 132px; }
.admin-trend-legend { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin: 5px 4px 0; color: #536963; font-size: 12px; font-weight: 800; }
.admin-trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.admin-trend-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #08796f; }
.admin-trend-legend [data-platform="android"]::before { background: #3f6ee8; }
.admin-trend-legend [data-platform="ios"]::before { background: #d46c94; }
.admin-trend-chart { width: 100%; min-height: 300px; margin-top: 4px; overflow-x: auto; }
.admin-trend-chart svg { display: block; width: 100%; min-width: 680px; height: 310px; }
.trend-grid-line { stroke: #e6eeeb; stroke-width: 1; }
.trend-axis-label,
.trend-date-label { fill: #73857f; font-size: 11px; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.admin-system-metrics { margin: 20px 0 14px; }
.admin-system-metrics > h3 { margin-bottom: 10px; font-size: 18px; }
body.admin-route .metric-strip { gap: 10px; }
body.admin-route .metric { padding: 16px; border-radius: 11px; }
body.admin-route .metric strong { font-size: 23px; }
body.admin-route .metric small { font-size: 12px; }

.admin-date-filter { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-day-summary { margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfa; }
.admin-day-summary > .empty { margin: 0; font-size: 14px; }
.user-row { display: grid; gap: 14px; }
.user-controls { width: 100%; grid-template-columns: minmax(140px, 1fr) 110px 190px minmax(150px, 1fr) minmax(160px, .8fr) auto auto auto; }
.user-credit-control { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; }
.user-credit-control input { min-height: 36px !important; }

@media (max-width: 1180px) {
  .admin-operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-controls { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 900px) {
  body.admin-route .admin-dashboard { grid-template-columns: 1fr; }
  body.admin-route .admin-workspace { padding: 22px 18px; }
  body.admin-route .admin-rail button { flex-basis: 132px; }
  body.admin-route .admin-section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  .history-link { display: none !important; }
  .converter-topbar { align-items: center; }
  .converter-actions { gap: 6px; }
  .top-app-download { min-width: 0; min-height: 38px; padding: 0 11px; font-size: 13px; box-shadow: none; }
  .top-app-download span:first-child { display: none; }
  .top-app-download span:last-child { display: inline; }
  .membership-link { display: inline-flex !important; min-height: 38px; max-width: 118px; padding: 0 11px; border: 1px solid #b8ddd5; border-radius: 8px; background: #fff; color: var(--brand-dark); font-size: 13px; }
  .membership-link .membership-diamond { display: none; }
  #membershipText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .converter-title { max-width: 105px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .file-retention-banner { align-items: flex-start; padding: 14px; }
  .file-retention-banner strong { font-size: 15px; }
  #userTaskList .data-row { display: grid; gap: 12px; }
  #userTaskList .row-actions { justify-content: space-between; }
  .membership-usage { grid-template-columns: 1fr; }
  .membership-usage small { grid-column: 1; }
  #accountView .member-summary-band.account-only .member-account-status { padding: 18px 16px; border-radius: 12px; }
  #accountView .membership-products { padding: 14px 0 0; }
  #accountView .membership-section-head { margin-bottom: 15px; }
  #accountView .member-plan-card { padding: 20px 17px; border-radius: 13px; box-shadow: 0 8px 22px rgba(16, 42, 37, .06); }
  #accountView .member-plan-card .member-plan-action { min-height: 52px; font-size: 16px; }
  #accountView .member-payment-guide > div { min-height: 64px; padding: 13px 14px; }
  #accountView .membership-orders { margin-top: 20px; }

  body.admin-route { font-size: 15px; }
  body.admin-route .admin-hero { padding: 20px 15px; }
  body.admin-route .admin-hero h1 { font-size: 24px; }
  body.admin-route .admin-hero p { font-size: 14px; }
  body.admin-route .admin-workspace { padding: 18px 12px; }
  body.admin-route .admin-section-head h2 { font-size: 24px; }
  body.admin-route .admin-card { padding: 17px 14px; }
  body.admin-route .settings-row,
  body.admin-route .app-settings-grid,
  body.admin-route .admin-form-grid { grid-template-columns: 1fr; }
  .admin-operation-grid { grid-template-columns: 1fr; }
  .admin-operation-card { padding: 16px; }
  .operation-values { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .operation-values strong { font-size: 17px; }
  .operation-values small { font-size: 11px; }
  .admin-trend-card { padding: 16px 12px; }
  .admin-operation-heading { align-items: flex-start; flex-direction: column; }
  .trend-selector { width: 100%; justify-content: space-between; }
  .trend-selector select { width: 150px; }
  .admin-trend-legend { justify-content: flex-start; gap: 12px; }
  .admin-trend-chart { min-height: 280px; }
  .admin-trend-chart svg { height: 280px; }
  .admin-day-summary { padding: 14px 10px; }
  .orders-toolbar { width: 100%; display: grid !important; grid-template-columns: 1fr; }
  .admin-date-filter { width: 100%; }
  .user-controls { grid-template-columns: 1fr; }
  body.admin-route .data-row { display: grid; gap: 12px; }
  body.admin-route .row-actions { width: 100%; }
}

@media (max-width: 390px) {
  .hero-copy h1 { font-size: 23px; }
  .hero-tags span:last-child { display: none; }
  .smart-tool-list { grid-template-columns: 1fr; }
  .user-controls, .task-filters, .admin-toolbar, .orders-toolbar { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* 2026-08 converter center */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body:not(.admin-route) {
  background: #fff;
  color: #091229;
  font-size: 16px;
}
body:not(.admin-route) .app-shell { display: block; min-height: 100vh; }
body:not(.admin-route) .sidebar { display: none; }
body:not(.admin-route) .main {
  width: 100%;
  max-width: 1108px;
  margin: 0 auto;
  padding: 11px 7px 42px 42px;
}
body:not(.admin-route) .view { max-width: none; }

.converter-topbar {
  min-height: 36px;
  max-width: none;
  margin: 0 0 17px;
}
.converter-title {
  padding: 0;
  background: transparent;
  color: #091229;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 900;
}
.converter-actions { gap: 27px; }
.membership-link,
.history-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0;
  background: transparent;
  color: #091229;
  font-size: 14px;
  font-weight: 500;
}
.membership-link:hover,
.history-link:hover { color: #375ff5; }
.membership-diamond {
  display: grid;
  place-items: center;
  width: 18px;
  height: 15px;
  clip-path: polygon(17% 0, 83% 0, 100% 40%, 50% 100%, 0 40%);
  background: #d9dce2;
  color: #777e8c;
  font-size: 9px;
  font-weight: 900;
}
.history-link svg { width: 16px; height: 16px; }

.converter-view { color: #091229; }
.conversion-hero {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(270px, 1fr);
  gap: 20px;
}
.format-converter {
  position: relative;
  min-width: 0;
  min-height: 270px;
  overflow: hidden;
  border-radius: 30px;
  background: #e9f8ff;
}
.format-copy {
  position: relative;
  z-index: 3;
  width: 53%;
  padding: 31px 0 29px 30px;
}
.format-copy h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 500;
}
.format-copy p {
  margin: 0;
  color: #607496;
  font-size: 16px;
  line-height: 1.55;
}
.hero-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 119px;
  min-height: 48px;
  margin-top: 59px;
  padding: 0 17px;
  border-radius: 10px;
  background: #4775f9;
  color: #fff;
  font-size: 16px;
}
.hero-upload-button:hover { background: #3866ec; }
.hero-upload-button svg { width: 22px; height: 22px; }

.format-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.art-sheet {
  position: absolute;
  right: -28px;
  top: 4px;
  width: 252px;
  height: 160px;
  border-radius: 9px;
  transform: rotate(10deg);
  background: rgba(82, 126, 250, .18);
}
.art-sheet-one { right: -5px; top: 12px; background: rgba(77, 124, 252, .28); }
.art-sheet-two { right: 22px; top: 2px; background: rgba(67, 112, 240, .38); }
.art-report {
  position: absolute;
  left: 265px;
  bottom: -63px;
  display: grid;
  gap: 11px;
  width: 275px;
  height: 154px;
  padding: 18px;
  border: 1px solid #d7e5ff;
  border-radius: 16px 16px 0 0;
  transform: rotate(-10deg);
  background: #fff;
  color: #9cb4dc;
}
.art-report i { display: block; width: 68%; height: 10px; border-radius: 4px; background: #e9f6fd; }
.art-report i:nth-of-type(2) { width: 84%; }
.art-report i:nth-of-type(3) { width: 54%; }

.reference-drop-zone {
  position: absolute;
  z-index: 4;
  top: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 302px;
  min-height: 201px;
  margin: 0;
  padding: 22px;
  border: 1px dashed #84adff;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
}
.reference-drop-zone.dragging { background: #f4f8ff; border-color: #4775f9; }
.reference-drop-zone button {
  margin-top: 26px;
  color: #7089ff;
  font-size: 18px;
  font-weight: 500;
}
.reference-drop-zone p {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: #99a0af;
  font-size: 13px;
}
.reference-drop-zone p svg { width: 15px; height: 15px; color: #4775f9; }
.file-type-stack {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 48px;
  padding-left: 17px;
}
.file-type {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  margin-left: -7px;
  border-radius: 9px;
  box-shadow: 0 6px 12px rgba(75, 103, 173, .13);
  color: #fff;
  font-weight: 900;
}
.excel-type { transform: rotate(-3deg); background: #39c7a4; font-size: 19px; }
.word-type { transform: rotate(3deg); background: #5c9af5; font-size: 19px; }
.pdf-type { z-index: 2; transform: rotate(1deg); background: #fa625e; font-size: 16px; }
.image-type { transform: rotate(-6deg); background: #8d7ae8; }
.image-type svg { width: 25px; height: 25px; }

.hero-shortcuts { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.shortcut-card {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 125px;
  padding: 24px;
  border: 1px solid #d7e4f4;
  border-radius: 30px;
  color: #091229;
  text-align: left;
}
.speech-card { background: #eefaff; }
.pdf-card { border-color: #fae2dc; background: #fff9f7; }
.shortcut-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(35, 61, 100, .07); }
.shortcut-icon { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 30px; color: #2259ee; }
.pdf-card .shortcut-icon { color: #ee3044; }
.shortcut-icon svg { width: 24px; height: 24px; }
.shortcut-copy { display: grid; min-width: 0; margin-left: 7px; }
.shortcut-copy strong { font-size: 24px; line-height: 1.25; font-weight: 600; }
.shortcut-copy small { margin-top: 9px; color: #6b7790; font-size: 13px; white-space: nowrap; }
.shortcut-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  color: #091229;
}
.shortcut-arrow svg { width: 20px; height: 20px; }

.editing-tools { margin-top: 35px; }
.editing-tools h2,
.all-tools-section > h2 {
  margin: 0 0 14px 3px;
  font-size: 20px;
  font-weight: 500;
}
.editing-tool-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.editing-tool-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 49px;
  padding: 0 10px;
  border: 1px solid #e5e9f0;
  border-radius: 11px;
  background: #fff;
  color: #10182f;
  font-size: 16px;
  white-space: nowrap;
}
.editing-tool-list button:hover { border-color: #9cb5f7; color: #2e5fe5; }
.editing-tool-list svg { flex: 0 0 auto; width: 21px; height: 21px; color: #2449ad; }

.all-tools-section { margin-top: 35px; }
.all-tools-section .smart-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.all-tools-section .smart-tool-group {
  min-width: 0;
  min-height: 308px;
  overflow: hidden;
  border: 1px solid #e9ecf2;
  border-radius: 16px;
  background: #fff;
}
.all-tools-section .smart-tool-group-title {
  min-height: 64px;
  padding: 19px 18px 13px;
  background: linear-gradient(180deg, #f0f3ff 0%, #fff 100%);
}
.all-tools-section .smart-tool-group:nth-child(1) .smart-tool-group-title { color: #fa4050; }
.all-tools-section .smart-tool-group:nth-child(2) .smart-tool-group-title { color: #4b73ff; }
.all-tools-section .smart-tool-group:nth-child(3) .smart-tool-group-title { color: #4f32e7; }
.all-tools-section .smart-tool-group-title strong { font-size: 16px; font-weight: 600; }
.all-tools-section .smart-tool-group-title strong span { color: inherit; }
.all-tools-section .smart-tool-group-title strong { color: #091229; }
.all-tools-section .smart-tool-group:nth-child(1) .smart-tool-group-title strong span { color: #fa4050; }
.all-tools-section .smart-tool-group:nth-child(2) .smart-tool-group-title strong span { color: #4b73ff; }
.all-tools-section .smart-tool-group:nth-child(3) .smart-tool-group-title strong span { color: #4f32e7; }
.all-tools-section .smart-tool-group-icon { display: none; }
.all-tools-section .smart-tool-list { padding: 2px 18px 15px; }
.all-tools-section .smart-tool-row {
  min-height: 58px;
  padding: 7px 0;
  border: 0;
  background: #fff;
}
.all-tools-section .smart-tool-row:hover,
.all-tools-section .smart-tool-row.active { background: #f8faff; }
.all-tools-section .smart-tool-icon {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: transparent;
  color: #5667ee;
}
.all-tools-section .smart-tool-copy strong { font-size: 16px; font-weight: 500; }
.all-tools-section .smart-tool-copy small { display: none; }
.all-tools-section .smart-tool-arrow { font-size: 0; }
.all-tools-section .smart-tool-arrow::after { content: "›"; font-size: 27px; font-weight: 300; color: #1b263d; }

.active-conversion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 20px;
  margin: 0;
}
.active-conversion-panel.open { display: grid; }
.active-conversion-panel .work-panel,
.active-conversion-panel .task-panel { border-color: #e4e9f2; border-radius: 12px; }

.conversion-dialog {
  width: min(1000px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  color: #091229;
}
.conversion-dialog::backdrop { background: rgba(8, 17, 37, .46); }
.conversion-dialog-shell { display: grid; max-height: calc(100vh - 30px); }
.conversion-dialog .active-conversion-panel { padding: 16px; overflow: auto; }
.conversion-dialog .work-panel,
.conversion-dialog .task-panel { min-width: 0; background: #fff; }
.conversion-dialog .task-panel { max-height: 560px; overflow: auto; }
.conversion-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.conversion-facts span {
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f3f6fb;
  color: #5e6a80;
  font-size: 11px;
}
.conversion-facts .fact-emphasis {
  flex-basis: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}
.add-files-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 1px dashed #9cb5f7;
  border-radius: 8px;
  background: #f8faff;
  color: #315fdb;
  font-weight: 700;
}
.add-files-button svg { width: 18px; height: 18px; }
.task-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #4775f9;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.task-download:hover { background: #3866ec; }
.task-download svg { width: 15px; height: 15px; }

.tts-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  color: #091229;
}
.tts-dialog::backdrop { background: rgba(8, 17, 37, .46); }
.tts-dialog-shell { margin: 0; }
.tts-body { padding: 20px; }
.tts-text-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.tts-body textarea { min-height: 158px; border-color: #dfe5ef; border-radius: 8px; line-height: 1.7; }
.tts-options { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-top: 15px; }
.tts-options label { display: grid; gap: 8px; color: #606b82; font-size: 12px; font-weight: 700; }
.tts-options label > span { display: flex; justify-content: space-between; gap: 8px; }
.tts-options input[type="range"] { min-height: 38px; padding: 0; border: 0; box-shadow: none; }
.tts-status { min-height: 22px; margin: 14px 0 0; color: #69758c; font-size: 13px; }
.tts-actions { display: flex; justify-content: flex-end; gap: 10px; }
.tts-actions .primary-button { width: auto; margin: 0; }
.tts-actions svg { width: 18px; height: 18px; }
.tts-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #f8faff;
}
.tts-result audio { width: 100%; min-width: 0; height: 40px; }
.tts-result .ghost-button { min-height: 40px; }

@media (max-width: 960px) {
  body:not(.admin-route) .main { padding-right: 24px; padding-left: 24px; }
  .conversion-hero { grid-template-columns: 1fr; }
  .hero-shortcuts { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .reference-drop-zone { width: 43%; }
  .editing-tool-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body:not(.admin-route) .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: block;
    width: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid #e4e9f2;
    background: #fff;
  }
  body:not(.admin-route) .sidebar .brand,
  body:not(.admin-route) .sidebar .sidebar-note,
  body:not(.admin-route) .sidebar .sidebar-footer { display: none; }
  body:not(.admin-route) .sidebar .nav { grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
  body:not(.admin-route) .sidebar .nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    padding: 4px;
    font-size: 10px;
  }
  body:not(.admin-route) .sidebar .nav-icon { width: 21px; height: 21px; }
  body:not(.admin-route) .main { padding: 12px 16px 30px; }
  .converter-topbar { align-items: flex-start; margin-bottom: 14px; }
  .converter-title { font-size: 20px; }
  .converter-actions { gap: 14px; }
  .membership-link { display: none; }
  .history-link { min-height: 28px; font-size: 13px; }
  .format-converter { min-height: 366px; border-radius: 20px; }
  .format-copy { width: 100%; padding: 24px 22px; }
  .format-copy h1 { font-size: 27px; }
  .format-copy p { font-size: 14px; }
  .hero-upload-button { margin-top: 20px; }
  .format-art { opacity: .65; }
  .art-report { left: -20px; bottom: -76px; }
  .reference-drop-zone {
    top: auto;
    right: 18px;
    bottom: 18px;
    left: 18px;
    width: auto;
    min-height: 152px;
  }
  .hero-shortcuts { grid-template-columns: 1fr; gap: 12px; }
  .shortcut-card { min-height: 108px; padding: 20px; border-radius: 20px; }
  .shortcut-copy strong { font-size: 21px; }
  .shortcut-copy small { white-space: normal; line-height: 1.45; }
  .editing-tools, .all-tools-section { margin-top: 27px; }
  .editing-tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editing-tool-list button { justify-content: flex-start; padding-left: 18px; }
  .all-tools-section .smart-tools-grid { grid-template-columns: 1fr; gap: 12px; }
  .all-tools-section .smart-tool-group { min-height: 0; border-radius: 12px; }
  .active-conversion-panel { grid-template-columns: 1fr; }
  .conversion-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .conversion-dialog-shell { max-height: calc(100vh - 18px); }
  .conversion-dialog .active-conversion-panel { padding: 10px; }
  .conversion-dialog .task-panel { max-height: none; }
  .tts-options { grid-template-columns: 1fr; }
  .tts-result { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .converter-actions { gap: 8px; }
  .editing-tool-list { grid-template-columns: 1fr; }
}

/* Unified tools, account and dialog experience */
.tool-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.tool-section-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.category-route-nav { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.category-route-nav::-webkit-scrollbar { display: none; }
.category-route-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #e1e7f1;
  border-radius: 8px;
  background: #fff;
  color: #536077;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.category-route-nav a:hover,
.category-route-nav a.active { border-color: #6e91f6; background: #f2f6ff; color: #285bdc; }
.group-route-link { margin-left: auto; color: #5b6b86; font-size: 12px; text-decoration: none; }
.group-route-link:hover { color: #315fdb; }
.all-tools-section .smart-tool-group:nth-child(4) .smart-tool-group-title strong span { color: #138a77; }
.all-tools-section .smart-tool-group:nth-child(5) .smart-tool-group-title strong span { color: #e17818; }

.tool-options { display: grid; gap: 10px; margin-top: 12px; }
.tool-options label { display: grid; gap: 6px; color: #5d6980; font-size: 12px; font-weight: 700; }
.tool-options input { min-height: 42px; border-color: #dfe5ef; border-radius: 8px; }
.image-resize-options { display: grid; gap: 11px; }
.dimension-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-option {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #f7fbfa;
  color: #40544e !important;
}
.check-option input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }

.segmented-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.verification-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.verification-field .ghost-button { min-width: 116px; }
.form-status { min-height: 20px; margin: 8px 0 0; color: #a66b12; font-size: 12px; line-height: 1.5; }

#accountView { max-width: 1240px; }
#accountView .section-head { margin: 10px 0 20px; }
.account-layout { grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 18px; }
.auth-panel,
.profile-panel {
  border-color: #e1e7f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(40, 64, 108, .05);
}
.auth-panel { padding: 24px; background: #fbfdff; }
.profile-panel { padding: 22px; }
.membership-panel { grid-column: 2; }
.member-plans { gap: 12px; }
.member-plan-card {
  position: relative;
  min-height: 260px;
  padding: 18px;
  border-color: #dde5f1;
  border-radius: 10px;
  background: #fff;
}
.member-plan-card:nth-child(2) { border-color: #82a0f4; box-shadow: inset 0 3px 0 #4d76ef; }
.member-plan-card > div:first-child strong { font-size: 17px; }
.member-plan-card > div:first-child small { color: #315fdb; font-weight: 800; }
.member-plan-card p { min-height: 52px; color: #69758c; font-size: 12px; line-height: 1.6; }
.member-plan-meta { display: grid; gap: 7px; }
.member-plan-meta span { padding: 0; background: transparent; color: #66738a; font-size: 11px; }
.member-plan-meta span:first-child { margin-bottom: 3px; background: transparent; color: #ec4e58; font-size: 24px; }
.member-plan-card .primary-button { margin-top: auto; }
.member-orders { overflow: hidden; border-color: #e1e7f0; border-radius: 9px; }

.tool-dialog,
.conversion-dialog,
.tts-dialog,
.confirm-dialog {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  background: #fff;
  color: #091229;
  box-shadow: 0 22px 70px rgba(8, 17, 37, .18);
}
.tool-dialog::backdrop,
.conversion-dialog::backdrop,
.tts-dialog::backdrop,
.confirm-dialog::backdrop { background: rgba(8, 17, 37, .46); backdrop-filter: blur(3px); }
.dialog-head { min-height: 72px; padding: 15px 20px; border-color: #e6eaf1; background: #fbfcff; }
.dialog-head .dialog-icon { width: 40px; height: 40px; border-radius: 9px; background: #4d76ef; }
.dialog-head .eyebrow { color: #5d79cf; }
.tool-dialog { width: min(1040px, calc(100vw - 28px)); }
.tool-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-height: calc(100vh - 104px); padding: 20px; }
.tool-group {
  padding: 16px;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
  background: #fff;
}
.tool-group[data-muted="true"] { opacity: .62; }
.tool-group h3 { margin-bottom: 12px; color: #17243c; font-size: 14px; }
.tool-grid { gap: 8px; }
.tool-grid button { display: flex; align-items: center; gap: 9px; min-height: 66px; padding: 9px 10px; border-color: #e5eaf2; border-radius: 8px; }
.tool-grid button:hover,
.tool-grid button.active { border-color: #7897ee; background: #f4f7ff; }
.tool-grid .mini-icon { width: 34px; height: 34px; border-radius: 7px; background: #eef3ff; color: #4168dd; }
.tool-grid strong { font-size: 13px; }
.tool-grid small { font-size: 10px; }

.confirm-dialog { width: min(460px, calc(100vw - 28px)); }
.confirm-dialog-shell { margin: 0; }
.confirm-dialog-shell > p { margin: 0; padding: 24px 22px 6px; color: #5d6980; font-size: 14px; line-height: 1.7; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 22px; }
.confirm-actions .primary-button { width: auto; margin: 0; }
.confirm-actions .primary-button.danger { border: 0; background: #d94c5d; color: #fff; }

.admin-login { grid-template-columns: minmax(180px, 1fr) minmax(180px, .8fr) minmax(180px, .8fr); max-width: 1040px; align-items: center; border-radius: 12px; box-shadow: 0 16px 48px rgba(16, 42, 37, .08); }
.admin-login > .primary-button { justify-self: end; }
.admin-captcha-row { display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 8px; grid-column: 1 / -1; padding: 10px; border: 1px solid #dfe6ee; border-radius: 9px; background: #f7faf9; }
.admin-captcha-row strong { min-width: 120px; color: #235b51; font-size: 15px; text-align: center; }
.sms-readiness { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #f0d5a9; border-radius: 8px; background: #fff9ee; color: #8a5d16; }
.sms-readiness.ready { border-color: #bfe5da; background: #f0faf7; color: #08796f; }
.sms-readiness svg { width: 22px; height: 22px; flex: 0 0 auto; }
.sms-readiness span { display: grid; gap: 3px; }
.sms-readiness small { line-height: 1.5; }
.payment-config-layout { display: grid; gap: 18px; }
.payment-channel-card { padding: 20px; border: 1px solid #d9ebe6; border-radius: 12px; background: #fbfefd; }
.payment-channel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.payment-channel-head h3 { margin: 4px 0 6px; color: var(--ink); font-size: 19px; }
.payment-channel-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.payment-channel-head .switch-row { flex: 0 0 auto; }
.fixed-payment-route { display: grid; gap: 7px; min-width: 0; padding: 11px 12px; border: 1px solid #dfece8; border-radius: 8px; background: #f4faf8; color: #52645f; font-size: 13px; font-weight: 800; }
.fixed-payment-route code { overflow-wrap: anywhere; color: #08796f; font-size: 13px; font-weight: 700; }
.payment-key-helper { display: grid; gap: 9px; padding: 14px; border: 1px solid #cfe3dd; border-radius: 10px; background: #f4faf8; }
.payment-key-helper > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-key-helper > div > span { color: #345d55; font-size: 13px; font-weight: 900; }
.payment-key-helper textarea { min-height: 104px; resize: vertical; background: #fff; color: #36544e; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.55; }
.payment-key-helper p { margin: 0; color: #697c76; font-size: 12px; line-height: 1.65; }
.payment-live-test { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px dashed #cbded9; border-radius: 10px; background: #fff; }
.payment-live-test > span { color: #667b75; font-size: 13px; line-height: 1.55; }
.payment-live-test > span.success { color: #08796f; font-weight: 800; }
.payment-live-test > span.failed { color: #a64636; font-weight: 800; }
.payment-config-layout > .primary-button { justify-self: start; min-width: 160px; }

@media (max-width: 960px) {
  .tool-section-head { align-items: flex-start; flex-direction: column; }
  .category-route-nav { width: 100%; }
  .account-layout { grid-template-columns: 1fr; }
  .membership-panel { grid-column: 1; }
  .admin-login { grid-template-columns: 1fr 1fr; }
  .payment-channel-head { align-items: stretch; flex-direction: column; }
  .payment-channel-head .switch-row { align-self: flex-start; }
  .payment-live-test { align-items: stretch; flex-direction: column; }
}

@media (max-width: 720px) {
  .tool-section-head { gap: 10px; }
  .category-route-nav { margin: 0 -16px; width: calc(100% + 32px); padding: 0 16px 3px; }
  .category-route-nav a { min-height: 34px; padding: 7px 11px; font-size: 12px; }
  .all-tools-section .smart-tool-group-title { gap: 8px; }
  .group-route-link { font-size: 11px; }
  .account-layout { gap: 12px; }
  .auth-panel, .profile-panel { padding: 16px; border-radius: 10px; }
  .member-plans { grid-template-columns: 1fr; }
  .member-plan-card { min-height: 0; }
  .verification-field { grid-template-columns: minmax(0, 1fr) 105px; }
  .verification-field .ghost-button { min-width: 0; padding: 0 8px; }
  .tool-groups { grid-template-columns: 1fr; gap: 10px; padding: 10px; }
  .tool-group { padding: 12px; }
  .tool-grid { grid-template-columns: 1fr; }
  .dialog-head { min-height: 64px; padding: 12px; }
  .confirm-dialog-shell > p { padding: 20px 16px 4px; }
  .confirm-actions { padding: 16px; }
  .admin-login { grid-template-columns: 1fr; }
  .admin-login > .primary-button { width: 100%; }
  .admin-captcha-row { grid-template-columns: 1fr auto; }
  .admin-captcha-row strong { grid-column: 1 / -1; }
  .payment-channel-card { padding: 16px; }
  .payment-channel-head h3 { font-size: 18px; }
  .payment-channel-head p,
  .fixed-payment-route,
  .fixed-payment-route code { font-size: 14px; }
  .payment-config-layout > .primary-button { width: 100%; }
}

/* Membership, authentication and download-first flow */
#accountView { max-width: 1180px; padding-bottom: 40px; }
.member-summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: center;
  margin: 10px 0 22px;
  padding: 30px 34px;
  border: 1px solid #cde8e1;
  border-radius: 8px;
  background: #fff;
}
.member-summary-band.account-only {
  display: block;
  margin: 4px 0 24px;
  padding: 0;
  background: transparent;
}
.member-summary-band.account-only .member-account-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  padding: 18px 22px;
  border-top: 0;
  border-left: 4px solid var(--brand);
}
.member-summary-band.account-only .member-account-status > span,
.member-summary-band.account-only .member-account-status > strong,
.member-summary-band.account-only .member-account-status > p { grid-column: 1; }
.member-summary-band.account-only .member-account-status > p { margin-bottom: 0; }
.member-summary-band.account-only .member-account-actions { grid-column: 2; grid-row: 1 / span 3; }
.member-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}
.member-summary-copy h1 { margin: 14px 0 9px; font-size: 30px; line-height: 1.25; }
.member-summary-copy > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.member-benefits { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.member-benefits span { display: inline-flex; align-items: center; gap: 6px; color: #40544e; font-size: 12px; font-weight: 800; }
.member-benefits i { display: grid; place-items: center; width: 20px; height: 20px; color: var(--brand-dark); }
.member-benefits svg { width: 17px; height: 17px; }
.member-account-status { min-width: 0; padding: 20px; border-left: 3px solid var(--brand); background: #f3fbf9; }
.member-account-status > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.member-account-status > strong { display: block; margin-top: 7px; font-size: 19px; }
.member-account-status > p { margin: 8px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.member-account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.member-account-actions .primary-button { width: auto; margin: 0; }

.membership-products,
.membership-orders { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.membership-orders { margin-top: 16px; }
.membership-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.membership-section-head h2 { margin: 4px 0 0; font-size: 21px; }
.membership-section-head > p { margin: 0; color: var(--muted); font-size: 12px; }
.member-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.member-plan-card {
  min-height: 292px;
  padding: 18px;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.member-plan-card:nth-child(2) { border-color: #dce7e3; box-shadow: none; }
.member-plan-card.featured { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.member-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.member-plan-head strong { font-size: 17px; }
.member-plan-badge { padding: 4px 7px; border-radius: 4px; background: #fff4d8; color: #8d6208; font-size: 10px; font-weight: 900; }
.member-plan-price { display: flex; align-items: baseline; margin-top: 16px; color: #102a25; }
.member-plan-price > span { margin-right: 2px; font-size: 15px; font-weight: 900; }
.member-plan-price > strong { font-size: 32px; line-height: 1; }
.member-plan-price > small { margin-left: 6px; color: var(--muted); font-size: 10px; }
.member-plan-card > p { min-height: 40px; margin: 13px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.member-plan-features { display: grid; gap: 7px; margin: 0 0 16px; padding: 0; list-style: none; }
.member-plan-features li { display: flex; align-items: center; gap: 6px; color: #42564f; font-size: 11px; }
.member-plan-features li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.member-plan-card .primary-button { margin-top: auto; }
.member-plan-card .renewal-note { margin: -7px 0 12px; }
.member-orders { margin: 0; border-radius: 6px; }

.auth-dialog { width: min(480px, calc(100vw - 24px)); padding: 0; border: 1px solid #dbe8e4; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(10, 42, 35, .2); }
.auth-dialog::backdrop { background: rgba(10, 35, 30, .48); backdrop-filter: blur(3px); }
.auth-dialog .auth-panel { display: block; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.auth-dialog-body { padding: 20px; }
.auth-download-note { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: #31534a; font-size: 12px; line-height: 1.55; }
.auth-dialog .segmented-small { margin-bottom: 16px; }
.auth-dialog .auth-panel label + label { margin-top: 11px; }
.auth-dialog .primary-button { margin-top: 10px; }

.tool-dialog,
.conversion-dialog,
.tts-dialog,
.confirm-dialog { border-color: #dbe8e4; border-radius: 8px; box-shadow: 0 22px 64px rgba(10, 42, 35, .18); }
.tool-dialog::backdrop,
.conversion-dialog::backdrop,
.tts-dialog::backdrop,
.confirm-dialog::backdrop { background: rgba(10, 35, 30, .48); }
.dialog-head { background: #fbfdfc; border-color: #e1ebe8; }
.dialog-head .dialog-icon { border-radius: 7px; background: var(--brand); }
.dialog-head .eyebrow { color: var(--brand-dark); }
.tool-group { border-color: #e0eae7; border-radius: 8px; }
.tool-grid button { border-color: #e1ebe8; border-radius: 7px; }
.tool-grid button:hover,
.tool-grid button.active { border-color: var(--brand); background: var(--brand-soft); }
.tool-grid .mini-icon { background: var(--brand-soft); color: var(--brand-dark); }
.category-route-nav a:hover,
.category-route-nav a.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.group-route-link:hover { color: var(--brand-dark); }
.add-files-button { border-color: #8ed8c8; background: #f5fcfa; color: var(--brand-dark); }
.task-download { background: var(--brand-dark); }
.task-download:hover { background: #05655d; }
.tts-options select { min-height: 44px; }
.tts-result .ghost-button { min-width: 124px; }

@media (max-width: 900px) {
  .member-summary-band { grid-template-columns: 1fr; gap: 20px; }
  .member-account-status { border-left: 0; border-top: 3px solid var(--brand); }
  .member-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .member-summary-band.account-only { padding: 0; }
  .member-summary-band.account-only .member-account-status { display: block; padding: 17px 16px; }
  .member-summary-band.account-only .member-account-actions { margin-top: 14px; }
  #accountView { padding-bottom: 24px; }
  .member-summary-band { margin-top: 0; padding: 20px 16px; border-right: 0; border-left: 0; }
  .member-summary-copy h1 { font-size: 23px; }
  .member-benefits { display: grid; gap: 10px; }
  .member-account-status { padding: 16px; }
  .membership-products,
  .membership-orders { padding: 18px 14px; border-right: 0; border-left: 0; }
  .membership-section-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .member-plans { grid-template-columns: 1fr; }
  .member-plan-card { min-height: 0; }
  .auth-dialog-body { padding: 16px; }
}

/* Mobile browser stability and touch ergonomics */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
.app-shell { min-height: 100dvh; }
.tool-dialog,
.conversion-dialog,
.tts-dialog,
.auth-dialog,
.confirm-dialog { max-height: calc(100dvh - 24px); }
.tool-groups { max-height: calc(100dvh - 104px); }
.conversion-dialog-shell { max-height: calc(100dvh - 26px); }
.tts-dialog-shell,
.auth-dialog .auth-panel,
.confirm-dialog-shell { max-height: calc(100dvh - 24px); }
.tts-body,
.auth-dialog-body { overflow-y: auto; overscroll-behavior: contain; }

@media (max-width: 720px) {
  body:not(.admin-route) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  body:not(.admin-route) .main {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 24px;
    padding-left: max(12px, env(safe-area-inset-left));
  }
  body:not(.admin-route) .sidebar {
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
  }
  input:not([type="checkbox"]):not([type="range"]),
  select,
  textarea { font-size: 16px; }
  .converter-topbar { align-items: center; }
  .converter-title { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .category-route-nav {
    width: calc(100% + 24px);
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }
  .history-link,
  .hero-upload-button,
  .add-files-button,
  .primary-button,
  .ghost-button,
  .text-button,
  .icon-button,
  .category-route-nav a { min-height: 44px; }
  .reference-drop-zone { padding: 16px 12px; }
  .reference-drop-zone button { margin-top: 18px; font-size: 16px; }
  .all-tools-section { margin-top: 24px; }
  .all-tools-section .smart-tool-list { padding-right: 12px; padding-left: 12px; }
  .all-tools-section .smart-tool-row { min-height: 60px; }
  .tool-dialog,
  .conversion-dialog,
  .tts-dialog,
  .auth-dialog,
  .confirm-dialog {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto;
  }
  .tool-groups { max-height: calc(100dvh - 80px); }
  .conversion-dialog-shell,
  .tts-dialog-shell,
  .auth-dialog .auth-panel,
  .confirm-dialog-shell { max-height: calc(100dvh - 16px); }
  .conversion-dialog .active-conversion-panel { overscroll-behavior: contain; }
  .tts-actions { position: sticky; bottom: 0; padding-top: 10px; background: #fff; }
  .dimension-fields { grid-template-columns: 1fr; }
  .toast {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    max-width: none;
    bottom: calc(76px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 390px) {
  .format-copy { padding-right: 16px; padding-left: 16px; }
  .shortcut-card { padding-right: 16px; padding-left: 16px; }
  .shortcut-copy strong { font-size: 19px; }
  .tool-section-head h2 { font-size: 18px; }
}

/* Account conversion and readability */
#accountView { max-width: 1260px; }
.member-summary-band {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 42px;
  margin-top: 4px;
  padding: 38px 40px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: #f3fbf9;
}
.member-kicker { min-height: 32px; padding: 0 12px; font-size: 14px; }
.member-summary-copy h1 { margin: 16px 0 12px; font-size: 36px; line-height: 1.25; }
.member-summary-copy > p { max-width: 720px; font-size: 16px; line-height: 1.75; }
.member-benefits { gap: 22px; margin-top: 23px; }
.member-benefits span { gap: 8px; font-size: 14px; font-weight: 500; }
.member-benefits span strong { font-weight: 900; }
.member-benefits i { width: 24px; height: 24px; }
.member-benefits svg { width: 20px; height: 20px; }
.member-account-status { padding: 24px; border-left-width: 4px; }
.member-status-label { font-size: 14px !important; }
.member-account-status > strong { margin-top: 9px; font-size: 24px; }
.member-account-status > p { margin: 10px 0 18px; font-size: 15px; line-height: 1.65; }
.member-account-actions .primary-button,
.member-account-actions .ghost-button { min-height: 46px; padding: 0 18px; font-size: 14px; }

.membership-products { padding: 14px 0 0; border: 0; background: transparent; }
.membership-section-head { align-items: center; margin-bottom: 22px; }
.membership-section-head .eyebrow { font-size: 14px; }
.membership-section-head h2 { margin-top: 6px; font-size: 28px; }
.membership-section-head > p { font-size: 14px; }
.membership-section-head > p.unavailable { color: #8a5b00; font-weight: 800; }
.member-plans { gap: 16px; }
.member-plan-card {
  position: relative;
  min-height: 390px;
  padding: 24px;
  border-width: 1px;
  box-shadow: 0 10px 28px rgba(16, 42, 37, .05);
}
.member-plan-card.featured {
  border: 2px solid var(--brand);
  box-shadow: 0 14px 34px rgba(8, 121, 111, .12);
}
.member-plan-card.trial:not(.featured) { background: #fcfffe; }
.member-plan-card.unavailable { border-style: dashed; background: #f7f9f8; box-shadow: none; }
.member-plan-card.unavailable .member-plan-price,
.member-plan-card.unavailable .member-plan-unit,
.member-plan-card.unavailable > p,
.member-plan-card.unavailable .member-plan-features { opacity: .72; }
.member-plan-card.unavailable .member-plan-badge { background: #e9efed; color: #52645f; }
.member-plan-card.unavailable .member-plan-action:disabled { background: #aebdb8; color: #fff; opacity: 1; cursor: not-allowed; }
.member-plan-recommend {
  position: absolute;
  top: -13px;
  left: 22px;
  min-height: 26px;
  padding: 5px 11px;
  border-radius: 4px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.member-plan-card.featured .member-plan-head { margin-top: 8px; }
.member-plan-head strong { font-size: 21px; }
.member-plan-badge { padding: 5px 9px; font-size: 14px; }
.member-plan-price { margin-top: 20px; }
.member-plan-price > span { font-size: 20px; }
.member-plan-price > strong { font-size: 43px; }
.member-plan-price > small { margin-left: 9px; font-size: 14px; }
.member-plan-unit { margin-top: 8px; color: var(--brand-dark); font-size: 14px; font-weight: 800; }
.member-plan-card > p { min-height: 48px; margin: 16px 0; font-size: 14px; line-height: 1.7; }
.member-plan-features { gap: 10px; margin-bottom: 18px; }
.member-plan-features li { gap: 9px; font-size: 14px; }
.member-plan-features li::before { width: 7px; height: 7px; }
.member-plan-renewal { min-height: 44px; padding: 10px 12px; border-left: 3px solid #b7d7cf; background: #f5f9f8; color: #52645f; font-size: 14px; line-height: 1.55; }
.member-plan-renewal.auto-renew { border-left-color: #d7a437; background: #fff9ec; color: #795514; }
.member-plan-card .member-plan-action { min-height: 50px; margin-top: 18px; font-size: 15px; }
.member-assurance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.member-assurance span { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 10px 12px; border-top: 1px solid var(--line); color: #52645f; font-size: 14px; }
.member-assurance i { display: grid; place-items: center; color: var(--brand-dark); }
.member-assurance svg { width: 19px; height: 19px; }
.membership-orders { margin-top: 30px; padding: 24px 0; border-right: 0; border-left: 0; border-radius: 0; }
.member-order-row { min-height: 56px; font-size: 14px; }
.member-order-row strong { font-size: 14px; }
.member-order-row small { font-size: 14px; }

@media (max-width: 900px) {
  .member-summary-band { grid-template-columns: 1fr; gap: 24px; }
  .member-account-status { border-top: 0; border-left: 4px solid var(--brand); }
}

@media (max-width: 640px) {
  .member-summary-band { padding: 26px 16px; }
  .member-summary-copy h1 { font-size: 28px; }
  .member-summary-copy > p { font-size: 15px; }
  .member-benefits { gap: 13px; }
  .member-benefits span { font-size: 14px; }
  .member-account-status { padding: 19px 16px; }
  .membership-products { padding-top: 8px; }
  .membership-section-head h2 { font-size: 24px; }
  .membership-section-head > p { font-size: 14px; }
  .member-plan-card { min-height: 0; padding: 22px 18px; }
  .member-plan-head strong { font-size: 20px; }
  .member-plan-price > strong { font-size: 40px; }
  .member-plan-card > p,
  .member-plan-features li { font-size: 14px; }
  .member-assurance { grid-template-columns: 1fr; gap: 0; }
  .membership-orders { padding-right: 0; padding-left: 0; }
}

@media (max-width: 720px) {
  body:not(.admin-route) .sidebar .nav-item { font-size: 14px; }
  .history-link { font-size: 14px; }
}

/* Membership recharge and Alipay checkout */
.payment-result-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid #bfe7dd;
  border-radius: 12px;
  background: #effbf8;
  box-shadow: 0 10px 26px rgba(8, 121, 111, .07);
}
.payment-result-banner > div { flex: 1; min-width: 0; }
.payment-result-banner strong { display: block; color: var(--brand-dark); font-size: 16px; }
.payment-result-banner p { margin: 4px 0 0; color: #52716a; font-size: 13px; line-height: 1.55; }
.payment-result-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; }
.payment-result-icon svg { width: 21px; height: 21px; }

.member-summary-band {
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 5%, rgba(120, 228, 208, .30), transparent 32%),
    linear-gradient(135deg, #f2fcf9 0%, #f9fffd 58%, #edf9f6 100%);
}
.member-account-status { border-radius: 10px; box-shadow: 0 10px 28px rgba(8, 121, 111, .07); }
.member-plan-card { border-radius: 14px; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.member-plan-card:not(.unavailable):hover { transform: translateY(-3px); border-color: #91d9c9; box-shadow: 0 16px 36px rgba(8, 121, 111, .10); }
.member-plan-card.featured:hover { border-color: var(--brand); box-shadow: 0 18px 42px rgba(8, 121, 111, .16); }
.member-plan-card .member-plan-action { border-radius: 9px; }
.member-plan-renewal { border-radius: 0 8px 8px 0; }
.member-assurance span { border-radius: 8px; background: #f8fbfa; }

.member-payment-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.member-payment-guide > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px 16px; background: #fff; }
.member-payment-guide b { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; }
.member-payment-guide span { display: grid; gap: 3px; min-width: 0; }
.member-payment-guide strong { font-size: 14px; }
.member-payment-guide small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.payment-readiness {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px solid #f0d6aa;
  border-radius: 9px;
  background: #fff9ed;
  color: #805b1e;
}
.payment-readiness.ready { border-color: #bce6dc; background: #effbf8; color: var(--brand-dark); }
.payment-readiness.failed { border-color: #f0d6aa; background: #fff9ed; color: #805b1e; }
.payment-readiness > svg { flex: 0 0 auto; width: 21px; height: 21px; }
.payment-readiness > span { display: grid; gap: 3px; min-width: 0; }
.payment-readiness strong { font-size: 13px; }
.payment-readiness small { font-size: 12px; line-height: 1.5; }

@media (max-width: 640px) {
  .payment-result-banner { align-items: flex-start; margin-right: -2px; margin-left: -2px; padding: 13px; }
  .payment-result-icon { width: 34px; height: 34px; }
  .member-payment-guide { grid-template-columns: 1fr; }
  .member-payment-guide > div { min-height: 70px; }
}

/* APP download entry: one data-driven link is rendered in the header and sidebar. */
.app-download-link:focus-visible {
  outline: 3px solid rgba(25, 188, 156, .26);
  outline-offset: 2px;
}
.sidebar-note.app-download-link {
  gap: 10px;
  padding: 11px 12px;
  border-color: #bde9df;
  background: #f1fbf8;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.sidebar-note.app-download-link:hover {
  border-color: var(--brand);
  background: #e8faf5;
  transform: translateY(-1px);
}
.sidebar-note .note-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
}
.sidebar-note .note-icon svg { width: 17px; height: 17px; }
.app-download-copy { display: grid; gap: 2px; min-width: 0; }
.app-download-copy strong { font-size: 13px; line-height: 1.2; }
.app-download-copy small { color: #5c7b73; font-size: 10px; line-height: 1.2; font-weight: 700; }
.app-download-arrow { display: grid; place-items: center; margin-left: auto; color: #4d8275; }
.app-download-arrow svg { width: 16px; height: 16px; }
.top-app-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(8, 121, 111, .16);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.top-app-download:hover {
  border-color: #13a98c;
  background: #13a98c;
  color: #fff;
  box-shadow: 0 5px 12px rgba(8, 121, 111, .22);
  transform: translateY(-1px);
}
.top-app-download svg { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .converter-actions { gap: 9px; }
  .top-app-download {
    min-width: 38px;
    min-height: 38px;
    padding: 0 10px;
  }
  .top-app-download span:last-child { display: none; }
  .top-app-download svg { width: 18px; height: 18px; }
}

@media (max-width: 720px) {
  .history-link { display: none !important; }
  .converter-actions { gap: 6px; }
  .top-app-download { min-width: 0; padding: 0 11px; font-size: 13px; box-shadow: none; }
  .top-app-download span:first-child { display: none !important; }
  .top-app-download span:last-child { display: inline !important; }
  .membership-link { display: inline-flex !important; min-height: 38px; max-width: 118px; padding: 0 11px; border: 1px solid #b8ddd5; border-radius: 8px; background: #fff; color: var(--brand-dark); font-size: 13px; }
  .membership-link .membership-diamond { display: none; }
  #membershipText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 2026-08 admin comfort redesign
   The admin console intentionally has its own larger type scale and spacing. */
body.admin-route {
  --admin-bg: #f3f7f6;
  --admin-panel: #ffffff;
  --admin-panel-soft: #f8fbfa;
  --admin-line: #d9e6e2;
  --admin-text: #17342d;
  --admin-muted: #62776f;
  min-width: 320px;
  background:
    radial-gradient(circle at 92% 0, rgba(25, 188, 156, .08), transparent 27rem),
    var(--admin-bg);
  color: var(--admin-text);
  font-size: 16px;
  line-height: 1.6;
}

body.admin-route .admin-page { min-height: 100dvh; }
body.admin-route .admin-hero {
  min-height: 116px;
  padding: 24px clamp(24px, 3vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  background:
    radial-gradient(circle at 82% -90%, rgba(58, 218, 184, .28), transparent 46%),
    linear-gradient(118deg, #0d2b25 0%, #123b33 58%, #0c302a 100%);
  box-shadow: 0 10px 30px rgba(12, 48, 42, .12);
}
body.admin-route .admin-hero .eyebrow {
  color: #62ddc6;
  font-size: 12px;
  letter-spacing: .1em;
}
body.admin-route .admin-hero h1 {
  margin: 4px 0 2px;
  color: #fff;
  font-size: clamp(28px, 2.3vw, 36px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
body.admin-route .admin-hero p {
  max-width: 760px;
  color: #c3d7d1;
  font-size: 15px;
  line-height: 1.7;
}
body.admin-route .admin-actions { gap: 10px; }
body.admin-route .admin-actions .ghost-button {
  min-height: 44px;
  padding: 0 17px;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(8px);
}
body.admin-route .admin-actions .ghost-button:hover {
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

body.admin-route .admin-login {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(760px, calc(100% - 32px));
  max-width: none;
  margin: clamp(38px, 8vh, 82px) auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 60px rgba(16, 57, 49, .10);
}
body.admin-route .admin-login > div:first-child { grid-column: 1 / -1; }
body.admin-route .admin-login .eyebrow { font-size: 12px; letter-spacing: .08em; }
body.admin-route .admin-login h2 {
  margin: 6px 0 2px;
  font-size: 27px;
  line-height: 1.3;
}
body.admin-route .admin-login > input {
  min-height: 54px;
  padding: 0 15px;
  font-size: 16px;
}
body.admin-route .admin-captcha-row {
  grid-column: 1 / -1;
  grid-template-columns: minmax(145px, auto) minmax(120px, 1fr) auto;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px;
  border-color: var(--admin-line);
  border-radius: 12px;
  background: var(--admin-panel-soft);
}
body.admin-route .admin-captcha-row strong { font-size: 18px; }
body.admin-route .admin-captcha-row input { min-height: 48px; font-size: 16px; }
body.admin-route .admin-login > .primary-button {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

body.admin-route .admin-dashboard {
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: calc(100dvh - 116px);
}
body.admin-route .admin-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  padding: 24px 16px;
  overflow-y: auto;
  border-color: var(--admin-line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 8px 0 24px rgba(19, 57, 49, .035);
  scrollbar-width: thin;
}
body.admin-route .admin-rail-title {
  gap: 4px;
  padding: 5px 12px 18px;
}
body.admin-route .admin-rail-title strong { color: var(--admin-text); font-size: 17px; }
body.admin-route .admin-rail-title small { color: var(--admin-muted); font-size: 13px; }
body.admin-route .admin-rail button {
  position: relative;
  gap: 1px;
  min-height: 64px;
  margin: 3px 0;
  padding: 10px 15px 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #526a63;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}
body.admin-route .admin-rail button::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 7px;
  width: 3px;
  border-radius: 99px;
  background: transparent;
}
body.admin-route .admin-rail button:hover {
  border-color: #d9eee9;
  background: #f5faf8;
  color: var(--admin-text);
  transform: translateX(2px);
}
body.admin-route .admin-rail button.active {
  border-color: #bce6dc;
  background: linear-gradient(120deg, #e9faf6, #f5fcfa);
  color: #08796f;
  box-shadow: 0 6px 16px rgba(8, 121, 111, .07);
}
body.admin-route .admin-rail button.active::before { background: var(--brand); }
body.admin-route .admin-rail button strong { font-size: 16px; line-height: 1.35; }
body.admin-route .admin-rail button small { font-size: 13px; line-height: 1.35; opacity: .8; }

body.admin-route .admin-workspace {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(26px, 3vw, 46px);
}
body.admin-route .admin-section-head {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--admin-line);
}
body.admin-route .admin-section-head .eyebrow {
  font-size: 12px;
  letter-spacing: .09em;
}
body.admin-route .admin-section-head h2 {
  margin: 5px 0 4px;
  color: var(--admin-text);
  font-size: clamp(27px, 2vw, 32px);
  line-height: 1.3;
  letter-spacing: -.02em;
}
body.admin-route .admin-section-head p {
  max-width: 850px;
  color: var(--admin-muted);
  font-size: 15px;
  line-height: 1.75;
}

body.admin-route .admin-card,
body.admin-route .admin-trend-card,
body.admin-route .admin-day-summary {
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  background: var(--admin-panel);
  box-shadow: 0 10px 30px rgba(18, 55, 47, .055);
}
body.admin-route .admin-card { padding: clamp(20px, 2vw, 28px); }
body.admin-route .admin-card-head { gap: 14px; margin-bottom: 22px; }
body.admin-route .admin-card-head > span {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, #e6faf5, #d9f4ed);
  font-size: 13px;
}
body.admin-route .admin-card-head h2 { color: var(--admin-text); font-size: 20px; }
body.admin-route .admin-card-head p { color: var(--admin-muted); font-size: 14px; line-height: 1.65; }
body.admin-route .admin-overview-grid,
body.admin-route .admin-tools-layout { gap: 18px; }

body.admin-route .admin-operation-block { margin-bottom: 26px; }
body.admin-route .admin-operation-heading { margin-bottom: 16px; }
body.admin-route .admin-operation-heading h3 { font-size: 21px; line-height: 1.4; }
body.admin-route .admin-operation-heading p { font-size: 14px; line-height: 1.65; }
body.admin-route .admin-operation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
body.admin-route .admin-operation-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-color: var(--admin-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 55, 47, .045);
}
body.admin-route .admin-operation-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #8fbdb4;
}
body.admin-route .admin-operation-card[data-platform="total"]::after { background: var(--brand); }
body.admin-route .admin-operation-card[data-platform="android"]::after { background: #4c75e8; }
body.admin-route .admin-operation-card[data-platform="ios"]::after { background: #d9779c; }
body.admin-route .operation-card-head { margin-bottom: 18px; }
body.admin-route .operation-card-head > span { font-size: 18px; }
body.admin-route .operation-card-head small { font-size: 13px; }
body.admin-route .operation-values { gap: 15px 12px; }
body.admin-route .operation-values small { font-size: 13px; }
body.admin-route .operation-values strong { font-size: 24px; }
body.admin-route .admin-trend-card { padding: clamp(20px, 2vw, 28px); }
body.admin-route .admin-trend-legend { gap: 22px; font-size: 14px; }
body.admin-route .trend-selector { font-size: 14px; }
body.admin-route .trend-axis-label,
body.admin-route .trend-date-label { font-size: 12px; }
body.admin-route .admin-system-metrics > h3 { font-size: 20px; }
body.admin-route .metric-strip { gap: 12px; margin-bottom: 18px; }
body.admin-route .metric {
  min-height: 92px;
  padding: 17px;
  border-color: var(--admin-line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(18, 55, 47, .035);
}
body.admin-route .metric strong { color: var(--admin-text); font-size: 26px; }
body.admin-route .metric small { color: var(--admin-muted); font-size: 14px; }

body.admin-route .settings-row,
body.admin-route .app-settings-grid,
body.admin-route .admin-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
body.admin-route .settings-row label,
body.admin-route .app-settings-grid label,
body.admin-route .admin-form-grid label,
body.admin-route .user-credit-control,
body.admin-route .admin-date-filter {
  gap: 8px;
  color: #50665f;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}
body.admin-route input,
body.admin-route select,
body.admin-route textarea {
  min-height: 50px;
  padding: 11px 14px;
  border-color: #d4e3de;
  border-radius: 10px;
  background: #fff;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.5;
}
body.admin-route textarea { min-height: 118px; }
body.admin-route input::placeholder,
body.admin-route textarea::placeholder { color: #94a49f; }
body.admin-route input:hover,
body.admin-route select:hover,
body.admin-route textarea:hover { border-color: #abcfc6; }
body.admin-route input:focus,
body.admin-route select:focus,
body.admin-route textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(25, 188, 156, .11);
}
body.admin-route .switch-row {
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid #dce9e5;
  border-radius: 10px;
  background: var(--admin-panel-soft);
  color: var(--admin-text);
  font-size: 14px;
}
body.admin-route .switch-row input { width: 20px; min-height: 20px; padding: 0; }
body.admin-route .primary-button.compact,
body.admin-route .ghost-button.compact,
body.admin-route button.danger,
body.admin-route .text-button {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: 15px;
}
body.admin-route .primary-button.compact { box-shadow: 0 6px 15px rgba(25, 188, 156, .17); }

body.admin-route .admin-form-list { gap: 18px; }
body.admin-route .admin-form-card {
  padding: 22px;
  border-color: var(--admin-line);
  border-radius: 14px;
  background: var(--admin-panel-soft);
}
body.admin-route .admin-form-card-head { margin-bottom: 18px; }
body.admin-route .admin-form-card-head strong { font-size: 18px; }
body.admin-route .admin-form-actions { gap: 10px; margin-top: 18px; }
body.admin-route .tool-summary,
body.admin-route .admin-summary-line,
body.admin-route .admin-sync-line {
  align-items: center;
  padding: 15px 17px;
  border: 1px solid #dce9e5;
  border-radius: 11px;
  background: var(--admin-panel-soft);
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.55;
}
body.admin-route .admin-summary-line { margin: 18px 0 12px; }
body.admin-route .admin-tool-group h3 { margin: 8px 0 9px; font-size: 16px; }
body.admin-route .admin-tool-group-list { border-color: var(--admin-line); border-radius: 12px; }

body.admin-route .data-list {
  border-color: var(--admin-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 55, 47, .04);
}
body.admin-route .data-row,
body.admin-route .system-row,
body.admin-route .tool-toggle {
  min-height: 78px;
  gap: 18px;
  padding: 17px 19px;
  border-color: #e8efed;
}
body.admin-route .data-row:hover,
body.admin-route .system-row:hover,
body.admin-route .tool-toggle:hover { background: #fbfdfc; }
body.admin-route .data-row strong,
body.admin-route .system-row strong,
body.admin-route .tool-toggle strong { color: var(--admin-text); font-size: 16px; line-height: 1.45; }
body.admin-route .data-row small,
body.admin-route .system-row small,
body.admin-route .tool-toggle small {
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.65;
}
body.admin-route .badge {
  min-height: 31px;
  padding: 0 11px;
  font-size: 13px;
}
body.admin-route .empty { padding: 34px 18px; font-size: 15px; }
body.admin-route .row-actions { gap: 9px; }
body.admin-route .row-actions select { min-width: 128px; }
body.admin-route .order-row > span:first-child { flex: 1 1 520px; }

body.admin-route .user-row { gap: 16px; }
body.admin-route .user-controls {
  grid-template-columns: minmax(180px, 1.1fr) minmax(135px, .65fr) minmax(220px, 1fr) minmax(180px, .9fr);
  gap: 12px;
  width: 100%;
}
body.admin-route .user-credit-control input { min-height: 50px !important; }
body.admin-route .user-controls .compact-switch { align-self: end; }
body.admin-route .user-controls > button { align-self: end; }

body.admin-route .payment-config-layout { gap: 24px; }
body.admin-route .payment-channel-card {
  padding: clamp(20px, 2.2vw, 30px);
  border-color: var(--admin-line);
  border-radius: 16px;
  background: #fbfefd;
}
body.admin-route .payment-channel-head { margin-bottom: 22px; }
body.admin-route .payment-channel-head h3 { font-size: 22px; }
body.admin-route .payment-channel-head p { font-size: 15px; line-height: 1.75; }
body.admin-route .payment-readiness,
body.admin-route .sms-readiness {
  gap: 13px;
  min-height: 66px;
  padding: 14px 16px;
  border-radius: 12px;
}
body.admin-route .payment-readiness strong,
body.admin-route .sms-readiness strong { font-size: 15px; }
body.admin-route .payment-readiness small,
body.admin-route .sms-readiness small { font-size: 14px; line-height: 1.6; }
body.admin-route .fixed-payment-route {
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
}
body.admin-route .fixed-payment-route code { font-size: 14px; line-height: 1.65; }
body.admin-route .payment-key-helper {
  gap: 12px;
  padding: 17px;
  border-radius: 12px;
}
body.admin-route .payment-key-helper > div > span,
body.admin-route .payment-live-test > span { font-size: 14px; line-height: 1.6; }
body.admin-route .payment-key-helper textarea { min-height: 132px; font-size: 14px; }
body.admin-route .payment-key-helper p { font-size: 14px; line-height: 1.7; }
body.admin-route .payment-live-test { gap: 14px; padding: 16px; border-radius: 12px; }
body.admin-route .admin-day-summary { margin-bottom: 22px; padding: 22px; }

body.admin-route :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(25, 188, 156, .28);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  body.admin-route .admin-dashboard { grid-template-columns: 238px minmax(0, 1fr); }
  body.admin-route .admin-workspace { padding: 28px 24px; }
  body.admin-route .admin-operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-route .metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.admin-route .user-controls { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}

@media (min-width: 1520px) {
  body.admin-route .admin-operation-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  body.admin-route .admin-hero { min-height: auto; }
  body.admin-route .admin-dashboard { grid-template-columns: 1fr; }
  body.admin-route .admin-rail {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    height: auto;
    padding: 10px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
    box-shadow: 0 8px 20px rgba(18, 55, 47, .07);
    scroll-snap-type: x proximity;
  }
  body.admin-route .admin-rail-title { display: none; }
  body.admin-route .admin-rail button {
    flex: 0 0 140px;
    min-height: 60px;
    margin: 0 3px;
    padding: 8px 13px;
    scroll-snap-align: start;
  }
  body.admin-route .admin-rail button::before { inset: auto 18px 3px; width: auto; height: 3px; }
  body.admin-route .admin-rail button:hover { transform: none; }
  body.admin-route .admin-section-head { align-items: flex-start; flex-direction: column; }
  body.admin-route .admin-section-head > .admin-toolbar,
  body.admin-route .admin-section-head > .task-filters { width: 100%; }
  body.admin-route .admin-toolbar input,
  body.admin-route .task-filters input { flex: 1 1 240px; }
  body.admin-route .admin-overview-grid,
  body.admin-route .admin-tools-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body.admin-route { font-size: 16px; }
  body.admin-route .admin-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
  }
  body.admin-route .admin-hero h1 { font-size: 25px; }
  body.admin-route .admin-hero p { display: block; font-size: 14px; line-height: 1.6; }
  body.admin-route .admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  body.admin-route .admin-actions .ghost-button { min-width: 0; padding: 0 8px; }
  body.admin-route .admin-login {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 24px auto;
    padding: 22px 17px;
    border-radius: 16px;
  }
  body.admin-route .admin-login > input,
  body.admin-route .admin-login > div:first-child,
  body.admin-route .admin-captcha-row,
  body.admin-route .admin-login > .primary-button { grid-column: 1; }
  body.admin-route .admin-captcha-row { grid-template-columns: 1fr auto; }
  body.admin-route .admin-captcha-row strong { grid-column: 1 / -1; }
  body.admin-route .admin-workspace { padding: 22px 13px 36px; }
  body.admin-route .admin-rail { padding: 9px 8px; }
  body.admin-route .admin-rail button { flex-basis: 124px; }
  body.admin-route .admin-section-head {
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }
  body.admin-route .admin-section-head h2 { font-size: 26px; }
  body.admin-route .admin-section-head p { font-size: 14px; }
  body.admin-route .admin-toolbar,
  body.admin-route .task-filters,
  body.admin-route .orders-toolbar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body.admin-route .admin-toolbar > *,
  body.admin-route .task-filters > *,
  body.admin-route .orders-toolbar > * { grid-column: 1; width: 100%; }
  body.admin-route .admin-card { padding: 18px 15px; border-radius: 15px; }
  body.admin-route .admin-card-head { align-items: flex-start; }
  body.admin-route .admin-card-head > span { width: 36px; height: 36px; }
  body.admin-route .settings-row,
  body.admin-route .app-settings-grid,
  body.admin-route .admin-form-grid,
  body.admin-route .user-controls { grid-template-columns: 1fr; gap: 14px; }
  body.admin-route .admin-operation-grid { grid-template-columns: 1fr; }
  body.admin-route .admin-operation-card { padding: 18px; }
  body.admin-route .operation-values { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  body.admin-route .operation-values strong { font-size: 22px; }
  body.admin-route .operation-values small { font-size: 13px; }
  body.admin-route .admin-trend-card { padding: 17px 12px; }
  body.admin-route .admin-trend-legend { justify-content: flex-start; gap: 13px; font-size: 13px; }
  body.admin-route .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.admin-route .metric { min-height: 86px; }
  body.admin-route .data-row,
  body.admin-route .system-row,
  body.admin-route .tool-toggle { display: grid; gap: 13px; padding: 16px 14px; }
  body.admin-route .row-actions { justify-content: flex-start; width: 100%; }
  body.admin-route .row-actions > * { flex: 1 1 auto; }
  body.admin-route .row-actions select { min-width: 100%; }
  body.admin-route .admin-form-card { padding: 17px 14px; }
  body.admin-route .admin-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  body.admin-route .admin-form-actions > * { width: 100%; }
  body.admin-route .tool-summary,
  body.admin-route .admin-summary-line,
  body.admin-route .admin-sync-line { align-items: flex-start; flex-direction: column; }
  body.admin-route .payment-channel-card { padding: 18px 14px; }
  body.admin-route .payment-channel-head { flex-direction: column; }
  body.admin-route .payment-key-helper > div,
  body.admin-route .payment-live-test { align-items: stretch; flex-direction: column; }
  body.admin-route .payment-config-layout > .primary-button { width: 100%; }
  body.admin-route .admin-day-summary { padding: 17px 12px; }
}

@media (max-width: 390px) {
  body.admin-route .admin-actions { grid-template-columns: 1fr 1fr; }
  body.admin-route .admin-actions > :last-child { grid-column: 1 / -1; }
  body.admin-route .metric-strip { grid-template-columns: 1fr; }
  body.admin-route .admin-form-actions { grid-template-columns: 1fr; }
}
