:root {
  --navy: #0f1e3d;
  --navy-2: #16264d;
  --indigo: #2f4b8f;
  --accent: #3b82f6;
  --slate-bg: #eef1f6;
  --card: #ffffff;
  --border: #dbe1ea;
  --text: #1a2233;
  --muted: #6b7688;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --gray: #94a3b8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--slate-bg);
  color: var(--text);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(47,75,143,0.06), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(59,130,246,0.05), transparent 45%);
}
.mono { font-family: 'IBM Plex Mono', monospace; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
}

/* Topbar */
.topbar {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(15,30,61,0.25);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { font-size: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.brand-name { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.ai-tag {
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; vertical-align: middle; margin-left: 2px;
}
.brand-tag { margin: 1px 0 0; font-size: 12px; opacity: 0.7; font-weight: 300; }
.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pending-pill {
  background: rgba(217,119,6,0.2); color: #fbbf24; border: 1px solid rgba(217,119,6,0.4);
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.today-pill {
  background: rgba(59,130,246,0.15); color: #93c5fd; padding: 4px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}

/* Grid */
.main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 250px 380px 1fr;
  gap: 16px;
  padding: 16px 22px;
  align-items: start;
}
@media (max-width: 1100px) { .main-grid { grid-template-columns: 220px 340px 1fr; } }
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; padding: 12px; }
}

/* Sidebar */
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; border-left: 4px solid var(--indigo);
}
.stat-card.ac-baru { border-left-color: var(--gray); }
.stat-card.ac-review { border-left-color: var(--amber); }
.stat-card.ac-done { border-left-color: var(--green); }
.stat-value { font-size: 24px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.btn-new {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 12px; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform 0.1s, background 0.2s; width: 100%;
}
.btn-new:hover { background: #2563eb; transform: translateY(-1px); }
.btn-new.sm { width: auto; padding: 0 16px; font-size: 20px; }

.filter-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.filter-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  background: #f1f4f9; border: 1px solid var(--border); color: var(--muted);
  padding: 5px 10px; border-radius: 20px; font-size: 12px; cursor: pointer; font-weight: 500;
  transition: all 0.15s; white-space: nowrap;
}
.fchip:hover { border-color: var(--indigo); color: var(--indigo); }
.fchip.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.m-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }

/* List column */
.list-col { display: flex; flex-direction: column; gap: 10px; }
.list-top { display: flex; gap: 8px; align-items: center; }
.search {
  flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; font-family: inherit;
}
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.list-scroll { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px; }
@media (max-width: 900px) { .list-scroll { max-height: none; } }

.claim-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; transition: all 0.15s;
}
.claim-card:hover { border-color: var(--indigo); box-shadow: 0 4px 14px rgba(47,75,143,0.1); transform: translateY(-1px); }
.claim-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
.ctype-icon { font-size: 20px; }
.claim-name { font-weight: 600; font-size: 15px; }
.claim-id { font-size: 11px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }
.claim-desc { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.claim-amount { font-weight: 600; font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--navy); }
.claim-date { font-size: 12px; color: var(--muted); }
.empty-list { text-align: center; padding: 40px 10px; color: var(--muted); }

