﻿
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
/*input,
select,
textarea {
    width: 100%;
}*/


/* ══════════════════════════════════════
           DESIGN TOKENS
        ══════════════════════════════════════ */
:root {
    --navy: #0d2b4e;
    --navy-mid: #163d6e;
    --navy-light: #1a4a7a;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --cream: #f4f6f9;
    --white: #ffffff;
    --border: #dde3ec;
    --text-dark: #1a1a2e;
    --text-mid: #3d4a5c;
    --text-light: #6b7a8d;
    --shadow-sm: 0 2px 8px rgba(13,43,78,0.08);
    --shadow-md: 0 4px 20px rgba(13,43,78,0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.6;
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    height: 34px;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    padding: 0px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

    .btn-ghost:hover {
        background: #f9fafb;
        border-color: #9ca3af;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        text-decoration: none;
        color: #374151;
    }

    .btn-ghost:active {
        background: #f3f4f6;
        box-shadow: none;
    }

    .btn-ghost svg {
        width: 15px;
        height: 15px;
        opacity: 0.6;
    }
/* ══════════════════════════════════════
           TOP HEADER BAR
        ══════════════════════════════════════ */
.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 70%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

    .site-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 50% 80% at 0% 50%, rgba(201,168,76,0.12) 0%, transparent 60%), repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 80px);
        pointer-events: none;
    }

    .site-header .header-inner {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 14px 32px;
        position: relative;
        z-index: 1;
    }

    .site-header .logo-wrap {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        border-radius: 50%;
        border: 2px solid rgba(201,168,76,0.5);
        background: rgba(201,168,76,0.1);
        overflow: hidden;
    }

        .site-header .logo-wrap img {
            height: 60px;
            width: auto;
            object-fit: contain;
        }

        /* Logo text fallback if image fails */
        .site-header .logo-wrap .logo-fallback {
            font-family: 'Playfair Display', serif;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--gold);
            letter-spacing: 0.05em;
            display: none;
        }

        .site-header .logo-wrap img[src=""] ~ .logo-fallback,
        .site-header .logo-wrap img:not([src]) ~ .logo-fallback {
            display: block;
        }

    .site-header .header-text {
        flex: 1;
    }

    .site-header .header-title {
        font-family: 'Playfair Display', serif;
        font-size: clamp(1rem, 2.2vw, 1.4rem);
        font-weight: 700;
        color: var(--white);
        margin: 0 0 2px;
        letter-spacing: 0.01em;
        line-height: 1.25;
    }

    .site-header .header-sub {
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--gold-light);
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    .site-header .gold-accent {
        width: 3px;
        height: 56px;
        background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
        border-radius: 2px;
        margin-right: 4px;
        flex-shrink: 0;
    }

/* ══════════════════════════════════════
           NAVIGATION BAR
        ══════════════════════════════════════ */
.site-nav {
    background: var(--white);
    border-bottom: 3px solid var(--gold);
    /* base shadow — JS adds .scrolled class for stronger shadow */
    box-shadow: 0 1px 4px rgba(13,43,78,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s;
}

    /* Shadow kicks in once user scrolls past hero */
    .site-nav.scrolled {
        box-shadow: 0 4px 20px rgba(13,43,78,0.14);
    }

    .site-nav .nav-inner {
        display: flex;
        align-items: center;
        padding: 0 32px;
    }

    .site-nav a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 14px 18px;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--navy);
        text-decoration: none;
        letter-spacing: 0.04em;
        position: relative;
        transition: color 0.2s;
        white-space: nowrap;
    }

        .site-nav a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 18px;
            right: 18px;
            height: 3px;
            background: var(--gold);
            transform: scaleX(0);
            transition: transform 0.25s ease;
            border-radius: 2px 2px 0 0;
        }

        .site-nav a:hover {
            color: var(--navy-mid);
        }

            .site-nav a:hover::after {
                transform: scaleX(1);
            }

        .site-nav a.active {
            color: var(--navy-mid);
            background: rgba(13,43,78,0.04);
        }

            .site-nav a.active::after {
                transform: scaleX(1);
            }

.nav-icon {
    font-size: 14px;
    opacity: 0.7;
}

/* ══════════════════════════════════════
           MAIN CONTENT WRAPPER
        ══════════════════════════════════════ */
.body-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0 16px;
}

footer {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-light);
    padding: 4px 0 12px;
}

    footer a {
        color: var(--navy-mid);
        text-decoration: none;
    }

        footer a:hover {
            text-decoration: underline;
        }

/* ══════════════════════════════════════
           FORM COMPONENTS (preserved + refined)
        ══════════════════════════════════════ */
.section-header {
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 18px;
    margin-top: 20px;
    border-left: 5px solid var(--gold);
    letter-spacing: 0.4px;
    border-radius: 6px 6px 0 0;
}

.form-container {
    margin: 28px auto;
    background-color: var(--white);
    padding: 28px 32px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.form-label {
    display: block;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
    margin-top: 18px;
    font-size: 14px;
}

.section-label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 6px;
    margin-top: 18px;
    font-size: 14px;
}

.form-control {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background-color: #fafafa;
    box-sizing: border-box;
    font-family: 'Source Sans 3', sans-serif;
    transition: border-color 0.2s, background-color 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: var(--navy-mid);
        background-color: var(--white);
        box-shadow: 0 0 0 3px rgba(22,61,110,0.08);
    }

/* Select2 refinements */
.select2-container .select2-selection--single {
    height: 43px !important;
    padding: 6px 12px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 6px !important;
    background-color: #fafafa !important;
    font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    padding-left: 0;
    font-family: 'Source Sans 3', sans-serif;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 41px;
}

.select2-container {
    width: 100% !important;
}

.select2-container--focus .select2-selection {
    border-color: var(--navy-mid) !important;
    box-shadow: 0 0 0 3px rgba(22,61,110,0.08);
}

/* Checkbox & Radio */
.checkbox-section {
    background-color: #f7f8fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 15px;
    width: fit-content;
}

    .checkbox-section input[type="checkbox"] {
        width: fit-content;
        height: 16px;
        margin-right: 8px;
        vertical-align: middle;
        accent-color: var(--navy);
    }

    .checkbox-section label {
        font-size: 14px;
        color: var(--text-dark);
    }

.radio-section {
    background-color: #f7f8fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 18px;
    margin-top: 8px;
    width: fit-content;
}

    .radio-section input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-right: 10px;
        vertical-align: middle;
        accent-color: var(--navy);
    }

    .radio-section label {
        font-size: 15px;
        color: var(--text-dark);
        line-height: 30px;
    }

/* Layout helpers */
.two-column {
    display: flex;
    gap: 20px;
}

    .two-column .form-group {
        flex: 1;
    }

.three-column {
    display: flex;
    gap: 20px;
}

    .three-column .form-group {
        flex: 1;
    }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Tabs */
