:root {
    --navy: #11284c;
    --navy-deep: #09162e;
    --white: #ffffff;
    --grey-50: #f5f7fb;
    --grey-100: #e8edf4;
    --grey-300: #c1cbda;
    --grey-600: #5f6c80;
    --grey-800: #253041;
    --gold: #c7a55b;
    --gold-soft: rgba(199, 165, 91, 0.18);
    --shadow: 0 28px 70px rgba(9, 22, 46, 0.14);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef2f8 100%);
    color: var(--grey-800);
    line-height: 1.7;
}
body.menu-open {
    overflow: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin-top: 0; color: var(--navy-deep); }
h1, h2 { font-family: "Fraunces", serif; }
p { margin: 0 0 1rem; }

.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(860px, 100%); }
.section { padding: 5rem 0; }
.alt-bg { background: rgba(255,255,255,0.65); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; font-weight: 800; color: var(--gold); margin-bottom: 1rem; }
.muted { color: var(--grey-600); }
.public-alert-wrap { padding-top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(17, 40, 76, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--white);
}
.brand strong { display: block; font-size: 1rem; }
.brand small { color: rgba(255,255,255,0.7); }
.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--navy);
    background: linear-gradient(135deg, #f9ebca, var(--gold));
}
.mobile-menu-button {
    display: none;
    border: 1px solid rgba(255,255,255,0.18);
    background: transparent;
    color: var(--white);
    border-radius: 999px;
    padding: 0.75rem 1rem;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.menu-level {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.2rem;
}
.menu-level li {
    position: relative;
}
.menu-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.menu-level a,
.menu-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    font-size: 0.94rem;
    color: var(--white);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.menu-label-button {
    cursor: default;
}
.menu-submenu-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
}
.menu-level > li:hover > a,
.menu-level > li:hover > .menu-toggle-label,
.menu-level > li:hover > .menu-item-row > a,
.menu-level > li:hover > .menu-item-row > .menu-label-button,
.menu-level > li:hover > .menu-item-row > .menu-submenu-toggle {
    background: rgba(255,255,255,0.1);
}
.menu-depth-1,
.menu-depth-2,
.menu-depth-3 {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 260px;
    display: none;
    flex-direction: column;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.menu-depth-1 a,
.menu-depth-1 .menu-toggle-label,
.menu-depth-2 a,
.menu-depth-2 .menu-toggle-label,
.menu-depth-3 a,
.menu-depth-3 .menu-toggle-label {
    color: var(--grey-800);
    border-radius: 12px;
    justify-content: space-between;
    width: 100%;
}
.menu-depth-2,
.menu-depth-3 { left: calc(100% + 0.25rem); top: 0; }
.has-children:hover > .menu-level { display: flex; }
.nav-actions { display: flex; gap: 0.75rem; margin-left: 0.5rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    background: linear-gradient(135deg, var(--gold), #f0ddb0);
    color: var(--navy-deep);
    font-weight: 800;
    border: 0;
    cursor: pointer;
}
.button-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.22);
}
.button-danger {
    background: #d55656;
    color: var(--white);
}
.button-dark {
    color: var(--navy);
    border-color: var(--grey-300);
}
.button-full { width: 100%; }

