/* ============================================================
   BMS — app.css
   Light/Dark theming via [data-theme] + CSS variables.
   ============================================================ */
:root {
  --font-head: 'Inter', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', 'Inter', -apple-system, sans-serif;

  --bg:        #f4f5f6;
  --surface:   #ffffff;
  --surface-2: #fafafa;
  --border:    #e8e8ea;
  --text:      #14151a;
  --text-soft: #5f626b;
  --text-mute: #9b9da6;

  /* Primary = near-black (B&W brand) */
  --accent:    #18181b;
  --accent-2:  #2c2c30;
  --accent-soft:#f1f1f2;

  /* CMYK functional accents */
  --cyan:    #00a7e1;  --cyan-bg:#e3f5fc;
  --magenta: #ec008c;  --magenta-bg:#fde4f2;
  --yellow:  #f6b500;  --yellow-bg:#fdf3d8;
  --key:     #18181b;  --key-bg:#ececed;

  /* status palette mapped onto CMYK */
  --green:  #1a9e5f;  --green-bg:#e2f6ec;
  --amber:  #d98a00;  --amber-bg:#fdf3d8;
  --red:    #e0245e;  --red-bg:#fde4ee;
  --blue:   #00a7e1;  --blue-bg:#e3f5fc;
  --purple: #7c3aed;  --purple-bg:#efe9fd;
  --slate:  #4b5563;  --slate-bg:#eceef1;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow:    0 6px 24px rgba(16,24,40,.07);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.10);
  --radius:    16px;
  --radius-sm: 11px;
  --sidebar-w: 264px;
}