.tab-container {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    background-color: #eef1f6;
    border: 1px solid var(--border);
    border-bottom: none;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    color: var(--text-mid);
    transition: background 0.2s, color 0.2s;
    font-family: 'Source Sans 3', sans-serif;
}

    .tab-btn:hover {
        background-color: #dde6f3;
        color: var(--navy);
    }

    .tab-btn.active {
        background-color: var(--navy);
        color: var(--white);
        border-color: var(--navy);
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* Accounts row */
.accounts-row {
    border: 1px dashed #bcd3f2;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fafcff;
}

/* Upload */
.upload-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 8px;
}

.upload-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e0e6ef;
}

.remarks-box {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
.btn-add {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.2s ease;
    font-family: 'Source Sans 3', sans-serif;
    letter-spacing: 0.03em;
}

    .btn-add:hover {
        background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
        box-shadow: 0 4px 12px rgba(13,43,78,0.25);
        transform: translateY(-1px);
    }

    .btn-add:active {
        transform: translateY(0);
        box-shadow: none;
    }

.btn-remove {
    background-color: #f2f4f7;
    color: var(--text-mid);
    border: 1px solid #cdd3db;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    min-width: 120px;
    transition: background 0.2s;
    font-family: 'Source Sans 3', sans-serif;
}

    .btn-remove:hover {
        background-color: #e5e9ef;
        border-color: #b0b8c4;
    }

.required {
    color: #c0392b;
    font-weight: bold;
    margin-left: 3px;
}

.success-box {
    background-color: #d4f0de;
    color: #1a5e38;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    font-weight: 500;
}

/* Tables */
.table-cag th {
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: white;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.02em;
}

.table-cag tr:hover {
    background-color: #edf2fa;
    cursor: pointer;
}

.active-row {
    background-color: #f4f6f9 !important;
}

.expand-toggle {
    cursor: pointer;
    font-size: 15px;
    color: var(--navy);
    font-weight: bold;
}

.child-container {
    display: none;
    padding: 15px;
    background-color: #f8fafd;
    border-left: 4px solid var(--navy-mid);
}

/* Nav tabs */
.nav-tabs-custom {
    list-style: none;
    padding: 0;
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 10px;
}

    .nav-tabs-custom li {
        padding: 7px 14px;
        cursor: pointer;
        background-color: #eef1f6;
        margin-right: 4px;
        border-radius: 4px 4px 0 0;
        font-weight: 500;
        font-size: 13.5px;
        color: var(--text-mid);
        transition: background 0.2s, color 0.2s;
    }

        .nav-tabs-custom li:hover {
            background-color: #dde6f3;
            color: var(--navy);
        }

        .nav-tabs-custom li.active {
            background-color: var(--navy);
            color: white;
        }

.tab-pane {
    display: none;
}

    .tab-pane.active {
        display: block;
    }

.child-wrapper {
    padding: 15px;
    background: #f8fafd;
    border-left: 4px solid var(--navy-mid);
}

.child-grid th {
    background: linear-gradient(90deg, var(--navy-mid) 0%, var(--navy-light) 100%);
    color: white;
}


:root {
    --navy: #0d2b4e;
    --navy-mid: #163d6e;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --cream: #f9f6f0;
    --text-dark: #1a1a2e;
    --text-mid: #3d4a5c;
    --text-light: #6b7a8d;
    --white: #ffffff;
    --border: #dde3ec;
    --card-shadow: 0 4px 24px rgba(13,43,78,0.10);
    --card-hover-shadow: 0 12px 40px rgba(13,43,78,0.18);
}

* {
    box-sizing: border-box;
}

body, .coefa-page {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    margin: 0;
}

/* ── Hero ─────────────────────────────────────── */
.coefa-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a4a7a 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 24px 90px; /* taller hero */
    text-align: center;
}

    /* Slightly more visible grid lines + stronger gold glow */
    .coefa-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 60% 50% at 50% -10%, rgba(201,168,76,0.22) 0%, transparent 70%), repeating-linear-gradient( 90deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 80px );
        pointer-events: none;
    }

    .coefa-hero .emblem-ring {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        border-radius: 50%;
        border: 2px solid var(--gold);
        background: rgba(201,168,76,0.18); /* deeper gold bg */
        margin-bottom: 20px;
        font-size: 28px;
    }

    .coefa-hero h1 {
        font-family: 'Playfair Display', serif;
        font-size: clamp(1.7rem, 4vw, 2.7rem);
        font-weight: 700;
        color: var(--white);
        margin: 0 0 6px;
        letter-spacing: 0.01em;
        line-height: 1.2;
    }

    .coefa-hero .gold-line {
        width: 56px;
        height: 3px;
        background: var(--gold);
        margin: 14px auto 18px;
        border-radius: 2px;
    }

    .coefa-hero .subtitle {
        font-size: 1rem;
        font-weight: 500;
        color: var(--gold-light);
        letter-spacing: 0.10em; /* slightly tighter for small screens */
        text-transform: uppercase;
        margin-bottom: 28px;
    }

    .coefa-hero p {
        font-size: 1.05rem;
        color: rgba(255,255,255,0.82);
        max-width: 720px;
        margin: 0 auto 44px;
        line-height: 1.75;
        font-weight: 300;
    }

/* ── Scroll chevron ──────────────────────────── */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

    .scroll-hint span {
        font-size: 0.68rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.4);
    }

.scroll-chevron {
    width: 22px;
    height: 22px;
    border-right: 2px solid rgba(201,168,76,0.65);
    border-bottom: 2px solid rgba(201,168,76,0.65);
    transform: rotate(45deg);
    animation: chevronBounce 1.7s ease-in-out infinite;
}

@keyframes chevronBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.55;
    }

    50% {
        transform: rotate(45deg) translateY(6px);
        opacity: 1;
    }
}

/* ── Section base ────────────────────────────── */
.coefa-section {
    max-width: 1060px;
    margin: 0 auto;
    padding: 56px 24px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

    .section-label::before {
        content: '';
        display: inline-block;
        width: 24px;
        height: 2px;
        background: var(--gold);
        border-radius: 1px;
    }

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    color: var(--navy);
    font-weight: 600;
    margin: 0 0 32px;
}

/* ── Objectives ──────────────────────────────── */
.coefa-objectives {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.obj-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--cream);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

    .obj-card:hover {
        box-shadow: var(--card-hover-shadow);
        transform: translateY(-3px);
        border-color: var(--gold);
    }

.obj-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.obj-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.55;
    font-weight: 400;
}

