/* 北辰管理後台 */
.adm-main { padding-top: 20px; padding-bottom: 48px; }
.adm-main .card { margin-bottom: 16px; }
.adm-main h2 { font-size: 16px; margin: 0 0 12px; }
.adm-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.adm-more { font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.adm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-kpi { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s; }
.adm-kpi:hover { border-color: var(--accent); }
.adm-kpi b { display: block; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.adm-kpi b .tag { font-size: 15px; padding: 3px 10px; }
.adm-kpi span { display: block; font-size: 14px; margin-top: 4px; }
.adm-kpi em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.adm-grid { display: grid; gap: 16px; }
.adm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-grid .card { margin-bottom: 0; }
.adm-grid-2 + .card { margin-top: 16px; }
.adm-todo { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.adm-todo ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.adm-todo li { display: flex; flex-direction: column; gap: 2px; }
.adm-list { list-style: none; padding: 0; margin: 0; }
.adm-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.adm-list li:last-child { border-bottom: 0; }
.adm-list li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-dl { display: grid; gap: 10px 24px; margin: 0; font-size: 14px; }
.adm-dl > div { display: flex; flex-direction: column; gap: 2px; }
.adm-dl dt { color: var(--muted); font-size: 13px; }
.adm-dl dd { margin: 0; overflow-wrap: anywhere; }
.adm-dl-cols { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.adm-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.adm-bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; }
.adm-bars div[data-zero] { background: var(--line); }
.adm-bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.adm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.adm-toolbar input { flex: 1; min-width: 200px; }
.adm-main input[type="search"], .adm-main input[type="email"], .adm-main select, .adm-inline input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; box-sizing: border-box; }
.adm-main .acct-field select { width: 100%; }
.adm-btn { margin-top: 0; display: inline-flex; align-items: center; text-decoration: none; padding: 8px 14px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.adm-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.adm-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1a1205; font-weight: 600; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th, .adm-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.adm-table th { color: var(--muted); font-weight: 500; }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table td.wrap-cell { white-space: normal; overflow-wrap: anywhere; min-width: 200px; }
.adm-table select { padding: 4px 8px; }
.adm-pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.adm-gate { padding: 32px 20px; }
.adm-gate h2 { text-align: center; }
.adm-gate > p { text-align: center; }
.adm-gate .adm-form { max-width: 360px; margin: 16px auto 0; }
.adm-home { width: auto; padding: 0 12px; text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; }
.adm-help { margin: -4px 0 14px; line-height: 1.7; }
.adm-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.adm-form-grid .acct-field span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.adm-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; }
.adm-src { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.adm-src.ok { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.adm-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.adm-inline input { min-width: 220px; }
.adm-copy { cursor: pointer; padding: 1px 6px; border-radius: 6px; background: var(--chip); word-break: break-all; }
.adm-copy.copied { background: color-mix(in srgb, var(--up) 18%, transparent); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--chip); color: var(--muted); margin-right: 4px; white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.tag.bad { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
.tag.acc { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.linklike { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0 2px; }
.up { color: var(--up); } .down { color: var(--down); }
@media (max-width: 900px) {
  .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid-2 { grid-template-columns: minmax(0, 1fr); }
  /* The site hides its top nav on phones (it has a bottom bar); the admin page keeps it. */
  body.admin .top-row { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  body.admin .nav { display: flex; order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  body.admin .nav[hidden] { display: none; }
}
