/* ===== Acctflow — Offline Accounting · Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  /* neutrals — cool blue-grey */
  --bg:        #eef2f7;
  --surface:   #ffffff;
  --surface-2: #f4f8fc;
  --surface-3: #e9f0f7;
  --border:    #dde6ef;
  --border-2:  #c9d6e3;

  --ink:   #16232f;
  --ink-2: #4c5c6b;
  --ink-3: #7b8b9b;
  --ink-4: #a5b2bf;

  /* brand — FlowAccount azure */
  --brand:     #0f7bc4;
  --brand-700: #0a5b93;
  --brand-600: #0f7bc4;
  --brand-500: #2492da;
  --brand-100: #cee6f8;
  --brand-50:  #eaf4fc;

  /* sidebar — deep navy */
  --nav:       #10314f;
  --nav-2:     #174064;
  --nav-line:  #234f76;
  --nav-ink:   #cfe0f0;
  --nav-ink-2: #8aa5be;
  --nav-accent:#4db8f0;

  /* semantic */
  --green:    #14875a;
  --green-50: #e4f4ec;
  --green-100:#c9e9d9;
  --red:      #c94436;
  --red-50:   #fae9e7;
  --amber:    #b3760f;
  --amber-50: #f9f0dc;
  --blue:     #1f6fc4;
  --blue-50:  #e7f0fa;

  --radius:   10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow:   0 1px 2px rgba(16,35,55,.06), 0 1px 1px rgba(16,35,55,.04);
  --shadow-md:0 4px 16px rgba(16,35,55,.10), 0 1px 3px rgba(16,35,55,.06);
  --shadow-lg:0 18px 50px rgba(16,49,79,.22), 0 4px 12px rgba(16,49,79,.10);

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{
  font-family:'IBM Plex Sans Thai', system-ui, sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  font-size:14px;
  line-height:1.45;
}
#root{ height:100%; }
::selection{ background:var(--brand-100); }

