/* TokenForge C 端样式 — 纯静态，无构建 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0d10; --surface: #13171d; --surface2: #1a1f28;
  --border: #252a35; --text: #e4e7eb; --text2: #8893a3; --text3: #5a6574;
  --brand: #00e5a0; --warn: #f9a825; --danger: #ff5252;
  --blue: #448aff; --purple: #b388ff; --radius: 12px;
}

body {
  /* 纯系统字体，不依赖 Google Fonts（国内加载慢/超时会阻碍渲染）。
     中文优先微软雅黑/苹方，拉丁优先系统等宽，数字/代码对齐干净。 */
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC',
    ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}

/* 响应式容器：窄屏留白小、宽屏最多 1180px 居中 */
.app { max-width: 1180px; margin: 0 auto; padding: 14px 14px 40px; min-height: 100vh; }
@media (min-width: 640px) { .app { padding: 14px 18px 40px; } }

.icon-s { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.icon-m { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; flex-shrink: 0; }

/* 顶部栏 */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 12px; position: sticky; top: 0; background: var(--bg); z-index: 20; }
.logo { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 20px; color: var(--brand); letter-spacing: -0.5px; }
.logo span { color: var(--text2); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.points { display: flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.points b { color: var(--brand); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.points .frozen { color: var(--text3); font-size: 11px; margin-left: 2px; }

/* 公告横幅 */
.announce-bar { display: flex; align-items: flex-start; gap: 10px; background: linear-gradient(90deg, rgba(0,229,160,.08), rgba(68,138,255,.05)); border: 1px solid rgba(0,229,160,.18); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.announce-bar .ann-icon { color: var(--brand); margin-top: 1px; }
.announce-bar .ann-body { flex: 1; font-size: 12px; line-height: 1.5; }
.announce-bar .ann-title { font-weight: 700; color: var(--text); margin-right: 6px; }
.announce-bar .ann-text { color: var(--text2); }
.announce-bar .ann-close { cursor: pointer; color: var(--text3); background: 0; border: 0; padding: 2px; display: flex; }
.announce-bar .ann-close:hover { color: var(--text); }

/* 首页公告卡片：暗色卡片，显示最新一条 + 历史入口 */
.notice-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; margin-bottom: 10px; }
.notice-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.notice-label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--brand); }
.notice-more { font-size: 10.5px; color: var(--text3); cursor: pointer; }
.notice-more:hover { color: var(--brand); }
.notice-latest .nl-title { font-size: 12px; font-weight: 600; color: var(--text); margin-right: 6px; }
.notice-latest .nl-text { font-size: 11px; color: var(--text2); }

/* 历史公告弹窗列表 */
.announce-scroll { max-height: 60vh; overflow-y: auto; margin: 4px 0 14px; }
.ann-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.ann-item:last-child { border-bottom: 0; }
.ann-item-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.ann-pin { font-size: 8.5px; font-weight: 700; color: var(--brand); background: rgba(0,229,160,.1); border: 1px solid rgba(0,229,160,.2); border-radius: 3px; padding: 1px 5px; }
.ann-item-title { font-size: 12.5px; font-weight: 700; color: var(--text); flex: 1; }
.ann-item-date { font-size: 10px; color: var(--text3); }
.ann-item-body { font-size: 11px; line-height: 1.6; color: var(--text2); white-space: pre-wrap; }

/* 一级 Tab */
.tab-bar { display: flex; gap: 0; background: var(--surface); border-radius: 11px; padding: 3px; margin-bottom: 14px; max-width: 520px; }
.tab-btn { flex: 1; text-align: center; padding: 10px 4px; border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text2); transition: all .2s; border: 0; background: transparent; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1; }
.tab-btn.active { background: var(--surface2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tab-btn .tab-icon { width: 18px; height: 18px; }

.filter-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-pill { padding: 6px 16px; border-radius: 16px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); transition: all .15s; font-family: inherit; }
.filter-pill.on { background: var(--brand); color: #000; border-color: var(--brand); }
.filter-pill .cnt { font-size: 9px; opacity: .7; margin-left: 3px; }

.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin: 0 0 10px 2px; display: flex; align-items: center; gap: 6px; }
.section-title .urgent { color: var(--danger); }

/* 批次网格 — auto-fill 自适应撑满，等宽卡片 */
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }

