/* =========================================================
   Portal Klien — tema formal korporat (navy & emas)
   ========================================================= */
:root {
  --navy-950: #071729;
  --navy-900: #0A1E38;
  --navy-800: #10294A;
  --navy-700: #17395F;
  --navy-600: #24507F;
  --gold-600: #B08D4A;
  --gold-500: #C6A15B;
  --gold-400: #D8B978;
  --gold-100: #F4EAD5;
  --ivory: #F7F4EE;
  --paper: #FFFFFF;
  --ink: #16202E;
  --ink-soft: #3C4A5A;
  --muted: #6E7787;
  --line: #E5DFD3;
  --line-soft: #F0EBE1;
  --ok: #2C6E52;
  --warn: #A9761C;
  --danger: #9E3A3A;
  --info: #2A5F8F;
  --violet: #5C4A8A;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 30, 56, .05);
  --shadow: 0 1px 2px rgba(10, 30, 56, .05), 0 18px 40px -28px rgba(10, 30, 56, .45);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(198, 161, 91, .12), transparent 60%),
    radial-gradient(800px 460px at 100% 0%, rgba(16, 41, 74, .08), transparent 62%);
  background-repeat: no-repeat;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-600); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 600; color: var(--navy-900); letter-spacing: -.01em; }
p { margin: 0; }
.ico { flex: 0 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

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

.sidebar {
  width: 272px;
  flex: 0 0 272px;
  background:
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-950) 100%);
  color: #E8EDF4;
  padding: 26px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(198, 161, 91, .22);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 4px; }

