:root {
  --ink: #17211c;
  --muted: #5d6b63;
  --paper: #f3efe4;
  --card: #fffdf8;
  --line: #d9d0bf;
  --accent: #1f6b4a;
  --accent-2: #c45c26;
  --danger: #9b2335;
  --ok: #1f6b4a;
  --shadow: 0 18px 40px rgba(23, 33, 28, 0.08);
  --focus: #0b5cab;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "Segoe UI Variable Text", sans-serif;
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sky { display: none; }
.sim-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.brand-row h1 { margin: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

html[data-theme="classic"] body {
  background:
    radial-gradient(circle at top right, rgba(196, 92, 38, 0.08), transparent 28%),
    linear-gradient(180deg, #ece6d6 0%, var(--paper) 40%);
}
html[data-theme="classic"] .login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
html[data-theme="classic"] .login-card,
html[data-theme="classic"] .topbar,
html[data-theme="classic"] .content,
html[data-theme="classic"] .stats .stat-card,
html[data-theme="classic"] table,
html[data-theme="classic"] .message-card,
html[data-theme="classic"] .panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
html[data-theme="classic"] .login-card { width: min(420px, 100%); padding: 32px 32px 28px; border-radius: 16px; }
html[data-theme="classic"] .eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--accent-2); margin: 0 0 8px; }
html[data-theme="classic"] h1,
html[data-theme="classic"] h2 { font-weight: 650; letter-spacing: -0.03em; margin: 0 0 12px; }
html[data-theme="classic"] .lede,
html[data-theme="classic"] p { color: var(--muted); line-height: 1.5; }
html[data-theme="classic"] label { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-size: 14px; }
html[data-theme="classic"] input,
html[data-theme="classic"] textarea,
html[data-theme="classic"] select,
html[data-theme="classic"] button {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
html[data-theme="classic"] textarea { min-height: 160px; resize: vertical; }
html[data-theme="classic"] button { background: var(--accent); color: white; border: 0; }
html[data-theme="classic"] button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
html[data-theme="classic"] button.danger { background: var(--danger); }
html[data-theme="classic"] .error { color: var(--danger); font-size: 14px; }
html[data-theme="classic"] .sidenav,
html[data-theme="classic"] #nav-toggle,
html[data-theme="classic"] .page-foot,
html[data-theme="classic"] .side-status { display: none; }
html[data-theme="classic"] .shell { min-height: 100vh; }
html[data-theme="classic"] .topbar,
html[data-theme="classic"] .stats,
html[data-theme="classic"] .tabs,
html[data-theme="classic"] .content { width: min(1180px, calc(100% - 32px)); margin: 20px auto; }
html[data-theme="classic"] .topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; flex-wrap: wrap; }
html[data-theme="classic"] .topbar-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
html[data-theme="classic"] .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
html[data-theme="classic"] .stat-card {
  text-align: left;
  padding: 16px;
  color: var(--ink);
  background: var(--card);
}
html[data-theme="classic"] .stat-card .stat-icon { display: none; }
html[data-theme="classic"] .stat-card strong { display: block; font-size: 28px; margin-top: 6px; }
html[data-theme="classic"] .stat-card.is-selected { outline: 3px solid var(--ink); }
html[data-theme="classic"] .tabs { display: flex; gap: 8px; flex-wrap: wrap; background: none; border: 0; box-shadow: none; }
html[data-theme="classic"] .tabs .nav-more { display: contents; }
html[data-theme="classic"] .tabs button { background: #fffdf8; color: var(--ink); border: 1px solid var(--line); }
html[data-theme="classic"] .tabs button.active { background: var(--ink); color: #fff; }
html[data-theme="classic"] .content { padding: 8px 0 40px; background: none; border: 0; box-shadow: none; }
html[data-theme="classic"] table { width: 100%; border-collapse: collapse; }
html[data-theme="classic"] th,
html[data-theme="classic"] td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
html[data-theme="classic"] th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
html[data-theme="classic"] .badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: #efe4c8; }
html[data-theme="classic"] .badge.ok { background: #dceee4; color: var(--ok); }
html[data-theme="classic"] .badge.warn { background: #f5e0c8; }
html[data-theme="classic"] .badge.bad { background: #f3d6db; color: var(--danger); }
html[data-theme="classic"] .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
html[data-theme="classic"] .message-card,
html[data-theme="classic"] .panel-card { padding: 20px; }
html[data-theme="classic"] #pin-dialog { border: 1px solid var(--line); padding: 24px; width: min(420px, 92vw); background: #fffdf8; color: var(--ink); }
html[data-theme="classic"] #pin-dialog::backdrop { background: rgba(23, 33, 28, 0.45); }
html[data-theme="classic"] menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 18px 0 0; }
html[data-theme="classic"] .empty,
html[data-theme="classic"] .status-line { padding: 28px; color: var(--muted); }
html[data-theme="classic"] code { font-family: Consolas, monospace; font-size: 12px; }
html[data-theme="classic"] .theme-switch { display: flex; gap: 6px; flex-wrap: wrap; }
html[data-theme="classic"] .theme-switch button { background: #fffdf8; color: var(--ink); }
html[data-theme="classic"] .theme-switch button[aria-checked="true"],
html[data-theme="classic"] .theme-switch button[aria-pressed="true"] { background: var(--ink); color: white; }
html[data-theme="classic"] .toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
html[data-theme="classic"] .toolbar label { margin: 0; font-size: 12px; }
html[data-theme="classic"] .pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
html[data-theme="classic"] .updated-label { margin: 0; font-size: 12px; }
html[data-theme="classic"] .template-list,
html[data-theme="classic"] .shot-grid { display: flex; flex-wrap: wrap; gap: 12px; }
html[data-theme="classic"] .shot-grid figure { width: min(280px, 100%); margin: 0; }
html[data-theme="classic"] .shot-grid img { width: 100%; height: auto; border: 1px solid var(--line); background: white; }

.badge::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: currentColor; display: inline-block; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 20; }
.toast { margin: 0; padding: 12px 14px; border-radius: 10px; background: #17211c; color: white; max-width: 320px; }
.operator-list { display: grid; gap: 16px; }
.operator-job { display: grid; gap: 8px; margin: 0; padding: 22px; }
.operator-job h2 { margin: 0; font-size: 1.7rem; }
.operator-job .amount { margin: 0; font-size: 2rem; font-weight: 700; }
.operator-job .account { margin: 0; font-size: 1.15rem; }
.operator-job .row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.operator-job .row-actions button,
.operator-job .row-actions a { font-size: 1.15rem; padding: 12px 18px; }
.toast.error { background: #9b2335; }

@media (max-width: 800px) {
  .order-table thead { display: none; }
  .order-table,
  .order-table tbody,
  .order-table tr,
  .order-table td { display: block; width: 100%; }
  .order-table tr { margin: 0 0 12px; padding: 8px 0; }
  .order-table td { border: 0; padding: 4px 12px; }
  .order-table td::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