/* ── Service Cards ───────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 30px 32px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

    .service-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--navy), var(--gold));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .service-card:hover {
        box-shadow: var(--card-hover-shadow);
        transform: translateY(-5px);
    }

        .service-card:hover::after {
            transform: scaleX(1);
        }

    .service-card .card-icon {
        font-size: 36px;
        margin-bottom: 18px;
        display: block;
    }

    .service-card h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.25rem;
        color: var(--navy);
        margin: 0 0 10px;
    }

    .service-card p {
        font-size: 0.95rem;
        color: var(--text-light);
        line-height: 1.65;
        margin: 0 0 24px;
    }

.btn-coefa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.25s;
}

.btn-coefa-primary {
    background: var(--navy);
    color: var(--white);
    border: 2px solid var(--navy);
}

    .btn-coefa-primary:hover {
        background: var(--gold);
        border-color: var(--gold);
        color: var(--navy);
        text-decoration: none;
    }

.btn-coefa-outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

    .btn-coefa-outline:hover {
        background: var(--navy);
        color: var(--white);
        text-decoration: none;
    }

/* ── Fade-in animation ───────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

    .fade-up:nth-child(1) {
        animation-delay: 0.1s;
    }

    .fade-up:nth-child(2) {
        animation-delay: 0.2s;
    }

    .fade-up:nth-child(3) {
        animation-delay: 0.3s;
    }

    .fade-up:nth-child(4) {
        animation-delay: 0.4s;
    }

    .fade-up:nth-child(5) {
        animation-delay: 0.5s;
    }
/* ── Page wrapper ───────────────────────────── */
.el-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 24px 56px;
}

/* ── Title bar ──────────────────────────────── */
.el-title-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dde3ec;
}

.el-title-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.el-title-bar h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    color: #0d2b4e;
    margin: 0 0 2px;
    font-weight: 700;
}

.el-title-bar p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7a8d;
}

/* ── Filter card ────────────────────────────── */
.el-filter-card {
    background: #ffffff;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    padding: 24px 28px;
    box-shadow: 0 2px 10px rgba(13,43,78,0.06);
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.el-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 220px;
}

    .el-filter-group label {
        font-size: 0.8rem;
        font-weight: 600;
        color: #0d2b4e;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

.el-input {
    padding: 10px 13px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #fafbfc;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    width: 100%;
}

    .el-input:focus {
        outline: none;
        border-color: #163d6e;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(22,61,110,0.09);
    }

.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    color: #ffffff;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-search:hover {
        box-shadow: 0 4px 14px rgba(13,43,78,0.28);
        transform: translateY(-1px);
    }

/* ── Results card ───────────────────────────── */
.el-results-card {
    background: #ffffff;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(13,43,78,0.06);
    overflow: hidden;
}

.el-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #eef1f5;
    background: #f8fafd;
}

    .el-results-header span {
        font-size: 0.82rem;
        font-weight: 600;
        color: #6b7a8d;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

/* ── Table ──────────────────────────────────── */
.el-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .el-table thead tr {
        background: linear-gradient(90deg, #0d2b4e 0%, #163d6e 100%);
    }

    .el-table thead th {
        padding: 13px 16px;
        text-align: left;
        color: #ffffff;
        font-weight: 600;
        font-size: 0.82rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .el-table tbody tr {
        border-bottom: 1px solid #eef1f5;
        transition: background 0.15s;
    }

        .el-table tbody tr:hover {
            background: #f0f5fb;
        }

    .el-table tbody td {
        padding: 13px 16px;
        color: #3d4a5c;
        vertical-align: middle;
    }

/* ── Expand toggle ──────────────────────────── */
.expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(13,43,78,0.07);
    color: #0d2b4e;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
    font-weight: 700;
}

    .expand-btn:hover {
        background: rgba(13,43,78,0.14);
    }

    .expand-btn.open {
        background: #0d2b4e;
        color: #c9a84c;
        transform: rotate(90deg);
    }

/* ── Child / detail row ─────────────────────── */
.child-row td {
    padding: 0 !important;
    background: #f0f5fb !important;
}

.child-wrapper {
    padding: 20px 24px;
    border-left: 4px solid #163d6e;
}

/* ── Detail tabs ────────────────────────────── */
.nav-tabs-custom {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    border-bottom: 2px solid #dde3ec;
    flex-wrap: wrap;
    gap: 2px;
}

    .nav-tabs-custom li {
        padding: 8px 16px;
        cursor: pointer;
        background: #eef1f6;
        border-radius: 5px 5px 0 0;
        font-size: 0.83rem;
        font-weight: 600;
        color: #6b7a8d;
        transition: background 0.2s, color 0.2s;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
    }

        .nav-tabs-custom li:hover {
            background: #dde6f3;
            color: #0d2b4e;
        }

        .nav-tabs-custom li.active {
            background: #ffffff;
            color: #0d2b4e;
            border-bottom-color: #c9a84c;
        }

.tab-pane {
    display: none;
}

    .tab-pane.active {
        display: block;
    }

/* Child grid */
.child-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

    .child-grid th {
        background: linear-gradient(90deg, #163d6e 0%, #1a4a7a 100%);
        color: #ffffff;
        padding: 10px 14px;
        text-align: left;
        font-weight: 600;
        font-size: 0.8rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .child-grid td {
        padding: 10px 14px;
        border-bottom: 1px solid #eef1f5;
        color: #3d4a5c;
    }

    .child-grid tbody tr:hover {
        background: #e8f0fa;
    }

/* ── Pager ──────────────────────────────────── */
.el-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #eef1f5;
    gap: 4px;
}

    .el-pager a, .el-pager span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        transition: background 0.2s;
    }

    .el-pager a {
        color: #163d6e;
        background: #eef1f6;
    }

        .el-pager a:hover {
            background: #dde6f3;
        }

    .el-pager span {
        background: #0d2b4e;
        color: #ffffff;
    }

/* ── GridView pager override ─────────────────── */
.el-table tr.gridview-pager td {
    padding: 14px 20px !important;
    background: #f8fafd !important;
    border-top: 1px solid #eef1f5;
}

    .el-table tr.gridview-pager td table {
        margin-left: auto;
    }

        .el-table tr.gridview-pager td table td {
            padding: 2px 4px;
        }

            .el-table tr.gridview-pager td table td a,
            .el-table tr.gridview-pager td table td span {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 32px;
                height: 32px;
                padding: 0 8px;
                border-radius: 6px;
                font-size: 0.85rem;
                font-weight: 600;
                text-decoration: none;
                transition: background 0.2s;
            }

            .el-table tr.gridview-pager td table td a {
                color: #163d6e;
                background: #eef1f6;
            }

                .el-table tr.gridview-pager td table td a:hover {
                    background: #dde6f3;
                }

            .el-table tr.gridview-pager td table td span {
                background: #0d2b4e;
                color: #fff;
            }

/* ── Empty state ────────────────────────────── */
.el-empty {
    text-align: center;
    padding: 52px 24px;
    color: #6b7a8d;
}

    .el-empty .el-empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .el-empty p {
        font-size: 0.95rem;
        margin: 0;
    }

/* ── Badge ──────────────────────────────────── */
.entity-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.badge-cpsu {
    background: rgba(13,43,78,0.1);
    color: #0d2b4e;
}

.badge-spsu {
    background: rgba(201,168,76,0.15);
    color: #8a6d0a;
}

/* ── Page wrapper ───────────────────────────── */
.psu-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 24px 56px;
}

/* ── Page title bar ─────────────────────────── */
.psu-title-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, #dde3ec);
}

