/* OSPRO CRM by OSCAR CONNECT — design system
   Navy #0F2B5B / #1E3A8A, Gold #C8A24A, latar putih & abu muda */
:root {
  --navy-900: #0b1f42;
  --navy-800: #0f2b5b;
  --navy-700: #163a75;
  --navy-600: #1e3a8a;
  --navy-100: #e8eefb;
  --gold-600: #b08932;
  --gold-500: #c8a24a;
  --gold-100: #f7efd8;
  --ink: #17233b;
  --muted: #64748b;
  --line: #e3e8f1;
  --panel: #f5f7fb;
  --white: #ffffff;
  --green: #0f9d58;
  --green-soft: #e6f6ed;
  --red: #d93a3a;
  --red-soft: #fdecec;
  --amber: #c47f17;
  --amber-soft: #fdf3e1;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 43, 91, .06), 0 2px 8px rgba(15, 43, 91, .05);
  --shadow-md: 0 8px 24px rgba(15, 43, 91, .1);
  --shadow-lg: 0 20px 48px rgba(11, 31, 66, .18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--panel);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1, .h1 { font-size: 1.75rem; font-weight: 800; }
h2, .h2 { font-size: 1.35rem; font-weight: 700; }
h3, .h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 .6em; }
small, .small { font-size: .8rem; }
.muted { color: var(--muted); }
.req { color: var(--red); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 650; font-size: .9rem; cursor: pointer; transition: .16s ease;
  background: var(--white); color: var(--navy-800); text-align: center; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); color: #fff; box-shadow: 0 6px 16px rgba(30, 58, 138, .25); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(30, 58, 138, .3); }