/* scrollbars */
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-thumb{ background:#c3d1e0; border-radius:6px; border:2px solid transparent; background-clip:padding-box; }
*::-webkit-scrollbar-thumb:hover{ background:#a7b9cb; background-clip:padding-box; }
*::-webkit-scrollbar-track{ background:transparent; }

.mono{ font-family:var(--mono); font-feature-settings:"tnum" 1; }
.num{ font-family:var(--mono); font-variant-numeric:tabular-nums; }

/* ===== App shell ===== */
.app{ display:grid; grid-template-columns:248px 1fr; height:100%; overflow:hidden; }

/* ===== Sidebar ===== */
.nav{
  background:linear-gradient(180deg,var(--nav) 0%, #0b2740 100%);
  color:var(--nav-ink);
  display:flex; flex-direction:column;
  border-right:1px solid #08203580;
  overflow:hidden;
}
.nav-brand{ display:flex; align-items:center; gap:11px; padding:18px 18px 16px; }
.nav-brand > div{ min-width:0; }
.nav-logo{
  width:34px; height:34px; border-radius:9px; flex:none;
  background:linear-gradient(135deg,#3aaeef,#0f7bc4);
  display:grid; place-items:center; color:#fff; font-weight:700; font-size:17px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14), 0 2px 8px rgba(0,0,0,.25);
}
.nav-brand h1{ font-size:15.5px; font-weight:600; color:#fff; margin:0; letter-spacing:.2px; white-space:nowrap; }
.nav-brand p{ font-size:11px; color:var(--nav-ink-2); margin:1px 0 0; }

.nav-scroll{ flex:1; overflow-y:auto; padding:6px 12px 18px; }
.nav-group-label{ font-size:10.5px; font-weight:600; letter-spacing:.7px; color:var(--nav-ink-2); text-transform:uppercase; padding:14px 10px 6px; }
.nav-item{
  display:flex; align-items:center; gap:11px; width:100%;
  padding:8.5px 11px; border-radius:8px; cursor:pointer;
  color:var(--nav-ink); font-size:13.5px; font-weight:400;
  background:none; border:none; text-align:left; font-family:inherit;
  transition:background .13s, color .13s; position:relative;
}
.nav-item:hover{ background:#ffffff10; color:#fff; }
.nav-item.active{ background:#ffffff14; color:#fff; font-weight:500; }
.nav-item.active::before{
  content:''; position:absolute; left:-12px; top:7px; bottom:7px; width:3px;
  background:var(--nav-accent); border-radius:0 3px 3px 0;
}
.nav-item span{ white-space:nowrap; }
.nav-item svg{ width:18px; height:18px; flex:none; opacity:.85; }
.nav-item.active svg{ opacity:1; }
.nav-badge{ margin-left:auto; background:var(--amber); color:#fff; font-size:10.5px; font-weight:600; min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:grid; place-items:center; }
.nav-badge.green{ background:var(--green); }

.nav-foot{ padding:12px; border-top:1px solid var(--nav-line); }
.nav-user{ display:flex; align-items:center; gap:10px; padding:7px 9px; border-radius:8px; }
.nav-user:hover{ background:#ffffff0d; }
.nav-ava{ width:30px; height:30px; border-radius:8px; background:#1d4a72; color:#d3e8fa; display:grid; place-items:center; font-weight:600; font-size:12px; flex:none; }
.nav-user-name{ font-size:12.5px; color:#fff; font-weight:500; }
.nav-user-sub{ font-size:10.5px; color:var(--nav-ink-2); }

/* offline pill */
.offline{ display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--nav-ink-2); padding:5px 10px; }
.offline .dot{ width:7px; height:7px; border-radius:50%; background:var(--nav-accent); box-shadow:0 0 0 3px #4db8f033; }

/* ===== Main ===== */
.main{ display:flex; flex-direction:column; overflow:hidden; background:var(--bg); }
.topbar{
  height:58px; flex:none; background:var(--surface); border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:16px; padding:0 22px;
}
.topbar > div:first-child{ flex:none; min-width:max-content; }
.topbar h2{ font-size:17px; font-weight:600; margin:0; color:var(--ink); white-space:nowrap; }
.topbar .crumb{ font-size:12px; color:var(--ink-3); }
.topbar-spacer{ flex:1; }

.search{
  display:flex; align-items:center; gap:8px; background:var(--surface-2);
  border:1px solid var(--border); border-radius:9px; padding:7px 12px; width:300px; color:var(--ink-3);
}
.search input{ border:none; background:none; outline:none; font-family:inherit; font-size:13px; color:var(--ink); width:100%; }
.search svg{ width:16px; height:16px; flex:none; }
.period{
  display:flex; align-items:center; gap:7px; background:var(--surface-2); border:1px solid var(--border);
  border-radius:9px; padding:7px 12px; font-size:12.5px; color:var(--ink-2); font-weight:500; cursor:pointer;
}
.period svg{ width:15px; height:15px; }

.content{ flex:1; overflow-y:auto; padding:24px 26px 60px; }
.content.narrow{ padding:24px 0 60px; }
.page{ max-width:1180px; margin:0 auto; }

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  font-family:inherit; font-size:13px; font-weight:500; line-height:1;
  padding:9px 15px; border-radius:9px; border:1px solid transparent; cursor:pointer;
  transition:background .14s, border-color .14s, box-shadow .14s, color .14s; white-space:nowrap;
}
.btn svg{ width:16px; height:16px; }
.btn-primary{ background:var(--brand); color:#fff; box-shadow:0 1px 2px rgba(10,91,147,.3); }
.btn-primary:hover{ background:var(--brand-700); }
.btn-green{ background:var(--green); color:#fff; }
.btn-green:hover{ background:#0f6b47; }
.btn-ghost{ background:var(--surface); color:var(--ink-2); border-color:var(--border-2); }
.btn-ghost:hover{ background:var(--surface-2); color:var(--ink); border-color:#b0c1d2; }
.btn-soft{ background:var(--brand-50); color:var(--brand-700); }
.btn-soft:hover{ background:var(--brand-100); }
.btn-danger-soft{ background:var(--red-50); color:var(--red); }
.btn-danger-soft:hover{ background:#f5d9d6; }
.btn-sm{ padding:6.5px 11px; font-size:12px; border-radius:8px; }
.btn-lg{ padding:12px 22px; font-size:14.5px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }
.btn-icon{ padding:8px; }

/* ===== Cards ===== */
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow); }
.card-pad{ padding:18px 20px; }
.card-head{ display:flex; align-items:center; gap:12px; padding:15px 20px; border-bottom:1px solid var(--border); }
.card-head h3{ font-size:14.5px; font-weight:600; margin:0; }
.card-head .sub{ font-size:12px; color:var(--ink-3); }

/* ===== Stat cards ===== */
.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.stat{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px 18px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.stat-label{ font-size:12px; color:var(--ink-3); font-weight:500; display:flex; align-items:center; gap:7px; }
.stat-ico{ width:30px; height:30px; border-radius:8px; display:grid; place-items:center; }
.stat-ico svg{ width:16px; height:16px; }
.stat-val{ font-size:25px; font-weight:600; margin-top:10px; letter-spacing:-.4px; font-family:var(--mono); font-variant-numeric:tabular-nums; }
.stat-val .cur{ font-size:14px; color:var(--ink-3); font-weight:500; font-family:'IBM Plex Sans Thai'; margin-right:3px; }
.stat-delta{ font-size:11.5px; margin-top:6px; display:inline-flex; align-items:center; gap:4px; font-weight:500; }
.stat-delta.up{ color:var(--green); }
.stat-delta.down{ color:var(--red); }

/* ===== Badges ===== */
.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:500; padding:3px 9px; border-radius:20px; line-height:1.3; white-space:nowrap; }
.badge .bdot{ width:6px; height:6px; border-radius:50%; }
.badge.amber{ background:var(--amber-50); color:var(--amber); }
.badge.amber .bdot{ background:var(--amber); }
.badge.green{ background:var(--green-50); color:var(--green); }
.badge.green .bdot{ background:var(--green); }
.badge.blue{ background:var(--blue-50); color:var(--blue); }
.badge.blue .bdot{ background:var(--blue); }
.badge.red{ background:var(--red-50); color:var(--red); }
.badge.red .bdot{ background:var(--red); }
.badge.gray{ background:var(--surface-3); color:var(--ink-2); }
.badge.gray .bdot{ background:var(--ink-3); }
.badge.teal{ background:var(--brand-50); color:var(--brand-700); }
.badge.teal .bdot{ background:var(--brand); }

/* ===== Tables ===== */
.tbl-wrap{ overflow-x:auto; }
table.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
table.tbl th{
  text-align:left; font-weight:500; color:var(--ink-3); font-size:11.5px; letter-spacing:.3px;
  padding:11px 14px; border-bottom:1px solid var(--border); background:var(--surface-2); white-space:nowrap;
  position:sticky; top:0; text-transform:uppercase;
}
table.tbl td{ padding:12px 14px; border-bottom:1px solid var(--border); color:var(--ink); vertical-align:middle; }
table.tbl tr:last-child td{ border-bottom:none; }
table.tbl tbody tr{ transition:background .1s; }
table.tbl tbody tr.clickable{ cursor:pointer; }
table.tbl tbody tr.clickable:hover{ background:var(--surface-2); }
.t-right{ text-align:right; }
.t-center{ text-align:center; }
.t-mono{ font-family:var(--mono); font-variant-numeric:tabular-nums; }
.t-muted{ color:var(--ink-3); }
.t-strong{ font-weight:600; }
.acc-code{ font-family:var(--mono); color:var(--brand-700); font-weight:500; font-size:12.5px; }

/* ===== Forms ===== */
.field{ display:flex; flex-direction:column; gap:5px; }
.field label{ font-size:12px; color:var(--ink-2); font-weight:500; }
.input, .select{
  font-family:inherit; font-size:13.5px; color:var(--ink); background:var(--surface);
  border:1px solid var(--border-2); border-radius:8px; padding:9px 12px; outline:none; width:100%;
  transition:border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus{ border-color:var(--brand-500); box-shadow:0 0 0 3px var(--brand-50); }
.input.mono{ font-family:var(--mono); }
textarea.input{ resize:vertical; min-height:64px; }

/* ===== Misc ===== */
.divider{ height:1px; background:var(--border); margin:18px 0; }
.kbd{ font-family:var(--mono); font-size:11px; background:var(--surface-3); border:1px solid var(--border-2); border-bottom-width:2px; border-radius:5px; padding:1px 6px; color:var(--ink-2); }
.dot-sep{ color:var(--ink-4); margin:0 7px; }
.page-title{ font-size:21px; font-weight:600; letter-spacing:-.3px; margin:0; }
.page-sub{ font-size:13px; color:var(--ink-3); margin:3px 0 0; }
.row{ display:flex; align-items:center; }
.gap8{ gap:8px; } .gap12{ gap:12px; } .gap16{ gap:16px; }

.empty{ text-align:center; padding:54px 20px; color:var(--ink-3); }
.empty svg{ width:42px; height:42px; opacity:.4; margin-bottom:12px; }

.fade-in{ animation:fadeIn .32s ease both; }
@keyframes fadeIn{ from{ transform:translateY(8px); } to{ transform:none; } }
.pop-in{ animation:popIn .3s cubic-bezier(.2,.7,.3,1) both; }
@keyframes popIn{ from{ opacity:0; transform:scale(.97); } to{ opacity:1; transform:none; } }

/* progress / spinner */
.spinner{ width:18px; height:18px; border:2.5px solid var(--brand-100); border-top-color:var(--brand); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.bar{ height:6px; background:var(--surface-3); border-radius:6px; overflow:hidden; }
.bar > span{ display:block; height:100%; background:linear-gradient(90deg,var(--brand-500),var(--brand)); border-radius:6px; transition:width .4s ease; }

/* confidence chip */
.conf{ font-size:10.5px; font-weight:600; padding:1.5px 6px; border-radius:5px; font-family:var(--mono); }
.conf.hi{ background:var(--green-50); color:var(--green); }
.conf.mid{ background:var(--amber-50); color:var(--amber); }
.conf.lo{ background:var(--red-50); color:var(--red); }

/* segmented control */
.seg{ display:inline-flex; background:var(--surface-2); border:1px solid var(--border); border-radius:9px; padding:3px; gap:2px; }
.seg button{ font-family:inherit; font-size:12.5px; font-weight:500; color:var(--ink-2); background:none; border:none; padding:6px 13px; border-radius:7px; cursor:pointer; transition:.12s; }
.seg button.on{ background:var(--surface); color:var(--brand-700); box-shadow:var(--shadow); }

/* tabs */
.tabs{ display:flex; gap:2px; border-bottom:1px solid var(--border); }
.tab{ font-family:inherit; font-size:13.5px; font-weight:500; color:var(--ink-3); background:none; border:none; padding:11px 16px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:.12s; }
.tab:hover{ color:var(--ink); }
.tab.on{ color:var(--brand-700); border-bottom-color:var(--brand); }

/* drop zone */
.dropzone{
  border:2px dashed var(--border-2); border-radius:var(--radius-lg); background:var(--surface-2);
  padding:48px 30px; text-align:center; transition:.18s; cursor:pointer;
}
.dropzone.over{ border-color:var(--brand); background:var(--brand-50); transform:scale(1.005); }
.dropzone .dz-ico{ width:64px; height:64px; border-radius:16px; background:var(--brand-50); display:grid; place-items:center; margin:0 auto 16px; }
.dropzone .dz-ico svg{ width:30px; height:30px; color:var(--brand); }

/* doc preview frame */
.doc-frame{ background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.doc-stripe{ background:repeating-linear-gradient(45deg,#eff4f9,#eff4f9 11px,#e6eef6 11px,#e6eef6 22px); }

/* modal */
.modal-bg{ position:fixed; inset:0; background:rgba(12,35,58,.45); backdrop-filter:blur(2px); display:grid; place-items:center; z-index:80; animation:fadeIn .18s ease; padding:24px; }
.modal{ background:var(--surface); border-radius:16px; box-shadow:var(--shadow-lg); width:100%; max-width:520px; max-height:88vh; overflow:hidden; display:flex; flex-direction:column; animation:popIn .22s cubic-bezier(.2,.7,.3,1); }
.modal-head{ padding:18px 22px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:12px; }
.modal-body{ padding:20px 22px; overflow-y:auto; }
.modal-foot{ padding:14px 22px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; background:var(--surface-2); }

/* toast */
.toast-wrap{ position:fixed; bottom:24px; right:24px; z-index:90; display:flex; flex-direction:column; gap:10px; }
.toast{ background:var(--nav); color:#fff; border-radius:11px; padding:13px 16px; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:11px; font-size:13px; min-width:280px; animation:toastIn .3s cubic-bezier(.2,.7,.3,1); }
.toast .t-ico{ width:24px; height:24px; border-radius:7px; display:grid; place-items:center; flex:none; }
@keyframes toastIn{ from{ opacity:0; transform:translateX(20px); } to{ opacity:1; transform:none; } }

/* account picker dropdown */
.acc-pick{ position:relative; }
.acc-menu{ position:absolute; top:calc(100% + 4px); left:0; right:0; background:var(--surface); border:1px solid var(--border-2); border-radius:10px; box-shadow:var(--shadow-md); z-index:30; max-height:260px; overflow-y:auto; padding:5px; }
.acc-opt{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:7px; cursor:pointer; }
.acc-opt:hover, .acc-opt.hl{ background:var(--brand-50); }
.acc-opt .ac{ font-family:var(--mono); font-size:12px; color:var(--brand-700); font-weight:600; width:46px; flex:none; }
.acc-opt .an{ font-size:13px; color:var(--ink); }
.acc-opt .at{ margin-left:auto; font-size:10.5px; color:var(--ink-4); }

.mini-trend{ display:flex; align-items:flex-end; gap:3px; height:34px; }
.mini-trend i{ flex:1; background:var(--brand-100); border-radius:2px 2px 0 0; min-height:3px; transition:.2s; }
.mini-trend i.hl{ background:var(--brand); }

/* ===== Client switcher ===== */
.cli-switch{ position:relative; padding:0 12px 8px; }
.cli-btn{
  display:flex; align-items:center; gap:10px; width:100%; padding:9px 10px; border-radius:10px;
  background:#ffffff0d; border:1px solid #ffffff14; cursor:pointer; font-family:inherit; text-align:left;
  transition:background .13s;
}
.cli-btn:hover{ background:#ffffff16; }
.cli-ava{ width:34px; height:34px; border-radius:9px; flex:none; display:grid; place-items:center; color:#fff; font-weight:600; font-size:12.5px; box-shadow:inset 0 0 0 1px #ffffff22; }
.cli-ava.sm{ width:30px; height:30px; font-size:11.5px; border-radius:8px; }
.cli-meta{ flex:1; min-width:0; }
.cli-name{ color:#fff; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cli-sub{ color:var(--nav-ink-2); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cli-menu{
  position:absolute; top:calc(100% - 2px); left:12px; right:12px; z-index:60;
  background:var(--surface); border:1px solid var(--border-2); border-radius:12px; box-shadow:var(--shadow-lg);
  overflow:hidden;
}
.cli-opt{ display:flex; align-items:center; gap:10px; padding:8px 9px; border-radius:8px; cursor:pointer; }
.cli-opt:hover{ background:var(--surface-2); }
.cli-opt.on{ background:var(--brand-50); }
.cli-opt-name{ font-size:13px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cli-opt-sub{ font-size:11px; color:var(--ink-3); font-family:var(--mono); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cli-pend{ background:var(--amber); color:#fff; font-size:10.5px; font-weight:600; min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:grid; place-items:center; flex:none; }
.cli-foot{ display:flex; align-items:center; justify-content:center; gap:7px; width:100%; padding:11px; background:var(--surface-2); border:none; border-top:1px solid var(--border); cursor:pointer; font-family:inherit; font-size:12.5px; font-weight:500; color:var(--brand-700); }
.cli-foot:hover{ background:var(--brand-50); }

/* client portfolio cards */
.cli-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:16px 18px; cursor:pointer; transition:box-shadow .15s, border-color .15s, transform .12s; }
.cli-card:hover{ box-shadow:var(--shadow-md); border-color:var(--border-2); transform:translateY(-1px); }

/* ===== Collapsible nav groups (FlowAccount-style) ===== */
.nav-grp{ margin:0; }
.nav-grp > summary{ list-style:none; cursor:pointer; }
.nav-grp > summary::-webkit-details-marker{ display:none; }
.nav-grp > summary::marker{ content:''; }
.nav-caret{ margin-left:auto; opacity:.55; transition:transform .16s ease; width:15px!important; height:15px!important; }
.nav-grp[open] > summary .nav-caret{ transform:rotate(180deg); }
.nav-sub{ padding:2px 0 6px 0; }
.nav-sub-item{
  display:flex; align-items:center; gap:8px;
  padding:6.5px 11px 6.5px 41px; border-radius:8px;
  color:var(--nav-ink-2); font-size:12.5px; text-decoration:none;
  position:relative; transition:background .13s, color .13s;
}
.nav-sub-item::before{
  content:''; position:absolute; left:22px; top:0; bottom:0; width:1px; background:var(--nav-line);
}
.nav-sub-item:hover{ background:#ffffff0d; color:#fff; }
.nav-sub-item.on{ background:#ffffff14; color:#fff; font-weight:500; }
.nav-sub-item.on::before{ background:var(--nav-accent); width:2px; left:21px; }
.nav-sub-item .nav-badge{ margin-left:auto; }

/* ===== Quick-create menu (ปุ่ม "+ สร้าง") ===== */
.qc-wrap{ position:relative; }
.qc-menu{
  position:absolute; top:calc(100% + 6px); right:0; z-index:60; width:262px;
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  box-shadow:var(--shadow-lg); padding:6px; max-height:70vh; overflow-y:auto;
}
.qc-lbl{ font-size:10.5px; font-weight:600; letter-spacing:.6px; text-transform:uppercase;
  color:var(--ink-4); padding:9px 10px 5px; }
.qc-item{
  display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px;
  text-decoration:none; color:var(--ink); font-size:13px; transition:background .12s;
}
.qc-item:hover{ background:var(--brand-50); color:var(--brand-700); }
.qc-item svg{ width:16px; height:16px; color:var(--ink-3); flex:none; }
.qc-item:hover svg{ color:var(--brand); }
.qc-item .qc-pre{
  font-family:var(--mono); font-size:10px; font-weight:600; margin-left:auto;
  color:var(--ink-4); background:var(--surface-3); border-radius:4px; padding:1px 5px;
}

/* ===== Dashboard: กราฟแท่ง 12 เดือน ===== */
.mchart{ display:flex; align-items:flex-end; gap:6px; height:190px; }
.mcol{ flex:1; display:flex; flex-direction:column; align-items:center; gap:7px; min-width:0; height:100%; }
.mbars{ flex:1; width:100%; display:flex; align-items:flex-end; justify-content:center; gap:3px; }
.mbars i{ width:44%; max-width:16px; min-height:2px; border-radius:3px 3px 0 0; transition:height .35s ease; }
.mb-rev{ background:linear-gradient(180deg,var(--brand-500),var(--brand)); }
.mb-exp{ background:linear-gradient(180deg,#e8b25a,#d99a32); }
.mcol:hover .mbars i{ filter:brightness(1.08); }
.mlbl{ font-size:10.5px; color:var(--ink-3); white-space:nowrap; }

/* ===== Dashboard: แถบอายุหนี้ ===== */
.agebar{ display:flex; height:10px; border-radius:6px; overflow:hidden; gap:2px; background:var(--surface-3); }
.agebar i{ display:block; }
.abdot{ width:9px; height:9px; border-radius:3px; display:inline-block; flex:none; }
.ab-current{ background:var(--brand-500); }
.ab-d1_30{ background:#5fb0e0; }
.ab-d31_60{ background:var(--amber); }
.ab-d61_90{ background:#d1734a; }
.ab-d90{ background:var(--red); }
.agelegend{ display:flex; flex-direction:column; gap:7px; margin-top:14px; font-size:12.5px; color:var(--ink-2); }

/* ===== Dashboard: แถวงานค้าง ===== */
.pipe-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border:1px solid var(--border); border-radius:9px;
  text-decoration:none; color:var(--ink); font-size:13px; background:var(--surface-2);
  transition:border-color .13s, background .13s;
}
.pipe-row:hover{ background:var(--brand-50); border-color:var(--brand-100); color:var(--brand-700); }
.pipe-row b{ font-size:15px; font-weight:600; }