.psu-title-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.psu-title-bar h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    color: #0d2b4e;
    margin: 0 0 2px;
    font-weight: 700;
}

.psu-title-bar p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7a8d;
}

/* ── Tab navigation ─────────────────────────── */
.psu-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 3px solid #dde3ec;
    overflow-x: visible;
}

.psu-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    background: transparent;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #6b7a8d;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    position: relative;
}

    .psu-tab-btn:hover {
        color: #0d2b4e;
        background: rgba(13,43,78,0.03);
    }

    .psu-tab-btn.active {
        color: #0d2b4e;
        border-bottom-color: #c9a84c;
        background: rgba(201,168,76,0.05);
    }

.tab-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    background: #e8ecf2;
    color: #6b7a8d;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.psu-tab-btn.active .tab-step {
    background: #0d2b4e;
    color: #ffffff;
}

.psu-tab-btn.completed .tab-step {
    background: #27ae60;
    color: #ffffff;
}

.psu-tab-btn.completed {
    color: #27ae60;
}

/* ── Form card ──────────────────────────────── */
.psu-form-card {
    background: #ffffff;
    border: 1px solid #dde3ec;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px 28px;
    box-shadow: 0 4px 20px rgba(13,43,78,0.07);
}

/* ── Section divider ────────────────────────── */
.form-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eef1f5;
}

    .form-section:first-child {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #0d2b4e;
    margin: 0 0 20px;
}

    .form-section-title::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 18px;
        background: linear-gradient(180deg, #c9a84c, #0d2b4e);
        border-radius: 2px;
        flex-shrink: 0;
    }

/* ── Field label ────────────────────────────── */
.f-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0d2b4e;
    margin: 20px 0 6px;
}

    .f-label:first-child {
        margin-top: 0;
    }

.f-sublabel {
    display: block;
    font-size: 0.83rem;
    color: #6b7a8d;
    margin: -2px 0 6px;
    font-weight: 400;
}

.required {
    color: #c0392b;
    font-weight: 700;
    margin-left: 2px;
}

/* ── Inputs ─────────────────────────────────── */
.f-input {
    width: 100%;
    padding: 10px 13px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #fafbfc;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

    .f-input:focus {
        outline: none;
        border-color: #163d6e;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(22,61,110,0.09);
    }

/* ── Two / Three column grids ───────────────── */
.f-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.f-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.f-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.f-grid-auto {
    display: grid;
    grid-template-columns: 180px 1fr 1fr 1fr 1fr;
    gap: 16px;
    align-items: end;
}

@media (max-width: 768px) {
    .f-grid-2, .f-grid-3, .f-grid-4, .f-grid-auto {
        grid-template-columns: 1fr;
    }
}

/* ── Choice sections (radio / checkbox) ─────── */
/* ── Choice sections (radio / checkbox) ─────── */
/* ASP.NET CheckBoxList/RadioButtonList renders as a <table> by default.
       These rules ensure checkbox/radio + label sit inline on the same line. */

.f-choices {
    padding: 14px 18px;
    background: #f8f9fc;
    border: 1px solid #e2e6ef;
    border-radius: 8px;
    width: fit-content;
    min-width: 220px;
}

.f-choices-row {
    padding: 14px 18px;
    background: #f8f9fc;
    border: 1px solid #e2e6ef;
    border-radius: 8px;
}

    /* Neutralise the ASP.NET generated table layout */
    .f-choices table,
    .f-choices-row table {
        border: none !important;
        background: transparent !important;
        border-collapse: collapse;
    }

        /* Each CheckBoxList/RadioButtonList item lives in a <td> */
        .f-choices table td,
        .f-choices-row table td {
            padding: 5px 20px 5px 0 !important;
            border: none !important;
            background: transparent !important;
            white-space: nowrap;
            vertical-align: middle;
            display: table-cell; /* keep as table-cell so input+label are inline */
        }

    /* The input and label are siblings inside the <td> — force same-line */
    .f-choices input[type="radio"],
    .f-choices input[type="checkbox"],
    .f-choices-row input[type="radio"],
    .f-choices-row input[type="checkbox"] {
        accent-color: #0d2b4e;
        width: 15px;
        height: 15px;
        margin: 0 7px 0 0;
        vertical-align: middle;
        display: inline-block;
        position: relative;
        top: -1px;

    }
.f-choices label {
    width: 100%;
    line-height: 1.4;
}
    .f-choices label,
    .f-choices-row label {
        font-size: 0.9rem;
        color: #1f2a37;
        cursor: pointer;
        vertical-align: middle;
    }
.f-choices {
    flex-direction: column !important;
}
    /* For RepeatLayout="Flow" — items wrapped in <span> */
    .f-choices span,
    .f-choices-row span {
        display: inline-flex;
        align-items: center;
        margin: 4px 20px 4px 0;
        white-space: nowrap;
    }

    /* ── Horizontal CheckBoxList fix ─────────────────
       ASP.NET RepeatDirection=Horizontal puts all items
       in <td>s on a single <tr>. Each <td> needs a right
       gap so the label of one item doesn't butt against
       the checkbox of the next.                         */
    .f-choices-row table td,
    .f-choices-row table th {
        padding: 6px 28px 6px 0 !important; /* generous right gap */
        border: none !important;
        background: transparent !important;
        white-space: nowrap;
        vertical-align: middle;
    }

        /* Last cell in the row needs no trailing gap */
        .f-choices-row table td:last-child {
            padding-right: 0 !important;
        }

    /* Ensure label text doesn't sit too close to the next checkbox */
    .f-choices-row label {
        margin-right: 0;
        padding-right: 0;
    }

/* ── Nested / conditional panel ─────────────── */
.f-panel {
    margin-top: 12px;
    padding: 20px 22px;
    background: #f0f4fa;
    border: 1px solid #d5e0f0;
    border-left: 4px solid #163d6e;
    border-radius: 0 8px 8px 0;
}

/* ── Dynamic rows ───────────────────────────── */
.f-dynamic-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fafcff;
    border: 1px dashed #bcd3f2;
    border-radius: 6px;
    margin-bottom: 4px;
}

    .f-dynamic-row .f-input {
        flex: 1;
        margin: 0;
    }

/* ── Buttons ────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    color: #ffffff;
    transition: all 0.2s;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #163d6e 0%, #1a4a7a 100%);
        box-shadow: 0 4px 14px rgba(13,43,78,0.28);
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: none;
    }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px solid #c5cdd8;
    cursor: pointer;
    background: #f2f4f7;
    color: #3d4a5c;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: #e5e9ef;
        border-color: #b0b8c4;
    }

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px dashed #163d6e;
    background: transparent;
    color: #163d6e;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-add-row:hover {
        background: rgba(22,61,110,0.06);
        border-style: solid;
    }

/* ── Form actions row ───────────────────────── */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #eef1f5;
}

