/* ===========================================================
   Account Vault — refined dark workspace
   =========================================================== */
:root {
  --bg:          #07090d;
  --surface:     #10151d;
  --surface-a:   #111821e8;
  --surface-2:   #171e28;
  --surface-3:   #212a36;
  --border:      #ffffff1a;
  --border-soft: #ffffff10;
  --text:        #f4f7fb;
  --text-dim:    #c8d0dc;
  --muted-fg:    #8d99aa;
  --accent:      #0a84ff;
  --accent-2:    #64d2ff;
  --accent-ghost:#0a84ff24;
  --green:       #30d158;
  --green-bg:    #30d15820;
  --amber:       #ffd60a;
  --amber-bg:    #ffd60a1f;
  --red:         #ff453a;
  --red-bg:      #ff453a1f;
  --radius:      8px;
  --radius-sm:   6px;
  --shadow:      0 1px 1px #0008, 0 18px 50px -32px #000;
  --shadow-soft: 0 1px 0 #ffffff08 inset, 0 10px 30px -24px #000;
  --sidebar-w:   228px;
  --font:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai",
                 "Sarabun", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #ffffff05, transparent 220px),
    linear-gradient(90deg, #0a84ff12, transparent 32%, transparent 68%, #64d2ff0d);
  opacity: .55;
}
.is-hidden { display: none !important; }
.muted { color: var(--muted-fg); }
.spacer { flex: 1; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: 13px;
  min-height: 38px; padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .16s, border-color .16s, transform .08s, color .16s, box-shadow .16s;
  text-decoration: none; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 36px; padding: 7px 11px; font-size: 12.5px; }
.btn--block { width: 100%; justify-content: center; padding: 11px; }
.btn--primary { background: var(--accent); border-color: #ffffff1f; color: #fff; box-shadow: 0 8px 24px -16px var(--accent); }
.btn--primary:hover { background: #2694ff; box-shadow: 0 12px 32px -18px var(--accent); }
.btn--ghost { background: #ffffff0b; border-color: var(--border); color: var(--text-dim); }
.btn--ghost:hover { background: #ffffff12; color: var(--text); border-color: #ffffff28; }
.btn--warning { background: var(--amber-bg); border-color: #ffd60a55; color: #ffe06a; }
.btn--warning:hover { background: #ffd60a2b; }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: #dc2626; }
.btn--ghostdanger { background: var(--red-bg); border-color: #ef444455; color: #f87171; }
.btn--ghostdanger:hover { background: #ef44442e; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: #ffffff0b; border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: #ffffff14; color: var(--text); }

/* ---------- brand mark ---------- */
.brand-mark {
  display: block;
  width: 36px; height: 36px; border-radius: var(--radius); flex: none;
  object-fit: cover; object-position: center;
  background: #f4f7fb; border: 1px solid #ffffff30;
  box-shadow: 0 10px 28px -22px #fff;
}

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.field-stack { display: flex; flex-direction: column; gap: 14px; }
input, select, textarea {
  font: inherit; color: var(--text); width: 100%;
  background: #ffffff0b; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  background: #ffffff10;
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost);
}
input::placeholder, textarea::placeholder { color: #758195; }
select { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a8499' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }

/* ===================== AUTH ===================== */
.boot-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.boot-card {
  display: flex; align-items: center; gap: 13px;
  min-width: 250px; background: var(--surface-a);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.boot-card h1 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }
.auth {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; padding: 24px;
}
.auth__card {
  width: 100%; max-width: 390px; background: var(--surface-a);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.auth__brand { display: flex; align-items: center; gap: 13px; margin-bottom: 6px; }
.auth__eyebrow { margin: 0; font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.auth__card h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.25; }
.auth__copy { margin: 0 0 22px; font-size: 13px; }
.auth__msg { margin: 14px 0 0; font-size: 13px; color: #fbbf24; min-height: 18px; }
.auth__foot { font-size: 12px; }

/* ===================== SHELL ===================== */
.shell { display: flex; min-height: 100dvh; }
.nav-overlay { display: none; }

/* sidebar */
.sidebar {
  width: var(--sidebar-w); flex: none; position: sticky; top: 0; height: 100dvh;
  background: #0d1219d9; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 40;
  backdrop-filter: blur(18px);
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 20px; }
.sidebar__title { font-weight: 700; font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 5px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  min-height: 42px; padding: 10px 11px; border-radius: var(--radius); border: 1px solid transparent;
  background: transparent; color: var(--text-dim); font: inherit; font-weight: 600;
  font-size: 13.5px; cursor: pointer; text-align: left; transition: background .15s, color .15s, border-color .15s;
}
.nav__item:hover { background: #ffffff0b; color: var(--text); }
.nav__item.is-active { background: #ffffff12; border-color: #ffffff1d; color: var(--text); }
.nav__item.is-active .ic { stroke: var(--accent-2); }
.sidebar__foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
}
.who { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.who__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #ffffff12; border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.who__name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: #07090ddb; backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar__menu { display: none; }
.topbar__title { margin: 0; font-size: 18px; font-weight: 750; flex: 1; line-height: 1.25; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 24px; max-width: 1260px; width: 100%; margin: 0 auto; }

/* views */
.view { display: none; animation: fade .25s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.stat {
  background: var(--surface-a); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-soft); backdrop-filter: blur(14px);
}
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .85; }
.stat--green::before { background: var(--green); }
.stat--amber::before { background: var(--amber); }
.stat--red::before { background: var(--red); }
.stat--cyan::before { background: var(--accent-2); }
.stat__label { font-size: 12px; color: var(--muted-fg); font-weight: 650; }
.stat__value { font-size: 23px; font-weight: 800; margin-top: 2px; letter-spacing: 0; line-height: 1.15; }

/* toolbar */
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); stroke: var(--muted-fg); }
.search input { padding-left: 38px; }
.toolbar .select { width: 180px; flex: none; }

/* account cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 13px;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.card:hover { border-color: #2f3a4f; box-shadow: var(--shadow); }
.card__top { display: flex; align-items: flex-start; gap: 10px; }
.card__no {
  flex: none; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px;
  background: var(--surface-3); color: var(--text-dim); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.card__head { flex: 1; min-width: 0; }
.card__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.chip {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-dim); border: 1px solid var(--border);
}
.pill {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent;
}
.pill--green { background: var(--green-bg); color: #4ade80; border-color: #22c55e44; }
.pill--amber { background: var(--amber-bg); color: #fbbf24; border-color: #f59e0b44; }
.pill--blue  { background: #64d2ff1f; color: #8be5ff; border-color: #64d2ff44; }
.pill--red   { background: var(--red-bg);   color: #f87171; border-color: #ef444444; }

.card__fields { display: flex; flex-direction: column; gap: 1px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-soft); }
.frow { display: flex; align-items: center; gap: 8px; padding: 8px 11px; background: var(--surface-2); min-height: 36px; }
.frow__key { font-size: 11.5px; color: var(--muted-fg); font-weight: 600; width: 84px; flex: none; }
.frow__val { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frow__val.is-secret { letter-spacing: 0; color: var(--muted-fg); }
.frow__val a { color: var(--accent-2); text-decoration: none; }
.frow__val a:hover { text-decoration: underline; }
.mini {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 28px; padding: 0 9px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 650;
  background: #ffffff0b; border: 1px solid var(--border); color: var(--text-dim);
  transition: background .12s, color .12s;
}
.mini:hover { background: var(--accent-ghost); color: var(--accent-2); border-color: #2f7de155; }
.mini .ic { width: 13px; height: 13px; }

.card__foot { display: flex; align-items: center; gap: 8px; }
.card__meta { flex: 1; min-width: 0; font-size: 11px; color: var(--muted-fg); line-height: 1.4; overflow: hidden; }
.card__meta b { color: var(--text-dim); font-weight: 600; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted-fg); border: 1px dashed var(--border); border-radius: var(--radius); grid-column: 1 / -1; }
.empty--compact { padding: 26px 18px; margin: 0; }

/* section head */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.section-head__actions { display: flex; gap: 8px; }

/* panels & tables */
.panel { background: var(--surface-a); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); }
.table-scroll { overflow-x: auto; scrollbar-color: var(--surface-3) transparent; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0;
  color: var(--text-dim); font-weight: 750; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #ffffff05; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #ffffff07; }
.done-row { opacity: .62; }
.result-done { color: #4ade80; font-weight: 700; }
.result-pending { color: var(--muted-fg); }
.note-input { padding: 7px 9px; font-size: 12.5px; min-width: 150px; }
.check-toggle { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }

.form-panel { padding: 22px; max-width: 460px; }
.form-panel h4 { margin: 0 0 4px; font-size: 15px; }
.form-panel .field-stack { margin: 16px 0 18px; }

/* status select (pill) */
.status-select { padding: 4px 24px 4px 10px; font-size: 11.5px; font-weight: 700; border-radius: 999px; width: auto; min-width: 104px; }

/* ===================== SHEET TABLE (accounts) ===================== */
.sheet-hint { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; color: var(--muted-fg); }
.sheet { min-width: 1280px; }
.sheet th, .sheet td { white-space: nowrap; vertical-align: middle; }
.sheet .sticky-col { position: sticky; left: 0; z-index: 2; background: #111821; }
.sheet thead .sticky-col { z-index: 3; }
.sheet tbody tr:hover .sticky-col { background: #18212c; }
.rowno { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: #ffffff0d; color: var(--text-dim); font-weight: 700; font-size: 12px; border: 1px solid var(--border-soft); }
.namecell { min-width: 150px; }
.namecell__name { font-weight: 700; font-size: 13.5px; }
.namecell__meta { font-size: 11px; color: var(--muted-fg); margin-top: 2px; }
.cc { display: flex; align-items: center; gap: 6px; max-width: 220px; }
.cc__v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc__v.is-secret { letter-spacing: 0; color: var(--muted-fg); }
.profile-link {
  color: var(--accent-2);
  font-weight: 650;
  text-decoration: none;
  text-decoration-color: #32b8a666;
  text-underline-offset: 3px;
}
.profile-link:hover { color: #9be8ff; text-decoration: underline; text-decoration-color: currentColor; }
.rowtools { display: flex; gap: 6px; }
.mini--open { text-decoration: none; }
.mini--danger { background: var(--red-bg); border-color: #ef444455; color: #f87171; }
.mini--danger:hover { background: #ef44442e; color: #fca5a5; }

/* users page */
.users-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.users-layout .form-panel { max-width: none; margin: 0; }
.user-form { position: sticky; top: 78px; }
.panel-title { display: flex; flex-direction: column; gap: 2px; }
.panel-title h4,
.users-list__head h4 { margin: 0; font-size: 16px; line-height: 1.25; }
.panel-kicker {
  color: var(--accent-2); font-size: 10.5px; line-height: 1.2;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0;
}
.users-list { overflow: hidden; }
.users-list__head { padding: 18px 18px 12px; border-bottom: 1px solid var(--border-soft); }
.user-cards { display: grid; gap: 10px; padding: 12px; }
.user-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  align-items: center; padding: 13px; border-radius: var(--radius);
  background: #ffffff07; border: 1px solid var(--border-soft);
}
.user-card:hover { border-color: #ffffff24; background: #ffffff0a; }
.user-card__identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-card__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: linear-gradient(180deg, #ffffff18, #ffffff0a);
  border: 1px solid var(--border); color: var(--text); font-weight: 800;
}
.user-card__name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.user-card__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card__name span { font-size: 11.5px; }
.user-card__status { justify-self: end; }
.user-card__meta {
  grid-column: 1 / 2; display: flex; flex-direction: column; gap: 1px;
  color: var(--muted-fg); font-size: 11.5px; padding-left: 47px;
}
.user-card__meta strong { color: var(--text-dim); font-weight: 650; font-size: 12px; }
.user-card__actions { justify-self: end; align-self: end; flex-wrap: wrap; justify-content: flex-end; }
.users-audit-head { margin-top: 24px; }
.audit-panel { overflow: hidden; }
.audit-feed { display: grid; gap: 0; }
.audit-item {
  display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.audit-item:last-child { border-bottom: 0; }
.audit-item__time { color: var(--muted-fg); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.audit-item__body { min-width: 0; }
.audit-item__title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.audit-item__title strong { font-size: 13.5px; }
.audit-item__title span { color: var(--text-dim); font-size: 12px; font-weight: 650; }
.audit-item__meta { margin-top: 2px; color: var(--muted-fg); font-size: 12px; }
.audit-item p {
  margin: 7px 0 0; color: var(--text-dim); font-size: 12.5px;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .users-layout { grid-template-columns: 1fr; }
  .user-form { position: static; }
}
@media (max-width: 560px) {
  .user-cards { padding: 10px; }
  .user-card { grid-template-columns: 1fr; align-items: start; }
  .user-card__status,
  .user-card__actions { justify-self: start; }
  .user-card__meta { padding-left: 47px; }
  .audit-item { grid-template-columns: 1fr; gap: 6px; padding: 13px 14px; }
}

/* shift selector */
.shift-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shift-pick { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: #ffffff0a; border: 1px solid var(--border); border-radius: var(--radius); }
.shift-btn {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
  border-radius: var(--radius-sm); padding: 9px 13px; font: inherit;
  transition: border-color .15s, background .15s, color .15s, transform .05s, box-shadow .15s;
}
.shift-btn:hover { background: #ffffff0a; color: var(--text); }
.shift-btn:active { transform: translateY(1px); }
.shift-btn.is-active { border-color: #ffffff16; background: #ffffff16; color: var(--text); box-shadow: 0 8px 24px -20px #000; }
.shift-btn__mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: #ffffff08; border: 1px solid var(--border-soft);
  color: var(--text-dim); font-size: 11px; font-weight: 800;
}
.shift-btn.is-active .shift-btn__mark {
  background: #f4f7fb; border-color: #ffffff40; color: #0b0f14;
}
.shift-btn__t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.shift-btn__t b { font-size: 14px; }
.shift-btn__t small { font-size: 11.5px; color: var(--muted-fg); }
.shift-btn.is-active .shift-btn__t small { color: var(--accent-2); }
.shift-info { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
@media (max-width: 560px) {
  .shift-bar { flex-direction: column; align-items: stretch; }
  .shift-pick { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ===================== EDITOR SLIDE-OVER ===================== */
.editor-overlay { position: fixed; inset: 0; background: #00000088; backdrop-filter: blur(2px); z-index: 60; animation: fade .2s; }
.editor {
  position: fixed; top: 0; right: 0; height: 100dvh; width: 480px; max-width: 94vw; z-index: 61;
  background: #0f151de8; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; box-shadow: -20px 0 50px -20px #000c;
  animation: slidein .25s ease;
  backdrop-filter: blur(18px);
}
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.editor__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.editor__head h3 { margin: 0; font-size: 17px; }
.editor__body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2__full { grid-column: 1 / -1; }
.editor__actions { display: flex; align-items: center; gap: 10px; padding-top: 4px; }

/* ===================== TOAST ===================== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80;
  background: #151b24f0; border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
  animation: toastin .2s ease;
}
@keyframes toastin { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: 20px 0 50px -20px #000c;
  }
  .shell.nav-open .sidebar { transform: none; }
  .nav-overlay {
    position: fixed; inset: 0; z-index: 35; display: none;
    border: 0; padding: 0; margin: 0; cursor: pointer;
    background: #00000088; backdrop-filter: blur(1px);
  }
  .shell.nav-open .nav-overlay {
    display: block;
  }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar__menu { display: inline-flex; }
  .topbar__title { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar__actions { gap: 6px; }
  .btn__label { display: none; }
  .topbar__actions .btn--sm { width: 36px; height: 36px; justify-content: center; padding: 0; }
  .content { padding: 14px; padding-bottom: 28px; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat__value { font-size: 21px; }
  .toolbar { flex-direction: column; }
  .toolbar .select { width: 100%; }
  .sheet-hint { gap: 6px; font-size: 11.5px; }
  .sheet-hint span:nth-child(2) { display: none; }
  .table th, .table td { padding: 9px 10px; }
  .editor { width: 100vw; max-width: 100vw; }
  .grid2 { grid-template-columns: 1fr; }
  .editor__actions { position: sticky; bottom: 0; background: #0f151d; padding-top: 12px; border-top: 1px solid var(--border-soft); }
}