[data-theme="dark"] {
  --bg:        #0d0e11;
  --surface:   #16171c;
  --surface-2: #1d1f25;
  --border:    #292b32;
  --text:      #e8e9ec;
  --text-soft: #9aa0ac;
  --text-mute: #6a6e79;
  --accent:    #fafafa;
  --accent-2:  #d4d4d8;
  --accent-soft:#26272e;
  --cyan-bg:#0a2e3c; --magenta-bg:#3a0f28; --yellow-bg:#3a2e0a; --key-bg:#26272e;
  --green-bg:#0f2e1c; --amber-bg:#3a2a0c; --red-bg:#3a1420;
  --blue-bg:#0a2e3c; --purple-bg:#241a3a; --slate-bg:#222630;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 8px 28px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px; border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -.3px; line-height: 1; display:flex; flex-direction:column; gap:3px; }
.brand-name small { font-family: var(--font-body); font-weight: 500; font-size: 11px; color: var(--text-mute); letter-spacing: 0; }

.sidebar__nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); padding: 16px 12px 7px; }
.nav-group:first-child { padding-top: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-weight: 500; margin-bottom: 1px;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.nav-link.is-active .nav-en { color: rgba(255,255,255,.6); }
.nav-ico { width: 20px; height: 20px; display: inline-grid; place-items: center; flex-shrink: 0; }
.nav-ico svg { width: 19px; height: 19px; }
.nav-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-th { font-size: 14px; font-weight: 600; }
.nav-en { font-size: 10.5px; color: var(--text-mute); font-weight: 500; }
.sidebar__foot { padding: 12px; border-top: 1px solid var(--border); }
.nav-link--ghost .nav-th { font-size: 13px; font-weight: 500; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: -.2px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 11px; display: grid; place-items: center; cursor: pointer; color: var(--text-soft);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.userchip { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.userchip__meta { display: flex; flex-direction: column; line-height: 1.15; }
.userchip__name { font-weight: 600; font-size: 13px; }
.userchip__role { font-size: 11px; color: var(--text-mute); }
.content { padding: 30px 32px; max-width: 1360px; width: 100%; margin: 0 auto; }
#menuToggle { display: none; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.page-head p { color: var(--text-soft); margin-top: 5px; font-size: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card__head { padding: 18px 22px; border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.card__head h3 { font-size: 16px; font-weight: 700; }
.card__body { padding: 22px; }
.card--pad { padding: 24px; }

/* ---------- Stat widgets ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.stat__ico svg { width: 21px; height: 21px; }
.stat__val { font-family: var(--font-head); font-size: 32px; font-weight: 800; letter-spacing: -.5px; }
.stat__label { color: var(--text-soft); font-size: 13px; margin-top: 3px; }
.tone-blue   .stat__ico { background: var(--blue-bg);   color: var(--blue); }
.tone-green  .stat__ico { background: var(--green-bg);  color: var(--green); }
.tone-amber  .stat__ico { background: var(--amber-bg);  color: var(--amber); }
.tone-red    .stat__ico { background: var(--red-bg);    color: var(--red); }
.tone-purple .stat__ico { background: var(--purple-bg); color: var(--purple); }
.tone-slate  .stat__ico { background: var(--slate-bg);  color: var(--slate); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { color: var(--text-mute); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.wrap { white-space: normal; }
.t-right { text-align: right !important; }
.muted { color: var(--text-mute); }
.strong { font-weight: 600; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }
.badge--new, .badge--draft, .badge--open, .badge--pending { background: var(--slate-bg); color: var(--slate); }
.badge--in-progress, .badge--processing, .badge--sent, .badge--quotation-sent { background: var(--blue-bg); color: var(--blue); }
.badge--waiting-client, .badge--waiting-approval, .badge--waiting-supplier, .badge--partial { background: var(--amber-bg); color: var(--amber); }
.badge--approved, .badge--completed, .badge--paid, .badge--delivered, .badge--awarded, .badge--todo { background: var(--green-bg); color: var(--green); }
.badge--cancelled, .badge--rejected, .badge--unpaid, .badge--out-of-stock { background: var(--red-bg); color: var(--red); }
.badge--production, .badge--delivery, .badge--shipped, .badge--made-to-order { background: var(--purple-bg); color: var(--purple); }
.badge--low { background: var(--slate-bg); color: var(--slate); }
.badge--medium { background: var(--blue-bg); color: var(--blue); }
.badge--high { background: var(--amber-bg); color: var(--amber); }
.badge--urgent { background: var(--red-bg); color: var(--red); }
.badge--in-stock, .badge--admin { background: var(--green-bg); color: var(--green); }
.badge--manager { background: var(--blue-bg); color: var(--blue); }
.badge--staff { background: var(--slate-bg); color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-body); transition: all .15s;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); }
.btn--danger { color: var(--red); border-color: var(--red-bg); }
.btn--danger:hover { background: var(--red-bg); }
.btn--sm { padding: 6px 11px; font-size: 12.5px; }
.btn--ghost { border-color: transparent; background: transparent; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 12.5px; color: var(--text-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 84px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- Toolbar / search ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search input { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-mute); }
.toolbar select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash--success { background: var(--green-bg); color: var(--green); }
.flash--error   { background: var(--red-bg);   color: var(--red); }
.flash--info    { background: var(--blue-bg);  color: var(--blue); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: 270px; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.kcol__head { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; position: sticky; top: 0; }
.kcol__count { background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 1px 9px; font-size: 12px; color: var(--text-soft); }
.kcol__body { padding: 0 10px 12px; overflow-y: auto; flex: 1; min-height: 60px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 9px; box-shadow: var(--shadow-sm); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .5; }
.kcol.drop-target { outline: 2px dashed var(--accent); outline-offset: -3px; }
.kcard__no { font-size: 11px; color: var(--text-mute); font-weight: 600; }
.kcard__title { font-weight: 600; margin: 3px 0 8px; font-size: 13.5px; }
.kcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kcard__assignee { font-size: 11.5px; color: var(--text-soft); }

/* ---------- Detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; }
.kv dt { color: var(--text-mute); font-size: 13px; }
.kv dd { font-weight: 500; }
.timeline { list-style: none; }
.timeline li { padding: 10px 0 10px 22px; position: relative; border-left: 2px solid var(--border); }
.timeline li::before { content:""; position:absolute; left:-6px; top:14px; width:10px; height:10px; border-radius:50%; background: var(--accent); }
.timeline .t-time { font-size: 12px; color: var(--text-mute); }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-mute); }
.empty svg { width: 42px; height: 42px; margin-bottom: 10px; opacity: .5; }
.row-actions { display: flex; gap: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(2,1fr); } .dash-grid, .detail-grid { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  #menuToggle { display: grid; }
  .content { padding: 16px; }
  .userchip__meta { display: none; }
}

/* ===== Calendar ===== */
.cal-nav{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.cal-title{font-family:var(--font-head);font-size:20px;font-weight:700;margin:0}
.cal-nav .cal-today{margin-left:auto}
.flip{transform:rotate(180deg)}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.cal-dow{text-align:center;font-size:12px;font-weight:600;color:var(--text-mute);text-transform:uppercase;letter-spacing:.05em;padding-bottom:4px}
.cal-cell{min-height:96px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:6px;background:var(--surface-2);display:flex;flex-direction:column;gap:4px}
.cal-cell--empty{background:transparent;border:none}
.cal-date{font-size:13px;font-weight:600;color:var(--text-soft)}
.cal-cell.is-today{border-color:var(--accent);background:var(--accent-soft)}
.cal-cell.is-today .cal-date{color:var(--accent)}
.cal-ev{font-size:11px;font-weight:600;padding:3px 6px;border-radius:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev--meeting{background:var(--blue-bg);color:var(--blue)}
.ev--delivery{background:var(--green-bg);color:var(--green)}
.ev--deadline{background:var(--red-bg);color:var(--red)}
.ev--other{background:var(--slate-bg);color:var(--slate)}
.cal-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.cal-legend .lg{font-size:12px;font-weight:600;padding:4px 10px;border-radius:6px}
@media(max-width:760px){.cal-cell{min-height:64px}.cal-ev{font-size:9px}}

/* ===== Dialog modal ===== */
.dialog{border:none;border-radius:var(--radius);padding:0;max-width:480px;width:92%;box-shadow:var(--shadow);background:var(--surface);color:var(--text)}
.dialog::backdrop{background:rgba(16,24,40,.45)}
.dialog form{padding:24px}
.dialog__title{font-family:var(--font-head);font-size:18px;font-weight:700;margin:0 0 16px}
.dialog__actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

/* ===== Misc utilities ===== */
.sub-line{font-size:12px;color:var(--text-mute);margin-top:2px}
.card-title{font-family:var(--font-head);font-size:15px;font-weight:700;margin:0 0 14px}
.inline-form{display:flex;gap:10px;align-items:center}
.inline-form .select{flex:1}

/* ===== Totals block ===== */
.totals{margin-top:16px;margin-left:auto;max-width:320px;display:flex;flex-direction:column;gap:8px}
.totals--in-card{max-width:100%}
.totals__row{display:flex;justify-content:space-between;font-size:14px;color:var(--text-soft)}
.totals__row b{color:var(--text);font-weight:600}
.totals__row--grand{border-top:1px solid var(--border);padding-top:10px;margin-top:4px;font-size:17px;font-weight:700;color:var(--text)}
.totals__row--grand b{font-size:17px;font-weight:800}
.totals__row--grand span{font-weight:700;color:var(--text)}

/* ===== Files module ===== */
.upload-form{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap}
.upload-form .field{flex:1;min-width:220px}
.hint{color:var(--text-mute);font-weight:400}
.file-ico{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:8px;background:var(--accent-soft);color:var(--accent)}
.file-ico svg{width:16px;height:16px}
.filter-tag{display:inline-flex;align-items:center;gap:8px;background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:600;padding:6px 12px;border-radius:999px}
.filter-tag a{color:inherit;text-decoration:none;font-size:16px;line-height:1}

/* ===== Reports bar chart ===== */
.bars{display:flex;align-items:flex-end;gap:18px;height:200px;padding:10px 4px 0}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%}
.bar-track{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:5px;width:100%}
.bar{width:34%;border-radius:6px 6px 0 0;min-height:3px;transition:height .3s}
.bar--invoiced{background:var(--accent)}
.bar--collected{background:var(--green)}
.bar-label{font-size:12px;color:var(--text-soft);font-weight:600}
.bars-legend{display:flex;gap:18px;align-items:center;margin-top:14px;font-size:13px;color:var(--text-soft)}
.lg-dot{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:5px;vertical-align:middle}
.lg-dot--invoiced{background:var(--accent)}
.lg-dot--collected{background:var(--green)}

/* ===== Users module ===== */
.badge--role-admin{background:var(--purple-bg);color:var(--purple)}
.badge--role-manager{background:var(--blue-bg);color:var(--blue)}
.badge--role-staff{background:var(--slate-bg);color:var(--slate)}
.checkbox{display:inline-flex;align-items:center;gap:8px;font-weight:500;font-size:14px;cursor:pointer;padding-top:8px}
.checkbox input{width:auto}
.info-note{margin-top:18px;background:var(--accent-soft);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 16px;font-size:13px;color:var(--text-soft);line-height:1.6}
.info-note strong{color:var(--text)}

/* ===== Price calculator ===== */
.price-summary{position:sticky;top:20px}
.price-big{font-family:var(--font-head);font-size:42px;font-weight:800;color:var(--accent);line-height:1}
.price-sub{color:var(--text-mute);font-size:13px;margin-top:4px}

/* ===== Price editor ===== */
.price-product{border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px;margin-bottom:14px;background:var(--surface-2)}
.price-product__name{font-weight:700;font-size:15px;margin-bottom:12px}
.price-rows{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.price-rows__head{display:flex;justify-content:space-between;font-size:12px;font-weight:600;color:var(--text-mute);text-transform:uppercase;letter-spacing:.04em;padding:0 2px 4px}
.price-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.price-row__label{font-size:14px;color:var(--text-soft);flex:1}
.mini-input{width:110px;padding:7px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);text-align:right;font-size:14px}
.mini-input:focus{outline:none;border-color:var(--accent)}
.price-opts{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.price-opt__head{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px}
@media(max-width:760px){.price-opts{grid-template-columns:1fr}}

/* ===== CMYK tone tiles ===== */
.cmyk-c { background: var(--cyan-bg);    color: var(--cyan); }
.cmyk-m { background: var(--magenta-bg); color: var(--magenta); }
.cmyk-y { background: var(--yellow-bg);  color: #b07d00; }
.cmyk-k { background: var(--key-bg);     color: var(--key); }

/* ===== Quote calculator layout ===== */
.quote-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.quote-side { position: sticky; top: 90px; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 15px; border-radius: 100px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  font-family: var(--font-body); transition: all .15s;
}
.cat-tab:hover { border-color: var(--text-mute); color: var(--text); }
.cat-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-tab__ico { width: 18px; height: 18px; border-radius: 6px; display: inline-grid; place-items: center; }
.cat-tab__ico svg { width: 12px; height: 12px; }
.cat-tab.is-active .cat-tab__ico { background: rgba(255,255,255,.2); color: #fff; }
.cat-tab__n { font-size: 12px; font-weight: 700; opacity: .65; }

.prod-section { margin-bottom: 30px; }
.prod-section__head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.prod-section__ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.prod-section__ico svg { width: 17px; height: 17px; }
.prod-section__head h3 { font-size: 17px; font-weight: 700; }
.prod-section__n { margin-left: auto; font-size: 12.5px; color: var(--text-mute); font-weight: 600; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.prod-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; transition: all .16s; font-family: var(--font-body);
}
.prod-card:hover { border-color: var(--text-mute); box-shadow: var(--shadow); transform: translateY(-3px); }
.prod-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.prod-card__ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 10px; }
.prod-card__ico svg { width: 23px; height: 23px; }
.prod-card__name { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.prod-card__from { font-size: 12px; color: var(--text-mute); font-weight: 600; }

/* ===== Quote summary panel ===== */
.quote-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.quote-panel__empty { padding: 50px 26px; text-align: center; color: var(--text-mute); }
.quote-panel__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--surface-2); color: var(--text-mute); margin-bottom: 16px; }
.quote-panel__icon svg { width: 28px; height: 28px; }
.quote-panel__empty p { font-size: 14px; line-height: 1.6; }
.quote-panel__body { padding: 22px; }
.quote-panel__title { font-family: var(--font-head); font-size: 19px; font-weight: 800; margin-bottom: 18px; letter-spacing: -.3px; }
.quote-total { display: flex; flex-direction: column; gap: 3px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0 4px; }
.quote-total > span:first-child { font-size: 12.5px; opacity: .7; }
.quote-total__num { font-family: var(--font-head); font-size: 30px; font-weight: 800; letter-spacing: -.5px; }

@media (max-width: 900px) {
  .quote-layout { grid-template-columns: 1fr; }
  .quote-side { position: static; }
}