.hero, .page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at top right, rgba(199, 165, 91, 0.28), transparent 30%),
        linear-gradient(135deg, var(--navy) 0%, #1c3a67 55%, #0c1b37 100%);
}
.hero { padding: 6.5rem 0 5rem; }
.page-hero { padding: 5rem 0 4rem; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}
.hero h1, .page-hero h1 { color: var(--white); font-size: clamp(2.8rem, 6vw, 5rem); margin-bottom: 1.2rem; }
.hero-copy { font-size: 1.08rem; color: rgba(255,255,255,0.82); max-width: 56rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 2rem; }
.hero-stats, .result-grid, .mini-grid, .card-grid, .dashboard-cards, .dashboard-grid, .contact-grid, .emi-grid, .footer-grid { display: grid; gap: 1rem; }
.hero-stats { grid-template-columns: repeat(3, 1fr); }
.hero-stats article, .metric-card, .testimonial-card, .info-card, .profile-card, .flash-card {
    padding: 1.3rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
}
.hero-stats strong, .metric-card strong { display: block; font-size: 2rem; }
.glass-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.hero-panel { color: var(--grey-800); }
.mini-grid { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.mini-grid span, .pill, .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    background: var(--grey-50);
    color: var(--navy);
    font-weight: 700;
}
.section-heading { margin-bottom: 1.75rem; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); }
.flash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.flash-card, .info-card, .profile-card, .testimonial-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 250ms ease, box-shadow 250ms ease;
}
.flash-card:hover, .info-card:hover, .profile-card:hover, .testimonial-card:hover {
    transform: translateY(-8px) rotate(-0.3deg);
    box-shadow: 0 35px 90px rgba(9, 22, 46, 0.16);
}
.animated-flash-card {
    perspective: 1200px;
    min-height: 290px;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.flash-card-inner {
    position: relative;
    min-height: 290px;
    transform-style: preserve-3d;
    transition: transform 700ms cubic-bezier(.2,.8,.2,1), box-shadow 300ms ease;
}
.animated-flash-card:hover .flash-card-inner {
    transform: rotateY(180deg) translateY(-8px);
}
.flash-card-face {
    position: absolute;
    inset: 0;
    padding: 1.35rem;
    border-radius: var(--radius-sm);
    background:
        radial-gradient(circle at top right, rgba(199, 165, 91, 0.18), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--grey-100);
    box-shadow: var(--shadow);
    backface-visibility: hidden;
}
.flash-card-back {
    transform: rotateY(180deg);
    background:
        radial-gradient(circle at top right, rgba(199, 165, 91, 0.25), transparent 35%),
        linear-gradient(135deg, var(--navy) 0%, #1f4477 100%);
    color: var(--white);
}
.flash-card-back h3,
.flash-card-back a,
.flash-card-back p { color: var(--white); }
.flash-hint {
    display: inline-block;
    margin-top: 1rem;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.card-grid { grid-template-columns: repeat(3, 1fr); }
.partners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.profile-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--navy), #244a83);
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
}
.prose { max-width: 900px; }
.prose section { margin-bottom: 2.5rem; }
.prose h2, .prose h3 { margin-bottom: 1rem; }
.pill-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.inline-highlight-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.contact-grid, .emi-grid, .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
.contact-form, .stacked-form, .emi-form, .auth-card {
    display: grid;
    gap: 1rem;
}
label { display: grid; gap: 0.45rem; font-weight: 700; }
input, textarea, select {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--grey-300);
    background: var(--white);
    font: inherit;
    color: var(--grey-800);
}
textarea { resize: vertical; }
.chart-bar {
    display: flex;
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    margin: 1.2rem 0;
    background: var(--grey-100);
}
.chart-principal { background: var(--navy); }
.chart-interest { background: var(--gold); }

