:root {
    --ep-navy: #0c2943;
    --ep-navy-2: #123d5c;
    --ep-teal: #087f78;
    --ep-teal-dark: #05645f;
    --ep-gold: #e6ad3a;
    --ep-ink: #162433;
    --ep-muted: #637182;
    --ep-bg: #f4f7f9;
    --ep-border: #dce5ea;
    --bs-primary: #087f78;
    --bs-primary-rgb: 8, 127, 120;
    --bs-success: #157347;
    --bs-success-rgb: 21, 115, 71;
    --bs-body-color: #162433;
    --bs-body-font-family: Inter, "Segoe UI", Arial, sans-serif;
    --bs-border-radius: .7rem;
    --bs-border-radius-lg: .9rem;
}

.payment-instructions {
    background: #f7fafc;
    border: 1px solid #dce6ef;
    border-radius: 1rem;
    padding: 1.25rem;
}

.payment-instructions img {
    object-fit: contain;
    width: 100%;
}

@media (max-width: 575.98px) {
    .admin-panel .table-responsive {
        border-radius: 0 0 1rem 1rem;
    }

    .stat-card strong {
        overflow-wrap: anywhere;
    }
}

@media print {
    body > header,
    body > nav,
    body > footer,
    .mobile-bottom-nav,
    #receipt + .d-flex {
        display: none !important;
    }

    #receipt {
        border: 0 !important;
        box-shadow: none !important;
    }
}

html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { max-width: 100%; overflow-x: hidden; background: var(--ep-bg); color: var(--ep-ink); }
.btn-primary {
    --bs-btn-bg: var(--ep-teal);
    --bs-btn-border-color: var(--ep-teal);
    --bs-btn-hover-bg: var(--ep-teal-dark);
    --bs-btn-hover-border-color: var(--ep-teal-dark);
    --bs-btn-active-bg: var(--ep-teal-dark);
    --bs-btn-active-border-color: var(--ep-teal-dark);
    font-weight: 700;
    letter-spacing: .01em;
}
.text-primary { color: var(--ep-teal) !important; }
a { color: var(--ep-teal); }
a:hover { color: var(--ep-teal-dark); }

.app-navbar {
    background: rgba(9, 36, 58, .98);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    min-height: 78px;
}
.navbar-brand small {
    display: block;
    color: rgba(255, 255, 255, .68);
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .035em;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ep-gold), #f1c767);
    color: var(--ep-navy);
    font-size: .95rem;
    font-weight: 900;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .16);
}
.brand-mark.large { width: 58px; height: 58px; border-radius: 17px; font-size: 1.2rem; }

