:root {
    --navy: #163f5f;
    --navy-deep: #0f2f49;
    --emerald: #18806f;
    --gold: #c8952c;
    --paper: #f6f4ee;
    --ink: #1c2c3a;
    --muted: #6d7b86;
    --line: #dfe6eb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(22, 63, 95, .10);
}

* { box-sizing: border-box; }
body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f7fafc 0%, #f3f6f8 100%);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { text-decoration: none; }

.app-navbar {
    background: linear-gradient(110deg, var(--navy-deep), var(--navy) 65%, #1b5874);
    box-shadow: 0 10px 30px rgba(15, 47, 73, .18);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 14px;
    background: white;
    padding: 3px;
    box-shadow: 0 7px 18px rgba(0,0,0,.18);
}
.brand-title { color: #fff; font-weight: 800; letter-spacing: .02em; line-height: 1.05; }
.brand-subtitle { color: rgba(255,255,255,.7); font-size: .73rem; }
.nav-link-soft {
    color: rgba(255,255,255,.8) !important;
    border-radius: 11px;
    padding: .55rem .85rem !important;
    font-weight: 600;
    font-size: .9rem;
}
.nav-link-soft:hover, .nav-link-soft.active { background: rgba(255,255,255,.12); color: #fff !important; }
.user-chip {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: white;
    padding: .35rem .55rem;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
}
.user-avatar {
    width: 37px;
    height: 37px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold), #e7bd63);
    color: #fff;
    font-weight: 800;
}

.page-shell { padding-top: 1.75rem; padding-bottom: 3rem; }
.page-kicker { color: var(--emerald); font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.page-title { font-weight: 800; color: var(--navy-deep); letter-spacing: -.025em; }
.page-description { color: var(--muted); max-width: 760px; }

.surface-card {
    border: 1px solid rgba(22,63,95,.08);
    border-radius: 20px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.surface-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 1.15rem 1.3rem;
}
.surface-card .card-body { padding: 1.3rem; }

.stat-card {
    height: 100%;
    border: 1px solid rgba(22,63,95,.08);
    border-radius: 18px;
    background: white;
    padding: 1.2rem;
    box-shadow: 0 12px 28px rgba(22,63,95,.07);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    right: -28px;
    top: -28px;
    background: var(--stat-tint, rgba(22,63,95,.08));
}
.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--stat-tint, rgba(22,63,95,.08));
    color: var(--stat-color, var(--navy));
    font-size: 1.15rem;
}
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 700; }
.stat-value { color: var(--navy-deep); font-size: 1.85rem; font-weight: 850; line-height: 1; }

