/**
 * NPA Portal — "Seasalt & Sage"
 * Persian Green #299F93 · Fire Red #E12826 · Seasalt #F5FAFA
 */

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #F5FAFA;
    color: #0F2624;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, rgba(41, 159, 147, 0.06) 1px, transparent 0);
    background-size: 24px 24px;
}

input, textarea, select { color: #0F2624; color-scheme: light; }
input::placeholder, textarea::placeholder { color: #7B8E8C; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C8D4D2; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7B8E8C; }

/* ── Surfaces ── */
.panel      { background: #FFF; border: 1px solid #DCE5E4; }
.panel-elev { background: #FFF; border: 1px solid #DCE5E4; box-shadow: 0 1px 3px rgba(15,38,36,.04), 0 1px 2px rgba(15,38,36,.02); }
.glass      { background: rgba(245,250,250,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.stat-tile         { background: #FFF; border: 1px solid #DCE5E4; box-shadow: 0 1px 2px rgba(15,38,36,.04); }
.stat-tile-hot     { background: linear-gradient(180deg, rgba(41,159,147,.12) 0%, rgba(41,159,147,.02) 100%); border: 1px solid rgba(41,159,147,.35); }
.stat-tile-danger  { background: linear-gradient(180deg, rgba(225,40,38,.10)  0%, rgba(225,40,38,.02)  100%); border: 1px solid rgba(225,40,38,.35); }
.stat-tile-warning { background: linear-gradient(180deg, rgba(180,83,9,.10)   0%, rgba(180,83,9,.02)   100%); border: 1px solid rgba(180,83,9,.30); }

/* ── Buttons ── */
.btn-primary {
    background: linear-gradient(135deg, #2BAC9F 0%, #1A776E 100%);
    color: #FFF; transition: all 150ms ease;
    box-shadow: 0 1px 2px rgba(15,38,36,.10), 0 4px 12px -3px rgba(41,159,147,.45);
}
.btn-primary:hover { background: linear-gradient(135deg, #2FBDAF 0%, #1F8479 100%); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost { background: #FFF; border: 1px solid #DCE5E4; color: #0F2624; transition: all 120ms ease; }
.btn-ghost:hover { background: #F0F4F4; border-color: #C8D4D2; }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.btn-danger { background: #FFF; border: 1px solid rgba(225,40,38,.4); color: #B91C1C; transition: all 120ms ease; }
.btn-danger:hover { background: #FEF2F2; }

/* ── Nav ── */
.top-nav-bar { background: #FFF; border-bottom: 1px solid #C8D4D2; }
.nav-item { color: #5A6D6B; transition: all 120ms ease; }
.nav-item:hover { background: #ECF1F1; color: #0F2624; }
.nav-item-active { background: rgba(41,159,147,.14); color: #1A5E58; font-weight: 600; }

/* ── Program / bucket badges ── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 1px 7px; border-radius: 9999px;
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    white-space: nowrap;
}
.badge-cash_pending { background: #E0F2FE; color: #075985; }
.badge-npa          { background: #FEF3C7; color: #92400E; }
.badge-rrwd         { background: #FBDBDB; color: #7E0D0B; }
.badge-current      { background: #ECF1F1; color: #5A6D6B; }

.badge-ELI { background: #D4E9E6; color: #1A5E58; }
.badge-NBL { background: #E0E7FF; color: #3730A3; }
.badge-CP  { background: #FCE7F3; color: #9D174D; }
.badge-CIL { background: #FEF3C7; color: #92400E; }
.badge-LR  { background: #DCFCE7; color: #166534; }

/* ── Status pills (follow-up outcomes) ── */
.pill { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.pill-settlement   { background: #D4E9E6; color: #1A5E58; }
.pill-partpayment  { background: #DBEAFE; color: #1E40AF; }
.pill-legalstage   { background: #FBDBDB; color: #7E0D0B; }
.pill-nottofollowup{ background: #ECF1F1; color: #5A6D6B; }
.pill-commitment   { background: #FEF3C7; color: #92400E; }
.pill-paid         { background: #DCFCE7; color: #166534; }
.pill-rnr, .pill-nocontact, .pill-dispute { background: #F1F5F9; color: #475569; }

/* ── DPD colouring ── */
.dpd-low  { color: #92400E; }
.dpd-high { color: #B91C1C; font-weight: 700; }

/* ── Tables ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl thead th {
    position: sticky; top: 0; z-index: 1;
    background: #F0F4F4; color: #5A6D6B;
    font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: 8px 10px; text-align: left; border-bottom: 1px solid #C8D4D2; white-space: nowrap;
}
.tbl tbody td { padding: 7px 10px; border-bottom: 1px solid #ECF1F1; vertical-align: middle; }
.tbl tbody tr:hover { background: rgba(41,159,147,.04); }
.tbl .num { text-align: right; font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.tbl-row-active { background: linear-gradient(90deg, rgba(41,159,147,.16) 0%, rgba(41,159,147,.02) 100%) !important; }

/* ── Forms ── */
.field {
    width: 100%; padding: 7px 10px; font-size: 13px;
    background: #FFF; border: 1px solid #DCE5E4; border-radius: 8px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field:focus { outline: none; border-color: #299F93; box-shadow: 0 0 0 3px rgba(41,159,147,.15); }
.field-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A6D6B; margin-bottom: 4px; }
.field-error { border-color: #E12826; }

/* ── Toast ── */
#toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 500;
    box-shadow: 0 8px 24px -6px rgba(15,38,36,.28); animation: toastIn 180ms ease;
    max-width: 420px;
}
.toast-ok    { background: #1A776E; color: #FFF; }
.toast-error { background: #B91C1C; color: #FFF; }
.toast-info  { background: #0F2624; color: #FFF; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Loading bar ── */
.loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: rgba(41,159,147,.1); z-index: 9998; overflow: hidden; }
.loading-bar::before {
    content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, #299F93 50%, transparent);
    animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { left: -40%; } 100% { left: 100%; } }

.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.divider { border-top: 1px solid #DCE5E4; }
.text-grad { background: linear-gradient(135deg, #2BAC9F 0%, #1A776E 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
