:root {
  --bg: #eef3f4;
  --card: #fff;
  --text: #122027;
  --muted: #5b6b75;
  --line: rgba(18, 36, 46, 0.1);
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --danger: #b42318;
  --ok: #027a48;
  --warn: #b54708;
  --ink: #0b1220;
  --sidebar: #0f1c22;
  --sidebar-2: #163039;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(15, 40, 50, 0.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.55 var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(20, 184, 166, 0.16), transparent 58%),
    radial-gradient(700px 360px at 100% 0%, rgba(15, 118, 110, 0.1), transparent 52%),
    var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico {
  width: 18px; height: 18px; flex: 0 0 auto;
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.ico-lg { width: 22px; height: 22px; }
.ico-xl { width: 28px; height: 28px; }

.shell { min-height: 100vh; }
.shell.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #d7e6ea;
  padding: 22px 16px 28px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar .brand { color: #fff; padding: 4px 8px 18px; }
.sidebar .brand:hover { text-decoration: none; }
.side-nav { display: grid; gap: 4px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  color: #b7c9cf; padding: 10px 12px; border-radius: 12px;
  text-decoration: none; font-weight: 600;
}
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side-link.active { background: rgba(20, 184, 166, .18); color: #fff; }
.side-foot {
  margin-top: auto; padding: 14px 10px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  display: grid; gap: 8px;
}
.side-user { font-size: 12.5px; color: #9fb3ba; word-break: break-all; }
.side-user strong { display: block; color: #fff; font-size: 13px; margin-bottom: 2px; }
.btn-logout {
  width: 100%;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: none;
}
.btn-logout:hover {
  background: rgba(254, 243, 242, .14);
  color: #fecaca;
  border-color: rgba(254, 202, 202, .35);
}
.content { min-width: 0; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.content .wrap { padding-bottom: 48px; }

.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 0; position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px); background: rgba(238, 243, 244, 0.86);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  box-shadow: 0 8px 16px rgba(15, 118, 110, .28);
}
.nav-links { display: flex; gap: 14px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a, .nav-links button.linkish {
  color: var(--muted); background: none; border: 0; cursor: pointer; font: inherit;
}
.nav-links a.active, .nav-links a:hover { color: var(--text); text-decoration: none; }
.linkish { display: inline-flex; align-items: center; gap: 6px; color: #9fb3ba; }
.linkish:hover { color: #fff; }
.nav__lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); color: #d7e6ea !important;
  font-weight: 700; font-size: 13px; text-decoration: none !important;
}
.nav__lang:hover { background: rgba(255,255,255,.08); color: #fff !important; }
.sidebar .nav__lang { width: 100%; margin: 4px 0 2px; box-sizing: border-box; }
.auth-visual .nav__lang { border-color: rgba(255,255,255,.22); }
.nav .nav__lang {
  border-color: var(--line); color: var(--muted) !important; background: #fff;
}
.nav .nav__lang:hover { color: var(--text) !important; background: #f4f8f8; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 16px; font: 650 14px var(--font);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(15, 118, 110, 0.25); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card-ico.warn { background: #fffaeb; color: var(--warn); }
.card-ico.ok { background: #ecfdf3; color: var(--ok); }
.card-ico.ink { background: #eef2ff; color: #3538cd; }
.card-ico.rose { background: #fff1f3; color: #c01048; }

.grid { display: grid; gap: 16px; }
.grid > *, .card { min-width: 0; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat {
  position: relative; overflow: hidden;
}
.stat .card-ico { margin-bottom: 12px; }
.stat-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 30px; font-weight: 780; letter-spacing: -0.03em; margin-top: 4px; }
.meter {
  height: 8px; border-radius: 999px; background: #e6eef0; overflow: hidden; margin-top: 12px;
}
.meter > i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.meter.warn > i { background: linear-gradient(90deg, #f79009, #f04438); }

h1 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -0.03em; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.hero { padding: 28px 0 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 700; font-size: 13px; margin-bottom: 8px;
}
.stack { display: grid; gap: 16px; padding: 16px 0 8px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; font: inherit; color: var(--text); background: #fff;
}
input:focus, textarea:focus { outline: 2px solid rgba(15, 118, 110, .25); border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; gap: 12px; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.code-row .btn { white-space: nowrap; border-radius: 12px; }
.hp-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table tr:hover td { background: #f8fbfb; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  padding: 3px 9px; font-size: 12px; font-weight: 650;
  background: var(--accent-soft); color: var(--accent);
}
.badge.warn { background: #fffaeb; color: var(--warn); }
.badge.ok { background: #ecfdf3; color: var(--ok); }
.badge.ink { background: #eef2ff; color: #3538cd; }
.badge.rose { background: #fff1f3; color: #c01048; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.flash {
  padding: 12px 14px; border-radius: 12px; margin: 12px 0;
  background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6;
  display: flex; align-items: center; gap: 8px;
}
.flash.err { background: #fef3f2; color: var(--danger); border-color: #fecdca; }
.hidden { display: none !important; }
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.auth-visual {
  background:
    radial-gradient(600px 400px at 20% 20%, rgba(20,184,166,.28), transparent 55%),
    linear-gradient(160deg, #0f1c22, #134e4a);
  color: #e8f4f3; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual .brand { color: #fff; }
.auth-visual .brand:hover { color: #fff; text-decoration: none; }
.auth-visual .brand span:last-child { color: #fff; opacity: 0.96; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: #f3f7f6;
}
.auth-tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: 650 13px var(--font);
  padding: 10px 8px;
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 28, 34, 0.08);
}
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.fa-field small, label small.muted { display: block; margin-top: 6px; font-weight: 500; }
.auth-visual h2 { font-size: 32px; color: #fff; margin: 16px 0 10px; }
.auth-visual > div > p,
.auth-visual .muted { color: #b7cdc9; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: #c9dddb; }
.auth-point .card-ico { background: rgba(255,255,255,.1); color: #99f6e4; }
.auth-box { width: min(440px, 100%); margin: 48px auto; padding: 24px; }
.key-reveal {
  background: var(--ink); color: #d7e3ef; border-radius: 12px; padding: 14px;
  font-family: var(--mono); font-size: 13px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start; gap: 10px;
}
.key-reveal > span { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.key-reveal .btn { flex: none; white-space: nowrap; }
.app-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: grid; gap: 10px; background: #fff;
}
.app-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.app-name { font-weight: 750; font-size: 16px; }
.empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.empty .card-ico { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; }
.tip-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tip-list li { display: flex; gap: 10px; align-items: flex-start; }
.tip-list li > span { min-width: 0; overflow-wrap: anywhere; }
.footer { padding: 20px 0 32px; color: var(--muted); font-size: 13px; }

.side-link-parent { margin-bottom: 4px; }
.side-product-context {
  margin: 10px 8px 8px; padding: 14px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; background: rgba(255,255,255,.055); display: grid; gap: 3px;
}
.side-product-context span, .side-product-context small { color: var(--sidebar-muted); font-size: 11px; }
.side-product-context strong { color: #fff; font-size: 14px; }
.product-directory-hero { align-items: flex-end; }
.product-line-card {
  margin-top: 22px; padding: 26px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(145deg, #f8fbfb 0%, #eef5f3 100%); box-shadow: var(--shadow-sm);
}
.product-line-head, .product-card-top, .product-card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.product-line-head h2 { margin: 3px 0 0; font-size: 26px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.product-line-mark {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 850; letter-spacing: -.04em;
}
.product-card-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr); gap: 16px; margin-top: 22px;
}
.product-card, .product-slot { min-height: 220px; border-radius: 18px; padding: 22px; }
.product-card {
  display: flex; flex-direction: column; color: var(--text); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #a9cfc5; text-decoration: none; }
.product-card h3 { margin: 22px 0 8px; font-size: 22px; }
.product-card p { color: var(--muted); line-height: 1.65; margin: 0 0 20px; max-width: 620px; }
.product-card-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.product-card-meta span { color: var(--muted); }
.product-card-meta strong { color: var(--accent-dark); }
.product-slot {
  border: 1px dashed #b9cac6; display: grid; place-content: center; text-align: center; color: #8aa09a;
}
.product-slot span { font-size: 28px; }
.product-slot p { margin: 8px 0 0; font-size: 12px; }

/* FullAPI workspace: denser solo-product layout */
body.is-fullapi .content .wrap {
  width: min(960px, calc(100% - 48px));
  margin: 0;
  margin-inline: 24px;
  padding-bottom: 32px;
}
body.is-fullapi .footer { padding-top: 8px; }
.fa-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 20px 0 16px;
}
.fa-hero-copy { min-width: 0; flex: 1; }
.fa-hero h1 { font-size: clamp(22px, 2.8vw, 28px); margin: 0 0 6px; }
.fa-hero .muted { margin: 0; max-width: 520px; font-size: 14px; line-height: 1.55; }
.fa-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.fa-summary-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}
.fa-summary-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.fa-summary-item strong { font-size: 26px; letter-spacing: -0.03em; line-height: 1.15; }
.fa-summary-item small { color: var(--muted); font-size: 12px; }
.fa-summary-link {
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.fa-summary-link:hover { text-decoration: underline; }
.fa-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.fa-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.fa-panel-head h2 { margin: 0; font-size: 16px; }
.fa-table { margin: 0; }
.fa-table th, .fa-table td { padding: 12px 16px; }
.fa-table th { background: #f7faf9; }
.fa-row-actions { text-align: right; white-space: nowrap; }
.fa-ips-cell { max-width: 260px; }
.fa-ips-cell code { font-size: 12px; word-break: break-all; }
.fa-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.fa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 34, 0.48);
  backdrop-filter: blur(2px);
}
.fa-modal-panel {
  position: relative;
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 28, 34, 0.22);
  overflow: hidden;
}
.fa-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.fa-modal-head h2 { margin: 0; font-size: 18px; }
.fa-modal-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f3f7f6;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.fa-modal-x:hover { background: #e8efed; color: var(--text); }
.fa-modal-body { display: grid; gap: 14px; padding: 14px 18px 18px; }
.fa-field { display: grid; gap: 6px; color: var(--text); font-size: 13px; font-weight: 650; }
.fa-field input, .fa-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: 500 14px/1.45 var(--font);
  color: var(--text);
  background: #fff;
  resize: vertical;
}
.fa-field textarea { min-height: 110px; font-family: var(--mono); font-size: 12.5px; }
.fa-field input:focus, .fa-field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}
.fa-field small { font-weight: 500; line-height: 1.45; }
.fa-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.fa-check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.fa-scope-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfa;
}
.fa-scope-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.fa-scope-name { font-weight: 650; }
.fa-scope-weight { font-size: 12px; }
.fa-scopes-cell { max-width: 220px; word-break: break-word; }
.fa-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.fa-modal-err {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef3f2;
  color: var(--danger);
  font-size: 13px;
}
.fa-secret-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cfe6dc;
  background: #f3faf7;
}
.fa-secret-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.fa-secret-box code {
  display: block;
  word-break: break-all;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.fa-docs { display: grid; gap: 12px; }
.fa-docs-card { padding: 16px 18px; }
.fa-docs-card h2 { margin: 0 0 8px; font-size: 16px; }
.fa-docs-card h3 { margin: 14px 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.fa-docs-card .muted { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.fa-docs-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.fa-docs-card-head h2 { margin: 0; }
.fa-inline-code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f7f6;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
}
.fa-code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f1c22;
  color: #e7f2f4;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre;
}
.fa-code code { font-family: var(--mono); color: inherit; }
@media (max-width: 720px) {
  body.is-fullapi .content .wrap { width: calc(100% - 32px); margin-inline: 16px; }
  .fa-summary { grid-template-columns: 1fr; }
}

/* Solo product: one product, no product-line shell / reserved slot */
.product-solo {
  margin-top: 22px;
}
.product-solo .product-card {
  min-height: 0;
  padding: 26px 28px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f3faf7 100%);
  border-color: #cfe6dc;
  box-shadow: var(--shadow-sm);
}
.product-solo .product-card:hover {
  border-color: #9ecfbb;
}
.product-solo .product-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px 22px;
  align-items: center;
}
.product-solo .product-card-copy .product-card-top {
  justify-content: flex-start;
  margin-bottom: 8px;
}
.product-solo .product-card-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
}
.product-solo .product-card-copy p {
  margin: 0;
  max-width: 640px;
}
.product-solo .product-card-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 8px;
  white-space: nowrap;
}
.product-solo .product-card-meta span { font-size: 13px; }
.product-solo .product-card-meta strong { font-size: 14px; }
.admin-product-hero, .admin-platform-hero { align-items: flex-end; }
.admin-scope {
  min-width: 240px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; display: grid; gap: 3px; box-shadow: var(--shadow-sm);
}
.admin-scope span, .admin-scope small { color: var(--muted); font-size: 11px; }
.admin-scope strong { font-size: 13px; }
.admin-product-line { margin-bottom: 22px; }
.product-mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 18px;
}
.product-mini-stats span { padding: 10px; border-radius: 10px; background: #f5f8f7; color: var(--muted); font-size: 11px; }
.product-mini-stats strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 2px; }
.mail-routing-card { margin-top: 18px; }
.mail-compose-card .mail-body-field { display: grid; gap: 8px; }
.mail-body-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; font-weight: 600; }
.mail-body-label small { font-weight: 400; color: var(--muted); }
.mail-editor {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.mail-editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f6f9f8;
}
.mail-editor-toolbar .btn { min-width: 36px; }
.mail-editor-surface {
  min-height: 220px;
  max-height: 480px;
  overflow: auto;
  padding: 14px 16px;
  line-height: 1.55;
  outline: none;
}
.mail-editor-surface.is-empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.mail-editor-surface h2 { margin: 0 0 10px; font-size: 1.25em; }
.mail-editor-surface p { margin: 0 0 10px; }
.mail-editor-surface ul, .mail-editor-surface ol { margin: 0 0 10px; padding-left: 1.4em; }
.mail-editor-surface a { color: var(--accent); }
.mail-editor-source {
  width: 100%;
  min-height: 220px;
  max-height: 480px;
  border: 0;
  border-radius: 0;
  padding: 14px 16px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  background: #0f1c22;
  color: #e7eef1;
}
.route-preview { padding: 14px; border-radius: 14px; background: #f6f9f8; }
.route-preview label { min-width: min(340px, 100%); }
.route-result { color: var(--accent); font-size: 13px; }
.route-editor { grid-template-columns: 1.25fr .8fr 1fr auto; align-items: end; }
[data-route-active] { width: auto; min-width: 18px; height: 18px; }

/* Account security */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.sec-card { padding: 22px 22px 18px; }
.sec-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.sec-card-head h2 { margin: 0 0 4px; font-size: 18px; }
.sec-card-head .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.sec-card-title { min-width: 0; flex: 1; }
.sec-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sec-title-row h2 { margin: 0; }
.sec-form { max-width: none; margin-top: 0; }
.sec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.sec-idle { display: grid; gap: 14px; }
.sec-idle .muted { margin: 0; }
.sec-setup {
  display: grid;
  gap: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #cfe6dc;
  background: linear-gradient(160deg, #f7fcfa 0%, #eef8f4 100%);
}
.sec-setup-step { display: grid; gap: 12px; }
.sec-step-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.sec-qr-wrap {
  width: fit-content;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.sec-qr-wrap img {
  display: block;
  border-radius: 8px;
}
.sec-secret {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.sec-secret-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sec-secret-row code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  word-break: break-all;
  font-size: 13px;
  color: var(--text);
}
.sec-code-label { display: grid; gap: 6px; }
.sec-code-label input {
  max-width: 220px;
  letter-spacing: .18em;
  font-size: 18px;
  font-weight: 650;
  font-family: var(--mono);
}
.sec-status-ok {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: var(--ok);
  margin-bottom: 16px;
}
.sec-status-ok strong { font-size: 14px; }
.sec-status-ok span { color: #027a48; opacity: .85; font-size: 13px; line-height: 1.45; }
.sec-danger {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #fecdca;
  background: #fff8f7;
}
.sec-danger h3 {
  margin: 0;
  font-size: 14px;
  color: var(--danger);
}
.sec-danger .muted { margin: 0; font-size: 13px; }
.sec-support {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .shell.app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-radius: 0 0 20px 20px; }
  .side-nav { grid-template-columns: repeat(2, 1fr); }
  .side-foot { border-top: 0; padding-top: 8px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .product-card-grid { grid-template-columns: 1fr; }
  .product-slot { min-height: 110px; }
  .product-solo .product-card-body {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .product-solo .product-card-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .route-editor { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
}