.batch-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; transition: all .2s; cursor: pointer; display: flex; flex-direction: column; min-height: 118px; }
.batch-card:hover { border-color: rgba(255,255,255,.15); transform: translateY(-1px); }
.batch-card.gone { opacity: .35; cursor: default; pointer-events: none; }
.batch-card.hidden { display: none; }
.batch-card .header-area { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 6px; }
.tag { display: inline-block; font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: .3px; vertical-align: 1px; }
.tag-30d { background: rgba(0,229,160,.1); color: var(--brand); border: 1px solid rgba(0,229,160,.2); }
.tag-7d { background: rgba(249,168,37,.1); color: var(--warn); border: 1px solid rgba(249,168,37,.2); }
.batch-card .name { font-size: 14px; font-weight: 700; }
.batch-card .sub { font-size: 9px; color: var(--text3); margin-top: 2px; }
.batch-card .price-area { text-align: right; }
.batch-card .price { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; color: var(--brand); line-height: 1; }
.batch-card .price.warn { color: var(--warn); }
.batch-card .price.danger { color: var(--danger); }
.batch-card .price-unit { font-size: 9px; color: var(--text3); }
.batch-card .price-orig { font-size: 9px; color: var(--text3); text-decoration: line-through; display: block; }
.batch-card .meta-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11px; }
.batch-card .stock { color: var(--text2); }
.batch-card .stock.low { color: var(--danger); font-weight: 600; }
.badge-pill { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 8px; font-weight: 700; vertical-align: 1px; margin-left: 4px; }
.badge-new { background: rgba(0,229,160,.1); color: var(--brand); }
.badge-hot { background: rgba(249,168,37,.1); color: var(--warn); }
.badge-urgent { background: rgba(255,82,82,.1); color: var(--danger); }

.empty-state { grid-column: 1/-1; text-align: center; color: var(--text3); font-size: 12px; padding: 40px 0; }

/* 页面切换 */
.page { display: none; animation: fadeIn .15s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* 详情页 */
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.back-btn { cursor: pointer; color: var(--text2); background: 0; border: 0; font-family: inherit; display: flex; align-items: center; padding: 4px 0; }
.back-btn:hover { color: var(--text); }
.detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 720px) { .detail-body { grid-template-columns: 1fr; } }