.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: #21170a; box-shadow: 0 6px 16px rgba(200, 162, 74, .3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy-800); }
.btn-ghost:hover { background: var(--white); border-color: var(--navy-100); }
.btn-outline { background: transparent; border-color: var(--navy-600); color: var(--navy-600); }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--white); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; position: relative; color: var(--navy-800);
}
.badge-count {
  position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 258px; flex: 0 0 258px; background: linear-gradient(180deg, var(--navy-900), var(--navy-800) 55%, #123163);
  color: #dbe4f5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: #16233d;
  font-weight: 900; letter-spacing: -.5px; font-size: .95rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: .98rem; letter-spacing: .02em; }
.brand-text small { font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-500); }
.company-chip {
  margin: 4px 14px 12px; padding: 9px 10px; border-radius: 11px; display: flex; gap: 9px; align-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.company-chip b { display: block; font-size: .82rem; color: #fff; }
.company-chip small { font-size: .7rem; color: #a9bde0; }
.company-avatar {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(200, 162, 74, .2); color: var(--gold-500);
  display: grid; place-items: center; font-weight: 800; flex: 0 0 30px;
}
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.nav-section {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .16em; color: #7f96c2;
  margin: 16px 10px 6px; font-weight: 700;
}
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  color: #c9d6ee; font-size: .86rem; font-weight: 550; margin-bottom: 2px; transition: .14s;
}
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(200,162,74,.22), rgba(200,162,74,.05)); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.nav-ico { width: 18px; text-align: center; font-size: .95rem; opacity: .95; }
.sidebar-foot { padding: 8px 10px 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .copy { font-size: .66rem; color: #7f96c2; margin: 8px 10px 0; letter-spacing: .04em; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 1.02rem; font-weight: 750; margin: 0; }
.topbar-left { flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sub-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 650;
  padding: 5px 10px; border-radius: 20px; background: var(--navy-100); color: var(--navy-800); border: 1px solid #d3dffa;
}
.dot-status { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot-status.tone-success { background: var(--green); } .dot-status.tone-danger { background: var(--red); }
.dot-status.tone-warning { background: var(--amber); } .dot-status.tone-info { background: var(--blue); }
.profile-btn {
  display: flex; align-items: center; gap: 9px; background: transparent; border: 1px solid transparent;
  padding: 5px 8px; border-radius: 11px; cursor: pointer; color: var(--ink);
}
.profile-btn:hover { background: var(--panel); border-color: var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: 0 0 34px;
}
.profile-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.profile-meta b { font-size: .82rem; }
.profile-meta small { font-size: .68rem; color: var(--muted); }
.chev { font-size: .7rem; color: var(--muted); }
.profile-menu { position: relative; }
.profile-drop {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-md); min-width: 210px; padding: 6px; display: none; z-index: 50;
}
.profile-drop.open { display: block; }
.profile-drop a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .85rem; color: var(--ink); }
.profile-drop a:hover { background: var(--panel); }
.profile-drop a.danger { color: var(--red); }
.content { padding: 24px 26px 40px; flex: 1; width: 100%; max-width: 1440px; }
.content.wide { max-width: none; }
.app-footer { padding: 14px 26px 22px; color: var(--muted); font-size: .74rem; border-top: 1px solid var(--line); background: #fff; }
.only-mobile { display: none; }

/* ---------- Page header / cards ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 3px; }
.page-sub { color: var(--muted); font-size: .86rem; margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-title { font-size: .96rem; font-weight: 750; margin: 0; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); margin-bottom: 22px; }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px;
  display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-sm); color: inherit; transition: .16s;
}
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cfd9ef; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.02rem;
  background: var(--navy-100); color: var(--navy-700); flex: 0 0 38px;
}
.stat-icon.tone-gold { background: var(--gold-100); color: var(--gold-600); }
.stat-icon.tone-green { background: var(--green-soft); color: var(--green); }
.stat-icon.tone-red { background: var(--red-soft); color: var(--red); }
.stat-icon.tone-blue { background: var(--blue-soft); color: var(--blue); }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; margin: 0 0 2px; }
.stat-value { font-size: 1.32rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.stat-hint { font-size: .74rem; color: var(--muted); margin: 2px 0 0; }

/* ---------- Table ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 560px; }
.table thead th {
  text-align: left; padding: 11px 14px; background: #f8fafd; color: var(--muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 700;
}
.table tbody td { padding: 12px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.table tbody tr:hover { background: #fafbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-title { font-weight: 650; color: var(--ink); }
.table-sub { font-size: .74rem; color: var(--muted); }
.pager { display: flex; gap: 6px; align-items: center; padding: 14px 16px; flex-wrap: wrap; }
.pg { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); font-size: .78rem; color: var(--ink); background: #fff; }
.pg:hover { border-color: var(--navy-600); }
.pg.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.pg.disabled { opacity: .45; pointer-events: none; }
.pg-info { margin-left: auto; color: var(--muted); font-size: .76rem; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: .71rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.badge-success { background: var(--green-soft); color: #0a7a44; }
.badge-warning { background: var(--amber-soft); color: #91590a; }
.badge-danger { background: var(--red-soft); color: #a62020; }
.badge-info { background: var(--blue-soft); color: #1c4fc0; }
.badge-muted { background: #eef1f6; color: #55617a; }
.badge-navy { background: var(--navy-100); color: var(--navy-700); }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; padding: 3px 8px; border-radius: 7px; background: #eef2f9; color: #3b4a66; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .78rem; font-weight: 650; color: #3c4a63; margin-bottom: 5px; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-inline label { margin: 0; }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid #d7dfec; border-radius: 9px; font: inherit;
  font-size: .87rem; background: #fff; color: var(--ink); transition: .14s; min-height: 40px;
}
.input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(30, 58, 138, .1); }
textarea.input { min-height: 84px; resize: vertical; }
.help { color: var(--muted); font-size: .73rem; display: block; margin-top: 3px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
form.inline { display: inline; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.filter-grid { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.filter-grid .field { margin-bottom: 8px; }
.filter-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--navy-600); }
.switch input:checked + span::before { transform: translateX(18px); }
.search-inline { display: flex; gap: 8px; }
.search-inline .input { max-width: 320px; }

/* ---------- Flash / states ---------- */
.flash { padding: 12px 16px; border-radius: 11px; margin-bottom: 18px; font-size: .87rem; border: 1px solid; font-weight: 550; }
.flash-success { background: var(--green-soft); border-color: #bfe8d3; color: #0a7a44; }
.flash-error { background: var(--red-soft); border-color: #f6c9c9; color: #a62020; }
.flash-info { background: var(--blue-soft); border-color: #cddffb; color: #1c4fc0; }
.flash-warning { background: var(--amber-soft); border-color: #f2ddb5; color: #91590a; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-icon { font-size: 1.9rem; margin-bottom: 8px; opacity: .8; }
.empty-state p { margin: 0 0 12px; font-size: .88rem; }
.empty-mini { color: var(--muted); font-size: .82rem; padding: 10px 0; }
.progress { position: relative; height: 8px; background: #eef1f7; border-radius: 8px; overflow: visible; min-width: 100px; }
.progress-fill { height: 8px; border-radius: 8px; background: var(--navy-600); }
.progress-fill.tone-gold { background: var(--gold-500); }
.progress-fill.tone-green { background: var(--green); }
.progress-fill.tone-red { background: var(--red); }
.progress-label { position: absolute; right: 0; top: -19px; font-size: .7rem; color: var(--muted); font-weight: 650; }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart-txt { font-size: 9px; fill: #7b879c; font-family: var(--font); }
.donut { width: 168px; height: 168px; flex: 0 0 168px; }
.donut-num { font-size: 17px; font-weight: 800; fill: var(--navy-800); font-family: var(--font); }
.donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.legend { list-style: none; padding: 0; margin: 0; font-size: .79rem; display: grid; gap: 6px; min-width: 160px; }
.legend li { display: flex; align-items: center; gap: 7px; color: #3d4a62; }
.legend b { margin-left: auto; }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.kanban-col { flex: 0 0 254px; background: #f0f3f9; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 220px; }
.kanban-col.drag-over { background: var(--navy-100); border-color: var(--navy-600); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; padding: 0 3px; }
.kanban-head b { font-size: .8rem; }
.kanban-count { font-size: .7rem; background: #fff; border-radius: 20px; padding: 1px 8px; color: var(--muted); font-weight: 700; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow-sm); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .5; }
.kanban-card .kc-name { font-weight: 700; font-size: .82rem; margin-bottom: 2px; }
.kanban-card .kc-meta { font-size: .72rem; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.kanban-empty { font-size: .74rem; color: #93a1b8; text-align: center; padding: 12px 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-item { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--navy-600); flex: 0 0 12px; margin-top: 5px; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--navy-100); }
.tl-dot.tone-green { background: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.tl-dot.tone-gold { background: var(--gold-500); box-shadow: 0 0 0 2px var(--gold-100); }
.tl-dot.tone-red { background: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.tl-body { min-width: 0; }
.tl-title { font-size: .84rem; font-weight: 650; margin: 0; }
.tl-meta { font-size: .72rem; color: var(--muted); margin: 1px 0 0; }
.tl-text { font-size: .81rem; margin: 4px 0 0; color: #38455c; }

/* ---------- Modal (dialog) ---------- */
dialog.modal { border: 0; border-radius: 16px; padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(11, 31, 66, .5); backdrop-filter: blur(2px); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fafbfe; }
.modal-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 16px;
  background: radial-gradient(1200px 600px at 15% 0%, #1c3b74 0%, transparent 55%),
              radial-gradient(900px 500px at 90% 100%, #2a4f92 0%, transparent 60%), linear-gradient(160deg, #0b1f42, #163a75 70%, #1e3a8a);
}
.auth-wrap { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.auth-aside { background: linear-gradient(160deg, #0d264f, #17396f 60%, #1e3f7c); color: #dbe4f5; padding: 38px 34px; display: flex; flex-direction: column; gap: 16px; }
.auth-aside h1 { color: #fff; font-size: 1.5rem; }
.auth-aside p { color: #b9c8e4; font-size: .88rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 9px; font-size: .84rem; }
.auth-aside li::before { content: '✓'; color: var(--gold-500); font-weight: 800; margin-right: 8px; }
.auth-side-foot { margin-top: auto; font-size: .72rem; color: #93a8cd; }
.auth-card { background: #fff; padding: 34px 32px; }
.auth-card.center { max-width: 460px; margin: 0 auto; border-radius: 16px; text-align: center; box-shadow: var(--shadow-md); }
.auth-card h1, .auth-card h2 { margin-bottom: 6px; }
.auth-form { margin-top: 18px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.auth-foot { margin-top: 18px; font-size: .74rem; color: var(--muted); text-align: center; }
.auth-wide { max-width: 1080px; }
.auth-wide .auth-card { max-height: 90vh; overflow-y: auto; }

/* ---------- Public ---------- */
.public-body { background: #fff; }
.pub-nav {
  display: flex; align-items: center; gap: 18px; padding: 14px 28px; position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.pub-nav .brand { color: var(--navy-900); padding: 0; }
.pub-nav .brand-text small { color: var(--gold-600); }
.pub-links { display: flex; gap: 22px; margin-left: 24px; flex: 1; font-size: .87rem; }
.pub-links a { color: #3c4a63; font-weight: 550; }
.pub-links a:hover { color: var(--navy-600); }
.pub-cta { display: flex; gap: 8px; }
.hero {
  padding: 66px 28px 54px; color: #fff;
  background: radial-gradient(900px 480px at 12% 8%, rgba(200, 162, 74, .18), transparent 60%),
              radial-gradient(800px 500px at 88% 20%, rgba(37, 99, 235, .32), transparent 60%),
              linear-gradient(155deg, #0b1f42, #14356b 60%, #1e3a8a);
}
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero h1 { font-size: 2.4rem; line-height: 1.16; color: #fff; letter-spacing: -.02em; }
.hero p.lead { color: #c4d2ea; font-size: 1rem; max-width: 520px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--gold-500); font-weight: 750; margin-bottom: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 1.15rem; color: #fff; }
.hero-stats span { font-size: .74rem; color: #9fb3d6; }
.hero-preview { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 14px; backdrop-filter: blur(8px); }
.preview-top { display: flex; gap: 5px; margin-bottom: 10px; }
.preview-top i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); display: block; }
.preview-screen { background: #fff; border-radius: 10px; padding: 14px; color: var(--ink); }
.preview-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.preview-stat { background: var(--panel); border-radius: 8px; padding: 8px; }
.preview-stat b { display: block; font-size: .9rem; color: var(--navy-800); }
.preview-stat span { font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.preview-bars { display: flex; align-items: flex-end; gap: 7px; height: 84px; padding-top: 6px; }
.preview-bars i { flex: 1; background: linear-gradient(180deg, var(--navy-600), #2a58b5); border-radius: 4px 4px 0 0; display: block; }
.preview-bars i:nth-child(even) { background: linear-gradient(180deg, var(--gold-500), var(--gold-600)); }
section.section { padding: 64px 28px; }
section.section.alt { background: var(--panel); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 38px; }
.section-head h2 { font-size: 1.85rem; }
.section-head p { color: var(--muted); }
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature .f-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 12px; }
.feature h3 { font-size: 1rem; }
.feature p { color: var(--muted); font-size: .85rem; margin: 0; }
.price-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 760px; margin: 0 auto; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--gold-500); box-shadow: 0 18px 40px rgba(200, 162, 74, .18); position: relative; }
.price-badge { position: absolute; top: -12px; left: 26px; background: var(--gold-500); color: #21170a; font-size: .68rem; font-weight: 800; padding: 3px 10px; border-radius: 20px; letter-spacing: .04em; }
.price-amount { font-size: 2rem; font-weight: 850; color: var(--navy-900); letter-spacing: -.02em; }
.price-amount small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 8px; font-size: .85rem; color: #3f4d66; }
.price-list li::before { content: '✓'; color: var(--green); font-weight: 800; margin-right: 7px; }
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.step-num { width: 32px; height: 32px; border-radius: 9px; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; font-size: .85rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 13px 0; font-weight: 650; font-size: .92rem; }
.faq-item p { color: var(--muted); font-size: .87rem; padding-bottom: 8px; }
.cta-band { background: linear-gradient(135deg, #0d264f, #173a70); color: #fff; border-radius: 18px; padding: 38px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 4px; }
.cta-band p { color: #bccbe5; margin: 0; }
.pub-footer { background: var(--navy-900); color: #c2d0e8; padding: 46px 28px 22px; }
.pub-footer-grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 26px; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.pub-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.pub-footer a { display: block; color: #a9bcdb; font-size: .85rem; margin-bottom: 7px; }
.pub-footer a:hover { color: #fff; }
.pub-footer .brand { padding: 0 0 10px; }
.muted-light { color: #93a8cb; font-size: .84rem; }
.pub-copy { max-width: 1180px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .76rem; color: #8ba0c4; }

/* ---------- Catalog ---------- */
.catalog-hero { background: linear-gradient(150deg, #0b1f42, #163a75); color: #fff; padding: 44px 28px; }
.catalog-hero-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.catalog-logo { width: 64px; height: 64px; border-radius: 15px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--gold-500); }
.catalog-hero h1 { color: #fff; margin: 0; font-size: 1.7rem; }
.catalog-hero p { color: #bfcfe8; margin: 4px 0 0; font-size: .9rem; }
.catalog-wrap { max-width: 1180px; margin: 0 auto; padding: 30px 24px 60px; }
.prop-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
.prop-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: .16s; }
.prop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.prop-thumb { aspect-ratio: 4 / 3; background: linear-gradient(140deg, #dfe7f5, #eef2f9); display: grid; place-items: center; color: #8fa3c4; font-size: 1.6rem; overflow: hidden; }
.prop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prop-price { font-weight: 800; color: var(--navy-800); font-size: 1.02rem; }
.prop-title { font-weight: 700; font-size: .92rem; }
.prop-meta { font-size: .77rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.prop-foot { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: #eef2f9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.spec-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.spec { background: var(--panel); border-radius: 10px; padding: 10px 12px; }
.spec span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.spec b { font-size: .86rem; }

/* ---------- Invoice / print ---------- */
.invoice-sheet { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px; max-width: 800px; margin: 0 auto; }
.invoice-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--navy-800); padding-bottom: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.invoice-table th { text-align: left; background: var(--panel); padding: 9px 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.invoice-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.invoice-total { text-align: right; margin-top: 16px; font-size: 1.1rem; font-weight: 800; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; padding: 6px 0; font-weight: 700; }
.cal-cell { min-height: 74px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; font-size: .72rem; background: #fff; }
.cal-cell.empty { background: #f8fafd; border-style: dashed; }
.cal-cell.today { border-color: var(--gold-500); box-shadow: inset 0 0 0 1px var(--gold-500); }
.cal-date { font-weight: 700; color: var(--muted); font-size: .7rem; }
.cal-event { display: block; background: var(--navy-100); color: var(--navy-800); border-radius: 4px; padding: 1px 4px; margin-top: 3px; font-size: .66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.done { background: var(--green-soft); color: #0a7a44; }
.cal-event.late { background: var(--red-soft); color: #a62020; }
.help-card { background: var(--navy-100); border: 1px solid #d5e0f7; border-radius: 12px; padding: 14px 16px; font-size: .83rem; color: #2c3f63; }
.help-card code { background: #fff; padding: 1px 5px; border-radius: 5px; font-size: .8rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: .85rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 15px; font-size: .84rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--navy-700); border-bottom-color: var(--navy-700); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eef2f8; }
.notif-item.unread { background: #f7faff; }
.notif-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--navy-100); display: grid; place-items: center; flex: 0 0 34px; }
.notif-body p { margin: 0; font-size: .84rem; }
.notif-body small { color: var(--muted); font-size: .72rem; }
.scroll-y { max-height: 420px; overflow-y: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; max-width: 560px; }
  .auth-aside { display: none; }
  .pub-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .only-mobile { display: inline-flex; }
  .content { padding: 18px 14px 34px; }
  .topbar { padding: 0 14px; gap: 10px; height: 62px; }
  .profile-meta { display: none; }
  .pub-links { display: none; }
  .hero { padding: 42px 18px; }
  .hero h1 { font-size: 1.75rem; }
  section.section { padding: 42px 18px; }
  .section-head h2 { font-size: 1.4rem; }
  .form-grid .span-2 { grid-column: span 1; }
  .pub-footer-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.15rem; }
  .invoice-sheet { padding: 20px; }
  .cta-band { padding: 24px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .stat-card { padding: 12px; gap: 9px; }
  .stat-icon { width: 32px; height: 32px; flex: 0 0 32px; font-size: .9rem; }
  .stat-label { font-size: .66rem; }
  .page-title { font-size: 1.15rem; }
  .sub-pill { display: none; }
  .kv { grid-template-columns: 1fr; }
  .card-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .pub-nav { padding: 12px 14px; }
}
@media print {
  .sidebar, .topbar, .app-footer, .page-actions, .filter-bar, .pager, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
  .table { min-width: 0; font-size: 12px; }
}

/* ---------- Perbaikan layout topbar & tabel (ditambahkan) ---------- */
.topbar-left { min-width: 0; }
.topbar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { flex-shrink: 0; }
.stat-card { text-decoration: none; color: inherit; }
.stat-card:hover { border-color: var(--navy-100); box-shadow: var(--shadow-md); }
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 28px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(11, 31, 66, .45); }
.kv dd { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .topbar { gap: 6px; }
  .topbar-right { gap: 6px; }
  .topbar-title { font-size: .92rem; }
  .filter-actions { flex-wrap: wrap; }
  .price-grid { grid-template-columns: 1fr; }
  .btn-group { gap: 6px; }
}

/* ---------- Blok pembayaran QRIS (satu-satunya metode) ---------- */
.qris-wrap { margin-top: 18px; }
.qris-panel {
  border: 1px solid #d9e3f5; border-radius: 14px; padding: 18px 18px 16px; text-align: center;
  background: linear-gradient(135deg, #f4f8ff, #fbf8ef);
}
.qris-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .92rem; color: var(--navy-800); margin-bottom: 12px; }
.qris-badge {
  display: inline-flex; align-items: center; font-size: .68rem; letter-spacing: .1em; font-weight: 800;
  padding: 3px 9px; border-radius: 7px; background: var(--gold-100, #f7efd8); color: var(--gold-600, #b08932);
}
.qris-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.qris-amount { font-size: 1.55rem; font-weight: 800; color: var(--navy-800); margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.qris-img { display: block; width: 100%; max-width: 320px; margin: 0 auto; border-radius: 12px; background: #fff; border: 1px solid #e2e9f6; }
.qris-empty { border: 1px dashed #c7d5ec; border-radius: 12px; padding: 26px 16px; font-size: .85rem; color: var(--muted); background: #fff; }
.qris-hint { font-size: .78rem; color: var(--muted); margin: 12px auto 0; max-width: 420px; line-height: 1.6; }
.qris-preview { margin: 8px 0 14px; }
.qris-preview img { display: block; max-width: 220px; border: 1px solid #e2e9f6; border-radius: 10px; background: #fff; }
.qris-del { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .8rem; color: #a62020; }
@media (max-width: 560px) {
  .qris-amount { font-size: 1.35rem; }
  .qris-panel { padding: 16px 14px; }
}


/* ---------- Kalkulator KPR ---------- */
.rate-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; color: #3c4a63;
  background: var(--navy-100); border-radius: 20px; padding: 2px 9px; margin: 2px 4px 2px 0;
}
.rate-chip b { color: var(--navy-800); }
.kpr-share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpr-share .input { flex: 1 1 320px; min-width: 200px; }
.kpr-row {
  display: grid; gap: 8px; align-items: center; margin: 0; padding: 10px 18px;
  grid-template-columns: minmax(150px, 1.5fr) 90px 90px 120px auto auto;
  border-bottom: 1px solid var(--line);
}
.kpr-row:last-child { border-bottom: 0; }
.kpr-row.kpr-head {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  font-weight: 750; padding-top: 8px; padding-bottom: 8px; background: #fafbfe;
}
.kpr-row .input { width: 100%; }
.kpr-row-del { display: flex; justify-content: flex-end; }
.kpr-fee-row { grid-template-columns: minmax(140px, 1.4fr) 150px 130px 150px auto auto; }
.kpr-add { background: #fbfcff; border-top: 1px solid var(--line); padding-left: 0; padding-right: 0; border-bottom: 0; }
details.kpr-details > summary { cursor: pointer; list-style: none; }
details.kpr-details > summary::-webkit-details-marker { display: none; }
details.kpr-details[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .kpr-row, .kpr-fee-row { grid-template-columns: 1fr 1fr; padding: 12px 14px; gap: 8px; }
  .kpr-row.kpr-head { display: none; }
  .kpr-row .btn { width: 100%; }
  .kpr-add { padding-left: 0; padding-right: 0; }
}