/* Badges */
.badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st-baru { background: #eef2f7; color: #64748b; }
.st-review { background: #fef3c7; color: #b45309; }
.st-approved { background: #dcfce7; color: #15803d; }
.st-rejected { background: #fee2e2; color: #b91c1c; }
.risk-low { background: #dcfce7; color: #15803d; }
.risk-med { background: #fef3c7; color: #b45309; }
.risk-high { background: #fee2e2; color: #b91c1c; }

/* Detail */
.detail-col { position: sticky; top: 88px; }
@media (max-width: 900px) { .detail-col { position: static; } }
.detail-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; max-height: calc(100vh - 120px); overflow-y: auto;
}
@media (max-width: 900px) { .detail-panel { max-height: none; } }
.detail-empty {
  background: var(--card); border: 1px dashed var(--border); border-radius: 14px;
  padding: 60px 20px; text-align: center; color: var(--muted);
}
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.detail-title { font-size: 20px; font-weight: 700; margin: 0; }
.detail-sub { font-size: 13px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.info-cell { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.info-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.info-v { font-size: 14px; font-weight: 600; margin-top: 3px; }

.section { margin-bottom: 16px; }
.section-label { font-size: 12px; font-weight: 700; color: var(--indigo); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.detail-desc { font-size: 14px; line-height: 1.6; color: var(--text); margin: 0; }
.doc-chip { background: #eef2f7; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #475569; }

/* AI box */
.ai-box {
  background: linear-gradient(160deg, #f0f5ff 0%, #eef1fa 100%);
  border: 1px solid #cdd9f2; border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
.btn-ai {
  background: var(--navy); color: #fff; border: none; border-radius: 9px;
  padding: 9px 16px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.btn-ai:hover:not(:disabled) { background: var(--indigo); }
.btn-ai:disabled { opacity: 0.65; cursor: wait; }
.ai-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.ai-hint { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 10px; }
.link-btn { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Settings modal extras */
.settings-test { margin-top: 14px; border-radius: 9px; padding: 9px 12px; font-size: 13px; font-weight: 500; }
.settings-test.st-ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.settings-test.st-err { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.settings-test.st-wait { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.ai-status { font-size: 13px !important; letter-spacing: -1px; }
.ai-status.ai-on { border-color: rgba(34,197,94,0.5) !important; }
.ai-sub { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.ai-text { font-size: 14px; line-height: 1.5; margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.check-list li { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.check-list li span { font-weight: 700; width: 16px; }
.check-list li.ok span { color: var(--green); }
.check-list li.miss span { color: var(--red); }
.check-list li.miss { color: var(--red); }

.risk-bar-wrap { position: relative; background: #e2e8f0; border-radius: 20px; height: 22px; overflow: hidden; display: flex; align-items: center; }
.risk-bar { height: 100%; border-radius: 20px; transition: width 0.6s ease; }
.rb-low { background: linear-gradient(90deg, #22c55e, #16a34a); }
.rb-med { background: linear-gradient(90deg, #f59e0b, #d97706); }
.rb-high { background: linear-gradient(90deg, #ef4444, #dc2626); }
.risk-num { position: absolute; right: 10px; font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--text); mix-blend-mode: normal; }

.reco { border-radius: 10px; padding: 10px 12px; margin-top: 12px; border-left: 4px solid; }
.reco-setujui { background: #dcfce7; border-color: var(--green); }
.reco-review { background: #fef3c7; border-color: var(--amber); }
.reco-tolak { background: #fee2e2; border-color: var(--red); }
.reco-tag { font-weight: 700; font-size: 13px; }
.reco-reason { font-size: 13px; margin: 4px 0 0; }

.btn-copy { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 3px 12px; font-size: 12px; cursor: pointer; font-weight: 600; color: var(--indigo); }
.btn-copy:hover { background: #f1f5f9; }
.draf-box {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; line-height: 1.6; white-space: pre-wrap;
  margin: 6px 0 0; max-height: 220px; overflow-y: auto;
}

.notes-area { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-family: inherit; font-size: 14px; resize: vertical; }
.notes-area:focus { outline: none; border-color: var(--accent); }

.action-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 4px; }
.act { border: none; border-radius: 10px; padding: 11px; font-weight: 600; font-size: 14px; cursor: pointer; color: #fff; transition: all 0.15s; }
.act:hover { transform: translateY(-1px); filter: brightness(1.05); }
.act-approve { background: var(--green); }
.act-review { background: var(--amber); }
.act-reject { background: var(--red); }
.disclaimer-inline { text-align: center; font-size: 11px; color: var(--muted); margin: 12px 0 0; }

/* Shimmer */
.shimmer { border-radius: 6px; background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: shim 1.2s infinite; }
@keyframes shim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Buttons */
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 9px; padding: 8px 14px; font-size: 14px; cursor: pointer; font-weight: 500; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-ghost.sm { padding: 6px 10px; border-color: rgba(255,255,255,0.25); color: #fff; }
.btn-ghost.sm:hover { background: rgba(255,255,255,0.1); }
.btn-primary { background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: 9px 18px; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,30,61,0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: pop 0.2s; }
@keyframes pop { from { transform: scale(0.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-title { font-size: 19px; font-weight: 700; margin: 0 0 16px; color: var(--navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.inp { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font-family: inherit; font-size: 14px; background: #fff; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

/* Footer */
.footer { padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); margin-top: auto; }
.remix-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.remix-link:hover { text-decoration: underline; }

/* Toasts */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.2); animation: toastIn 0.25s; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-info { background: var(--indigo); }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
</parameter>