/* ── Remarks box ────────────────────────────── */
.f-remarks {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 12px 14px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.9rem;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #fafbfc;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

    .f-remarks:focus {
        outline: none;
        border-color: #163d6e;
        box-shadow: 0 0 0 3px rgba(22,61,110,0.09);
    }

/* ── Tab content ────────────────────────────── */
.psu-tab-content {
    display: none;
}

    .psu-tab-content.active {
        display: block;
    }

/* ── Info badge ─────────────────────────────── */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(22,61,110,0.07);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #163d6e;
    margin-left: 8px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   PSU ANALYTICS DASHBOARD — EntityAnalytics.aspx
   Complete replacement for the analytics block in style.css
   ══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ───────────────────────────── */
.analytics-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 60px;
}

/* ── Page header ────────────────────────────── */
.analytics-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

    .analytics-header::before {
        content: '📊';
        width: 48px;
        height: 48px;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        flex-shrink: 0;
    }

.analytics-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 2px;
    letter-spacing: 0.01em;
}

.analytics-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ── Filter bar ─────────────────────────────── */
.analytics-filters {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.analytics-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
    flex: 1;
}

    .analytics-filter-group label {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--navy);
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

.analytics-last-updated {
    margin-left: auto;
    align-self: center;
    font-size: 0.75rem;
    color: var(--text-light);
    background: #f0f4fa;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
}

/* ── KPI rows ────────────────────────────────── */
.analytics-kpis {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .analytics-kpis .col-md-2 {
        flex: 1;
        min-width: 140px;
        padding: 0;
    }

/* ── KPI cards ───────────────────────────────── */
.dashboard-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 18px 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: left;
    height: 100%;
}

    /* Gold top accent bar — slides in on hover */
    .dashboard-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--navy), var(--gold));
        border-radius: 12px 12px 0 0;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.35s ease;
    }

    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

        .dashboard-card:hover::before {
            transform: scaleX(1);
        }

/* Loss card — red accent bar */
.danger-card::before {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.kpi-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    display: block;
    font-family: 'Source Sans 3', sans-serif;
}

.danger-card .kpi-value {
    color: #c0392b;
}

/* Staggered fade-up on KPI cards */
.analytics-kpis .col-md-2 .dashboard-card {
    animation: analyticsCardIn 0.45s ease both;
}

.analytics-kpis .col-md-2:nth-child(1) .dashboard-card {
    animation-delay: 0.05s;
}

.analytics-kpis .col-md-2:nth-child(2) .dashboard-card {
    animation-delay: 0.10s;
}

.analytics-kpis .col-md-2:nth-child(3) .dashboard-card {
    animation-delay: 0.15s;
}

.analytics-kpis .col-md-2:nth-child(4) .dashboard-card {
    animation-delay: 0.20s;
}

.analytics-kpis .col-md-2:nth-child(5) .dashboard-card {
    animation-delay: 0.25s;
}

.analytics-kpis .col-md-2:nth-child(6) .dashboard-card {
    animation-delay: 0.30s;
}

@keyframes analyticsCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Tabs ────────────────────────────────────── */
.analytics-tabs {
    margin-top: 8px;
    margin-bottom: 0;
}

/* ── Tab body wrapper ────────────────────────── */
/*
   KEY: Do NOT use display:none — Chart.js can't measure a hidden
   canvas and renders at 0×0. Instead inactive panes are
   position:absolute + visibility:hidden + height:0 so they stay
   measurable (charts render correctly) but take no layout space.
   The active pane reverts to position:relative + height:auto.
*/
.analytics-tabs-body {
    position: relative;
    min-height: 200px;
}

.analytics-tab-pane {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

    .analytics-tab-pane.active {
        position: relative;
        visibility: visible;
        height: auto;
        overflow: visible;
        pointer-events: auto;
        padding-top: 20px;
        animation: fadeUp 0.3s ease both;
    }

/* ── Section cards (charts + grids) ─────────── */
.section-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    height: calc(100% - 24px);
    transition: box-shadow 0.25s;
    animation: analyticsCardIn 0.45s ease both;
    animation-delay: 0.15s;
}

    .section-card:hover {
        box-shadow: var(--shadow-md);
    }

/* Section title */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

    .section-title::before {
        content: '';
        display: inline-block;
        width: 3px;
        height: 14px;
        background: linear-gradient(180deg, var(--gold) 0%, var(--navy) 100%);
        border-radius: 2px;
        flex-shrink: 0;
    }

/* ── Charts ─────────────────────────────────── */
canvas {
    max-height: 280px !important;
}

/* ── Analytics tables ───────────────────────── */
.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text-dark) !important;
    margin: 0 !important;
}

    .analytics-table thead tr {
        background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 100%);
    }

    .analytics-table thead th {
        padding: 11px 14px;
        text-align: left;
        color: #ffffff !important;
        font-weight: 600;
        font-size: 0.78rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        white-space: nowrap;
        border: none !important;
    }

    .analytics-table tbody tr {
        border-bottom: 1px solid #eef1f5;
        transition: background 0.15s;
        background: transparent !important;
    }

        .analytics-table tbody tr:last-child {
            border-bottom: none;
        }

        .analytics-table tbody tr:hover {
            background: #f0f5fb !important;
        }

    .analytics-table tbody td {
        padding: 10px 14px;
        color: var(--text-mid) !important;
        border: none !important;
        vertical-align: middle;
    }

/* ── Bootstrap row spacing fix ──────────────── */
.analytics-container .row {
    margin-left: -10px;
    margin-right: -10px;
}

    .analytics-container .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .analytics-filter-group {
        min-width: 100%;
    }

    .analytics-last-updated {
        margin-left: 0;
    }

    .analytics-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .analytics-kpis .col-md-2 {
        min-width: 120px;
    }
}

/* ══════════════════════════════════════════════
   CHART.JS COLOR REFERENCE (use in your .cs)
   Axis label color   : '#6b7a8d'
   Grid line color    : 'rgba(221,227,236,0.7)'
   Palette            : ['#0d2b4e','#163d6e','#1a4a7a','#c9a84c',
                          '#e8c97a','#4a90d9','#6b7a8d','#c0392b',
                          '#27ae60','#8e44ad']
   Bar primary        : '#163d6e'
   Bar secondary      : '#c9a84c'
   Danger             : '#c0392b'
   ══════════════════════════════════════════════ */

/* ───── NAV GROUP DROPDOWN ───── */

.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

    .nav-parent:hover {
        color: var(--navy-mid);
    }

/* dropdown container */

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(13,43,78,0.12);
    padding: 6px 0;
    z-index: 999;
}

    /* submenu links */

    .nav-dropdown a {
        display: block;
        padding: 10px 18px;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--text-mid);
        text-decoration: none;
    }

        .nav-dropdown a:hover {
            background: #f4f6f9;
            color: var(--navy);
        }

/* show dropdown on hover */

.nav-group:hover .nav-dropdown {
    display: block;
}

/* ======================================================
   PART D – FINANCIAL PROFILE CARDS
====================================================== */

