:root {
  --navy: #0b2a5b;
  --navy-2: #123a7a;
  --navy-3: #1d4f9e;
  --gold: #c9a14a;
  --gold-2: #e2c27a;
  --gold-soft: #f7efdc;
  --bg: #f3f5fa;
  --text: #1c2540;
  --muted: #7a849c;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(11, 42, 91, .08);
}
html { font-size: 15px; }
* { font-family: 'Poppins', system-ui, sans-serif; }
body { background: var(--bg); color: var(--text); }
a { color: var(--navy-3); }

/* ---------- Sidebar layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; z-index: 1030;
  background: linear-gradient(180deg, var(--navy) 0%, #071d40 100%);
  color: #c9d3ea; display: flex; flex-direction: column; transition: transform .25s;
  overflow-y: auto;
}
.sidebar .brand { background: #fff; margin: 10px 14px; border-radius: 14px; padding: 6px; text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.sidebar .brand img { max-width: 100%; height: 64px; object-fit: contain; }
.sidebar .nav-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-2); opacity: .8; padding: 8px 22px 4px; }
.sidebar .nav-link { color: #c9d3ea; padding: 7px 12px; margin: 1px 12px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; font-size: .92rem; transition: all .15s; }
.sidebar .nav-link i { font-size: 1.1rem; width: 20px; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active { background: linear-gradient(90deg, var(--gold), var(--gold-2));
  color: var(--navy); font-weight: 600; box-shadow: 0 4px 14px rgba(201,161,74,.35); }
.sidebar .nav-link .badge { margin-left: auto; }
.sidebar .tagline { margin-top: auto; padding: 10px 18px; font-size: .75rem; color: #8ea0c8;
  border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .tagline b { color: var(--gold-2); font-weight: 500; }

.main { margin-left: 230px; flex: 1; min-width: 0; }
.topbar { background: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 10px rgba(11,42,91,.05); position: sticky; top: 0; z-index: 1020; }
.topbar h1 { font-size: 1.25rem; margin: 0; font-weight: 600; color: var(--navy); }
.topbar .sub { font-size: .8rem; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: var(--gold-2); }
.content { padding: 16px 20px 24px; }
.menu-toggle { display: none; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 575px) {
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .content { padding: 12px; }
}

/* ---------- Cards ---------- */
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: transparent; border-bottom: 1px solid #eef1f7; padding: 10px 14px;
  font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card-header i { color: var(--gold); }
.card-body { padding: 14px; }

.kpi { position: relative; overflow: hidden; padding: 14px; border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); height: 100%; transition: transform .15s; display: block; color: inherit;
  text-decoration: none; }
