/* OmniEmail — neon console theme. 无外部字体/CDN，满足 CSP。 */
:root {
  --bg: #05070d;
  --panel: rgba(12, 18, 33, 0.74);
  --panel-solid: #0c1221;
  --line: rgba(0, 240, 255, 0.14);
  --line-strong: rgba(0, 240, 255, 0.4);
  --text: #d7e3f4;
  --muted: #7d8ba3;
  --cyan: #00f0ff;
  --violet: #a855f7;
  --green: #2bff88;
  --amber: #ffc857;
  --red: #ff4d6d;
  --radius: 12px;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --topbar-h: 60px;
  --tabbar-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
a { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--violet); }
[hidden] { display: none !important; }

/* ── background fx ─────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 80%);
}
.bg-glow {
  position: fixed; inset: -20%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(168, 85, 247, 0.22), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(0, 240, 255, 0.16), transparent 45%);
}
.scanline {
  position: fixed; left: 0; right: 0; top: 0; height: 140px; z-index: 60; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.045) 50%, transparent);
  animation: scan 8s linear infinite;
}
@keyframes scan { from { transform: translateY(-140px); } to { transform: translateY(100vh); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── buttons & inputs ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(0, 240, 255, 0.06);
  color: var(--text); font-weight: 600; letter-spacing: 0.02em; text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn:hover { background: rgba(0, 240, 255, 0.12); box-shadow: 0 0 16px rgba(0, 240, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  border-color: transparent; color: #031018;
  background: linear-gradient(90deg, var(--cyan), #7af6ff);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.btn-primary:hover { background: linear-gradient(90deg, #5ff7ff, #b0fbff); box-shadow: 0 0 26px rgba(0, 240, 255, 0.55); }
.btn-danger { border-color: rgba(255, 77, 109, 0.55); color: #ffb3c1; background: rgba(255, 77, 109, 0.08); }
.btn-danger:hover { background: rgba(255, 77, 109, 0.18); box-shadow: 0 0 16px rgba(255, 77, 109, 0.3); }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-code { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 240, 255, 0.08); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--cyan); }
.icon-btn:disabled { opacity: 0.4; }
.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(3, 8, 18, 0.7); color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.field-wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.check input, td input[type="checkbox"], th input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cyan); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-error { min-height: 20px; margin: 0; color: var(--red); font-size: 13px; }

/* ── badges / tags / status ───────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; min-width: 24px; height: 20px; padding: 0 7px;
  border-radius: 999px; font-size: 11px; color: var(--cyan); background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--line);
}
.tag {
  flex: none; font: 600 10px/1 var(--mono); padding: 4px 6px; border-radius: 4px;
  letter-spacing: 0.08em; border: 1px solid currentColor;
}
.tag-microsoft { color: #4cc2ff; }
.tag-gmail { color: #ff7b7b; }
.tag-imap { color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.status-ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-error { background: var(--red); box-shadow: 0 0 8px var(--red); }
.status-checking { background: var(--amber); animation: pulse 1s infinite; }
.status-warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.status-pill.err { color: #ffb3c1; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); list-style: none; }
.empty.error { color: #ffb3c1; }
.skeleton-wrap { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.skeleton {
  height: 52px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0, rgba(0,240,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 800px 100%; animation: shimmer 1.4s linear infinite;
}

/* ── shell ────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 24px;
  background: rgba(5, 7, 13, 0.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0.7;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  font: 700 18px/1 var(--mono); letter-spacing: 0.14em; white-space: nowrap;
}
.brand-mark { color: var(--cyan); font-size: 20px; text-shadow: 0 0 12px var(--cyan); }
.brand-lg { font-size: 26px; justify-content: center; }
.topnav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 500; border: 1px solid transparent;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(0, 240, 255, 0.06); }
.nav-link.active {
  color: var(--cyan); border-color: var(--line-strong); background: rgba(0, 240, 255, 0.08);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.12);
}
.userbox { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip { font-size: 12px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.view {
  position: fixed; left: 0; right: 0; bottom: 0; overflow: auto;
  top: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
}
.view[data-route="mail"] { overflow: hidden; }
.tabbar { display: none; }

/* ── panels & pages ───────────────────────────────────────── */
.panel, .pane {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.panel::before, .pane::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 18px; height: 18px; pointer-events: none;
  border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); border-top-left-radius: var(--radius);
}
.panel::after, .pane::after {
  content: ""; position: absolute; bottom: -1px; right: -1px; width: 18px; height: 18px; pointer-events: none;
  border-bottom: 2px solid var(--violet); border-right: 2px solid var(--violet); border-bottom-right-radius: var(--radius);
}
.page { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; animation: rise 0.3s ease; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title { margin: 0; font: 700 20px/1.2 var(--mono); letter-spacing: 0.08em; }
.page-title::before { content: "// "; color: var(--violet); }
.page-head .btn { margin-left: auto; }
.pane-foot { padding: 0 6px 6px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex: 1; min-width: 260px; }
.filters .input:first-child { flex: 1; }
.filters select.input { width: auto; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sel-info { font-size: 12px; color: var(--muted); min-height: 18px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 12px; font: 600 11px/1 var(--mono); letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(0, 240, 255, 0.06); vertical-align: middle; }
.data-table tr:hover td { background: rgba(0, 240, 255, 0.03); }
.data-table tr.selected td { background: rgba(0, 240, 255, 0.07); }
.col-check { width: 44px; }
.check-hit { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mobile-only { display: none; }
.col-actions { white-space: nowrap; text-align: right; }
.col-actions .btn { margin-left: 6px; }
.cell-email { word-break: break-all; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font: 600 14px/1 var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.notice {
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.08); color: var(--amber);
}
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 8px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); }
.card-grid { align-items: start; }

/* ── mail layout ──────────────────────────────────────────── */
.mail-layout {
  display: grid; height: 100%; gap: 14px;
  grid-template-columns: 300px minmax(320px, 420px) minmax(0, 1fr);
}
.pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.pane-head { padding: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pane-title {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.pane-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pane-title-text {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 13px/1.3 var(--mono); color: var(--cyan);
}
.back-btn { display: none; }
.box-list, .msg-list {
  list-style: none; margin: 0; padding: 6px; flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
}
.box-item, .msg-item {
  display: flex; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.box-item { align-items: center; gap: 10px; min-height: 52px; }
.box-item:hover, .msg-item:hover { background: rgba(0, 240, 255, 0.05); }
.box-item.active, .msg-item.active {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.12), rgba(168, 85, 247, 0.06));
}
.box-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.box-email, .box-remark, .msg-from, .msg-subject, .msg-preview, .read-from span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.box-email { font: 13px/1.4 var(--mono); }
.box-remark { font-size: 12px; color: var(--muted); }
.msg-item { flex-direction: column; gap: 4px; min-height: 72px; }
.msg-top { display: flex; justify-content: space-between; gap: 10px; }
.msg-from { font-weight: 600; }
.msg-time { flex: none; font-size: 11px; color: var(--muted); }
.msg-subject { font-size: 13px; }
.msg-bottom { display: flex; align-items: center; gap: 8px; }
.msg-preview { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.code-chip {
  position: relative; flex: none; padding: 2px 8px; border-radius: 6px; cursor: pointer; font-size: 12px;
  color: #031018; background: var(--cyan); box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.seg { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.seg-item {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; min-height: 36px;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.seg-item.active {
  color: #031018; background: linear-gradient(90deg, var(--cyan), #7af6ff);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}
.read-subject { margin: 0; flex: 1; min-width: 0; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.read-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px;
  font: 700 16px var(--mono); color: #031018; background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.read-from { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.read-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
.read-tools:empty { display: none; }
.read-body { flex: 1; min-height: 0; display: flex; padding: 12px 14px 14px; }
.mail-frame { flex: 1; width: 100%; border: 0; border-radius: 10px; background: #fff; }
.mail-text {
  flex: 1; margin: 0; padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 13px/1.7 var(--mono); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 10px;
}
.read-empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.radar {
  position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle, transparent 29%, rgba(0, 240, 255, 0.12) 30%, transparent 31%,
    transparent 59%, rgba(0, 240, 255, 0.12) 60%, transparent 61%);
}
.radar::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 240, 255, 0.4), transparent 25%);
  animation: spin 3s linear infinite;
}

/* ── modal & toast ────────────────────────────────────────── */
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0;
  border: 1px solid var(--line-strong); border-radius: 16px; color: var(--text);
  background: var(--panel-solid); box-shadow: 0 0 40px rgba(0, 240, 255, 0.18);
}
.modal-wide { width: min(820px, calc(100vw - 32px)); }
.modal[open] { display: flex; flex-direction: column; animation: rise 0.2s ease; }
.modal::backdrop { background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 700 16px/1.2 var(--mono); letter-spacing: 0.06em; }
.modal-body { padding: 18px; overflow: auto; flex: 1; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px;
  padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.checklist { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.checklist label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.checklist label:hover { background: rgba(0, 240, 255, 0.05); }
.import-result { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.import-stats { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--mono); }
.import-errors { margin: 0; padding: 10px 10px 10px 28px; max-height: 180px; overflow: auto; color: #ffb3c1; background: rgba(255, 77, 109, 0.06); border-radius: 10px; font-size: 12px; }
.clip-helper { position: fixed; left: -9999px; top: 0; opacity: 0; pointer-events: none; }
.toasts {
  position: fixed; z-index: 100; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(8, 14, 28, 0.95); box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  animation: rise 0.2s ease; transition: opacity 0.4s;
}
.toast-error { border-color: rgba(255, 77, 109, 0.6); color: #ffc2cd; }
.toast-success { border-color: rgba(43, 255, 136, 0.5); color: #b8ffd8; }
.toast.out { opacity: 0; }

/* ── login ────────────────────────────────────────────────── */
.login-page { overflow: auto; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; animation: rise 0.4s ease; }
.login-sub { margin: -6px 0 8px; text-align: center; font-size: 11px; letter-spacing: 0.4em; color: var(--muted); }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  .mail-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .mail-layout .pane-read { display: none; }
  .mail-layout[data-level="read"] .pane-list { display: none; }
  .mail-layout[data-level="read"] .pane-read { display: flex; }
  .mail-layout[data-level="read"] .pane-read .back-btn { display: inline-grid; }
}
@media (max-width: 767px) {
  :root { --topbar-h: 52px; }
  .topnav, .user-chip { display: none; }
  .topbar { gap: 12px; }
  .brand { font-size: 16px; }
  .view { padding: 10px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(5, 7, 13, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tab-link {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 44px; color: var(--muted); text-decoration: none; font-size: 11px;
  }
  .tab-link .nav-icon { font-size: 18px; }
  .tab-link.active { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); }
  .mail-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mail-layout .pane { display: none; }
  .mail-layout[data-level="boxes"] .pane-boxes,
  .mail-layout[data-level="list"] .pane-list,
  .mail-layout[data-level="read"] .pane-read { display: flex; }
  .mail-layout .back-btn { display: inline-grid; }
  .read-subject { font-size: 16px; }
  .input, select.input, textarea.input { font-size: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
  .filters .input:first-child { grid-column: 1 / -1; }
  .filters select.input { width: 100%; }
  .icon-btn { width: 44px; height: 44px; }
  .btn, .btn-sm, .seg-item, .input, select.input, textarea.input { min-height: 44px; }
  .code-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; }
  .code-chip::after { content: ""; position: absolute; inset: -6px -4px; }
  .toasts { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
  .toolbar-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr {
    position: relative; margin-bottom: 10px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 8, 18, 0.4);
  }
  .data-table td { position: relative; min-height: 30px; padding: 4px 0 4px 84px; border: 0; }
  .data-table td[data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 6px; width: 76px;
    font-size: 12px; color: var(--muted);
  }
  .data-table td.col-check { position: absolute; top: 0; right: 0; z-index: 2; width: auto; min-height: 0; padding: 0; }
  .data-table tr:hover td, .data-table tr.selected td { background: transparent; }
  .data-table tr.selected { background: rgba(0, 240, 255, 0.07); border-color: var(--line-strong); }
  .data-table td.col-check .check-hit { width: 44px; height: 44px; }
  .data-table td.cell-email { padding-right: 44px; }
  .mobile-only { display: inline-flex; }
  .table-wrap.panel { background: transparent; border: 0; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
  .table-wrap.panel::before, .table-wrap.panel::after { display: none; }
  .data-table td.col-actions { padding: 8px 0 0; text-align: left; display: flex; gap: 8px; flex-wrap: wrap; }
  .data-table td.col-actions .btn { margin: 0; min-height: 44px; flex: 1; }
  .data-table td.empty { padding: 20px 0; }
  .modal, .modal-wide {
    width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0;
    border-radius: 18px 18px 0 0; border-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scanline, .radar::after { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