/* Card container */
.fp-card {
    border: 1px solid #dde3ec;
    border-radius: 10px;
    background: #ffffff;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* Card header */
.fp-card-header {
    background: linear-gradient( 90deg, var(--navy-mid) 0%, var(--navy) 70% );
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
}
/* Arrow icon */
.fp-arrow {
    font-size: 14px;
    opacity: 0.85;
}

/* Header text */
.fp-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Card body */
.fp-card-body {
    padding: 18px 18px 20px 18px;
}

/* Hidden card body */
.fp-hidden {
    display: none;
}

/* ======================================================
   GRID LAYOUT FOR FINANCIAL INPUTS
====================================================== */

.f-grid-4 {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px 20px;
}

    /* Each grid cell */
    .f-grid-4 > div {
        display: flex;
        flex-direction: column;
    }

/* Label alignment */
.fp-card-body .f-label {
    display: block;
    min-height: 34px;
    font-size: 13px;
    font-weight: 600;
    color: #3d4a5c;
    margin-bottom: 4px;
}

/* Input styling */
.fp-card-body .f-input {
    border: 1px solid #cfd6e2;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
}

    /* Highlight when typing */
    .fp-card-body .f-input:focus {
        border-color: #0d2b4e;
        box-shadow: 0 0 0 2px rgba(13,43,78,0.08);
    }

/* ======================================================
   SECTION STYLING
====================================================== */

.fp-card-body .form-section {
    margin-bottom: 22px;
}

.fp-card-body .fp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0d2b4e;
    margin: 20px 0 10px 0;
    padding-left: 12px;
    border-left: 3px solid #c9a84c;
    letter-spacing: 0.01em;
}

/* ======================================================
   BUTTON AREA
====================================================== */

.fp-delete-row {
    margin-top: 18px;
}

/* ======================================================
   COPY PREVIOUS BUTTON
====================================================== */

.fp-card-header .btn-secondary {
    margin-left: auto;
    font-size: 12px;
    padding: 4px 10px;
}

/* ======================================================
   MOBILE RESPONSIVE
====================================================== */

@media (max-width:1100px) {

    .f-grid-4 {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width:650px) {

    .f-grid-4 {
        grid-template-columns: 1fr;
    }
}
/* spacing for financial section */

.financial-section {
    margin-top: 20px;
    margin-bottom: 30px;
}

.add-financial-btn {
    margin-top: 10px;
    margin-bottom: 22px;
}
.fp-card-header:hover {
    background: linear-gradient( 90deg, var(--navy) 0%, var(--navy-mid) 70% );
}
/* Top row alignment */

.financial-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
}

/* Each field */

.financial-field {
    display: flex;
    flex-direction: column;
}

    /* keep labels consistent height */

    .financial-field .f-label {
        min-height: 20px;
    }
/* ---------- Financial Top Row Layout ---------- */




/* Financial year dropdown width */

.financial-field select {
    max-width: 260px;
}


/* Accounting standard row */

.acc-standard-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}


/* compact radios */

.acc-radios {
    padding: 8px 14px;
    background: #f8f9fc;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    display: flex;
    gap: 16px;
}


/* other textbox width */

.acc-other {
    width: 220px;
}
.acc-radios label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}
/* Expand/Collapse buttons */
.section-controls {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

/* Financial Year Card */
.fy-card {
    border: 1px solid #d7e3f4;
    border-radius: 8px;
    background: #f8fbff;
    margin-bottom: 12px;
    transition: all .2s ease;
}

/* Header */
.fy-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #1d3557;
    background: #eef4ff;
    border-radius: 8px;
}

    /* Hover effect */
    .fy-header:hover {
        background: #e3edff;
    }

/* Arrow */
.fy-arrow {
    font-size: 14px;
    width: 16px;
    color: #2c5282;
}

/* Body */
.fy-body {
    padding: 20px;
    border-top: 1px solid #e3eaf6;
}

/* Add button style */
.btn-add-row {
    border: 1px dashed #6b8ed6;
    background: #f7f9ff;
    color: #1d3557;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

    .btn-add-row:hover {
        background: #eef4ff;
    }
/* ── Header Actions ─────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center; /* ← was: column + flex-end */
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-user-info {
    display: flex;
    align-items: center; /* ← horizontal now */
    gap: 8px;
}

.header-username {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff !important;
    white-space: nowrap;
}

.header-office {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    height: 34px;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

    .btn-logout:hover {
        background: rgba(201,168,76,0.2);
        border-color: #c9a84c;
        color: #c9a84c !important;
    }

    .btn-logout svg {
        flex-shrink: 0;
    }
.header-username {
    color: #ffffff !important; /* override the gold — make fully white */
}

    .header-username svg {
        stroke: #ffffff;
        flex-shrink: 0;
    }

.db-wrap {
    padding: 15px 20px;
}

.db-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* CARD STYLE SAME AS YOUR SYSTEM */
.db-card {
    background: #f8f9fb;
    border: 1px solid #d9dee5;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
}

    /* SECTION HEADINGS */
    .db-card h3 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #2c3e50;
    }

/* KPI BLOCKS (like your PSU/AB boxes) */
.db-kpi {
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.db-kpi-num {
    font-size: 22px;
    font-weight: 600;
    color: #1f3c5a;
}

/* GRID */
.db-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* TABLE (matches your HR table style) */
.db-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    .db-table th {
        text-align: left;
        font-weight: 600;
        padding: 10px;
        border-bottom: 2px solid #d9dee5;
        color: #2c3e50;
    }

    .db-table td {
        padding: 10px;
        border-bottom: 1px solid #e5e7eb;
    }

/* STATUS COLORS (soft, not harsh) */
.good {
    color: #2e7d32; /* subtle green */
    font-weight: 600;
}

.bad {
    color: #c62828; /* subtle red */
    font-weight: 600;
}


.cp-wrapper {
    max-width: 520px;
    margin: 36px auto;
    padding: 0 16px;
}

/* ── Title bar ── */
.cp-title-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.cp-title-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cp-title-bar h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--navy);
    margin: 0 0 2px;
    font-weight: 700;
}

.cp-title-bar p {
    margin: 0;
    font-size: 0.83rem;
    color: var(--text-light);
}

/* ── Card ── */
.cp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 32px;
}

/* ── Last changed notice ── */
.cp-last-changed {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: #f8fafd;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 10px 14px;
    margin-bottom: 24px;
}

/* ── Message ── */
.cp-msg {
    font-size: 0.85rem;
    padding: 11px 14px;
    border-radius: 7px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

    .cp-msg.show {
        display: flex;
    }

    .cp-msg.error {
        background: #fef2f2;
        color: #b91c1c;
        border-left: 3px solid #ef4444;
    }

    .cp-msg.success {
        background: #f0fdf4;
        color: #166534;
        border-left: 3px solid #22c55e;
    }

    .cp-msg.info {
        background: #eff6ff;
        color: #1e40af;
        border-left: 3px solid #3b82f6;
    }

/* ── Field ── */
.cp-field {
    margin-bottom: 20px;
}

    .cp-field label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--navy);
        margin-bottom: 6px;
    }

