:root {
    --portal-primary: #0b4f8a;
    --portal-primary-dark: #07365f;
    --portal-secondary: #146c94;
    --portal-bg: #f4f7fb;
    --portal-border: #dce5ef;
    --portal-text: #1d2a39;
    --portal-muted: #68788a;
    --portal-white: #ffffff;
    --portal-success: #198754;
    --portal-danger: #dc3545;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    background: var(--portal-bg);
    color: var(--portal-text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


.portal-header {
    background: var(--portal-white);
    border-bottom: 1px solid var(--portal-border);
    box-shadow: 0 2px 12px rgba(16, 42, 67, 0.06);
}


.navbar {
    min-height: 76px;
}


.navbar-brand {
    color: var(--portal-primary);
    text-decoration: none;
}


.navbar-brand:hover {
    color: var(--portal-primary-dark);
}


.navbar-brand strong {
    display: block;
    font-size: 1.14rem;
    line-height: 1.1;
}


.navbar-brand small {
    display: block;
    color: var(--portal-muted);
    font-size: 0.88rem;
    margin-top: 2px;
}


.brand-mark {
    width: auto;
    height: 65px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf3fb;
    color: var(--portal-primary);
    border-radius: 10px;
    font-size: 1.25rem;
}


.nav-link {
    color: #435466;
    font-weight: 500;
}


.nav-link:hover,
.nav-link.active {
    color: var(--portal-primary);
}


.portal-main {
    min-height: calc(100vh - 150px);
}


.portal-footer {
    background: #102a43;
    color: #dce7f1;
    padding: 28px 0;
    margin-top: 50px;
}


.footer-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}


.footer-meta {
    font-weight: 600;
    color: #ffffff;
}


.footer-version {
    color: #9db2c6;
    font-size: 0.82rem;
    margin-top: 3px;
}


.portal-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(16, 42, 67, 0.06);
}


.portal-card-header {
    padding: 11px 17px;
    border-bottom: 1px solid var(--portal-border);
}


.portal-card-body {
    padding: 20px;
}


.page-heading {
    font-weight: 700;
    color: #17324d;
}


.page-subtitle {
    color: var(--portal-muted);
}


.form-label {
    font-weight: 600;
    color: #34495e;
}


.form-control,
.form-select {
    min-height: 36px;
    border-color: #cfdbe7;
    border-radius: 8px;
}


.form-control:focus,
.form-select:focus {
    border-color: #6ea8d4;
    box-shadow: 0 0 0 0.2rem rgba(11, 79, 138, 0.12);
}


.btn-primary {
    --bs-btn-bg: var(--portal-primary);
    --bs-btn-border-color: var(--portal-primary);
    --bs-btn-hover-bg: var(--portal-primary-dark);
    --bs-btn-hover-border-color: var(--portal-primary-dark);
}


.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #17324d;
    margin-bottom: 8px;
}


.section-title i {
    color: var(--portal-primary);
}


.password-wrapper {
    position: relative;
}


.password-wrapper .form-control {
    padding-right: 48px;
}


.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 46px;
    border: 0;
    background: transparent;
    color: #6b7d8e;
}


.password-toggle:hover {
    color: var(--portal-primary);
}


.dashboard-hero {
    background:
        linear-gradient(
            135deg,
            #0b4f8a,
            #146c94
        );
    color: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(11, 79, 138, 0.18);
}


.dashboard-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.8;
}


.dashboard-hero h1 {
    font-weight: 700;
    margin: 6px 0;
}


.dashboard-hero p {
    opacity: 0.88;
    margin-bottom: 0;
}


.stat-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 15px;
    padding: 22px;
    height: 100%;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.08);
}


.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: #eaf3fb;
    color: var(--portal-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}


.stat-label {
    color: var(--portal-muted);
    font-size: 0.9rem;
    margin-top: 9px;
}


.stat-value {
    font-size: 1.75rem;
    font-weight: 750;
    color: #17324d;
}


@media (max-width: 767.98px) {

    .navbar {
        min-height: 68px;
    }

    .brand-mark {
        width: auto;
        height: 50px;
    }

    .portal-card-body {
        padding: 18px;
    }

    .dashboard-hero {
        padding: 24px;
        border-radius: 14px;
    }

    .portal-footer {
        text-align: center;
    }
}

.candidate-subject-table {
    font-size: 0.84rem;
    min-width: 820px;
}

.candidate-subject-table th,
.candidate-subject-table td {
    padding: 0.45rem 0.4rem;
    vertical-align: middle;
}

.candidate-subject-table thead th {
    background: #f4f7fb;
    color: #23384d;
    font-weight: 700;
}

.candidate-subject-table .subject-header {
    min-width: 120px;
}

.candidate-subject-table small {
    font-weight: 500;
    color: #657789;
}

.subject-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.subject-required-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: #edf7f0;
    color: #198754;
    font-weight: 700;
    font-size: 0.78rem;
}

.subject-mark-input {
    min-width: 65px;
    max-width: 80px;
    margin: auto;
    text-align: center;
}

.subject-note {
    background: #fff8e6;
    border: 1px solid #f1dfaa;
    border-radius: 8px;
    padding: 10px 12px;
    color: #665d45;
    font-size: 0.82rem;
}

@media (max-width: 767.98px) {

    .candidate-subject-table {
        font-size: 0.76rem;
    }

    .candidate-subject-table th,
    .candidate-subject-table td {
        padding: 0.35rem 0.25rem;
    }

}