/* ============================================================
   Plebo — Brand-aligned UI theme
   Palette: Turquoise #5BDDCA · Teal #289386 · Emerald #1A535C
            Onyx #3C3C3B · White
   Type: Red Hat Display
   ============================================================ */
:root {
  --turq: #19c0a8;
  --turq-soft: #e3f6f1;
  --turq-tint: #f3fbfa;
  --teal: #16b39c;
  --teal-dark: #0f8d7e;
  --emerald: #0f3b3a;
  --emerald-deep: #11403f;
  --onyx: #1f2d33;
  --ink: #1f2d33;

  --brand: var(--teal);
  --accent: var(--teal);
  --accent-soft: var(--turq-soft);

  --amber: #e0a008;
  --red: #d8453a;
  --green: #16b39c;

  --bg: #eef2f4;
  --surface: #ffffff;
  --border: #eef2f3;
  --border-strong: #d6e0e2;
  --text: #33474b;
  --text-soft: #7c8d91;
  --text-faint: #9aa9ac;

  --shadow: 0 2px 8px rgba(20,60,60,.06);
  --shadow-md: 0 12px 26px rgba(20,60,60,.13);
  --shadow-lg: 0 18px 48px rgba(15,45,48,.22);
  --ring: 0 0 0 4px rgba(22,179,156,.16);

  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 250px;
  --ease: cubic-bezier(.4,.0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.mono { font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; letter-spacing: .2px; }

/* ---------- Entrance animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes revealX { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- Logo ---------- */
.logomark { display: block; flex: none; }
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-word { font-weight: 800; letter-spacing: -.5px; line-height: 1; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f2e30 0%, #11403f 100%);
  color: #cfe8e6;
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  transition: transform .28s var(--ease);
}
.sidebar:before { /* soft turquoise glow */
  content: ""; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,221,202,.25), transparent 70%);
  pointer-events: none;
}
.sidebar .brand {
  padding: 22px 22px 18px; border-bottom: 1px solid rgba(255,255,255,.10);
}
.sidebar .brand .brand-word { font-size: 23px; color: #fff; }
.sidebar .brand .tag-sub { display:block; font-size: 10.5px; color: #79b8b0; letter-spacing: 1.2px; text-transform: uppercase; margin-top: 4px; }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav button {
  width: 100%; text-align: left; position: relative;
  background: none; border: none; color: #bfe0db;
  padding: 11px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; font-family: inherit; font-weight: 500;
  display: flex; align-items: center; gap: 12px; margin-bottom: 3px;
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.nav button .ic { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav button:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.nav button.active { background: rgba(91,221,202,.16); color: #fff; font-weight: 700; }
.nav button.active:before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--turq); border-radius: 0 4px 4px 0;
}
.nav .badge {
  margin-left: auto; background: var(--turq); color: var(--emerald-deep);
  font-size: 11px; padding: 1px 8px; border-radius: 20px; font-weight: 800;
}
.nav .group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: #5f938c; padding: 14px 14px 6px; }

.sidebar .userbox { padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.10); font-size: 12.5px; }
.sidebar .userbox .name { color: #fff; font-weight: 700; }
.sidebar .userbox .role { color: #79b8b0; font-size: 11.5px; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); padding: 0 28px; height: 64px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 30;
}
.topbar .hamburger { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--teal); }
.topbar h2 { font-size: 18px; font-weight: 800; color: var(--emerald); letter-spacing: -.3px; }
.topbar .spacer { flex: 1; }
.topbar .branch-select select {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 12px; font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.topbar .branch-select select:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }

.content { padding: 26px 28px 52px; animation: fadeUp .4s var(--ease); }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  animation: pop .45s var(--ease) both;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.kpi:before { content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--teal); }
.kpi.warn:before { background: var(--amber); }
.kpi.danger:before { background: var(--red); }
.kpi.good:before { background: var(--turq); }
.kpi.warn { background: linear-gradient(180deg, #fff9ef, #fff); }
.kpi.danger { background: linear-gradient(180deg, #fff6f5, #fff); }
.kpi.danger .value, .kpi.danger .label { color: var(--red); }
.kpi.warn .value { color: #d08700; }
.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-soft); font-weight: 700; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 8px; color: #13494a; letter-spacing: -.5px; white-space: nowrap; }
.kpi .sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
/* stagger */
.kpi:nth-child(2){animation-delay:.05s} .kpi:nth-child(3){animation-delay:.1s}
.kpi:nth-child(4){animation-delay:.15s} .kpi:nth-child(5){animation-delay:.2s}
.kpi:nth-child(6){animation-delay:.25s} .kpi:nth-child(7){animation-delay:.3s}

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; animation: fadeUp .4s var(--ease) both; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.panel-head h3 { font-size: 15px; font-weight: 800; color: var(--emerald); letter-spacing: -.2px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 4px 0; }
.panel-body.pad { padding: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 980px){ .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 11px 16px; background: var(--turq-tint);
  color: var(--teal-dark); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr { transition: background .12s; }
table.data tbody tr:hover td { background: var(--turq-tint); }
table.data tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* ---------- Badges / status ---------- */
.tag { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .2px; background: #e3f6f1; color: #0f8d7e; }
.tag.draft { background: #eef2f1; color: #5b6b68; }
.tag.submitted { background: #fdf3e0; color: #b06f15; }
.tag.approved { background: #def3ec; color: #157a5c; }
.tag.rejected { background: #fdeae9; color: #c33b34; }
.tag.revision { background: #fdf2e2; color: #b06f15; }
.tag.ordered { background: #e3eef0; color: var(--emerald); }
.tag.closed { background: #e6edec; color: #4d5d5a; }
.tag.pending { background: #fdf2e2; color: #b06f15; }
.tag.exp-30 { background: #fdeae9; color: #c33b34; }
.tag.exp-60 { background: #fdeee0; color: #c2610c; }
.tag.exp-90 { background: #fdf2e2; color: #b06f15; }
.tag.exp-expired { background: #5a201d; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); color: #fff; box-shadow: 0 6px 18px rgba(40,147,134,.35); }
.btn.navy { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.btn.navy:hover { background: var(--emerald-deep); color: #fff; box-shadow: 0 6px 18px rgba(26,83,92,.35); }
.btn.success { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.success:hover { background: var(--teal-dark); color:#fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #d6443c; color:#fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--teal-dark); }
.btn.ghost:hover { background: var(--turq-soft); transform: none; box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
.field textarea { resize: vertical; min-height: 64px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px){ .form-row { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { flex: 1; min-width: 180px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: inherit; font-size: 13.5px; transition: border-color .15s, box-shadow .15s; }
.search:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
.filter-select { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; background: var(--surface); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(19,63,71,.45); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 44px 16px; z-index: 100; overflow-y: auto; animation: fadeUp .2s var(--ease); }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 720px; animation: pop .22s var(--ease); }
.modal.wide { max-width: 920px; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { font-size: 17px; color: var(--emerald); font-weight: 800; }
.modal-head .close { margin-left: auto; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-faint); line-height: 1; transition: color .15s; }
.modal-head .close:hover { color: var(--red); }
.modal-body { padding: 24px; max-height: 64vh; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* line-item editor */
.line-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.line-table th { text-align: left; padding: 7px 8px; font-size: 11px; text-transform: uppercase; color: var(--text-soft); border-bottom: 1px solid var(--border); }
.line-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); }
.line-table input, .line-table select { width: 100%; padding: 8px 9px; font-size: 13px; border: 1px solid var(--border-strong); border-radius: 8px; }
.line-table .x { color: var(--red); cursor: pointer; background: none; border: none; font-size: 16px; }

/* comments */
.comment { padding: 11px 14px; background: var(--turq-tint); border-radius: var(--radius-sm); margin-bottom: 8px; border-left: 3px solid var(--turq); }
.comment .meta { font-size: 11.5px; color: var(--text-soft); margin-bottom: 3px; font-weight: 600; }

/* misc */
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--teal-dark); margin: 20px 0 8px; font-weight: 800; }
.muted { color: var(--text-soft); }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 18px; background: var(--turq-tint); padding: 16px 18px; border-radius: var(--radius-sm); }
.detail-grid .k { font-size: 11.5px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .3px; font-weight: 700; }
.detail-grid .v { font-size: 14px; font-weight: 600; }

.chart-box { padding: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.bar-row .lbl { width: 64px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; background: var(--turq-tint); border-radius: 8px; height: 24px; position: relative; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: 11px; font-weight: 800; min-width: 2px; animation: revealX .7s var(--ease) both; }
.bar-fill.gr { background: linear-gradient(90deg, var(--teal), var(--turq)); }
.bar-fill.gi { background: linear-gradient(90deg, #d98a2b, #e7b15f); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-soft); margin-bottom: 14px; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }

.toast { position: fixed; bottom: 26px; right: 26px; z-index: 200; background: var(--emerald); color: #fff; padding: 14px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 360px; animation: slideInRight .28s var(--ease); display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: #b5403a; }
.toast.success { background: var(--teal); }

.loader { padding: 54px; text-align: center; color: var(--text-faint); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--turq-soft); border-top-color: var(--teal); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 12px; }

/* ---------- Login gate ---------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(160deg, var(--emerald) 0%, var(--emerald-deep) 60%, #0d2d33 100%); position: relative; overflow: hidden; }
.gate:before { content:""; position:absolute; top:-120px; right:-120px; width:420px; height:420px; border-radius:50%;
  background: radial-gradient(circle, rgba(91,221,202,.28), transparent 70%); }
.gate:after { content:""; position:absolute; bottom:-140px; left:-100px; width:360px; height:360px; border-radius:50%;
  background: radial-gradient(circle, rgba(40,147,134,.30), transparent 70%); }
.gate-card { background: #fff; border-radius: 22px; padding: 40px 36px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); text-align: center; position: relative; z-index: 1; animation: pop .35s var(--ease); }
.gate-card .logomark { margin: 0 auto 14px; animation: floaty 4s ease-in-out infinite; }
.gate-card h1 { color: var(--emerald); font-size: 24px; margin-bottom: 4px; font-weight: 800; }
.gate-card .brand-word { color: var(--onyx); }
.gate-card p { color: var(--text-soft); margin-bottom: 8px; }
.gate form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; text-align: left; }
.gate label { font-size: 12px; color: var(--text-soft); font-weight: 700; }
.gate input { width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.gate input:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
.gate .err { color: var(--red); font-size: 13px; min-height: 16px; }
.gate .btn { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }
.gate .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 12px; }
.logout-btn { margin-top: 10px; width: 100%; }

/* ---------- Responsive ---------- */
.backdrop { display: none; }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar .hamburger { display: block; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(19,63,71,.45); z-index: 35; }
  .content { padding: 18px 16px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}

/* ---------- Attachments (bukti transaksi) ---------- */
.link { color: var(--teal-dark); cursor: pointer; font-weight: 700; text-decoration: none; border-bottom: 1px dashed rgba(40,147,134,.5); }
.link:hover { color: var(--teal); border-bottom-style: solid; }
.att-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--turq-tint); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; transition: box-shadow .15s, transform .12s; }
.att-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.att-ic { flex: none; width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; letter-spacing: .5px; }
.att-ic.img { background: linear-gradient(135deg, var(--teal), var(--turq)); }
.att-ic.pdf { background: linear-gradient(135deg, #b5403a, #e0775f); }
.att-meta { flex: 1; min-width: 0; }
.att-name { font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-sub { font-size: 11px; color: var(--text-soft); }
.att-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.att-upload input[type=file] { font-size: 12.5px; font-family: inherit; max-width: 100%; }
.att-upload input[type=file]::file-selector-button { font-family: inherit; font-weight: 700; font-size: 12px; border: 1px solid var(--border-strong); background: #fff; color: var(--teal-dark); padding: 7px 12px; border-radius: 8px; cursor: pointer; margin-right: 10px; transition: all .15s; }
.att-upload input[type=file]::file-selector-button:hover { border-color: var(--teal); background: var(--turq-soft); }
.att-hint { font-size: 11px; color: var(--text-faint); flex-basis: 100%; }
.att-ic.thumb { padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.att-ic.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Attachment count badge ---------- */
.att-badge { display: inline-block; margin-left: 6px; background: var(--turq-soft); color: var(--teal-dark); font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 20px; vertical-align: middle; }
.att-ic.thumb { cursor: pointer; }
.att-ic.thumb img { transition: transform .15s; }
.att-ic.thumb:hover img { transform: scale(1.06); }

/* ---------- Lightbox gallery ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(19,63,71,.92); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; animation: fadeUp .18s var(--ease); }
.lightbox .lb-stage { max-width: 86vw; max-height: 82vh; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-stage img { max-width: 86vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop .2s var(--ease); }
.lightbox .lb-stage .spinner { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.lightbox .lb-close { position: absolute; top: 18px; right: 22px; background: rgba(255,255,255,.12); color: #fff; border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 1; transition: background .15s; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: none; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; cursor: pointer; transition: background .15s; }
.lightbox .lb-nav:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-nav.prev { left: 20px; } .lightbox .lb-nav.next { right: 20px; }
.lightbox .lb-cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #dff5f1; font-size: 13px; font-weight: 600; }
@media (max-width: 860px){ .lightbox .lb-nav { width: 42px; height: 42px; font-size: 24px; } }

/* ============================================================
   Motion & feedback polish
   ============================================================ */

/* Top progress bar */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 500; opacity: 0; pointer-events: none; }
.progress.active { opacity: 1; }
.progress.fade { opacity: 0; transition: opacity .3s ease; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--turq)); box-shadow: 0 0 10px rgba(91,221,202,.8), 0 0 4px rgba(40,147,134,.6); border-radius: 0 3px 3px 0; }

/* Button ripple */
.btn { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.5); animation: ripple .6s var(--ease); pointer-events: none; }
.btn:not(.primary):not(.navy):not(.success):not(.danger) .ripple,
.btn.ghost .ripple { background: rgba(40,147,134,.25); }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* Toast icon */
.toast { transition: opacity .3s, transform .3s; }
.toast-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.22); color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }

/* Skeleton loaders */
.skel { position: relative; overflow: hidden; background: #e9f1ef; border-radius: var(--radius); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-kpi { height: 92px; }
.skel-block { height: 240px; }
.skel-card { height: 150px; }
.skel-toolbar { height: 42px; margin-bottom: 16px; max-width: 460px; border-radius: var(--radius-sm); }
.skel-row { height: 44px; margin: 0 0 1px; border-radius: 6px; }
.skel-row.head { height: 38px; background: #def0ec; }

/* Branded boot splash */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--bg); z-index: 400; }
.boot-logo { animation: floaty 2.4s ease-in-out infinite; }
.boot-bar { width: 180px; height: 4px; background: var(--turq-soft); border-radius: 4px; overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--turq)); animation: bootslide 1.1s var(--ease) infinite; }
@keyframes bootslide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.boot-text { color: var(--text-soft); font-size: 13px; font-weight: 600; letter-spacing: .3px; }

@media (prefers-reduced-motion: reduce) {
  .ripple, .skel::after, .boot-bar span, .boot-logo { animation: none !important; }
}

/* ---------- Line editor: Rupiah input + new-material panel ---------- */
.rp-input { display: flex; align-items: center; width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rp-input:focus-within { border-color: var(--teal); box-shadow: var(--ring); }
.rp-input span { padding: 0 8px; font-size: 12px; font-weight: 700; color: var(--text-soft); background: var(--turq-tint); align-self: stretch; display: flex; align-items: center; }
.rp-input input { flex: 1; min-width: 0; width: auto; border: none !important; border-radius: 0 !important; box-shadow: none !important; padding: 8px 9px; }
.line-table tfoot td { border-bottom: none; border-top: 2px solid var(--border); }
.line-table .ln-total { color: var(--emerald); font-weight: 700; white-space: nowrap; }
.newmat { margin-top: 12px; padding: 14px 16px; background: var(--turq-tint); border: 1px dashed var(--turq); border-radius: var(--radius); animation: fadeUp .25s var(--ease); }
.newmat .section-title { margin-top: 0; }

/* ---------- Dashboard enhancements ---------- */
.greet-bar { background: linear-gradient(110deg, #0f8d7e, #16b39c); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(16,150,130,.25); animation: fadeUp .4s var(--ease); }
.greet-hi { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.greet-sub { font-size: 13.5px; color: #dff5f1; margin-top: 3px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.greet-sub .btn { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
.greet-sub .btn:hover { background: rgba(255,255,255,.28); color: #fff; }
.greet-sub b { color: #fff; }
.kpi-link { cursor: pointer; }
.kpi-go { font-size: 11px; font-weight: 700; color: var(--teal); opacity: 0; transition: opacity .18s; margin-top: 6px; }
.kpi-link:hover .kpi-go { opacity: 1; }
.vb-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; font-size: 12.5px; }
.vb-name { width: 84px; flex: none; font-weight: 700; color: var(--emerald); }
.vb-track { flex: 1; background: var(--turq-tint); border-radius: 8px; height: 18px; overflow: hidden; }
.vb-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--teal), var(--turq)); animation: revealX .7s var(--ease) both; }
.vb-val { width: 130px; flex: none; text-align: right; font-weight: 700; color: var(--text); }
@media (max-width: 640px) { .vb-name { width: 60px; } .vb-val { width: 96px; font-size: 11px; } }

/* ---------- PR two-stage workflow ---------- */
.tag.procapproved { background: #fdf3e0; color: #b06f15; }
.att-badge.chat { background: #e7eefc; color: #2c5cc5; }
.tracking { display: flex; flex-wrap: wrap; gap: 0; margin: 4px 0 14px; }
.trk-step { flex: 1; min-width: 150px; position: relative; padding: 4px 14px 4px 0; }
.trk-step .trk-dot { width: 14px; height: 14px; border-radius: 50%; background: #d6e2e0; border: 2px solid #c2d3d0; margin-bottom: 6px; position: relative; z-index: 1; }
.trk-step::before { content: ""; position: absolute; left: 7px; top: 11px; right: 0; height: 2px; background: #e1eae8; }
.trk-step:last-child::before { display: none; }
.trk-step.done .trk-dot { background: var(--teal); border-color: var(--teal); }
.trk-step.done::before { background: var(--turq); }
.trk-step.active .trk-dot { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px var(--turq-soft); }
.trk-label { font-size: 12px; font-weight: 700; color: var(--text); }
.trk-meta { font-size: 11px; color: var(--text-soft); margin-top: 1px; }
.trk-meta.muted { color: var(--muted); font-style: italic; }
.trk-flag { border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.trk-flag.rej { background: #fdeae9; color: #c33b34; }
.trk-flag.rev { background: #fdf2e2; color: #b06f15; }

/* ---------- payment status + three-way match ---------- */
.tag.lunas { background: #def3ec; color: #157a5c; }
.tag.sebagian { background: #fdf2e2; color: #b06f15; }
.tag.belum { background: #fdeae9; color: #c33b34; }
.match-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.match-cell { background: var(--surface, #f7faf9); border: 1px solid #e4ecea; border-radius: 12px; padding: 12px 14px; }
.match-l { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-soft, #5b6b68); }
.match-v { font-size: 20px; font-weight: 800; color: var(--emerald, #1A535C); margin: 3px 0 2px; }
.match-s { font-size: 11.5px; color: var(--muted, #8a9a96); }
@media (max-width: 640px) { .match-grid { grid-template-columns: 1fr; } }

/* ---------- cancelled / void ---------- */
.tag.cancelled { background: #ececec; color: #7a7a7a; text-decoration: line-through; }

/* ---------- dashboard: quick actions, aging strip, activity feed ---------- */
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.aging-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.aging-cell { background: var(--surface, #f7faf9); border: 1px solid #e4ecea; border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.aging-cell:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,83,92,.10); }
.aging-cell.warn { border-color: #f3d9a8; background: #fdf7ec; }
.aging-cell.danger { border-color: #f1c2bd; background: #fdeeec; }
.aging-l { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-soft, #5b6b68); }
.aging-v { font-size: 17px; font-weight: 800; color: var(--emerald, #1A535C); margin-top: 3px; }
.aging-cell.danger .aging-v { color: #c33b34; }
.act-list { display: flex; flex-direction: column; }
.act-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #eef3f2; }
.act-row:last-child { border-bottom: none; }
.act-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--turq-soft, #e3f5f1); color: var(--emerald, #1A535C); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.act-body { flex: 1; min-width: 0; }
.act-main { font-size: 13px; color: var(--text, #2b3a37); }
.act-meta { font-size: 11.5px; color: var(--muted, #8a9a96); margin-top: 1px; }
@media (max-width: 640px) { .aging-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- mockup alignment: hero CTA, accents ---------- */
.greet-bar .greet-sub { opacity: .92; font-size: 14px; margin-top: 4px; }
.greet-bar .btn, .greet-bar .btn.sm { background: #fff; color: #0f8d7e; border-color: #fff; font-weight: 600; }
.greet-bar .btn:hover { background: #f3fbfa; color: #0f8d7e; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.panel h3 { color: var(--emerald); }
.kpi-go { color: var(--teal); }

/* ---------- KPI section grouping + corner icon (mockup parity) ---------- */
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #8a999c; text-transform: uppercase; margin: 22px 4px 12px; }
.section-title:first-child { margin-top: 4px; }
.kpi { padding-top: 18px; }
.kpi-ic { position: absolute; top: 14px; right: 14px; font-size: 16px; line-height: 1; opacity: .9; }

/* ============ semantic polish: empty states, status icons, action icons ============ */
/* pretty empty state with optional initiative action */
.empty { padding: 46px 24px; text-align: center; color: var(--text-faint); }
.empty .empty-ic { font-size: 40px; line-height: 1; margin-bottom: 12px; opacity: .85; }
.empty .empty-title { font-size: 15px; font-weight: 800; color: var(--text-soft); }
.empty .empty-desc { font-size: 13px; color: var(--text-faint); margin-top: 5px; max-width: 380px; margin-left: auto; margin-right: auto; }
.empty .empty-act { margin-top: 18px; display: flex; justify-content: center; gap: 10px; }

/* status pills get a leading semantic symbol (applies app-wide automatically) */
.tag.approved::before, .tag.lunas::before, .tag.closed::before, .tag.ordered::before { content: '✓'; margin-right: 5px; font-weight: 800; }
.tag.submitted::before, .tag.procapproved::before, .tag.pending::before, .tag.sebagian::before { content: '⏳'; margin-right: 5px; }
.tag.revision::before { content: '↻'; margin-right: 5px; font-weight: 800; }
.tag.draft::before { content: '✎'; margin-right: 5px; }
.tag.rejected::before, .tag.belum::before { content: '✕'; margin-right: 5px; font-weight: 800; }
.tag.cancelled::before { content: '⊘'; margin-right: 5px; }
.tag.exp-30::before, .tag.exp-expired::before { content: '⚠'; margin-right: 5px; }
.tag.exp-60::before, .tag.exp-90::before { content: '⏰'; margin-right: 5px; }

/* semantic action buttons get a leading icon (icon-only buttons opt out) */
.btn.success::before { content: '✓'; margin-right: 6px; font-weight: 800; }
.btn.danger:not(.icon-only)::before { content: '✕'; margin-right: 6px; font-weight: 800; }
.btn.icon-only { padding: 4px 9px; }

/* toast feedback icons already colored via .toast.success/.error */

/* ============ mobile responsiveness pass (modals, tables, forms) ============ */
@media (max-width: 640px) {
  /* modal fills the screen comfortably */
  .modal-overlay { padding: 12px 8px; align-items: flex-start; }
  .modal, .modal.wide { max-width: 100%; border-radius: 14px; }
  .modal-head { padding: 16px 16px; }
  .modal-head h3 { font-size: 16px; }
  .modal-body { padding: 16px; max-height: 74vh; }
  /* footer buttons in a tidy 2-column grid instead of overflowing one row */
  .modal-foot { padding: 12px 16px; gap: 8px; display: grid; grid-template-columns: 1fr 1fr; }
  .modal-foot .btn { width: 100%; justify-content: center; white-space: normal; line-height: 1.15; text-align: center; padding: 10px 8px; }

  /* any wide table scrolls horizontally rather than getting clipped */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap .data { min-width: 460px; }
  .line-table { table-layout: auto; min-width: 520px; }

  /* detail summary grids stack */
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 18px; }
  .quick-actions .btn { flex: 1 1 46%; justify-content: center; }
}
@media (max-width: 340px) {
  .modal-foot { grid-template-columns: 1fr; }   /* one button per row on very small phones */
}

/* ===================== RAB MCU builder ===================== */
.rab-card{margin-bottom:16px}
.rab-step{display:flex;align-items:center;gap:12px;padding:14px 18px 0}
.rab-step-badge{width:30px;height:30px;border-radius:9px;background:var(--teal);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:14px;box-shadow:var(--shadow)}
.rab-step-title{font-weight:800;color:var(--emerald);font-size:15px;letter-spacing:-.2px}
.rab-step-sub{font-size:12px;color:var(--text-soft);margin-top:1px}

.rab-addbar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.rab-presetsel{flex:0 0 auto;min-width:170px}

.rab-pkgs{display:flex;flex-direction:column;gap:12px}
.rab-pkg{border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:12px 13px;background:var(--turq-tint)}
.rab-pkg-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.rab-pkg-name{flex:1;font-weight:700;border:1px solid var(--border-strong);border-radius:8px;padding:7px 10px;background:#fff;font-size:14px;color:var(--emerald)}
.rab-pkg-foot{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.rab-pkg-foot .field label{font-size:11px;color:var(--text-soft)}
.rab-ro{padding:7px 10px;border-radius:8px;background:#fff;border:1px dashed var(--border-strong);font-size:13px}

.chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.chip{display:inline-flex;align-items:center;gap:5px;background:#fff;border:1px solid var(--border-strong);color:var(--emerald);border-radius:999px;padding:4px 10px;font-size:12.5px;font-weight:600}
.chip-x{border:none;background:transparent;color:var(--text-faint);font-size:15px;line-height:1;cursor:pointer;padding:0 0 0 2px}
.chip-x:hover{color:var(--red)}
.chip.add{cursor:pointer;border-style:dashed;color:var(--teal-dark);background:var(--turq-soft);border-color:var(--teal)}
.chip.add:hover{background:var(--teal);color:#fff}
.chip.rec{cursor:pointer}
.chip.rec.on{background:var(--teal);border-color:var(--teal);color:#fff}
.rec-wrap{margin-bottom:6px}

.rab-omzet-foot{display:flex;justify-content:space-between;align-items:center;margin-top:14px;padding-top:12px;border-top:1px solid var(--border-strong);flex-wrap:wrap;gap:8px}
.rab-omzet-total{font-size:13px;color:var(--text-soft)}
.rab-omzet-total b{font-size:17px;color:var(--emerald);margin-left:6px}

.rab-sec{border-bottom:1px solid var(--border);padding:4px 0}
.rab-sec summary{cursor:pointer;font-weight:700;color:var(--emerald);padding:8px 0;list-style:none;display:flex;align-items:center;gap:8px}
.rab-sec summary::-webkit-details-marker{display:none}
.rab-sec summary:before{content:'▸';color:var(--teal);font-size:11px}
.rab-sec[open] summary:before{content:'▾'}
.rab-sec-tot{margin-left:auto;color:var(--text);font-weight:700}
.rab-addline{margin:6px 0 12px}
.rab-addline select{min-width:200px}
.rab-costtotal{display:flex;justify-content:flex-end;align-items:center;gap:10px;border-top:2px solid var(--border-strong);padding-top:12px;margin-top:6px;font-weight:700;color:var(--text-soft)}
.rab-costtotal b{font-size:17px;color:var(--red)}

.pst-tag{display:inline-block;font-size:10px;font-weight:700;background:var(--turq-soft);color:var(--teal-dark);border-radius:5px;padding:1px 5px;vertical-align:middle;text-transform:uppercase;letter-spacing:.3px}

.rab-check{display:flex;align-items:center;gap:8px;font-weight:600;padding:7px 0}
.rab-check input{width:auto}
.rab-search{width:100%;padding:9px 12px;border:1px solid var(--border-strong);border-radius:9px;font-size:14px}

.rab-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}
.rab-kpi{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:14px 16px;box-shadow:var(--shadow)}
.rab-kpi span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-soft);font-weight:700}
.rab-kpi b{display:block;font-size:20px;margin-top:4px;color:var(--emerald)}
.rab-kpi.accent{background:linear-gradient(135deg,var(--teal),var(--teal-dark));border-color:transparent}
.rab-kpi.accent span{color:rgba(255,255,255,.85)}
.rab-kpi.accent b{color:#fff;font-size:22px}

.rab-br{display:flex;justify-content:space-between;padding:5px 0;font-size:13px;color:var(--text-soft)}
.rab-br.strong{font-weight:800;color:var(--emerald);border-top:1px solid var(--border-strong);margin-top:5px;padding-top:9px;font-size:15px}

@media (max-width:640px){
  .rab-pkg-foot{grid-template-columns:1fr 1fr}
  .rab-kpis{grid-template-columns:1fr 1fr}
  .rab-step{padding:12px 14px 0}
}

/* RAB workflow additions */
.rab-cap{background:#fff5e6;border:1px solid var(--amber);color:#8a6400;border-radius:var(--radius-sm);padding:10px 14px;margin-bottom:14px;font-weight:700;font-size:12.5px}
.rab-revision{background:#fde8e6;border:1px solid var(--red);color:#9b2c22;border-radius:var(--radius-sm);padding:10px 14px;margin-bottom:14px;font-weight:600;font-size:13px}
.rab-modebar{display:flex;gap:6px;margin:6px 0 10px;flex-wrap:wrap}

/* RAB analytics */
.rab-2col{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:760px){.rab-2col{grid-template-columns:1fr}}
.an-row{display:flex;align-items:center;gap:10px;margin:7px 0}
.an-lab{flex:0 0 38%;font-size:12.5px;color:var(--ink)}
.an-track{flex:1;height:18px;background:#eef3f2;border-radius:9px;overflow:hidden}
.an-fill{display:block;height:100%;border-radius:9px;min-width:2px;transition:width .3s}
.an-val{flex:0 0 auto;font-size:12.5px;font-weight:700;color:var(--ink);min-width:54px;text-align:right}

/* grouped sidebar nav */
.nav-sec{font-size:10.5px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:#7fb0a8;padding:14px 16px 4px;opacity:.85}
.nav-sec:first-child{padding-top:6px}

/* multi-role picker */
.role-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;margin-top:4px}
.role-chk{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;padding:5px 8px;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:#fafbfb}
.role-chk input{width:auto;margin:0}
@media(max-width:520px){.role-grid{grid-template-columns:1fr}}

/* RAB two-panel builder + sticky summary + sticky action bar */
.rab-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start;padding-bottom:76px}
.rab-main{min-width:0}
.rab-aside{position:sticky;top:14px}
.rab-aside .rab-kpis{grid-template-columns:1fr 1fr}
.rab-actionbar{position:fixed;left:var(--sidebar-w,260px);right:0;bottom:0;background:rgba(255,255,255,.96);backdrop-filter:blur(6px);border-top:1px solid var(--line);box-shadow:0 -4px 16px rgba(26,83,92,.07);z-index:40}
.rab-actionbar-inner{max-width:1180px;margin:0 auto;padding:10px 22px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
@media(max-width:980px){
  .rab-layout{grid-template-columns:1fr}
  .rab-aside{position:static}
  .rab-aside .rab-kpis{grid-template-columns:1fr 1fr 1fr 1fr}
}
@media(max-width:860px){ .rab-actionbar{left:0} }
@media(max-width:560px){ .rab-aside .rab-kpis{grid-template-columns:1fr 1fr} }

/* RAB tracker timeline */
.tl{display:flex;flex-direction:column;gap:2px}
.tl-item{display:flex;gap:10px;padding:7px 0;position:relative}
.tl-item:not(:last-child)::before{content:'';position:absolute;left:13px;top:30px;bottom:-2px;width:2px;background:var(--line)}
.tl-ic{flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--turq-soft);display:flex;align-items:center;justify-content:center;font-size:14px;z-index:1}
.tl-item.ok .tl-ic{background:#d8f3ec}.tl-item.warn .tl-ic{background:#fdecd0}.tl-item.bad .tl-ic{background:#fbe0dd}
.tl-meta{font-size:11px;color:var(--text-faint)}
.tl-text{font-size:13px;color:var(--ink);margin-top:1px}

/* table polish: sticky header in scroll areas + hover + mobile column hide */
.table-wrap{overflow:auto}
.table-wrap table thead th{position:sticky;top:0;background:var(--paper,#fff);z-index:2;box-shadow:0 1px 0 var(--line)}
table.data tbody tr:hover{background:var(--turq-soft)}
@media(max-width:640px){ .hide-sm{display:none!important} }
/* status tag icon spacing */
.tag .st-ic{margin-right:3px}

/* Quick Estimate (Sales) */
.est-rows{display:flex;flex-direction:column;gap:8px}
.est-row{display:grid;grid-template-columns:1fr 150px 34px;gap:8px;align-items:center}
.est-row select,.est-row input{margin:0}
.est-row .x{justify-self:center}
.est-total{margin-top:12px;font-size:14px;color:var(--ink)}
.est-total b{color:var(--emerald);font-size:16px}
.est-hero-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:6px 0 14px}
.est-hero{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px 18px;box-shadow:0 2px 10px rgba(26,83,92,.05)}
.est-hero.alt{background:linear-gradient(135deg,var(--emerald),var(--teal-dark,#14706a));border:none;color:#fff}
.est-hero-name{font-size:13px;font-weight:700;color:var(--text-faint);text-transform:uppercase;letter-spacing:.4px}
.est-hero.alt .est-hero-name{color:#bfe9e1}
.est-hero-price{font-size:30px;font-weight:800;color:var(--emerald);margin:6px 0 2px;line-height:1.1}
.est-hero.alt .est-hero-price{color:#fff}
.est-hero-price span{font-size:13px;font-weight:600;color:var(--text-faint);margin-left:3px}
.est-hero-sub{font-size:12.5px;color:var(--text-faint)}
.est-hero.alt .est-hero-sub{color:#d8f3ec}
.est-hero-sub b{color:var(--emerald)}
.est-hero.alt .est-hero-sub b{color:#fff}
.est-detail{border:1px solid var(--line);border-radius:12px;padding:6px 14px;background:#fafbfb;margin-bottom:80px}
.est-detail>summary{cursor:pointer;font-weight:700;color:var(--emerald);padding:8px 0}
@media(max-width:560px){ .est-row{grid-template-columns:1fr 96px 30px} }

/* Quick Estimate package row + items */
.est-row-card{border:1px solid var(--line);border-radius:12px;padding:10px;background:#fafbfb}
.est-items{margin-top:8px}
.est-items .chip{font-size:12px}

/* --- Fase 3: bell + notifications + calendar --- */
.bell-btn{position:relative;background:transparent;border:1px solid var(--line,#e2e8e6);border-radius:10px;width:38px;height:38px;font-size:17px;cursor:pointer;margin-left:8px}
.bell-btn:hover{background:var(--turq-soft,#eafaf6)}
.bell-badge{position:absolute;top:-5px;right:-5px;background:var(--red,#e5484d);color:#fff;font-size:10px;font-weight:700;min-width:17px;height:17px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 3px}
.notif-dd{position:fixed;z-index:9000;width:340px;max-width:92vw;background:#fff;border:1px solid var(--line,#e2e8e6);border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.16);overflow:hidden}
.notif-head{font-weight:800;padding:12px 14px;border-bottom:1px solid var(--line,#eef2f1)}
.notif-list{max-height:60vh;overflow:auto}
.notif-item{padding:10px 14px;border-bottom:1px solid var(--line,#f0f4f3)}
.notif-item.unread{background:var(--turq-soft,#eafaf6)}
.notif-title{font-weight:700;font-size:13px}
.notif-body{font-size:12px;color:var(--muted,#5b6b67);margin:2px 0}
.notif-time{font-size:11px;color:var(--muted,#90a09b)}
.notif-empty{padding:18px 14px;color:var(--muted,#90a09b);font-size:13px;text-align:center}
.cal-date{font-weight:800;color:var(--emerald,#1A535C);margin:14px 0 6px;font-size:13px;border-bottom:2px solid var(--turq-soft,#eafaf6);padding-bottom:3px}
.cal-event{display:flex;gap:12px;align-items:flex-start;padding:10px;border:1px solid var(--line,#eef2f1);border-radius:12px;margin-bottom:8px}
.staff-wrap{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.staff-chip{background:var(--turq-soft,#eafaf6);border:1px solid var(--turq,#5BDDCA);color:var(--emerald,#1A535C);border-radius:20px;padding:3px 10px;font-size:12px;font-weight:600}
.staff-chip .x{cursor:pointer;color:var(--red,#e5484d);font-weight:800;margin-left:4px}

/* --- Target Sales progress bar --- */
.pbar{height:8px;border-radius:6px;background:var(--turq-soft,#eef5f3);overflow:hidden;margin-bottom:3px}
.pbar-fill{height:100%;border-radius:6px;transition:width .3s ease}

/* --- Notif preference radios --- */
.radio-group{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.radio-row{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer;padding:6px 8px;border:1px solid var(--line,#e2e8e6);border-radius:8px}
.radio-row:hover{background:var(--turq-soft,#eafaf6)}