.cp-input-wrap {
    position: relative;
}

.cp-input {
    width: 100%;
    padding: 11px 42px 11px 13px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #fafbfc;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .cp-input:focus {
        outline: none;
        border-color: var(--navy-mid);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(22,61,110,0.09);
    }

    .cp-input.valid {
        border-color: #22c55e;
    }

    .cp-input.invalid {
        border-color: #ef4444;
    }

/* Eye toggle */
.cp-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
}

/* ── Strength bar ── */
.cp-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin: 7px 0 4px;
    overflow: hidden;
}

.cp-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.cp-strength-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ── Requirements ── */
.cp-requirements {
    background: #f8fafd;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 4px 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.cp-req {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--text-light);
    transition: color 0.2s;
}

    .cp-req.met {
        color: #16a34a;
    }

.cp-req-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #d0d5dd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.cp-req.met .cp-req-dot {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

/* ── Match indicator ── */
.cp-match {
    font-size: 0.78rem;
    margin-top: 5px;
    min-height: 16px;
}

    .cp-match.ok {
        color: #16a34a;
    }

    .cp-match.bad {
        color: #ef4444;
    }

/* ── Divider ── */
.cp-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* ── Actions ── */
.cp-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cp-btn-cancel {
    padding: 10px 22px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1.5px solid #c5cdd8;
    background: #f2f4f7;
    color: var(--text-mid);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

    .cp-btn-cancel:hover {
        background: #e5e9ef;
        border-color: #b0b8c4;
        color: var(--text-mid);
    }

.cp-btn-submit {
    padding: 10px 28px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

    .cp-btn-submit:hover {
        box-shadow: 0 4px 14px rgba(13,43,78,0.28);
        transform: translateY(-1px);
    }

    .cp-btn-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.pip-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dde3ec;
}

.pip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pip-dot-blue {
    background: #163d6e;
}

.pip-dot-teal {
    background: #1D9E75;
}

.pip-section-header h4 {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #3d4a5c;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0;
}

/* Audit Universe row layout */
.au-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
    gap: 1rem;
}

    .au-row:last-child {
        border-bottom: none;
    }

.au-row-label {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: #3d4a5c;
}

.au-inputs {
    display: flex;
    gap: 10px;
}

.au-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.col-badge-psu {
    background: rgba(13,43,78,0.08);
    color: #0d2b4e;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.col-badge-ab {
    background: rgba(201,168,76,0.15);
    color: #8a6d0a;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Number inputs */
.pip-input {
    width: 100px !important;
    background: #fafbfc !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 6px !important;
    padding: 7px 10px !important;
    font-size: 0.88rem !important;
    font-family: 'Source Sans 3', monospace !important;
    color: #1a1a2e !important;
    text-align: center !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

    .pip-input:focus {
        outline: none !important;
        border-color: #163d6e !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(22,61,110,0.09) !important;
    }

/* HR table tweaks */
.pip-subheader th {
    background: rgba(13,43,78,0.06) !important;
    color: #163d6e !important;
    font-size: 0.75rem !important;
    text-align: center;
    padding: 7px 14px !important;
    border-bottom: 1px solid #dde3ec !important;
    letter-spacing: 0.04em;
}

.analytics-table td.center {
    text-align: center;
}

.analytics-table td.label {
    font-weight: 600;
    color: #1a1a2e !important;
}

/* Civil cadre divider */
.civil-divider td {
    background: #f4f6f9 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #3d4a5c !important;
    padding: 9px 14px !important;
    border-top: 1px solid #dde3ec !important;
    border-bottom: 1px solid #dde3ec !important;
}

.civil-tag {
    display: inline-block;
    background: rgba(201,168,76,0.15);
    color: #8a6d0a;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 500;
}

.pip-star {
    color: #c0392b;
    font-size: 0.75rem;
    vertical-align: super;
    margin-left: 2px;
}

.pip-footnote {
    font-size: 0.78rem !important;
    color: #c0392b !important;
    font-style: italic;
    padding: 8px 14px !important;
}

.pip-dash {
    color: #b0b8c4 !important;
}

/* Footer bar */
.pip-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pip-footer-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0d2b4e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}



/* KPI cards row */
.op-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 4px;
}

.op-kpi-card {
    background: #f8fafd;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

    .op-kpi-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #0d2b4e, #c9a84c);
        border-radius: 10px 10px 0 0;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .op-kpi-card:hover {
        box-shadow: 0 4px 20px rgba(13,43,78,0.12);
        transform: translateY(-2px);
    }

        .op-kpi-card:hover::before {
            transform: scaleX(1);
        }

.op-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7a8d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.op-kpi-num {
    font-size: 2rem;
    font-weight: 700;
    color: #0d2b4e;
    line-height: 1;
    font-family: 'Source Sans 3', sans-serif;
}

/* Accounts status side-by-side tables */
.op-accounts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.op-accounts-table-wrap {
    border: 1px solid #dde3ec;
    border-radius: 8px;
    overflow: hidden;
}

    .op-accounts-table-wrap .analytics-table thead th {
        background: linear-gradient(90deg, #163d6e 0%, #1a4a7a 100%) !important;
        font-size: 0.78rem !important;
    }




/* Office selector bar */
.op-office-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid #eef1f5;
    background: #f8fafd;
    flex-wrap: wrap;
}

.op-office-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0d2b4e;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

/* Date badge in HR title */
.op-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.35);
    color: #8a6d0a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    font-family: 'Source Sans 3', sans-serif;
    font-style: normal;
}

@media (max-width: 640px) {
    .op-kpi-row, .op-accounts-grid {
        grid-template-columns: 1fr;
    }
}
.frozen-dropdown {
    background: #f4f6f9 !important;
    color: #6b7a8d !important;
    border-color: #dde3ec !important;
    cursor: not-allowed !important;
    pointer-events: none;
    opacity: 0.85;
}
.civil-tag {
    display: block;
    background: rgba(201,168,76,0.15);
    color: #8a6d0a;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 5px;
    font-weight: 500;
    width: fit-content;
}
/* ── Financial Profile Card (fpc) ─────────────────────────── */

.fpc-card {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Sub-header band (e.g. "Liabilities", "Assets") */
.fpc-sub-header {
    background: #f0f4fa;
    border-bottom: 1px solid #dde3ec;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0d2b4e;
}

/* 2-column grid of added items */
.fpc-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #eef1f6;
}

.fpc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 12px;
}

.fpc-item-label {
    flex: 1; /* label takes available space */
    font-size: 0.82rem;
    color: #3d4a5c;
    min-width: 0;
}

.fpc-input {
    width: 160px; /* slightly wider now it has full row */
    flex-shrink: 0;
    padding: 5px 8px;
    border: 1px solid #c8d0dc;
    border-radius: 5px;
    font-size: 0.82rem;
    color: #1a2b3c;
    background: #f8f9fc;
    text-align: right;
}