a.kpi:hover { transform: translateY(-3px); color: inherit; }
.kpi .icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-size: 1.2rem; margin-bottom: 8px; }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.kpi .value { font-size: 1.65rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.kpi .foot { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: currentColor; opacity: .04; }
.kpi.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; }
.kpi.hero .label, .kpi.hero .foot { color: #b9c6e4; }
.kpi.hero .value { color: var(--gold-2); }
.kpi.hero .icon { background: rgba(226,194,122,.18); color: var(--gold-2); }
.ic-navy { background: #e6ecf8; color: var(--navy-3); }
.ic-gold { background: var(--gold-soft); color: #a8822f; }
.ic-green { background: #e3f6ec; color: #1f9a5b; }
.ic-red { background: #fde8e8; color: #d64545; }
.ic-amber { background: #fff3d6; color: #c98a00; }
.ic-violet { background: #efe9fb; color: #6c4bc2; }

/* ---------- Tables ---------- */
.table { margin: 0; }
.table thead th { background: #f7f9fd; color: var(--muted); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; border-bottom: 0; padding: 8px 10px; white-space: nowrap; }
.table td { padding: 8px 10px; font-size: .88rem; vertical-align: middle; border-color: #f0f2f7; }
.table-hover tbody tr:hover > * { background: #fafbff; }
tr.overdue > td:first-child { box-shadow: inset 4px 0 0 #d64545; }
tr.duetoday > td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.cust-cell { display: flex; align-items: center; gap: 10px; }
.cust-cell .mini { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-soft);
  color: #a8822f; display: grid; place-items: center; font-weight: 600; font-size: .85rem; flex-shrink: 0; }
.cust-cell .n { font-weight: 600; color: var(--text); }
.cust-cell .s { font-size: .75rem; color: var(--muted); }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 30px;
  font-size: .74rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-New { background: #e6f0ff; color: #2d6cdf; }
.st-In-Process { background: #efe9fb; color: #6c4bc2; }
.st-Documents-Pending { background: #fff3d6; color: #b07800; }
.st-Login-Done { background: #e0f5f7; color: #12838f; }
.st-Approved { background: #e3f6ec; color: #1f9a5b; }
.st-Rejected { background: #fde8e8; color: #d64545; }
.st-Disbursed { background: linear-gradient(90deg, var(--gold-soft), #fbf5e6); color: #946f1f; }
.st-Closed { background: #eceff4; color: #5b6478; }

/* ---------- Buttons & forms ---------- */
.btn { border-radius: 10px; font-weight: 500; font-size: .9rem; }
.btn-brand { background: var(--navy); color: #fff; border: 0; }
.btn-brand:hover { background: var(--navy-3); color: #fff; }
.btn-gold { background: linear-gradient(90deg, var(--gold), var(--gold-2)); color: var(--navy); border: 0; font-weight: 600; }
.btn-gold:hover { filter: brightness(1.05); color: var(--navy); }
.btn-soft { background: #eef2fa; color: var(--navy); border: 0; }
.btn-soft:hover { background: #e1e8f6; color: var(--navy); }
.form-control, .form-select { border-radius: 10px; border-color: #e1e6f0; padding: 6px 10px; font-size: .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201,161,74,.18); }
.form-label { font-size: .8rem; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold);
  font-weight: 600; margin: 8px 0 4px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: #eef1f7; }

/* ---------- Misc ---------- */
.flash-wrap .alert { border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: #e8ecf5; }
.timeline li { position: relative; padding: 0 0 18px 32px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
.timeline .t { font-size: .75rem; color: var(--muted); }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: #f7f9fd; margin-bottom: 8px; text-decoration: none; color: var(--text); font-size: .83rem;
  word-break: break-all; transition: background .15s; }
.doc-item:hover { background: var(--gold-soft); color: var(--text); }
.doc-item i { font-size: 1.4rem; color: var(--navy-3); }
.dropzone { border: 2px dashed #d5dcea; border-radius: 14px; padding: 22px; text-align: center; background: #fafbfe;
  cursor: pointer; transition: all .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: var(--gold-soft); }
.dropzone i { font-size: 2rem; color: var(--gold); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f2f7; }
.list-row:last-child { border-bottom: 0; }
.date-chip { min-width: 52px; text-align: center; border-radius: 10px; background: #eef2fa; padding: 5px 4px; line-height: 1.1; }
.date-chip .d { font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.date-chip .m { font-size: .65rem; text-transform: uppercase; color: var(--muted); }
.date-chip.late { background: #fde8e8; } .date-chip.late .d { color: #d64545; }
.date-chip.now { background: var(--gold-soft); } .date-chip.now .d { color: #946f1f; }
.progress { height: 8px; border-radius: 10px; background: #eef1f7; }
.progress-bar { background: linear-gradient(90deg, var(--navy-3), var(--gold)); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty i { font-size: 2.6rem; color: #cfd6e6; display: block; margin-bottom: 8px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(circle at 20% 20%, var(--navy-3), var(--navy) 55%, #061634);
  color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-art::before, .login-art::after { content: ""; position: absolute; border-radius: 50%;
  border: 2px solid rgba(226,194,122,.25); }
.login-art::before { width: 520px; height: 520px; right: -180px; bottom: -200px; }
.login-art::after { width: 340px; height: 340px; right: -60px; bottom: -110px; border-color: rgba(226,194,122,.4); }
.login-art h2 { font-weight: 700; font-size: 2.3rem; }
.login-art h2 span { color: var(--gold-2); }
.login-art .feat { display: flex; gap: 12px; align-items: center; margin-top: 14px; color: #c9d3ea; }
.login-art .feat i { color: var(--gold-2); font-size: 1.2rem; }
.login-form { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form .box { width: 100%; max-width: 380px; }
.login-form img { width: 260px; display: block; margin: 0 auto 26px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- Document checklist ---------- */
.min-w-0 { min-width: 0; }
.profile-toggle { display: flex; gap: 8px; }
.profile-toggle .btn { flex: 1; border: 1.5px solid #dfe5f1; background: #fff; color: var(--navy); font-weight: 500; border-radius: 12px; }
.profile-toggle .btn-check:checked + .btn { background: var(--navy); border-color: var(--navy); color: #fff; }
.cl-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed #dfe5f1;
  border-radius: 14px; margin-bottom: 10px; transition: all .2s; background: #fff; }
.cl-item.drag { border-color: var(--gold); background: var(--gold-soft); }
.cl-item.done { border-style: solid; border-color: #b7e4cb; background: #f1fbf5; }
.cl-item.missing { border-style: solid; border-color: #f3b4ae; background: #fff5f4; }
.cl-num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: #eef2fa; color: var(--navy); font-weight: 600; font-size: .8rem; }
.cl-item.done .cl-num { background: #1f9a5b; color: #fff; font-size: 0; }
.cl-item.done .cl-num::before { content: "\F26E"; font-family: bootstrap-icons; font-size: 1rem; }
.cl-label { font-weight: 500; font-size: .88rem; }
.cl-label .req { color: #d64545; }
.cl-files { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-item.done .cl-files { color: #1f9a5b; }
.cl-summary { position: sticky; top: 90px; }
.cl-count { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.cl-summary .progress-bar { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.cl-summary .progress-bar.bg-success { background: #1f9a5b !important; }
.cl-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f0f2f7; }
.cl-check:last-of-type { border-bottom: 0; }
.cl-check > i { font-size: 1.1rem; margin-top: 1px; }
.cl-check.done > i { color: #1f9a5b; }
.cl-check.pending > i { color: #e08a1e; }
.cl-check.opt > i { color: var(--muted); }
.cl-check .doc-item { padding: 4px 6px; margin-top: 2px; font-size: .78rem; }
.cl-check .doc-item i { font-size: 1rem; }
.doc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; background: #eef2fa; color: var(--navy); white-space: nowrap; }
.doc-badge.ok { background: #e3f6eb; color: #1f9a5b; }
.doc-badge.warn { background: #fff1de; color: #b54708; cursor: help; }
.cl-tabs { gap: 6px; flex-wrap: wrap; }
.cl-tabs .nav-link { border-radius: 999px; background: #eef2fa; color: var(--navy); font-size: .82rem; font-weight: 500; padding: 6px 14px; }
.cl-tabs .nav-link.active { background: var(--navy); color: #fff; }
.cl-profile { border: 1px solid #e8ecf4; border-radius: 14px; overflow: hidden; height: 100%; }
.cl-profile-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; color: var(--navy);
  background: linear-gradient(90deg, var(--gold-soft), #fff); }
.cl-profile-head i { color: var(--gold); }
.cl-profile-head .badge { background: var(--navy); font-weight: 500; }
.cl-list { margin: 0; padding: 10px 14px 12px 34px; font-size: .86rem; }
.cl-list li { padding: 4px 0; }
.cl-list li::marker { color: var(--gold); font-weight: 600; }