.qty-box { background: var(--surface2); border-radius: 10px; padding: 16px; }
.qty-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; color: var(--text2); }
.qty-row .big { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 18px; color: var(--brand); }
.qty-row .big.warn { color: var(--warn); }
.qty-stepper { display: flex; align-items: center; gap: 0; margin-top: 4px; }
.qty-stepper button { width: 44px; height: 44px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 20px; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.qty-stepper button:first-child { border-radius: 7px 0 0 7px; }
.qty-stepper button:last-child { border-radius: 0 7px 7px 0; }
.qty-stepper input { width: 100%; height: 44px; background: var(--bg); border: 1px solid var(--border); border-left: 0; border-right: 0; text-align: center; font-size: 22px; font-weight: 700; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: 0; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-total { text-align: right; font-size: 11px; color: var(--text3); margin-top: 8px; }
.qty-total b { color: var(--brand); font-weight: 700; }

.warranty-strip { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--brand); background: rgba(0,229,160,.05); border: 1px solid rgba(0,229,160,.1); border-radius: 6px; padding: 6px 9px; margin: 10px 0; line-height: 1.35; }

.disclaimer { display: flex; align-items: flex-start; gap: 5px; font-size: 10px; color: var(--text2); background: rgba(249,168,37,.05); border: 1px solid rgba(249,168,37,.15); border-radius: 6px; padding: 6px 9px; margin: 8px 0; line-height: 1.4; }
.disclaimer svg { color: var(--warn); margin-top: 1px; }

/* 自定义暗色勾选框（详情页下单前确认） */
.boom-agree { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text2); margin: 12px 0; cursor: pointer; user-select: none; line-height: 1.4; }
.boom-agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.boom-agree .box { flex-shrink: 0; width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.boom-agree .box svg { width: 11px; height: 11px; color: #000; opacity: 0; }
.boom-agree input:checked + .box { background: var(--brand); border-color: var(--brand); }
.boom-agree input:checked + .box svg { opacity: 1; }
.boom-agree:hover .box { border-color: var(--brand); }

.field-label { font-size: 10px; font-weight: 700; color: var(--text3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.fmt-btn { padding: 10px 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all .15s; font-family: inherit; }
.fmt-btn.sel { border-color: var(--brand); background: rgba(0,229,160,.05); color: var(--brand); }

.btn-primary { width: 100%; padding: 14px; background: var(--brand); color: #000; border: 0; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary.danger { background: var(--danger); color: #fff; }
.btn-primary.warn { background: var(--warn); color: #000; }

/* 预约卡 */
.queue-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; text-align: center; }
.queue-cycle { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.queue-num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 38px; font-weight: 700; color: var(--brand); line-height: 1; }
.queue-num.warn { color: var(--warn); }
.queue-label { font-size: 10px; color: var(--text3); margin: 4px 0 14px; }
.queue-input { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 11px; color: var(--text); font-size: 15px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: 0; margin-bottom: 10px; -moz-appearance: textfield; }
.queue-input::-webkit-outer-spin-button,
.queue-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.queue-summary { background: var(--surface2); border-radius: 7px; padding: 11px; text-align: left; font-size: 11px; color: var(--text2); margin-bottom: 10px; }
.queue-summary .line { display: flex; justify-content: space-between; padding: 3px 0; }
.queue-summary .total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; font-weight: 700; color: var(--text); font-size: 13px; }

/* 我的 */
.recharge-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; margin-bottom: 14px; }
.recharge-amount { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 34px; font-weight: 700; color: var(--brand); margin: 6px 0; }
.recharge-frozen { font-size: 11px; color: var(--text3); margin-bottom: 12px; }
.me-account { font-size: 11px; color: var(--text2); margin-bottom: 8px; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.input-field { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 12px; color: var(--text); font-size: 13px; outline: 0; }
.input-field:focus { border-color: var(--brand); }
.btn-field { width: 100%; padding: 12px; background: var(--brand); color: #000; border: 0; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; }

.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .me-grid { grid-template-columns: 1fr; } }

.menu-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.menu-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--surface2); }
.menu-item .left { display: flex; align-items: center; gap: 10px; }
.menu-item .right { color: var(--text3); display: flex; align-items: center; gap: 6px; font-size: 12px; }

/* 内层 Tab */
.inner-tabs { display: flex; gap: 6px; margin-bottom: 14px; max-width: 420px; }
.inner-tab { flex: 1; padding: 9px; text-align: center; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); font-family: inherit; transition: all .15s; }
.inner-tab.on { background: var(--brand); color: #000; border-color: var(--brand); }

/* 号池 */
.pool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .pool-grid { grid-template-columns: 1fr; } }
.pool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.pool-hint { font-size: 10px; color: var(--text3); margin-bottom: 10px; display: flex; align-items: flex-start; gap: 6px; border-radius: 6px; padding: 8px 10px; line-height: 1.4; }
.pool-hint.secure { background: rgba(68,138,255,.05); border: 1px solid rgba(68,138,255,.12); }
.pool-hint.secure svg { color: var(--blue); flex-shrink: 0; margin-top: 1px; }
.connection-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.connection-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(0,229,160,.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; }
.conn-dot.on { background: var(--brand); }
.conn-dot.off { background: var(--text3); }

/* 订单 */
.order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 8px; }
.order-title { font-size: 13px; font-weight: 600; }
.order-status { font-size: 8px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.st-done, .st-pushed { background: rgba(0,229,160,.12); color: var(--brand); }
.st-wait { background: rgba(68,138,255,.1); color: var(--blue); }
.st-progress { background: rgba(179,136,255,.1); color: var(--purple); }
.st-expired { background: rgba(255,82,82,.1); color: var(--danger); }
.st-partial, .st-refund, .st-warranty401 { background: rgba(249,168,37,.1); color: var(--warn); }
.order-meta { font-size: 11px; color: var(--text3); margin-bottom: 8px; line-height: 1.5; }
.dl-bar-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dl-bar { flex: 1; height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.dl-bar .fill { height: 100%; border-radius: 2px; }
.dl-bar .fill.green { background: var(--brand); }
.dl-bar .fill.amber { background: var(--warn); }
.dl-bar .fill.red { background: var(--danger); }
.dl-time { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 600; min-width: 42px; text-align: right; }
.order-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 6px; font-size: 10px; font-weight: 600; cursor: pointer; border: 1px solid var(--brand); background: transparent; color: var(--brand); font-family: inherit; }
.order-btn.dim { border-color: var(--border); color: var(--text3); cursor: not-allowed; }
.order-btn.warn { border-color: var(--warn); color: var(--warn); }
.order-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); padding: 20px; }
.modal-sheet { width: 100%; max-width: 440px; background: var(--surface); border-radius: 18px; padding: 24px 22px 26px; border: 1px solid var(--border); }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; color: var(--text2); }
.modal-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; font-weight: 700; color: var(--text); font-size: 15px; display: flex; justify-content: space-between; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions button { flex: 1; padding: 13px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; border: 0; }
.modal-actions .secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }

