/* Aurora app shell + shared building blocks. Class-only (CSP: no inline styles).
   Dynamic values go through CSS custom properties set from JS. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
html[lang="th"] body, html[lang="th"] button, html[lang="th"] input, html[lang="th"] select, html[lang="th"] textarea { font-family: var(--font-th); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: var(--r-btn);
  border: 1px solid #cfc9b9; background: #fff; color: var(--ink); text-decoration: none; line-height: 1.2;
  min-height: 38px; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.btn.primary:hover { background: var(--charcoal-2); }
.btn.gold { background: var(--gold-2); border-color: var(--gold-2); color: var(--charcoal); font-weight: 700; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 32px; padding: 6px 12px; font-size: 12px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: 13px; }

/* ---------- surfaces ---------- */
.page { max-width: 1312px; margin: 0 auto; padding: 28px var(--gutter) 40px; }
.page.wide { max-width: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px; }
.page-head h1, .h1 { font-size: 26px; font-weight: 600; }
.sub { color: var(--ink-2); font-size: 14px; }
.crumb { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.card.pad { padding: 18px 20px; }
.card.hot { border-color: var(--red-line); background: var(--red-soft); }
.card.now { border: 2px solid var(--gold); }
.card h2 { font-size: 14px; font-weight: 600; }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.sec-label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 16px 20px 8px; margin: 0; }
.sec-label.flush { padding-left: 0; padding-right: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; }
.two-col > .main { flex: 999 1 620px; min-width: 0; }
.two-col > .side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 960px) { .grid.c4, .grid.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4, .grid.c5 { grid-template-columns: 1fr; } .grid.c4.keep2, .grid.c5.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-4); display: inline-block; }
.dot.red { background: var(--red); } .dot.gold { background: var(--gold); } .dot.blue { background: var(--blue); }
.dot.green { background: var(--green); } .dot.grey { background: var(--ink-4); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 16px; padding: 3px 10px; background: var(--line-soft); color: var(--ink); line-height: 1.3; white-space: nowrap; }
.pill.amber { background: var(--amber-soft); color: var(--amber-ink); }
.pill.green { background: var(--green-soft); color: var(--green-ink); }
.pill.red { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); }
.pill.blue { background: #e4ecf7; color: var(--blue); }
.pill.dark { background: var(--charcoal); color: #fff; }
.who { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; border-radius: 4px; padding: 1px 5px; background: var(--line-soft); color: var(--ink-2); margin-left: 4px; text-transform: uppercase; }

.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: block; text-decoration: none; color: inherit; min-width: 0; }
a.kpi:hover { border-color: var(--gold); }
.kpi .n { font-size: 28px; font-weight: 600; line-height: 1.15; }
.kpi .l { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.kpi.hot { border-color: var(--red-line); background: var(--red-soft); }
.kpi .delta { font-size: 12px; font-weight: 600; margin-left: 6px; color: var(--green-ink); }
.kpi .delta.neg { color: var(--red); }
.kpi.sm .n { font-size: 22px; }

/* task / inbox rows */
.task-list { overflow: hidden; }
.task { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.task:last-child { border-bottom: 0; }
.task .body { min-width: 0; flex: 1; }
.task .t1 { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.task .t2 { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.task .btn { margin-left: auto; flex: none; }

/* where is it */
.where-is-it { background: var(--sand); border: 1px dashed #d8d2c0; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); }
.where-is-it b { color: var(--ink); display: block; margin-bottom: 6px; font-size: 13px; }
.where-is-it ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.where-is-it a { color: var(--ink); font-weight: 600; }

/* next step card */
.next-step { background: var(--card); border: 2px solid var(--gold); border-radius: var(--r-card); margin-bottom: 16px; }
.next-step .ch { padding: 16px 20px 12px; }
.next-step .eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); font-weight: 700; }
.next-step h2 { font-size: 18px; margin: 4px 0 2px; font-weight: 600; }
.next-step p { margin: 0; font-size: 13px; color: var(--ink-2); }
.next-step .act { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 18px; }
.next-step .note { margin: 0 20px 18px; font-size: 13px; background: var(--sand); border-radius: 10px; padding: 10px 12px; color: var(--ink-2); }
.next-step.calm { border-color: var(--line); }
.next-step.calm .eyebrow { color: var(--ink-3); }

/* progress strip */
.progress-strip { display: flex; overflow-x: auto; padding: 0 0 18px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.progress-strip .st { flex: 1 0 128px; position: relative; padding-top: 26px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.progress-strip .st::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: #dcd7c8; }
.progress-strip .st i { position: absolute; top: 0; left: 0; width: 19px; height: 19px; border-radius: 50%; background: #dcd7c8; display: block; }
.progress-strip .st.done { color: var(--ink); }
.progress-strip .st.done::before, .progress-strip .st.done i { background: var(--green); }
.progress-strip .st.now { color: var(--ink); font-weight: 700; }
.progress-strip .st.now i { background: var(--gold); box-shadow: 0 0 0 5px #b8893a33; }
.progress-strip .st.now::before { background: linear-gradient(90deg, var(--green), #dcd7c8); }
.progress-strip .st small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.empty { text-align: center; padding: 48px 24px; }
.empty .glyph { width: 52px; height: 52px; border-radius: 16px; background: var(--gold-soft); color: var(--gold-ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 16px; }
.skeleton { background: linear-gradient(90deg, #efeadd, #f7f3e8, #efeadd); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 12px; height: 76px; margin-bottom: 12px; }
.skeleton.title { height: 30px; width: 40%; }
@keyframes sk { to { background-position: -200% 0; } }

/* forms + tables (shared look for the feature views) */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=tel], input[type=url], select, textarea {
  width: 100%; border: 1px solid #cfc9b9; background: #fff; border-radius: var(--r-btn); padding: 10px 12px; min-height: 40px; font-size: 14px;
}
textarea { min-height: 84px; resize: vertical; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
table.tbl th, table.tbl td { padding: 10px 20px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.tbl th { font-size: 12px; color: var(--ink-3); font-weight: 600; border-top: 0; }
table.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.list-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border: 0; }
.list-row > span:last-child { color: var(--ink-2); text-align: right; }

/* ---------- preview banner ---------- */
.preview-banner {
  position: sticky; top: 0; z-index: 60; background: var(--banner); color: #fff; font-size: 13px;
  padding: 8px var(--gutter); display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center;
}
.preview-banner b { font-weight: 600; }
.preview-banner .msg { opacity: .92; flex: 1 1 280px; }
.preview-banner .x { margin-left: auto; border: 1px solid #ffffff88; background: transparent; color: #fff; border-radius: 6px; padding: 3px 10px; font-size: 13px; min-height: 28px; }
.preview-banner .x:hover { background: #ffffff22; }
.ro-chip { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--amber-soft); color: var(--amber-ink); border-radius: 12px; padding: 3px 9px; white-space: nowrap; }

/* ---------- shell: top layouts (today, board, marketing) ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell .frame { flex: 1; display: flex; min-width: 0; }
.shell .col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: var(--banner-h); z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 26px; padding: 0 var(--gutter); min-height: var(--topbar-h);
}
.topbar .logo { height: 36px; width: auto; display: block; }
.topbar .logo-link { display: flex; align-items: center; flex: none; }
.tabs { display: flex; align-items: stretch; gap: 26px; align-self: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--gold); }
.tab .badge, .side-item .badge { font-style: normal; font-size: 11px; background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.search-btn {
  background: var(--chip); border: 0; border-radius: 10px; padding: 9px 14px; font-size: 13px; color: var(--ink-3);
  width: 260px; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; min-height: 38px;
}
.search-btn kbd { font: inherit; font-size: 12px; color: var(--ink-3); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--avatar); color: var(--avatar-ink); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; border: 0; flex: none; }
.chip-btn { font-size: 13px; border: 1px solid #cfc9b9; border-radius: 10px; padding: 8px 12px; background: #fff; min-height: 36px; white-space: nowrap; }
.chip-btn b { font-weight: 600; }
.chip-btn:hover { border-color: var(--ink-3); }
.lang-toggle { display: inline-flex; border: 1px solid #cfc9b9; border-radius: 10px; overflow: hidden; background: #fff; }
.lang-toggle button { border: 0; background: transparent; padding: 7px 11px; font-size: 13px; min-height: 36px; color: var(--ink-2); }
.lang-toggle button.on { background: var(--charcoal); color: #fff; font-weight: 600; }

/* board: Thai-first pill tabs */
.shell-board .tab { padding: 8px 16px; border: 0; border-radius: 10px; font-weight: 600; align-self: center; }
.shell-board .tab.on { background: var(--charcoal); color: #fff; }
.shell-board .tabs { gap: 8px; align-items: center; }
.shell-board .page { max-width: none; padding-top: 22px; }
.board-cols { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.board-col { flex: 1 0 240px; min-width: 240px; background: var(--col); border-radius: 18px; padding: 14px 10px 14px; }
.board-col > header { display: flex; justify-content: space-between; align-items: flex-start; padding: 2px 8px 12px; }
.board-col > header b { font-size: 14px; display: block; }
.board-col > header small { font-size: 12px; color: var(--ink-2); }
.board-col .count { background: #fff; border-radius: 14px; min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; padding: 0 8px; }
.board-card { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line); }

/* ---------- shell: workbench (dark sidebar) ---------- */
.sidebar {
  flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); background: var(--charcoal-2); color: var(--on-dark);
  padding: 20px 12px; position: sticky; top: var(--banner-h); align-self: flex-start;
  height: calc(100vh - var(--banner-h)); overflow-y: auto;
}
.sidebar .brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 14px; color: #fff; font-weight: 600; font-size: 15px; line-height: 1.15; text-decoration: none; }
.sidebar .brand img { height: 30px; width: auto; background: #fff; border-radius: 10px; padding: 6px 8px; box-sizing: content-box; display: block; }
.side-grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-dim); padding: 16px 10px 6px; font-weight: 600; }
.side-item { font-size: 14px; padding: 8px 10px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--on-dark); text-decoration: none; }
.side-item:hover { background: #3b3f45; }
.side-item.on { background: var(--charcoal-3); color: #fff; }
.side-item span { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.side-item svg { opacity: .8; flex: none; }
.wb-top { position: sticky; top: var(--banner-h); z-index: 40; display: flex; align-items: center; gap: 14px; padding: 12px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.wb-top .search-btn { flex: 1; max-width: 420px; width: auto; }
.wb-top .top-tools { margin-left: auto; }

/* ask layout: slim rail */
.rail { flex: 0 0 var(--rail-w); width: var(--rail-w); background: var(--charcoal-2); color: var(--on-dark); padding: 12px 8px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; position: sticky; top: var(--banner-h); align-self: flex-start; height: calc(100vh - var(--banner-h)); overflow-y: auto; }
.rail .logo-tile { background: #fff; border-radius: 12px; padding: 6px 8px; margin-bottom: 6px; display: flex; justify-content: center; }
.rail .logo-tile img { height: 28px; width: auto; display: block; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; padding: 8px 2px; border-radius: 10px; color: var(--on-dark); text-decoration: none; text-align: center; font-weight: 500; position: relative; }
.rail-item:hover { background: #3b3f45; }
.rail-item.on { background: var(--charcoal-3); color: #fff; }
.rail-item .badge { position: absolute; top: 2px; right: 8px; font-style: normal; font-size: 10px; background: var(--red); color: #fff; border-radius: 9px; padding: 0 5px; }

/* ---------- phone: bottom tab bar ---------- */
.tabbar { display: none; }
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 35; background: var(--charcoal); color: #fff; border: 0; border-radius: 24px; padding: 12px 20px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; box-shadow: 0 6px 20px rgba(31,33,36,.25); }
.fab:hover { background: var(--charcoal-2); }
.phone-search { display: none; }

@media (max-width: 720px) {
  .tabs, .topbar .search-btn, .topbar .chip-btn.desk, .topbar .lang-toggle.desk, .sidebar, .rail { display: none; }
  .topbar { gap: 10px; padding: 10px var(--gutter); background: #fff; }
  .topbar .logo { height: 32px; }
  .ro-chip { display: none; }
  .top-tools { margin-left: 0; flex: 1; gap: 10px; }
  .phone-search { display: flex; flex: 1; background: #f4eee0; border: 0; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-3); text-align: left; min-height: 44px; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
  .avatar { width: 38px; height: 38px; background: var(--gold-soft); }
  .wb-top { padding: 10px var(--gutter); gap: 10px; }
  .wb-top .search-btn, .wb-top .chip-btn { display: none; }
  .wb-top .top-tools { flex: 1; margin-left: 0; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line-warm);
    padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); min-height: var(--tabbar-h);
  }
  .tabbar a { flex: 1; text-align: center; font-size: 11px; color: var(--ink-3); padding: 4px 0; text-decoration: none; min-width: 0; position: relative; display: block; }
  .tabbar a i { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 10px; background: var(--gold-tab); margin: 0 auto 3px; color: var(--ink-2); }
  .tabbar a.on { color: var(--ink); font-weight: 700; }
  .tabbar a.on i { background: var(--gold); color: #fff; }
  .tabbar a span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .tabbar .badge { position: absolute; top: 0; left: 55%; font-style: normal; font-size: 10px; background: var(--red); color: #fff; border-radius: 9px; padding: 0 5px; }
  .view { padding-bottom: calc(var(--tabbar-h) + 24px); }
  .page { padding-top: 18px; }
  .page-head h1, .h1 { font-size: 24px; }
  .fab { right: 14px; bottom: calc(var(--tabbar-h) + 14px); padding: 12px 14px; }
  .fab .lbl { display: none; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; }
  .chip-btn, .lang-toggle button { min-height: 44px; }
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=tel], input[type=url], select { min-height: 46px; font-size: 16px; }
  .task { padding: 14px; gap: 12px; }
  .task .btn { padding: 11px 14px; }
}

/* ---------- toast ---------- */
#toast-stack { position: fixed; top: calc(var(--banner-h) + 14px); right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--charcoal); color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { background: var(--green-ink); }
.toast.error { background: var(--red); }
.toast button { margin-left: auto; background: transparent; border: 0; color: inherit; opacity: .8; padding: 0 2px; font-size: 16px; line-height: 1; }
@media (max-width: 720px) { #toast-stack { right: 50%; transform: translateX(50%); } }

/* ---------- modal / sheet / finder ---------- */
.overlay { position: fixed; inset: 0; background: rgba(31, 33, 36, .45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-pop); }
.modal.wide { width: min(760px, 100%); }
.modal-head { padding: 20px 22px 4px; font-size: 18px; font-weight: 600; }
.modal-body { padding: 10px 22px 6px; font-size: 14px; color: var(--ink-2); }
.modal-body .field label { color: var(--ink); }
.modal-foot { padding: 14px 22px 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.sheet-overlay { position: fixed; inset: 0; z-index: 110; background: rgba(31, 33, 36, .35); }
.sheet { position: fixed; z-index: 111; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-pop); right: 16px; top: calc(var(--banner-h) + 58px); width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - var(--banner-h) - 80px); overflow: auto; border-radius: 16px; padding: 8px; }
.sheet.center { right: auto; left: 50%; top: 18vh; transform: translateX(-50%); }
.sheet-title { padding: 10px 12px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.menu-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; width: 100%; background: transparent; border: 0; text-align: left; padding: 11px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); text-decoration: none; min-height: 44px; }
.menu-item:hover { background: var(--sand); }
.menu-item.on { background: var(--chip); }
.menu-item small { color: var(--ink-3); font-size: 12px; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
@media (max-width: 720px) {
  .sheet { right: 0; left: 0; top: auto; bottom: 0; width: auto; max-height: 80vh; border-radius: 20px 20px 0 0; padding: 10px 10px calc(16px + env(safe-area-inset-bottom)); animation: slideup .18s ease-out; }
  .sheet.center { left: 0; transform: none; top: auto; }
  .sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #d6d0c0; margin: 0 auto 8px; }
}
@keyframes slideup { from { transform: translateY(30px); opacity: .4; } }

.finder-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(31, 33, 36, .45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.finder { background: #fff; border-radius: 18px; width: min(640px, 100%); box-shadow: var(--shadow-pop); overflow: hidden; max-height: 76vh; display: flex; flex-direction: column; }
.finder input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; min-height: 56px; outline: none; }
.finder-list { overflow: auto; padding: 6px; }
.finder-grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px 4px; font-weight: 600; }
.finder-item { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.finder-item .ti { font-weight: 600; font-size: 14px; }
.finder-item .su { font-size: 12px; color: var(--ink-2); }
.finder-item.on { background: var(--gold-soft); }
.finder-note { padding: 18px; color: var(--ink-2); font-size: 14px; }
.finder-foot { border-top: 1px solid var(--line-soft); padding: 8px 14px; font-size: 12px; color: var(--ink-3); display: flex; gap: 14px; }
.finder-foot .close-m { display: none; margin-left: auto; }
@media (max-width: 720px) { .finder-overlay { padding-top: 0; } .finder { border-radius: 0 0 18px 18px; width: 100%; max-height: 92vh; } .finder-foot { display: none; } }

/* ---------- login ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--cream); }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px 26px; text-align: center; }
.login-card .stack-logo { width: 132px; height: auto; display: block; margin: 0 auto 10px; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card p.lead { color: var(--ink-2); margin: 0 0 22px; }
.google-signin { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #cfc9b9; border-radius: 12px; padding: 13px 16px; font-weight: 600; text-decoration: none; background: #fff; min-height: 48px; }
.google-signin:hover { border-color: var(--ink-3); }
.login-form { text-align: left; margin-top: 18px; }
.login-error { background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; text-align: left; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 18px 0 4px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-foot { margin-top: 20px; font-size: 12px; color: var(--ink-3); display: flex; justify-content: center; gap: 12px; align-items: center; }
.login-card .btn.block { width: 100%; }

/* ---------- print ---------- */
@media print {
  .topbar, .sidebar, .rail, .tabbar, .fab, .preview-banner, .wb-top, #toast-stack, .finder-overlay, .sheet, .sheet-overlay, .overlay, .no-print { display: none !important; }
  body { background: #fff; }
  .shell .frame, .shell .col { display: block; }
  .page { max-width: none; padding: 0; }
  .card, .kpi { border-color: #ccc; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { .skeleton, .sheet { animation: none; } }

.phone-logo { display: none; height: 32px; width: auto; }
@media (max-width: 720px) { .phone-logo { display: block; } }

.sheet-pad { padding: 4px 10px 8px; }
.hint { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }

.menu-lbl { display: inline-flex; gap: 12px; align-items: center; }
.more-list { padding: 4px; margin-bottom: 8px; }
.more-list .menu-item { border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.more-list .menu-item:last-child { border-bottom: 0; }

/* dev demo helpers */
.block-btn { width: 100%; margin-top: 8px; }
.board-card .sub { font-size: 12px; color: var(--ink-2); margin: 2px 0 6px; }
.board-card .amt { font-size: 18px; }
@media (max-width: 720px) {
  .board-cols { scroll-snap-type: x mandatory; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .board-col { flex-basis: 84vw; min-width: 84vw; scroll-snap-align: start; }
}
