:root {
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-soft: #eff4ff;
  --primary-100: #dbe6fe;
  --accent: #0ea5e9;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --text-soft: #6b7280;
  --text-dim: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #2563eb;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --sh-sm: 0 1px 2px rgba(16,24,40,0.05);
  --sh: 0 1px 3px rgba(16,24,40,0.07), 0 1px 2px rgba(16,24,40,0.04);
  --sh-md: 0 4px 12px rgba(16,24,40,0.08);
  --sh-lg: 0 12px 28px rgba(16,24,40,0.12);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
h1 { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
h2 { font-size: 18px; font-weight: 600; color: var(--text); }
h3 { font-size: 14.5px; font-weight: 600; color: var(--text); }

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; padding: 6px 8px; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand strong { display: block; font-size: 15px; color: var(--text); letter-spacing: .2px; }
.brand small { color: var(--text-dim); font-size: 11px; }

/* Judul bagian sidebar — bisa diklik untuk melipat isinya */
.sidebar .nav-section {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: calc(100% - 20px);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-dim); margin: 16px 10px 6px; font-weight: 600;
  font-family: inherit; text-align: left;
  /* Reset penuh: elemennya <button>, jadi tanpa ini tampil sebagai kotak abu-abu bawaan peramban. */
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  padding: 3px 0; cursor: pointer; line-height: inherit;
  transition: color .15s;
}
.sidebar .nav-section:hover { color: var(--text-main, #0f172a); background: transparent; }

.nav-section__arrow { display: inline-flex; transition: transform .18s ease; opacity: .6; }
.nav-group.collapsed .nav-section__arrow { transform: rotate(-90deg); }

/* Isi bagian disembunyikan saat dilipat */
.nav-group.collapsed > .nav { display: none; }

@media (prefers-reduced-motion: reduce) { .nav-section__arrow { transition: none; } }
.nav { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: var(--r-sm);
  color: var(--text-soft); font-weight: 500; font-size: 13.5px;
  transition: all .1s;
}
.nav li a:hover { background: var(--surface-2); color: var(--text); }
.nav li a.active { background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; }
.nav li a.active .ic { opacity: 1; }
.nav .ic { display: inline-flex; opacity: .7; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-weight: 600; color: var(--text); font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; justify-content: flex-end; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); max-width: 200px; flex-shrink: 0; }
.user-chip-text { min-width: 0; flex: 1; }
.user-chip-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-tag { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

.content { padding: 24px; flex: 1; max-width: 1500px; width: 100%; }

/* ===== Page header ===== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header p { color: var(--text-soft); margin-top: 3px; font-size: 13px; }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; box-shadow: var(--sh-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-body { padding: 18px; }

/* ===== Stats grid ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--sh-sm); transition: box-shadow .15s; }
.stat:hover { box-shadow: var(--sh-md); }
.stat .ic-wrap { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--primary-soft); flex-shrink: 0; }
.stat .label { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.stat .value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.15; margin: 2px 0; letter-spacing: -0.5px; }
.stat .sub { font-size: 11px; color: var(--text-dim); }
.stat.alt-1 .ic-wrap { color: var(--accent); background: #e0f2fe; }
.stat.alt-2 .ic-wrap { color: var(--success); background: var(--success-soft); }
.stat.alt-3 .ic-wrap { color: var(--warning); background: var(--warning-soft); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: all .1s; white-space: nowrap; box-shadow: var(--sh-sm);
}
.btn:hover { background: var(--surface-2); border-color: var(--text-dim); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #047857; border-color: #047857; color: #fff; }
.btn-soft-info { color: var(--info); background: var(--primary-soft); border-color: var(--primary-100); }
.btn-soft-info:hover { background: var(--primary-100); border-color: var(--primary-100); color: var(--primary-strong); }
.btn-soft-warning { color: var(--warning); background: var(--warning-soft); border-color: #fde68a; }
.btn-soft-warning:hover { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.btn-soft-danger { color: var(--danger); background: var(--danger-soft); border-color: #fecaca; }
.btn-soft-danger:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }
.btn-icon-sm { padding: 5px; }
.btn-icon-mobile { display: none; }

/* ===== Switch toggle ===== */
.switch {
  position: relative; display: inline-flex; align-items: center;
  width: 34px; height: 19px; cursor: pointer; flex-shrink: 0; vertical-align: middle;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch .switch-track {
  position: absolute; inset: 0; background: var(--border-strong);
  border-radius: 999px; border: 1px solid var(--border-strong); transition: background .15s;
}
.switch .switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(16,24,40,.25);
  transition: transform .15s;
}
.switch input:checked + .switch-track { background: var(--success); border-color: var(--success); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.switch input:disabled + .switch-track { opacity: .55; }
.switch:has(input:disabled) { cursor: not-allowed; }

.btn-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text-dim);
  cursor: pointer; transition: all .2s ease;
}
.btn-hamburger:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-hamburger:active { transform: scale(0.92); }
.app.nav-open .btn-hamburger { color: var(--primary); background: var(--primary-soft); border-color: transparent; }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-help { font-size: 11.5px; color: var(--text-dim); margin-top: 5px; }
.input, .select, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-size: 13.5px; font-family: inherit; transition: border-color .1s, box-shadow .1s;
}
.input::placeholder, textarea.input::placeholder { color: var(--text-dim); }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th { background: var(--surface-2); text-align: left; padding: 10px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-soft); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.txt-center { text-align: center; }
.txt-right, .right { text-align: right; }
.recap-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recap-table th, .recap-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.recap-table thead th { background: var(--surface-2); font-size: 11px; text-transform: uppercase; color: var(--text-soft); text-align: left; }
.recap-table tfoot td { font-weight: 700; background: var(--surface-2); }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.badge-primary { color: var(--primary-strong); background: var(--primary-soft); border-color: var(--primary-100); }
.badge-success { color: var(--success); background: var(--success-soft); border-color: #a7f3d0; }
.badge-warning { color: var(--warning); background: var(--warning-soft); border-color: #fde68a; }
.badge-danger { color: var(--danger); background: var(--danger-soft); border-color: #fecaca; }
.badge-info { color: var(--info); background: var(--primary-soft); border-color: var(--primary-100); }
.badge-muted { color: var(--text-soft); background: var(--surface-2); border-color: var(--border); }

/* ===== Progress ===== */
.progress { background: var(--border); height: 8px; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; }

/* ===== KV grid ===== */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kv { padding: 11px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.kv .k { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-soft); font-weight: 600; margin-bottom: 3px; }
.kv .v { font-size: 14px; font-weight: 600; color: var(--text); }

/* ===== Timeline ===== */
.timeline { list-style: none; position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding-bottom: 16px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.tl-title { font-weight: 600; font-size: 14px; }
.tl-meta { font-size: 12px; color: var(--text-dim); margin: 2px 0; }
.tl-desc { font-size: 13px; margin-top: 4px; color: var(--text-soft); }

/* ===== Stage list ===== */
.stage-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stage-item { border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.stage-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 15px; cursor: pointer; list-style: none; }
.stage-item summary::-webkit-details-marker { display: none; }
.stage-item summary:hover { background: var(--surface-2); }
.stage-ic { color: var(--text-dim); display: inline-flex; }
.stage-label { flex: 1; font-weight: 600; font-size: 14px; }
.stage-body { padding: 0 15px 15px; }
.stage-done { border-color: #a7f3d0; }
.stage-done .stage-ic { color: var(--success); }
.stage-in_progress { border-color: var(--primary-100); }
.stage-in_progress .stage-ic { color: var(--info); }

/* ===== Toolbar ===== */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 280px; }

.filter-bar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}
.filter-actions {
  display: flex;
  gap: 8px;
}

/* ===== Flash ===== */
.flash { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.flash .success, .flash .error { padding: 11px 15px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.flash .success { color: var(--success); background: var(--success-soft); border-color: #a7f3d0; }
.flash .error { color: var(--danger); background: var(--danger-soft); border-color: #fecaca; }

/* ===== Empty ===== */
.empty { text-align: center; padding: 34px 20px; color: var(--text-dim); font-size: 13px; }

/* ===== Helpers ===== */
.flex { display: flex; }
.center { align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-12 { margin-bottom: 12px; } .mb-24 { margin-bottom: 24px; }
.muted { color: var(--text-dim); }
.text-soft { color: var(--text-soft); }

/* ===== Auth ===== */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-hero { background: linear-gradient(150deg, var(--primary-dark), var(--primary) 65%, var(--accent)); color: #fff; padding: 50px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-logo img { width: 110px; background: #fff; padding: 10px 14px; border-radius: var(--r-md); }
.auth-hero h1 { color: #fff; font-size: 30px; line-height: 1.25; }
.auth-hero p { color: rgba(255,255,255,0.88); margin-top: 16px; font-size: 14px; }
.auth-quote { font-size: 12px; color: rgba(255,255,255,0.72); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); padding: 34px; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--sh-md); }
.auth-card h2 { color: var(--text); }
.auth-sub { color: var(--text-soft); font-size: 13px; margin: 6px 0 22px; }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* ===== Alert alih ===== */
.alert-alih { background: var(--warning-soft); border: 1px solid #fde68a; border-radius: var(--r-md); padding: 13px 16px; display: flex; gap: 12px; margin-bottom: 16px; }
.alert-alih .ic-svg { color: var(--warning); }
.alert-alih strong { color: var(--warning); display: block; margin-bottom: 2px; }

.scrim { display: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; width: 240px; height: 100vh; transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: var(--sh-lg); will-change: transform; }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(16,24,40,0.4); z-index: 25; }
  .btn-icon-mobile, .btn-hamburger { display: inline-flex; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 10px 14px; }
  .topbar .page-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .user-chip { padding: 4px; border: none; background: transparent; max-width: none; }
  .user-chip-text { display: none; }
}
@media (max-width: 480px) {
  .topbar .page-title { max-width: 32vw; }
}
.hide-mobile { display: inline; }
.show-mobile { display: none; }
@media (max-width: 980px) { .hide-mobile { display: none; } .show-mobile { display: inline; } }

/* ===== Stage checkbox items ===== */
.chk { display:inline-flex; align-items:center; gap:4px; min-width:34px; justify-content:center; padding:6px 10px; border-radius:6px; font-size:12px; font-weight:600; font-family:inherit; cursor:pointer; border:1px solid var(--border-strong); background:var(--surface); color:var(--text-soft); transition:all .1s; }
.chk-on { background:var(--success-soft); border-color:#a7f3d0; color:var(--success); }
.chk-off:hover { border-color:var(--primary); color:var(--primary); }
.chk-locked { cursor:default; opacity:.85; }
.chk-locked.chk-off { background:var(--surface-2); }
.chkline { display:inline-block; }

.admin-tab-bar .admin-tab-btn.active { color: var(--primary-strong) !important; border-bottom-color: var(--primary) !important; }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* ============================================================
   CLIENT PORTAL REDESIGN
   ============================================================ */

/* Hero header (dashboard & detail) */
.cl-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--accent) 100%);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  color: #fff;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--sh-md);
}
.cl-hero::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.cl-hero::before {
  content: '';
  position: absolute; right: 40px; bottom: -80px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.cl-hero .cl-hero-in { position: relative; z-index: 1; }
.cl-hero h1 { color: #fff; font-size: 24px; margin-bottom: 4px; }
.cl-hero p { color: rgba(255,255,255,0.9); font-size: 13.5px; }
.cl-hero .cl-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cl-hero .cl-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.22);
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.cl-hero .cl-chip .ic-svg { opacity: .9; }

/* Package card */
.cl-pkg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
.cl-pkg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(120deg, var(--primary-soft), #fff);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.cl-pkg-head .cl-pkg-name { font-size: 17px; font-weight: 700; color: var(--primary-dark); letter-spacing: -.3px; }
.cl-pkg-head .cl-pkg-cat { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.cl-pkg-tier {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; box-shadow: var(--sh-sm);
}

/* Benefit list */
.cl-benefits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 18px 20px; }
.cl-benefit {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2); transition: border-color .12s, box-shadow .12s;
}
.cl-benefit:hover { border-color: var(--primary-100); box-shadow: var(--sh-sm); }
.cl-benefit .cl-bic {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.cl-benefit .cl-blabel { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.cl-benefit .cl-bqty { font-size: 11.5px; color: var(--primary-strong); font-weight: 700; margin-top: 2px; }
.cl-benefit .cl-bsubs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cl-benefit .cl-bsub { font-size: 10.5px; background: var(--primary-soft); color: var(--primary-strong); padding: 2px 7px; border-radius: 5px; font-weight: 600; }

/* Section title */
.cl-sec-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); margin: 0 0 4px; }

/* Progress ring / big progress */
.cl-progress-big { background: var(--border); height: 12px; border-radius: 999px; overflow: hidden; }
.cl-progress-big > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .4s; }

/* Live hours meter */
.cl-meter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cl-meter .cl-meter-num { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1; }

/* Timeline step (benefit / stage progress) */
.cl-steps { list-style: none; display: flex; flex-direction: column; gap: 0; }
.cl-step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.cl-step:last-child { padding-bottom: 0; }
.cl-step::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: -4px; width: 2px; background: var(--border); }
.cl-step:last-child::before { display: none; }
.cl-step .cl-step-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--border); color: var(--text-dim);
}
.cl-step.done .cl-step-dot { background: var(--success-soft); border-color: #a7f3d0; color: var(--success); }
.cl-step.active .cl-step-dot { background: var(--primary-soft); border-color: var(--primary-100); color: var(--primary); }
.cl-step .cl-step-body { padding-top: 4px; flex: 1; min-width: 0; }
.cl-step .cl-step-label { font-weight: 600; font-size: 14px; }
.cl-step .cl-step-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* Trend pill */
.cl-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.cl-trend.up { color: var(--success); background: var(--success-soft); }
.cl-trend.down { color: var(--danger); background: var(--danger-soft); }
.cl-trend.flat { color: var(--text-soft); background: var(--surface-2); }

/* Project cards grid */
.cl-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cl-proj-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--sh-sm); color: var(--text);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.cl-proj-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--primary-100); color: var(--text); }
.cl-proj-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cl-proj-store { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-soft); font-weight: 600; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.cl-proj-name { font-size: 15.5px; font-weight: 700; color: var(--text); letter-spacing: -.2px; line-height: 1.3; }
.cl-proj-prog { padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cl-proj-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Bottom nav (mobile only) */
.cl-bottomnav { display: none; }

/* ===== Client responsive ===== */
@media (max-width: 720px) {
  .cl-hero { padding: 20px 18px; }
  .cl-hero h1 { font-size: 20px; }
  .cl-benefits { grid-template-columns: 1fr; padding: 14px; }
  .stat .value { font-size: 20px; }
  h1 { font-size: 19px; }

  /* Mobile card-style tables for client portal */
  body.role-client .tbl thead { display: none; }
  body.role-client .tbl,
  body.role-client .tbl tbody,
  body.role-client .tbl tr,
  body.role-client .tbl td { display: block; width: 100%; }
  body.role-client .tbl tr { border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; padding: 6px 4px; background: var(--surface); }
  body.role-client .tbl tbody td { border: none; padding: 7px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  body.role-client .tbl tbody td::before {
    content: attr(data-label);
    font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
    color: var(--text-soft); font-weight: 700; flex-shrink: 0;
  }
  body.role-client .tbl tbody td.actions { justify-content: flex-end; }
  body.role-client .tbl tbody td.actions::before { display: none; }
}

/* Client bottom navigation for small screens */
@media (max-width: 720px) {
  body.role-client .cl-bottomnav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(16,24,40,0.06);
    padding: 6px 4px env(safe-area-inset-bottom, 6px);
  }
  body.role-client .cl-bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 4px; color: var(--text-soft); font-size: 10.5px; font-weight: 600;
  }
  body.role-client .cl-bottomnav a.active { color: var(--primary); }
  body.role-client .content { padding-bottom: 76px; }
}

/* ===== Client: no sidebar, topbar navigation ===== */
body.role-client .sidebar,
body.role-client .scrim { display: none !important; }
body.role-client .main { width: 100%; }

/* Brand in topbar (client) */
.topbar-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: var(--text); letter-spacing: .2px; }
.topbar-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }

/* Top navigation (client, desktop) */
.topnav-client { display: flex; align-items: center; gap: 2px; }
.topnav-client a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--text-soft); font-weight: 600; font-size: 13.5px;
  transition: background .1s, color .1s;
}
.topnav-client a:hover { background: var(--surface-2); color: var(--text); }
.topnav-client a.active { background: var(--primary-soft); color: var(--primary-strong); }

@media (max-width: 820px) {
  .topnav-client { display: none; }
  .topbar-brand span { display: none; }
}