.auth-page { min-height: calc(100vh - 180px); display: grid; align-items: center; }
.auth-wrapper { max-width: 540px; }
.cta-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.dashboard-body {
    background: linear-gradient(180deg, #eef2f8 0%, #f6f8fc 100%);
}
.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}
.dashboard-sidebar {
    padding: 2rem;
    background: linear-gradient(180deg, var(--navy-deep), var(--navy));
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dashboard-brand {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--white);
}
.dashboard-brand span:first-child {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--gold), #f6e5bb);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-weight: 800;
}
.dashboard-nav { display: grid; gap: 0.55rem; }
.dashboard-nav a {
    color: rgba(255,255,255,0.86);
    padding: 0.9rem 1rem;
    border-radius: 14px;
}
.dashboard-nav a:hover { background: rgba(255,255,255,0.09); color: var(--white); }
.dashboard-main { padding: 2rem; }
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dashboard-user {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.dashboard-cards { grid-template-columns: repeat(4, 1fr); margin-bottom: 1.5rem; }
.metric-card {
    background: var(--white);
    border: 1px solid var(--grey-100);
    box-shadow: var(--shadow);
}
.dashboard-table, .glass-card {
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}
th, td {
    text-align: left;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--grey-100);
    vertical-align: top;
}
th { color: var(--navy); background: var(--grey-50); }
.employee-list { display: grid; gap: 1rem; }
.employee-card {
    padding: 1rem;
    border-radius: 16px;
    background: var(--grey-50);
    border: 1px solid var(--grey-100);
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
}
.checkbox-line input {
    width: auto;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: end;
}
.alert {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 700;
}
.alert.success { background: #e7f7ee; color: #1d6d43; }
.alert.error { background: #fdebec; color: #a43c47; }

.site-footer {
    padding: 3rem 0 2rem;
    background: var(--navy-deep);
    color: rgba(255,255,255,0.78);
}
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
.footer-grid h3 { color: var(--white); }
.footer-grid a { display: block; margin-bottom: 0.5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1rem;
}
.alerts-stack {
    display: grid;
    gap: 1.25rem;
}
.alert-panel {
    display: grid;
    gap: 1rem;
}
.alert-link-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: var(--grey-50);
    border: 1px solid var(--grey-100);
    transition: transform 220ms ease, box-shadow 220ms ease;
}
.alert-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.alert-link-card small {
    color: var(--grey-600);
}
.alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.alert-actions a {
    color: var(--navy);
    font-weight: 800;
}

@media (max-width: 1200px) {
    .menu-level > li > a,
    .menu-level > li > .menu-toggle-label { padding-inline: 0.75rem; font-size: 0.86rem; }
}

@media (max-width: 1024px) {
    .hero-grid, .contact-grid, .emi-grid, .dashboard-grid, .footer-grid, .card-grid, .partners-grid, .flash-grid {
        grid-template-columns: 1fr;
    }
    .cta-strip { flex-direction: column; align-items: flex-start; }
    .dashboard-shell { grid-template-columns: 1fr; }
    .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
    .filter-grid { grid-template-columns: repeat(2, 1fr); }
    .site-nav {
        display: none;
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + 0.8rem);
        flex-direction: column;
        align-items: stretch;
        background: var(--navy);
        border-radius: 24px;
        padding: 1rem;
        box-shadow: var(--shadow);
        max-height: calc(100vh - 120px);
        overflow: auto;
    }
    .site-nav.is-open { display: flex; }
    .menu-level {
        flex-direction: column;
        width: 100%;
        gap: 0.45rem;
    }
    .menu-depth-1, .menu-depth-2, .menu-depth-3 {
        position: static;
        display: none;
        min-width: auto;
        box-shadow: none;
        background: rgba(255,255,255,0.06);
        margin-left: 0.5rem;
        margin-top: 0.35rem;
        padding: 0.75rem;
        border-radius: 18px;
    }
    .has-children.open > .menu-level {
        display: flex;
    }
    .menu-depth-1 a, .menu-depth-2 a, .menu-depth-3 a,
    .menu-depth-1 .menu-toggle-label, .menu-depth-2 .menu-toggle-label, .menu-depth-3 .menu-toggle-label {
        color: var(--white);
    }
    .menu-level a,
    .menu-toggle-label,
    .menu-item-row > a {
        width: 100%;
        justify-content: space-between;
    }
    .nav-actions { flex-direction: column; margin-left: 0; }
    .mobile-menu-button { display: inline-flex; }
}

@media (max-width: 720px) {
    .hero { padding-top: 5rem; }
    .hero-stats, .dashboard-cards, .filter-grid { grid-template-columns: 1fr; }
    .dashboard-main { padding: 1rem; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
}