.btn-brand {
    background: linear-gradient(135deg, var(--navy), #1d607d);
    color: white;
    border: none;
    border-radius: 12px;
    padding: .68rem 1rem;
    font-weight: 750;
    box-shadow: 0 8px 20px rgba(22,63,95,.18);
}
.btn-brand:hover { color: white; transform: translateY(-1px); background: linear-gradient(135deg, var(--navy-deep), var(--navy)); }
.btn-soft { border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 11px; font-weight: 700; }
.btn-soft:hover { background: #f5f8fa; color: var(--navy-deep); }
.btn-emerald { background: var(--emerald); color: white; border: 0; border-radius: 11px; font-weight: 700; }
.btn-emerald:hover { background: #126f60; color: white; }

.form-label { font-size: .84rem; font-weight: 750; color: #344b5d; margin-bottom: .45rem; }
.form-control, .form-select {
    border: 1px solid #d7e0e6;
    border-radius: 12px;
    min-height: 46px;
    padding: .68rem .85rem;
    background-color: #fcfdfe;
}
textarea.form-control { min-height: 110px; }
.form-control:focus, .form-select:focus {
    border-color: rgba(24,128,111,.65);
    box-shadow: 0 0 0 .22rem rgba(24,128,111,.12);
    background: white;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #8a99a5; z-index: 2; }
.input-icon-wrap .form-control { padding-left: 2.65rem; }
.password-toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #72818d; z-index: 3; }

.data-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.search-box { position: relative; min-width: min(100%, 290px); }
.search-box i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #8a99a5; }
.search-box input { padding-left: 2.5rem; }
.table-modern { margin-bottom: 0; vertical-align: middle; }
.table-modern thead th {
    background: #f4f7f9;
    color: #536674;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-size: .7rem;
    font-weight: 850;
    border-bottom: 1px solid var(--line);
    padding: .85rem .8rem;
    white-space: nowrap;
}
.table-modern tbody td { padding: .9rem .8rem; border-color: #edf1f4; font-size: .89rem; }
.table-modern tbody tr:hover { background: #fbfcfd; }
.name-cell { font-weight: 750; color: var(--navy-deep); }
.sub-cell { color: var(--muted); font-size: .78rem; }
.status-badge { display: inline-flex; align-items: center; gap: .42rem; padding: .35rem .62rem; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-approved { color: #0d725e; background: #e7f6f1; }
.status-rejected { color: #b73b45; background: #fdecef; }
.status-pending { color: #9b6b0b; background: #fff5dc; }

.alert-modern { border: 0; border-radius: 14px; box-shadow: 0 8px 24px rgba(22,63,95,.08); }
.empty-state { max-width: 520px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 22px; padding: 2.2rem; box-shadow: var(--shadow); }
.empty-icon { width: 68px; height: 68px; border-radius: 20px; margin: 0 auto; display: grid; place-items: center; background: #eef4f7; color: var(--navy); font-weight: 900; font-size: 1.25rem; }

.auth-page {
    background:
        radial-gradient(circle at 10% 10%, rgba(24,128,111,.13), transparent 35%),
        radial-gradient(circle at 90% 85%, rgba(200,149,44,.12), transparent 34%),
        linear-gradient(135deg, #f7fafb, #eef3f6);
}
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.4rem; }
.auth-card { width: min(960px, 100%); border: 1px solid rgba(22,63,95,.08); border-radius: 28px; overflow: hidden; background: white; box-shadow: 0 28px 70px rgba(22,63,95,.16); }
.auth-visual {
    min-height: 560px;
    padding: 3rem;
    color: white;
    background: linear-gradient(145deg, rgba(15,47,73,.96), rgba(22,63,95,.94)), url('../logo.jpg') center/cover;
    position: relative;
    overflow: hidden;
}
.auth-visual::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -100px; bottom: -100px; box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.025); }
.auth-form { padding: 3rem; }
.auth-logo { width: 66px; height: 66px; border-radius: 18px; object-fit: cover; padding: 4px; background: white; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.feature-check { display: flex; gap: .75rem; align-items: flex-start; color: rgba(255,255,255,.86); }
.feature-check i { color: #e8bd62; margin-top: .2rem; }

.app-footer { color: #7b8993; font-size: .8rem; padding: 1rem 0 2rem; }
.modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 70px rgba(15,47,73,.22); }
.modal-header { border-bottom-color: var(--line); }
.modal-footer { border-top-color: var(--line); }

@media (max-width: 991.98px) {
    .auth-visual { min-height: auto; padding: 2rem; }
    .auth-form { padding: 2rem; }
    .page-shell { padding-top: 1.2rem; }
    .navbar-collapse { padding-top: .8rem; }
    .user-chip { margin-top: .7rem; }
}
@media (max-width: 575.98px) {
    .auth-shell { padding: .75rem; }
    .auth-card { border-radius: 20px; }
    .auth-form { padding: 1.5rem; }
    .surface-card { border-radius: 16px; }
    .surface-card .card-body { padding: 1rem; }
    .page-title { font-size: 1.55rem; }
}

@media print {
    .no-print, .app-navbar, .app-footer { display: none !important; }
    body { background: white; }
    .surface-card { box-shadow: none; border: 0; }
    .page-shell { padding: 0; }
}

.text-purple { color: #6d55a4 !important; }
.recap-note {
    border-left: 4px solid var(--gold);
    background: #fffaf0;
    border-radius: 12px;
    padding: .9rem 1rem;
    color: #6d591f;
}