/* Logo kecil ASLP: badge persegi berisi ikon timbangan keadilan (lihat brand_logo()) */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(198, 161, 91, .18), rgba(198, 161, 91, .06));
  border: 1px solid rgba(216, 185, 120, .42);
  color: var(--gold-400);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.brand-mark.lg { width: 46px; height: 46px; border-radius: 12px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-family: var(--font-serif); font-size: 15px; color: #fff; letter-spacing: .01em; }
.brand-text small { font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: rgba(216, 185, 120, .82); margin-top: 4px; }

.sidebar-role {
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(232, 237, 244, .45);
  padding: 0 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 16px;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #C6D2E2;
  font-size: 14.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active {
  background: linear-gradient(90deg, rgba(198, 161, 91, .22), rgba(198, 161, 91, .06));
  color: #FBF4E5;
  box-shadow: inset 0 0 0 1px rgba(216, 185, 120, .35);
}
.nav-link.active .ico { color: var(--gold-400); }
.nav-badge {
  margin-left: auto;
  background: var(--gold-500); color: #1A1206;
  font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
}

.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.mini-user { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(198, 161, 91, .18);
  border: 1px solid rgba(216, 185, 120, .45);
  color: var(--gold-400);
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
}
.mini-user-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.mini-user-text strong { font-size: 13.5px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-user-text small { font-size: 11.5px; color: rgba(232, 237, 244, .55); }
.sidebar-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(232, 237, 244, .7); padding: 6px 6px; }
.sidebar-link:hover { color: var(--gold-400); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 34px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title h1 { font-size: 24px; line-height: 1.2; }
.topbar-title p { margin-top: 3px; font-size: 13px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.content {
  padding: 30px 34px 40px;
  width: 100%;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.app-foot {
  margin-top: auto;
  padding: 18px 34px 26px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ---------- Kartu ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 17px; }
.card-head .muted { font-size: 12.5px; margin-top: 2px; }
.card-body { padding: 22px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line-soft); background: #FCFAF6; font-size: 12.5px; color: var(--muted); }

.cards-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.cards-grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.split.even { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--font-serif); font-size: 30px; color: var(--navy-900); line-height: 1.15; }
.kpi-note { font-size: 12.5px; color: var(--muted); }
.kpi-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: #F6F1E6; color: var(--gold-600);
  border: 1px solid var(--gold-100);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #fff; box-shadow: 0 8px 18px -12px rgba(10, 30, 56, .9); }
.btn-primary:hover { background: linear-gradient(180deg, var(--navy-700), var(--navy-800)); color: #fff; }
.btn-gold { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: #241A08; box-shadow: 0 8px 18px -14px rgba(198, 161, 91, .9); }
.btn-gold:hover { color: #241A08; filter: brightness(1.04); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy-800); }
.btn-ghost:hover { border-color: var(--gold-500); color: var(--navy-900); }
.btn-quiet { background: transparent; color: var(--navy-700); padding: 8px 10px; }
.btn-quiet:hover { background: rgba(16, 41, 74, .05); color: var(--navy-900); }
.btn-danger { background: #fff; border-color: #E4C9C9; color: var(--danger); }
.btn-danger:hover { background: #FBF1F1; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tone-slate { background: #F2F4F7; color: #46566A; border-color: #E3E8EF; }
.tone-blue { background: #EAF2FA; color: #24547F; border-color: #D3E3F2; }
.tone-gold { background: #FBF3E2; color: #8A6A26; border-color: #EFE0C4; }
.tone-amber { background: #FDF3E3; color: var(--warn); border-color: #F3E2C5; }
.tone-violet { background: #F1EDFA; color: var(--violet); border-color: #E2DAF2; }
.tone-green { background: #EAF5EF; color: var(--ok); border-color: #D2E9DC; }
.tone-red { background: #FBEEEE; color: var(--danger); border-color: #F0D5D5; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Flash ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  border: 1px solid;
}
.flash-success { background: #EEF7F1; border-color: #CDE7D7; color: #245B41; }
.flash-error { background: #FBEFEF; border-color: #EFD3D3; color: #8C3232; }
.flash-info { background: #EEF4FA; border-color: #D6E4F2; color: #24547F; }

/* ---------- Tabel ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  background: #FBF9F4;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #FCFAF6; }
table.data .cell-title { font-weight: 600; color: var(--navy-900); }
table.data .cell-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Form ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.field .hint { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="datetime-local"],
input[type="number"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, .18);
}
textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
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='%236E7787' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.check-list { display: flex; flex-direction: column; gap: 8px; max-height: 190px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #FCFAF6; }
.check-item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.check-item input { width: 15px; height: 15px; accent-color: var(--navy-800); }

/* ---------- Tab ---------- */
.tabs {
  display: flex; gap: 4px; overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tab {
  padding: 11px 15px;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--navy-800); }
.tab.active { color: var(--navy-900); border-bottom-color: var(--gold-500); font-weight: 600; }
.tab .count { background: #F1EDE4; color: var(--ink-soft); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }

/* ---------- Halaman detail perkara ---------- */
.case-hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800) 62%, var(--navy-700));
  color: #EAF0F7;
  border-radius: var(--radius);
  padding: 26px 28px;
  border: 1px solid rgba(198, 161, 91, .3);
  position: relative;
  overflow: hidden;
}
.case-hero::after {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(198, 161, 91, .22), transparent 62%);
  pointer-events: none;
}
.case-hero .eyebrow { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-400); font-weight: 600; }
.case-hero h1 { color: #fff; font-size: 26px; margin-top: 8px; line-height: 1.25; }
.case-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 13px; color: rgba(234, 240, 247, .78); }
.case-hero .meta span { display: inline-flex; align-items: center; gap: 7px; }
.case-hero .meta .ico { color: var(--gold-400); }
.case-hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }

.detail-list { display: grid; gap: 0; }
.detail-row { display: flex; gap: 16px; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row .k { color: var(--muted); flex: 0 0 42%; }
.detail-row .v { text-align: right; font-weight: 500; color: var(--ink); word-break: break-word; }

.timeline { display: flex; flex-direction: column; gap: 0; padding: 4px 0; }
.timeline-item { display: flex; gap: 14px; padding: 0 0 20px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px;
  background: linear-gradient(180deg, var(--line), transparent);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 15px; height: 15px; flex: 0 0 15px; border-radius: 50%; border: 3px solid var(--gold-100); background: var(--gold-500); margin-top: 4px; }
.timeline-body strong { font-size: 13.5px; color: var(--navy-900); display: block; font-weight: 600; }
.timeline-body span { font-size: 12.5px; color: var(--muted); }
.timeline-body p { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }

/* ---------- Pesan ---------- */
.thread { display: flex; flex-direction: column; gap: 16px; padding: 22px; max-height: 520px; overflow-y: auto; background: #FCFAF6; }
.bubble { display: flex; gap: 11px; max-width: 82%; }
.bubble-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #EDE7DA; color: var(--navy-800); border: 1px solid var(--line); }
.bubble-body { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-sm); }
.bubble-meta { display: flex; align-items: baseline; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.bubble-meta strong { font-size: 12.5px; color: var(--navy-800); }
.bubble-body p { font-size: 13.5px; color: var(--ink-soft); white-space: pre-wrap; }
.bubble.firm { margin-left: auto; flex-direction: row-reverse; }
.bubble.firm .bubble-body { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); border-color: var(--navy-800); }
.bubble.firm .bubble-body p { color: #EAF0F7; }
.bubble.firm .bubble-meta strong, .bubble.firm .bubble-meta { color: rgba(234, 240, 247, .7); }
.bubble.firm .bubble-avatar { background: rgba(198, 161, 91, .2); color: var(--gold-400); border-color: rgba(198, 161, 91, .4); }
.composer { padding: 16px 22px; border-top: 1px solid var(--line-soft); background: #fff; display: flex; flex-direction: column; gap: 10px; }
.composer textarea { min-height: 70px; }

/* ---------- Dokumen ---------- */
.doc-list { display: flex; flex-direction: column; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--line-soft); }
.doc-item:last-child { border-bottom: 0; }
.doc-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; background: #F6F1E6; color: var(--gold-600); border: 1px solid var(--gold-100); }
.doc-item .grow strong { font-size: 14px; color: var(--navy-900); display: block; font-weight: 600; }
.doc-item .grow small { font-size: 12.5px; color: var(--muted); }

/* ---------- Sidang ---------- */
.hearing { display: flex; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.hearing:last-child { border-bottom: 0; }
.hearing-date {
  flex: 0 0 68px; text-align: center; border-radius: 11px; padding: 8px 6px;
  background: #FBF7EE; border: 1px solid var(--gold-100);
}
.hearing-date .d { font-family: var(--font-serif); font-size: 22px; color: var(--navy-900); line-height: 1; }
.hearing-date .m { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-600); font-weight: 700; }
.hearing-body { min-width: 0; }
.hearing-body strong { font-size: 14px; color: var(--navy-900); }
.hearing-body .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.hearing-body .result { font-size: 13px; color: var(--ink-soft); margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line-soft); }

/* ---------- Progres perkara ---------- */
.progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.progress-figure { display: flex; align-items: baseline; gap: 3px; font-family: var(--font-serif); color: var(--navy-900); line-height: 1; }
.progress-figure .num { font-size: 42px; }
.progress-figure .sign { font-size: 20px; color: var(--gold-600); font-weight: 600; }
.progress-label { margin-top: 5px; font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.progress-track {
  height: 10px; border-radius: 999px; background: #EDE7DA; overflow: hidden; margin-top: 14px;
  box-shadow: inset 0 1px 2px rgba(10, 30, 56, .08);
}
.progress-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); transition: width .35s ease; }
.progress-fill.is-done { background: linear-gradient(90deg, #2C6E52, #57A37F); }
.progress-track.sm { height: 7px; margin-top: 0; }
.progress-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.progress-meta span { display: inline-flex; align-items: center; gap: 6px; }
.progress-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.65; }
.next-step {
  margin-top: 16px; padding: 13px 16px; border-radius: 12px;
  background: #FBF7EE; border: 1px solid var(--gold-100); border-left: 3px solid var(--gold-500);
}
.next-step .label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); font-weight: 700; }
.next-step p { margin-top: 5px; font-size: 13.5px; color: var(--ink-soft); white-space: pre-wrap; }
.next-step .due { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.next-step.tight { margin-top: 9px; padding: 9px 12px; border-radius: 10px; }
.next-step.tight p { font-size: 12.5px; }
.next-step.tight .label { font-size: 10px; }
.progress-empty { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 11px; background: #FCFAF6; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.progress-empty .ico { color: var(--gold-600); flex: 0 0 auto; }
.progress-log { display: flex; flex-direction: column; }
.progress-log-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.progress-log-item:last-child { border-bottom: 0; }
.progress-log-pct {
  flex: 0 0 58px; text-align: center; padding: 7px 4px; border-radius: 10px;
  background: #FBF7EE; border: 1px solid var(--gold-100);
  font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--navy-900);
}
.progress-log-pct.is-done { background: #EAF5EF; border-color: #D2E9DC; color: var(--ok); }
.progress-log-body strong { font-size: 13.5px; color: var(--navy-900); }
.progress-log-body p { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.progress-lite { display: flex; align-items: center; gap: 9px; min-width: 118px; }
.progress-lite .progress-track { flex: 1 1 auto; }
.progress-lite b { font-size: 12px; color: var(--navy-900); font-weight: 700; min-width: 34px; text-align: right; }
.case-progress { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.case-progress .small { display: flex; align-items: flex-start; gap: 6px; }
.range-row { display: grid; grid-template-columns: 1fr 88px; gap: 14px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--gold-600); }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 46px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: #F7F2E7; color: var(--gold-600); border: 1px solid var(--gold-100); }
.empty h3 { font-size: 17px; }
.empty p { font-size: 13.5px; color: var(--muted); max-width: 420px; }

/* ---------- Login / auth ---------- */
.auth { display: grid; grid-template-columns: 1.02fr .98fr; min-height: 100vh; }
.auth-aside {
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(198, 161, 91, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 58%, var(--navy-950) 100%);
  color: #EAF0F7;
  padding: 52px 56px;
  display: flex; flex-direction: column; gap: 34px;
  border-right: 1px solid rgba(198, 161, 91, .25);
}
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand strong { display: block; font-family: var(--font-serif); font-size: 19px; color: #fff; }
.auth-brand small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(216, 185, 120, .85); }
.auth-quote { margin-top: auto; }
.auth-eyebrow { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-400); font-weight: 600; }
.auth-quote h2 { color: #fff; font-size: 33px; line-height: 1.25; margin-top: 12px; max-width: 15ch; }
.auth-desc { margin-top: 16px; font-size: 14px; line-height: 1.7; color: rgba(234, 240, 247, .72); max-width: 44ch; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13px; color: rgba(234, 240, 247, .78); }
.auth-points li { display: flex; align-items: center; gap: 10px; }
.auth-points .ico { color: var(--gold-400); }
.auth-foot { font-size: 11.5px; color: rgba(234, 240, 247, .45); line-height: 1.7; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; }
.auth-foot a { color: rgba(234, 240, 247, .8); text-decoration: underline; text-underline-offset: 2px; }
.auth-foot a:hover { color: var(--gold-400); }
.app-foot a { color: var(--navy-700); }
.app-foot a:hover { color: var(--gold-600); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 44px 40px; background: rgba(255, 255, 255, .55); flex-direction: column; gap: 20px; }
.auth-card { width: 100%; max-width: 424px; display: flex; flex-direction: column; gap: 22px; }
.auth-card .auth-head h1 { font-size: 28px; }
.auth-card .auth-head p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.auth-legal { font-size: 11.5px; color: var(--muted); text-align: center; max-width: 424px; }
.auth-alt { font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Lain ---------- */
.deny-card { max-width: 520px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px; }
.deny-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #FBF7EE; border: 1px solid var(--gold-100); color: var(--gold-600); }

.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #FCFAF6; }
.link-box { background: #FBF7EE; border: 1px solid var(--gold-100); border-radius: 11px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .cred-grid { grid-template-columns: 1fr; } }
.link-box textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #FCFAF6; resize: vertical; }
.copy-row input[readonly] { color: var(--ink); }

.notice { display: flex; gap: 11px; padding: 13px 15px; border-radius: 11px; font-size: 13px; background: #FBF7EE; border: 1px solid var(--gold-100); color: #6B5320; }
.notice .ico { color: var(--gold-600); margin-top: 1px; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; min-width: 180px; }
.filter-bar .grow { flex: 1 1 220px; }

.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.pill-tab.active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.pill-tab:hover { border-color: var(--gold-500); color: var(--navy-900); }
.pill-tab.active:hover { color: #fff; }

.stat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line .k { color: var(--muted); }
.stat-line .v { font-weight: 600; color: var(--navy-900); }

@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { padding: 34px 30px; gap: 24px; }
  .auth-quote h2 { font-size: 27px; max-width: none; }
  .auth-panel { padding: 32px 24px; }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { position: static; width: auto; flex-basis: auto; height: auto; padding: 20px 18px; gap: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-link { padding: 8px 12px; font-size: 13.5px; }
  .sidebar-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .topbar { position: static; padding: 18px 20px; flex-wrap: wrap; }
  .topbar-title h1 { font-size: 21px; }
  .content { padding: 20px; gap: 20px; }
  .app-foot { padding: 16px 20px 24px; }
  .case-hero { padding: 22px; }
  .case-hero h1 { font-size: 21px; }
}
@media (max-width: 560px) {
  .bubble { max-width: 94%; }
  .doc-item, .hearing { padding: 14px 16px; }
  .card { padding: 18px; }
  .card-head, .card-body { padding: 16px; }
  .range-row { grid-template-columns: 1fr 72px; }
  .progress-log-item { padding: 14px 16px; flex-wrap: wrap; }
  .progress-log-body { flex: 1 1 160px; }
  .progress-figure .num { font-size: 34px; }
  .progress-lite { min-width: 96px; }
}