.push-toggle { background: rgba(0,229,160,.04); border: 1px solid rgba(0,229,160,.1); border-radius: 7px; padding: 10px 12px; margin: 6px 0; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.push-toggle .chk { width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.push-toggle .chk.on { background: var(--brand); border-color: var(--brand); }

.note-box { padding: 9px 11px; margin: 7px 0; font-size: 10px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; border-radius: 7px; }
.note-red { background: rgba(255,82,82,.04); border: 1px solid rgba(255,82,82,.1); color: var(--text2); }
.note-green { background: rgba(0,229,160,.03); border: 1px solid rgba(0,229,160,.08); color: var(--text2); }

/* 成功浮层 */
@keyframes successPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.success-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(2px); }
.success-card { background: var(--surface); border: 1px solid var(--brand); border-radius: 20px; padding: 30px 40px; text-align: center; animation: successPop .4s cubic-bezier(.34,1.56,.64,1); }
.succ-circle { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,229,160,.08); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

/* Toast */
#toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 150; pointer-events: none; }
.toast { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 12px; color: var(--text); white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.4); animation: toastIn .3s ease; }
.toast.new-batch { border-color: var(--brand); }
.toast b { color: var(--brand); }
.toast .mono-hash { display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; color: var(--brand); white-space: normal; word-break: break-all; max-width: 340px; }
.toast:has(.mono-hash) { white-space: normal; max-width: 380px; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 认证遮罩 */
.auth-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.auth-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; }
.auth-logo { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 24px; color: var(--brand); text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; font-size: 11px; color: var(--text3); margin-bottom: 20px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 9px; text-align: center; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); font-family: inherit; }
.auth-tab.on { background: var(--brand); color: #000; border-color: var(--brand); }
.auth-msg { font-size: 11px; text-align: center; margin-top: 10px; min-height: 14px; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--brand); }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.2); border-top-color: #000; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