.official-branding {
    border-bottom: 1px solid var(--ep-border);
    background: #fff;
}
.partner-logos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.75rem, 3vw, 2.5rem);
    align-items: start;
    max-width: 760px;
    margin-inline: auto;
}
.partner-logo {
    min-width: 0;
    margin: 0;
}
.partner-logo img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: 96px;
    margin-inline: auto;
    background: #fff;
    object-fit: contain;
}
.partner-logo figcaption {
    max-width: 190px;
    margin: .55rem auto 0;
    color: var(--ep-muted);
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.official-kicker {
    color: var(--ep-teal);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.official-program-title {
    margin: 0;
    color: var(--ep-navy);
    font-size: clamp(1.65rem, 4vw, 2.6rem);
    font-weight: 850;
    letter-spacing: -.025em;
    text-transform: uppercase;
}
.official-program-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    max-width: 900px;
    margin-inline: auto;
}
.official-program-meta > div {
    padding: .85rem 1rem;
    border: 1px solid var(--ep-border);
    border-radius: .8rem;
    background: #f7fafb;
}
.official-program-meta .official-organiser { grid-column: 1 / -1; }
.official-program-meta dt {
    color: var(--ep-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.official-program-meta dd {
    margin: .2rem 0 0;
    font-weight: 700;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 30%, rgba(11, 158, 148, .22), transparent 34%),
        linear-gradient(135deg, var(--ep-navy) 0%, var(--ep-navy-2) 100%);
    color: #fff;
}
.hero-section::after {
    position: absolute;
    right: -10%;
    bottom: -160px;
    width: 430px;
    height: 430px;
    border: 55px solid rgba(255, 255, 255, .035);
    border-radius: 50%;
    content: "";
}
.py-lg-6 { padding-top: 5.5rem !important; padding-bottom: 5.5rem !important; }
.hero-section h1, .hero-section h2 { max-width: 780px; letter-spacing: -.04em; }
.hero-section h1 span, .hero-section h2 span { color: #7be0d8; }
.hero-section .lead { max-width: 690px; color: rgba(255, 255, 255, .74); }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-emblem {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 230px;
    height: 230px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 20px rgba(255, 255, 255, .025);
    backdrop-filter: blur(4px);
}
.hero-emblem span { font-size: 3.8rem; font-weight: 900; color: var(--ep-gold); line-height: 1; }
.hero-emblem small { position: absolute; bottom: 50px; color: rgba(255, 255, 255, .7); letter-spacing: .08em; }

.program-section { background: #f7f9fb; }
.program-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ep-border);
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 16px 50px rgba(13, 41, 64, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}
.program-card:hover { transform: translateY(-3px); box-shadow: 0 20px 55px rgba(13, 41, 64, .12); }
.program-card-accent { height: 7px; background: linear-gradient(90deg, var(--ep-teal), #30afa6, var(--ep-gold)); }
.program-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: #fff; background: var(--ep-navy); font-size: 1.25rem; font-weight: 900; }
.letter-spacing { letter-spacing: .1em; }
.program-meta { padding: 1rem; border: 1px solid var(--ep-border); border-radius: .85rem; background: #f8fafb; }
.program-meta dt { color: var(--ep-muted); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
.program-meta dd { margin: .2rem 0 0; font-weight: 650; }
.empty-state { border: 1px dashed #b8c7d1; border-radius: 1rem; background: #fff; }
.empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: var(--ep-teal); font-weight: 800; }

.form-hero { color: #fff; background: linear-gradient(120deg, var(--ep-navy), #145c68); }
.back-link { color: rgba(255, 255, 255, .8); font-size: .9rem; font-weight: 650; text-decoration: none; }
.back-link:hover { color: #fff; }
.registration-form { max-width: 920px; margin-inline: auto; }
.form-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--ep-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 30px rgba(13, 41, 64, .055);
}
.form-section legend { float: none; width: auto; margin-bottom: 1.4rem; font-size: 1.15rem; font-weight: 750; }
.form-section legend span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: .45rem; border-radius: 9px; color: #fff; background: var(--ep-teal); font-size: .85rem; }
.form-label { font-weight: 650; }
.form-label span { color: #b42318; }
.form-control, .form-select { border-color: #bdcbd4; }
.form-control:focus, .form-select:focus { border-color: var(--ep-teal); box-shadow: 0 0 0 .22rem rgba(8, 127, 120, .14); }
.privacy-note { padding: 1rem 1.1rem; border-radius: .8rem; background: #eaf6f4; color: #244b49; }

.success-card, .login-card {
    max-width: 620px;
    padding: 2rem;
    border: 1px solid var(--ep-border);
    border-radius: 1.2rem;
    background: #fff;
    box-shadow: 0 22px 65px rgba(12, 41, 67, .12);
}
.login-card { max-width: 460px; }
.success-check { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 1.2rem; border-radius: 50%; color: #fff; background: #188c5a; font-size: 2rem; box-shadow: 0 10px 25px rgba(24, 140, 90, .25); }
.reference-box { padding: 1.1rem; border: 1px dashed #8ab8b3; border-radius: .9rem; background: #f0faf8; }
.reference-box small { display: block; color: var(--ep-muted); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.reference-box strong { display: block; margin-top: .3rem; color: var(--ep-navy); font-family: Consolas, monospace; font-size: clamp(1.35rem, 4vw, 2rem); letter-spacing: .06em; }
.success-details { border-top: 1px solid var(--ep-border); }
.success-details div { display: grid; grid-template-columns: minmax(90px, .35fr) 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--ep-border); }
.success-details dt { color: var(--ep-muted); }
.success-details dd { margin: 0; font-weight: 650; }
.login-page { background: radial-gradient(circle at 15% 15%, #d5efec, transparent 28%), linear-gradient(145deg, #eff5f7, #dfe8ed); }

.app-footer { margin-top: auto; color: #d2dce4; background: #091f31; }
.skip-link { position: fixed; z-index: 1100; left: 1rem; top: 1rem; padding: .6rem 1rem; border-radius: .4rem; background: #fff; }

.admin-body { min-height: 100vh; background: #f3f6f8; }
.admin-navbar { background: var(--ep-navy); }
.admin-navbar .navbar-brand { margin-right: 2rem; }
.admin-navbar .nav-link { padding-inline: .85rem !important; }
.admin-navbar .nav-link.active { color: #fff; font-weight: 700; }
.stat-card { height: 100%; padding: 1.25rem; border: 1px solid var(--ep-border); border-radius: .9rem; background: #fff; box-shadow: 0 5px 18px rgba(13, 41, 64, .04); }
.stat-card small { display: block; color: var(--ep-muted); font-weight: 650; }
.stat-card strong { display: block; margin-top: .25rem; color: var(--ep-navy); font-size: 2rem; line-height: 1.15; }
.admin-panel { overflow: hidden; border: 1px solid var(--ep-border); border-radius: .9rem; background: #fff; box-shadow: 0 7px 24px rgba(13, 41, 64, .05); }
.panel-heading { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--ep-border); }
.admin-panel .table > :not(caption) > * > * { padding: 1rem 1.2rem; }
.admin-panel thead th { color: var(--ep-muted); background: #f7f9fa; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.session-item + .session-item { border-top: 1px solid var(--ep-border); }
.registration-table td { min-width: 175px; }

@media (max-width: 767.98px) {
    .app-navbar { min-height: 68px; }
    .app-navbar .container { flex-wrap: nowrap; gap: .75rem; }
    .app-navbar .navbar-brand { min-width: 0; margin-right: 0; }
    .app-navbar .btn { flex: none; font-size: .75rem; }
    .navbar-brand small { display: none; }
    .hero-section h1, .hero-section h2 { font-size: 2.35rem; }
    .py-lg-6 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
    .program-card .p-md-5 { padding: 1.35rem !important; }
    .form-section { padding: 1.1rem; }
    .success-card, .login-card { padding: 1.35rem; }
    .admin-panel .table > :not(caption) > * > * { padding: .8rem; }
}

@media (max-width: 575.98px) {
    .form-preview-frame { padding: .75rem; }
    .form-preview-card { padding: 1rem; }
    .address-grid > [class*="col-"] { width: 100%; }
    .partner-logos { gap: .45rem; }
    .partner-logo img { height: 66px; max-width: 96px; }
    .partner-logo figcaption { padding-inline: .2rem; font-size: .55rem; }
    .official-program-meta { grid-template-columns: minmax(0, 1fr); }
    .official-program-meta .official-organiser { grid-column: auto; }
}

@media print {
    .app-navbar, .app-footer, .btn { display: none !important; }
    body { background: #fff; }
    .success-card { border: 0; box-shadow: none; }
}

/* Portal UI v1.2 */
.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 82px;
    color: var(--portal-header-text, #fff);
    background: linear-gradient(110deg, var(--portal-header-bg, #123d70) 0%, #0d5e9e 100%);
    border-bottom: 4px solid var(--ep-gold);
    box-shadow: 0 8px 28px rgba(8, 35, 61, .18);
}
.public-navbar-container { width: 100%; min-width: 0; gap: .85rem; }
.portal-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .8rem;
    color: var(--portal-header-text, #fff);
    text-decoration: none;
}
.portal-brand:hover { color: var(--portal-header-text, #fff); }
.portal-brand-logo {
    display: block;
    flex: none;
    width: 72px;
    height: 58px;
    padding: 2px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}
.portal-brand-copy { display: block; min-width: 0; line-height: 1.15; }
.portal-brand-copy strong { display: block; max-width: 23rem; font-size: 1.08rem; line-height: 1.16; letter-spacing: .02em; text-transform: uppercase; white-space: normal; }
.portal-brand-copy small, .portal-brand-caption { display: block; margin-top: .18rem; color: color-mix(in srgb, var(--portal-header-text, #fff) 76%, transparent); font-size: .66rem; white-space: normal; }
.portal-brand-caption { font-size: .55rem; letter-spacing: .025em; }
.public-navbar-collapse .nav-link { color: color-mix(in srgb, var(--portal-header-text, #fff) 82%, transparent); font-size: .86rem; font-weight: 700; }
.public-navbar-collapse .nav-link:hover, .public-navbar-collapse .nav-link:focus { color: var(--portal-header-text, #fff); }
.public-header-actions { display: flex; min-width: 0; flex: none; align-items: center; gap: .5rem; }
.public-header-actions form { margin: 0; }
.public-login-button { min-height: 42px; padding-inline: .85rem; border-color: color-mix(in srgb, var(--portal-header-text, #fff) 68%, transparent); color: var(--portal-header-text, #fff); font-weight: 750; white-space: nowrap; }
.header-action-short { display: none; }
.public-menu-toggle { min-height: 44px; align-items: center; gap: .35rem; padding: .42rem .6rem; border-color: color-mix(in srgb, var(--portal-header-text, #fff) 58%, transparent); color: var(--portal-header-text, #fff); font-size: .75rem; font-weight: 750; }

.portal-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: clamp(300px, 58vw, 620px);
    align-items: end;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 78% 20%, rgba(49, 190, 205, .32), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(230, 173, 58, .17), transparent 30%),
        linear-gradient(135deg, #0a2c50 0%, #0d5677 100%);
}
.portal-hero::before, .portal-hero::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    content: "";
}
.portal-hero::before { top: -120px; right: -80px; width: 390px; height: 390px; }
.portal-hero::after { top: -45px; right: 28px; width: 240px; height: 240px; }
.portal-hero-image { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
.portal-hero-overlay { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(4, 24, 44, .94) 0%, rgba(4, 34, 58, .74) 54%, rgba(4, 34, 58, .28) 100%); }
.portal-hero-content { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.portal-kicker { margin: 0 0 .8rem; color: #f4c85a; font-size: .75rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.portal-hero h1 { max-width: 850px; margin: 0; color: #fff; font-size: clamp(2.25rem, 6vw, 4.9rem); font-weight: 850; line-height: 1.03; letter-spacing: -.05em; text-wrap: balance; }
.portal-hero-content > p:not(.portal-kicker) { max-width: 680px; margin: 1.2rem 0 0; color: rgba(255, 255, 255, .82); font-size: clamp(1rem, 2vw, 1.18rem); }
.portal-hero-cta { min-height: 48px; margin-top: 1.5rem; padding: .72rem 1.1rem; border: 1px solid #f2cc6d; border-radius: 999px; color: #0b2d4e; background: #edbd4b; font-weight: 850; }
.portal-hero-cta:hover { color: #08243e; background: #ffd66f; }

.official-program-title span { color: var(--ep-teal); }
.program-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-top: 1.15rem; border-top: 5px solid var(--ep-gold); }
.program-card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.program-card { display: flex; min-width: 0; flex-direction: column; }
.program-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #dfeaf0; }
.program-card-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.program-card-media.is-fallback { display: grid; place-items: center; background: radial-gradient(circle at 75% 22%, rgba(230, 173, 58, .35), transparent 27%), linear-gradient(135deg, #e8f3f6, #c8e5e5); }
.program-card-media.is-fallback::before { position: absolute; inset: 12% auto auto 8%; width: 55%; height: 55%; border: 1px solid rgba(12, 75, 91, .15); border-radius: 50%; content: ""; }
.program-card-media > img.program-card-logo { position: relative; width: 66%; height: 70%; object-fit: contain; filter: drop-shadow(0 7px 12px rgba(14, 49, 69, .12)); }
.program-card-media > span:not(.program-status) { color: var(--ep-navy); font-size: 2rem; font-weight: 900; }
.program-status { position: absolute; top: .65rem; right: .65rem; max-width: calc(100% - 1.3rem); padding: .5rem .65rem; font-size: .68rem; white-space: normal; }
.program-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.2rem; }
.program-card-kicker { margin: 0 0 .35rem; color: var(--ep-teal); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.program-card-body h3 { margin: 0; color: var(--ep-navy); font-size: 1.18rem; line-height: 1.25; }
.program-card-date { margin: 1rem 0 .2rem; color: #354f62; font-size: .86rem; font-weight: 700; }
.program-card-location { min-height: 2.7em; margin: 0 0 1rem; color: var(--ep-muted); font-size: .82rem; }
.program-card-body .btn { margin-top: auto; min-height: 44px; }

.mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: .38rem max(.25rem, env(safe-area-inset-right)) calc(.32rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-left));
    border-top: 1px solid #d8e1e6;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -10px 30px rgba(13, 41, 64, .12);
    backdrop-filter: blur(14px);
}
.mobile-bottom-nav a { display: flex; min-width: 0; min-height: 58px; align-items: center; justify-content: center; flex-direction: column; gap: .2rem; padding: .2rem .08rem; color: #657482; text-decoration: none; }
.mobile-bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-bottom-nav span { max-width: 100%; font-size: clamp(.54rem, 2.35vw, .68rem); line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.mobile-bottom-nav a[aria-current="page"] { color: #ad7415; font-weight: 800; }
.mobile-bottom-nav a[aria-current="page"] svg { stroke-width: 2.3; }
.app-footer { padding-bottom: calc(5.7rem + env(safe-area-inset-bottom)) !important; }

.login-brand-logo { display: block; width: 110px; height: 84px; object-fit: contain; }
.settings-jump-nav { display: flex; flex-wrap: wrap; gap: .55rem; }
.settings-jump-nav a { padding: .55rem .8rem; border: 1px solid #b9cbd6; border-radius: 999px; background: #fff; color: var(--ep-navy); text-decoration: none; font-size: .82rem; font-weight: 750; }
.settings-section { scroll-margin-top: 100px; }
.settings-subsection { padding: 1.2rem; border: 1px solid var(--ep-border); border-radius: .9rem; background: #f8fafb; }
.asset-editor { padding: 1rem; border: 1px solid var(--ep-border); border-radius: .85rem; background: #fff; }
.col-xxl-4 > .asset-editor { height: 100%; }
.asset-preview { display: grid; min-height: 130px; place-items: center; margin-bottom: 1rem; overflow: hidden; border-radius: .65rem; background: #f1f5f7; }
.asset-preview img { display: block; width: 100%; height: 130px; object-fit: contain; }
.asset-preview-small { min-height: 78px; }
.asset-preview-small img { height: 78px; }
.asset-placeholder { display: grid; min-height: 78px; place-items: center; color: var(--ep-muted); font-size: .8rem; }
.asset-fields { min-width: 0; }
.hero-preview-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .34fr); gap: .75rem; align-items: end; }
.hero-preview-pair small { display: block; margin-bottom: .35rem; color: var(--ep-muted); font-size: .7rem; font-weight: 750; text-transform: uppercase; }
.hero-upload-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--ep-border); border-radius: .85rem; background: #e9f1f4; }
.hero-upload-preview.is-mobile { aspect-ratio: 9 / 16; max-height: 260px; }
.hero-upload-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-preview-copy { position: absolute; right: 0; bottom: 0; left: 0; padding: .65rem; color: #fff; background: linear-gradient(transparent, rgba(5, 29, 49, .9)); font-size: clamp(.55rem, 1.4vw, .8rem); line-height: 1.2; }
.hero-fallback-mini { display: grid; width: 100%; height: 100%; min-height: 180px; place-items: center; color: #dcebf4; background: radial-gradient(circle at 75% 20%, #2e8195, transparent 28%), linear-gradient(135deg, #0a2c50, #0d5677); font-weight: 800; }
.settings-master-switch { padding: 1rem 1rem 1rem 3.25rem; border: 1px solid #b9d7d4; border-radius: .75rem; background: #edf8f7; }
.settings-master-switch small { display: block; margin-top: .2rem; color: var(--ep-muted); }

@media (min-width: 390px) {
    .program-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .program-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
    .program-card-body { padding: 1.35rem; }
}
@media (min-width: 992px) {
    .program-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mobile-bottom-nav { display: none; }
    .app-footer { padding-bottom: 1.5rem !important; }
    .public-menu-toggle { display: none; }
}
@media (max-width: 991.98px) {
    .app-navbar { min-height: 72px; }
    .app-navbar .public-navbar-container { flex-wrap: wrap; gap: .55rem; }
    .portal-brand { flex: 1 1 140px; margin-right: auto; }
    .portal-brand-logo { width: 50px; height: 44px; }
    .portal-brand-copy strong { max-width: 13rem; font-size: .9rem; }
    .portal-brand-copy small { font-size: .58rem; }
    .portal-brand-caption { display: none; }
    .public-header-actions { margin-left: auto; }
    .public-login-button { min-height: 42px; padding: .45rem .6rem; font-size: .7rem; }
    .public-menu-toggle { display: inline-flex; }
    .public-navbar-collapse { order: 4; width: 100%; padding: .55rem 0 .35rem; border-top: 1px solid rgba(255, 255, 255, .16); }
    .public-navbar-collapse .nav-link { min-height: 44px; padding: .65rem .8rem; border-radius: .55rem; }
    .public-navbar-collapse .nav-link:hover { background: rgba(255, 255, 255, .1); }
    .portal-hero-overlay { background: linear-gradient(180deg, rgba(4, 28, 49, .46), rgba(4, 27, 48, .94)); }
    .program-section-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) {
    .app-navbar .public-navbar-container { padding-inline: .75rem; }
    .portal-brand { gap: .5rem; }
    .portal-brand-copy strong { max-width: 9rem; font-size: .72rem; line-height: 1.18; }
    .portal-brand-copy small { font-size: .52rem; line-height: 1.2; }
    .portal-hero { min-height: 300px; }
    .portal-hero-content { padding: 2.6rem 1rem 2.4rem; }
    .portal-hero h1 { font-size: clamp(1.9rem, 9.5vw, 2.65rem); }
    .portal-hero-content > p:not(.portal-kicker) { margin-top: .8rem; font-size: .9rem; }
    .portal-hero-cta { min-height: 44px; margin-top: 1rem; padding-block: .6rem; }
    .program-card-media { aspect-ratio: 4 / 3; }
    .official-branding .container { padding-inline: .75rem; }
    .program-card-body { padding: .95rem; }
    .program-card-body h3 { font-size: 1rem; }
    .program-card-location { font-size: .75rem; }
    .program-status { font-size: .6rem; }
}
@media (max-width: 390px) {
    .portal-brand-logo { width: 44px; height: 40px; }
    .portal-brand-copy strong { max-width: 8rem; font-size: .72rem; }
    .portal-brand-copy small { display: block; max-width: 8rem; font-size: .5rem; }
    .public-login-button { padding-inline: .5rem; }
    .public-menu-toggle { padding-inline: .45rem; }
}
@media print {
    .mobile-bottom-nav { display: none !important; }
}

/* User accounts and application workflow v1.3 */
.account-shell { flex: 1; background: radial-gradient(circle at 10% 10%, #d9efef, transparent 28%), var(--ep-bg); }
.account-card { max-width: 640px; padding: clamp(1.25rem, 4vw, 2.25rem); border: 1px solid var(--ep-border); border-radius: 1.2rem; background: #fff; box-shadow: 0 20px 60px rgba(12, 41, 67, .1); }
.account-card-wide { max-width: 920px; }
.custom-field-editor { background: #fbfdff; border-color: #dce6ef !important; }
.form-preview-frame { margin-inline: auto; max-width: 100%; min-height: 360px; padding: 2rem; border: 1px solid #d9e2ec; border-radius: 1rem; background: #eef3f7; transition: max-width .2s ease; }
.form-preview-frame.is-mobile { max-width: 390px; padding: 1rem; }
.form-preview-card { max-width: 760px; margin: auto; padding: 1.5rem; border-radius: .9rem; background: #fff; box-shadow: 0 .5rem 1.5rem rgba(15, 39, 66, .08); }
.preview-field { display: grid; gap: .25rem; margin-bottom: .8rem; padding: .75rem .9rem; border: 1px solid #dfe7ef; border-radius: .6rem; }
.preview-field span { color: #6c7a89; font-size: .85rem; }
.identifier-feedback.text-success { color: #146c43 !important; }
.identifier-feedback.text-danger { color: #b02a37 !important; }
.user-dashboard, .application-shell { flex: 1; background: #f4f7f9; }
.application-shell .container, .application-shell .row > *, .application-shell h1 { min-width: 0; }
.application-shell h1 { overflow-wrap: anywhere; }
.user-welcome { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #cfe2e6; border-radius: 1rem; background: linear-gradient(120deg, #fff, #eaf5f5); }
.notification-unread { border-left: 4px solid var(--ep-gold) !important; background: #fffaf0; }

.header-notification-button {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    position: relative;
    width: 40px;
}

.header-notification-button:hover,
.header-notification-button:focus-visible {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.header-notification-button svg {
    fill: none;
    height: 21px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 21px;
}

.header-notification-count {
    align-items: center;
    background: #dc3545;
    border: 2px solid var(--portal-header-bg, #123d70);
    border-radius: 999px;
    display: inline-flex;
    font-size: .65rem;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 4px;
    position: absolute;
    right: -7px;
    top: -7px;
}
.application-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 860px; margin: 0 auto 1.5rem; padding: 0; list-style: none; }
.application-steps li { position: relative; display: grid; min-width: 0; place-items: center; gap: .3rem; color: #7b8894; font-weight: 800; text-align: center; }
.application-steps li::before { z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid #b9c8d1; border-radius: 50%; background: #fff; content: attr(data-step-indicator); }
.application-steps li::after { position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: #c9d5db; content: ""; }
.application-steps li:first-child::after { display: none; }
.application-steps li.active { color: var(--ep-navy); }
.application-steps li.active::before { border-color: var(--ep-teal); color: #fff; background: var(--ep-teal); }
.application-steps li.active::after { background: var(--ep-teal); }
.application-steps span { font-size: .73rem; }
.application-step-panel, .participant-stage { max-width: 980px; margin-inline: auto; }
.application-actions { display: flex; max-width: 980px; margin: 1rem auto 0; gap: .75rem; padding: 1rem; border: 1px solid var(--ep-border); border-radius: 1rem; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(13, 41, 64, .08); }
.participant-editor { margin-bottom: 1rem; overflow: hidden; border: 1px solid var(--ep-border); border-radius: 1rem; background: #fff; box-shadow: 0 10px 32px rgba(13, 41, 64, .06); }
.participant-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--ep-border); background: #f8fafb; }
.participant-number { display: block; color: var(--ep-teal); font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.participant-stage-fields { padding: clamp(1rem, 3vw, 1.5rem); }
.gender-correction-row[hidden], .health-details[hidden] { display: none !important; }
.health-question { margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--ep-border); border-radius: .85rem; background: #f8fafb; }
.health-question legend { float: none; width: auto; margin-bottom: .7rem; font-size: .95rem; font-weight: 750; }
.health-choice { display: flex; gap: 1.5rem; }
.health-choice label { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; }
.health-details { margin-top: .7rem; }
.review-summary { padding: 1rem; border: 1px solid var(--ep-border); border-radius: .8rem; background: #f8fafb; }
.quota-card { min-width: 190px; padding: 1rem 1.2rem; border: 1px solid #d8c286; border-radius: .9rem; background: #fff9e9; }
.quota-card small, .quota-card span { display: block; color: var(--ep-muted); }
.quota-card strong { display: block; color: var(--ep-navy); font-size: 1.8rem; }
.health-admin-list { padding-left: 1.2rem; }
.health-admin-list li { margin-bottom: .4rem; }

@media (max-width: 575.98px) {
    .app-navbar .public-navbar-container { flex-wrap: wrap; gap: .35rem; }
    .portal-brand { flex: 1 1 0; min-width: 0; }
    .portal-brand-copy { overflow: hidden; }
    .portal-brand-copy strong { max-width: none; overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
    .portal-brand-copy small, .portal-brand-caption { display: none; }
    .public-header-actions { gap: .3rem; }
    .public-login-button { width: 48px; min-height: 40px; padding-inline: .2rem; font-size: .62rem; }
    .header-action-long { display: none; }
    .header-action-short { display: inline; }
    .public-menu-toggle { min-width: 42px; min-height: 40px; padding-inline: .3rem; }
    .public-menu-toggle > span:last-child { display: none; }
    .header-notification-button { width: 38px; height: 38px; }
    .application-steps span { font-size: .56rem; }
    .application-steps li::before { width: 30px; height: 30px; }
    .application-steps li::after { top: 14px; }
    .application-actions { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 1020; padding: .7rem; }
    .application-actions .btn { min-height: 48px; padding-inline: .8rem; font-size: .9rem; }
    .participant-card-heading { align-items: flex-start; padding: .9rem; }
    .health-choice { gap: 1rem; }
}
.otp-code-input {
    letter-spacing: .45rem;
    font-variant-numeric: tabular-nums;
}

.template-placeholder {
    display: inline-block;
    padding: .3rem .5rem;
    border: 1px solid #d8e1e9;
    border-radius: .4rem;
    background: #f5f8fa;
    color: #123d70;
    font-size: .78rem;
}

.email-preview-shell {
    overflow: hidden;
    border: 1px solid #d8e1e9;
    border-radius: .75rem;
    background: #eef1f4;
    box-shadow: 0 .35rem 1rem rgba(18, 61, 112, .08);
}

.email-preview-shell iframe {
    display: block;
    width: 100%;
    height: 540px;
    border: 0;
    background: #eef1f4;
}

.email-preview-shell.is-mobile {
    width: min(100%, 390px);
    margin-inline: auto;
}

/* KHATAN Admin Hub v1.1 */
.hub-status { display: inline-flex; align-items: center; gap: .38rem; padding: .28rem .58rem; border-radius: 999px; font-size: .78rem; font-weight: 750; line-height: 1.15; }
.hub-status > span { display: inline-grid; width: 1.05rem; height: 1.05rem; place-items: center; border-radius: 50%; color: #fff; font-size: .72rem; }
.hub-status-success { color: #11633d; background: #e8f7ef; }.hub-status-success > span { background: #198754; }
.hub-status-warning { color: #805500; background: #fff4d6; }.hub-status-warning > span { background: #d99100; }
.hub-status-danger { color: #8f2530; background: #fdecef; }.hub-status-danger > span { background: #c43b4b; }
.hub-status-secondary { color: #53616e; background: #edf1f4; }.hub-status-secondary > span { background: #74818d; }
.hub-workflow { display: grid; gap: .8rem; }
.hub-workflow-step { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid var(--ep-border); border-radius: .85rem; background: #fff; }
.hub-workflow-step small { display: block; color: var(--ep-muted); }
.hub-action-panel { border-left: 4px solid #d99100; }
.hub-filter-bar { position: sticky; top: .5rem; z-index: 10; }
.hub-table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.staff-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.staff-profile-grid > div { padding: .85rem; border: 1px solid var(--ep-border); border-radius: .75rem; background: #f8fafb; }
@media (max-width: 767.98px) {
    .admin-navbar .dropdown-menu { border: 0; background: rgba(255,255,255,.08); }
    .admin-navbar .dropdown-item { color: #fff; white-space: normal; }
    .admin-navbar .dropdown-item:hover,.admin-navbar .dropdown-item:focus { color: #0d2940; background: #fff; }
    .hub-workflow-step { grid-template-columns: 1fr; }
    .hub-workflow-step .btn { width: 100%; }
    .staff-profile-grid { grid-template-columns: 1fr; }
}