.fpc-input:focus {
        outline: none;
        border-color: #0d2b4e;
        background: #fff;
    }

/* ✕ remove button */
.fpc-remove-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #9aa5b4;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

    .fpc-remove-btn:hover {
        background: #fee2e2;
        color: #c0392b;
    }

/* Add-item row at bottom of card */
.fpc-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fc;
    border-top: 1px dashed #dde3ec;
}

.fpc-drop {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #c8d0dc;
    border-radius: 5px;
    font-size: 0.82rem;
    color: #3d4a5c;
    background: #fff;
}

    .fpc-drop:focus {
        outline: none;
        border-color: #0d2b4e;
    }

.fpc-add-btn {
    flex-shrink: 0;
    padding: 5px 14px;
    background: #0d2b4e;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

    .fpc-add-btn:hover {
        background: #163d6e;
    }

/* Responsive — single column on narrow screens */
@media (max-width: 640px) {
    .fpc-grid {
        grid-template-columns: 1fr;
    }
}
.ab-total-field {
    background: #eef2f7 !important;
    font-weight: 600;
    color: #0d2b4e;
    cursor: not-allowed;
}
.f-choices-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .f-choices-vertical label {
        display: flex;
        align-items: flex-start; /* aligns properly for long text */
        gap: 8px;
        line-height: 1.4;
        cursor: pointer;
    }

    .f-choices-vertical input[type="radio"] {
        margin-top: 3px; /* aligns with first line */
    }
.it-app-flex {
    display: flex;
    align-items: center;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.inline-options {
    display: flex;
    gap: 10px;
}

.remove-btn {
    margin-left: auto; /* pushes button to right */
    margin-top: 20px;
}
/* ══════════════════════════════════════════════════════════════
   USER MANAGEMENT PAGES  (Create / Edit / Reset Password)
   cu- = "create-user" prefix shared across all three pages
   ══════════════════════════════════════════════════════════════ */

/* ── Page wrapper ───────────────────────────── */
.cu-page {
    margin: 0 auto;
    padding: 36px 24px 60px;
}

/* ── Title bar ──────────────────────────────── */
.cu-title-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dde3ec;
}

.cu-title-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(13, 43, 78, 0.22);
}

.cu-title-bar h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    color: #0d2b4e;
    margin: 0 0 3px;
    font-weight: 700;
}

.cu-title-bar p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7a8d;
}

/* ── Alert messages ─────────────────────────── */
.cu-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeUp 0.3s ease;
}

.cu-alert-icon {
    font-size: 1.1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.cu-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    color: #15803d;
}

.cu-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    color: #b91c1c;
}

/* ── Main card ──────────────────────────────── */
.cu-card {
    background: #ffffff;
    border: 1px solid #dde3ec;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(13, 43, 78, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

/* ── Section ────────────────────────────────── */
.cu-section {
    padding: 26px 32px;
}

.cu-divider {
    border: none;
    border-top: 1px solid #eef1f5;
    margin: 0;
}

/* ── Section title ──────────────────────────── */
.cu-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0d2b4e;
    margin: 0 0 22px;
}

.cu-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d2b4e 0%, #163d6e 100%);
    color: #c9a84c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    font-family: 'Source Sans 3', sans-serif;
}

/* ── Context strip (Edit / Reset pages) ─────── */
.cu-context-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #f0f5fb;
    border-bottom: 1px solid #dde3ec;
}

.cu-context-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b7a8d;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.cu-context-user {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0d2b4e;
}

/* ── Validator messages ─────────────────────── */
.cu-validator {
    display: block;
    font-size: 0.78rem;
    color: #dc2626;
    margin-top: 4px;
}

/* ── Password show/hide wrapper ─────────────── */
.cu-pw-wrap {
    position: relative;
}

    .cu-pw-wrap .f-input {
        padding-right: 44px;
    }

.cu-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #6b7a8d;
    display: flex;
    align-items: center;
}

    .cu-eye-btn svg {
        width: 18px;
        height: 18px;
    }

    .cu-eye-btn:hover {
        color: #0d2b4e;
    }

/* ── Password strength bar ──────────────────── */
.cu-strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 7px 0 4px;
    overflow: hidden;
}

.cu-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.cu-strength-label {
    font-size: 0.75rem;
    color: #6b7a8d;
    min-height: 16px;
}

/* ── Password match message ─────────────────── */
.cu-match-msg {
    font-size: 0.78rem;
    margin-top: 5px;
    min-height: 16px;
}

.cu-match-ok {
    color: #16a34a;
}

.cu-match-bad {
    color: #dc2626;
}

/* ── Password requirements checklist ────────── */
.cu-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    background: #f8fafd;
    border: 1px solid #e2e8f4;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 18px;
}

.cu-req {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.81rem;
    color: #9ca3af;
    transition: color 0.2s;
}

    .cu-req.met {
        color: #16a34a;
    }

.cu-req-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #d0d5dd;
    font-size: 10px;
    flex-shrink: 0;
    transition: all 0.2s;
    color: transparent;
}

.cu-req.met .cu-req-dot {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

/* ── Status badges (Edit page grid) ─────────── */
.cu-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cu-badge-active {
    background: rgba(22, 163, 74, 0.10);
    color: #15803d;
}

.cu-badge-inactive {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

/* ── "Edit →" / "Select →" button in grids ──── */
.cu-select-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #163d6e;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #c5d3e8;
    border-radius: 5px;
    background: #eef4fb;
    transition: background 0.15s;
    white-space: nowrap;
}

    .cu-select-btn:hover {
        background: #dbe8f8;
        color: #0d2b4e;
        text-decoration: none;
    }

/* ── Account action pills (Edit page) ───────── */
.cu-action-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cu-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    font-family: 'Source Sans 3', sans-serif;
}

.cu-pill-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

    .cu-pill-warn:hover {
        background: #fef3c7;
        color: #78350f;
        text-decoration: none;
    }

.cu-pill-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

    .cu-pill-info:hover {
        background: #dbeafe;
        color: #1e3a8a;
    }

/* ── Lock status text (Edit page) ───────────── */
.cu-lock-status {
    font-size: 0.82rem;
    color: #6b7a8d;
    min-height: 16px;
}

    .cu-lock-status .locked-msg {
        color: #b91c1c;
        font-weight: 600;
    }

/* ── Form actions bar ───────────────────────── */
.cu-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: #f8fafd;
    border-top: 1px solid #eef1f5;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
    .cu-section {
        padding: 20px 16px;
    }

    .cu-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .cu-requirements {
        grid-template-columns: 1fr;
    }

    .cu-context-strip {
        padding: 12px 16px;
    }
}
/* Admin nav group — superadmin only */
.nav-group-admin {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 2px solid rgba(201, 168, 76, 0.35);
}

.nav-parent-admin {
    color: var(--gold) !important;
}

.nav-dd-icon {
    font-size: 13px;
    margin-right: 4px;
    opacity: 0.85;
}

/* Super Admin badge in header */
.header-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    background: rgba(201, 168, 76, 0.18);
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}