body {
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

/* NAVBAR */
.custom-navbar {
    padding-top: 18px;
    padding-bottom: 18px;
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.95rem;
    margin-left: 10px;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

.custom-toggler {
    border-color: rgba(255,255,255,0.35);
}

.custom-toggler .navbar-toggler-icon {
    filter: invert(1);
}

/* GENERAL HEADINGS */
h1, h2, h3, h4 {
    color: #1f3b5b;
}

/* HERO */
.hero-section {
    background: linear-gradient(to bottom, #ffffff 0%, #eef3f9 100%);
    position: relative;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#d6dee8 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #6b7280;
    text-transform: uppercase;
}

.hero-text {
    font-size: 1.15rem;
    color: #4b5563;
    max-width: 850px;
    margin: 0 auto;
}

/* BUTTONS */
.btn-dark {
    background-color: #1f3b5b;
    border-color: #1f3b5b;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-dark:hover {
    background-color: #162c44;
}

.btn-outline-dark {
    color: #1f3b5b;
    border-color: #1f3b5b;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-dark:hover {
    background-color: #1f3b5b;
    color: #ffffff;
}

/* SECTIONS */
section {
    padding: 80px 0;
}

/* REMOVE TOP LINE COMPLETELY */
.border-top {
    border-top: none !important;
}

/* LIGHT CONTRAST BACKGROUND */
section.border-top {
    background-color: #f4f7fb;
}

/* CARDS */
.intro-box {
    background: #f3f7fc;
    padding: 35px 28px;
    border-radius: 16px;
    border: 1px solid #b8c6d8;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    transition: all 0.25s ease;
    height: 100%;
}

.intro-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.20);
    border-color: #9fb1c7;
}

.intro-box h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 700;
}

.intro-box p {
    color: #6b7280;
    font-size: 0.98rem;
    line-height: 1.6;
}

/* BOTTOM SECTION CARD */
.bottom-card {
    background: #f3f7fc;
    border: 1px solid #b8c6d8;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    padding: 60px 40px;
    max-width: 900px;
    margin: 0 auto;
    transition: all 0.25s ease;
}

.bottom-card:hover {
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.20);
}

/* PORTAL LAYOUT */
.portal-shell {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: 280px;
    background: #0f172a;
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 24px 20px 28px;
    border-right: 1px solid #1e293b;
}

.portal-brand h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.portal-brand p {
    color: rgba(255,255,255,0.7);
    margin: 8px 0 0;
    font-size: 0.92rem;
}

.portal-section-title {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 18px 0 10px;
    text-transform: uppercase;
}

.portal-sidebar a {
    display: block;
    color: rgba(255,255,255,0.86);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    text-decoration: none;
}

.portal-sidebar a:hover,
.portal-sidebar a.active {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.portal-main {
    margin-left: 280px;
    width: calc(100% - 280px);
}

.portal-topbar {
    background: #ffffff;
    padding: 22px 28px;
    border-bottom: 1px solid #d9e2ec;
}

.portal-content {
    padding: 28px;
}

.portal-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #d9e2ec;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.portal-highlight {
    background: #f3f7fc;
    border: 1px solid #b8c6d8;
}

.metric-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #d9e2ec;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    height: 100%;
}

.metric-label {
    font-size: 0.92rem;
    color: #64748b;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.referral-link-box {
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.95rem;
    word-break: break-all;
}

.table-wrap {
    overflow-x: auto;
}

.table thead th {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 700;
    border-bottom: 1px solid #d9e2ec;
}

.table td {
    vertical-align: middle;
}

.soft-note {
    color: #64748b;
    font-size: 0.95rem;
}

.resource-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #d9e2ec;
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.resource-title {
    font-weight: 700;
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.resource-actions a,
.resource-actions button {
    margin-right: 10px;
    margin-top: 8px;
}

/* FOOTER */
footer {
    background: #ffffff;
}

footer strong {
    color: #1f3b5b;
}

footer small,
footer a {
    color: #6b7280;
}

footer a:hover {
    color: #1f3b5b;
}

.footer-reg {
    margin-top: 15px;
    font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.6rem;
    }

    .portal-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .portal-main {
        margin-left: 0;
        width: 100%;
    }

    .portal-shell {
        display: block;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }

    section {
        padding: 60px 0;
    }

    .bottom-card {
        padding: 35px 20px;
    }
}

/* =========================
   UI POLISH ENHANCEMENTS
========================= */

/* Better spacing rhythm */
.portal-content {
    padding: 32px;
}

/* Improve topbar hierarchy */
.portal-topbar h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.portal-topbar p {
    color: #64748b;
    margin-bottom: 0;
}

/* Card polish */
.portal-card {
    border-radius: 18px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
}

/* Subtle hover lift */
.portal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

/* Metric cards feel tighter + modern */
.metric-card {
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

/* Stronger metric emphasis */
.metric-value {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

/* Section spacing consistency */
.portal-card + .portal-card {
    margin-top: 20px;
}

/* Tables cleaner */
.table thead th {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Badge consistency */
.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* Sidebar polish */
.portal-sidebar a {
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.portal-sidebar a:hover {
    padding-left: 16px;
}

/* Active nav stronger */
.portal-sidebar a.active {
    background: rgba(255,255,255,0.12);
    font-weight: 600;
}

/* Message cards refinement */
.portal-card h3 {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Soft note refinement */
.soft-note {
    font-size: 0.9rem;
    color: #64748b;
}

/* Better spacing for stacked content */
.d-flex.flex-column.gap-3 > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}