/* ==========================================================
   Challenge Your Mind - main stylesheet
   Brand colours taken from the logo.
   ========================================================== */
:root {
    --navy: #0B2A5B;
    --navy-2: #173F7E;
    --blue: #1E73E8;
    --blue-light: #16B4F2;
    --orange: #FF8A00;
    --orange-2: #FF5E1A;
    --yellow: #FFC400;
    --green: #6BB32E;
    --red: #F2542D;
    --bg: #F4F7FC;
    --card: #FFFFFF;
    --text: #1C2B45;
    --muted: #6B7A93;
    --border: #E3E9F3;
    --radius: 18px;
    --shadow: 0 8px 28px rgba(11, 42, 91, .08);
    --shadow-lg: 0 18px 48px rgba(11, 42, 91, .14);
    --grad-brand: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 45%, var(--orange) 100%);
    --grad-blue: linear-gradient(135deg, #16B4F2, #1E73E8 60%, #1553C7);
    --grad-orange: linear-gradient(135deg, #FFC400, #FF8A00 55%, #FF5E1A);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-main { flex: 1 0 auto; padding-bottom: 3rem; }
.auth-page .app-main { padding-bottom: 0; }
h1, h2, h3, h4, h5, .font-display { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; color: var(--navy); }

.text-navy { color: var(--navy) !important; }
.text-blue { color: var(--blue) !important; }
.text-orange { color: var(--orange) !important; }
.text-muted { color: var(--muted) !important; }
.bg-navy { background: var(--navy) !important; }
.text-gradient { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 700; padding: .55rem 1.1rem; }
.btn-lg { border-radius: 14px; padding: .8rem 1.6rem; }
.btn-brand {
    background: var(--grad-blue); color: #fff; border: 0;
    box-shadow: 0 6px 18px rgba(30, 115, 232, .35);
}
.btn-brand:hover, .btn-brand:focus { color: #fff; filter: brightness(1.07); transform: translateY(-1px); }
.btn-orange {
    background: var(--grad-orange); color: #fff; border: 0;
    box-shadow: 0 6px 18px rgba(255, 138, 0, .35);
}
.btn-orange:hover, .btn-orange:focus { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline-navy { border: 2px solid var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-soft { background: #EAF1FD; color: var(--blue); border: 0; }
.btn-soft:hover { background: #DCE8FC; color: var(--navy); }
.btn { transition: transform .15s ease, filter .15s ease, background .15s ease; }

/* ---------- Navbar ---------- */
.app-navbar {
    box-shadow: 0 2px 16px rgba(11, 42, 91, .06); padding: .7rem 0;
    background: radial-gradient(1100px 450px at 90% -10%, rgba(255, 138, 0, .16), transparent 60%),
                radial-gradient(900px 450px at 0% 0%, rgba(22, 180, 242, .18), transparent 60%), #fff;
}
.app-navbar .nav-link { font-weight: 700; color: var(--muted); border-radius: 10px; padding: .45rem .85rem !important; }
.app-navbar .nav-link:hover { color: var(--navy); background: #F1F5FC; }
.app-navbar .nav-link.active { color: var(--blue); background: #EAF1FD; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--grad-brand); color: #fff; font-weight: 800; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-lg { width: 84px; height: 84px; font-size: 1.8rem; }
.user-chip::after { color: var(--muted); }

/* ---------- Cards ---------- */
.card-soft { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-soft > .card-body { padding: 1.25rem; }
.card-soft form .form-label { margin-bottom: .35rem; }
.card-soft .card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; font-weight: 800; color: var(--navy); }
.section-title { font-size: 1.35rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

.stat-card { padding: 1.2rem 1.25rem; display: flex; gap: 1rem; align-items: center; }
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; color: #fff; flex-shrink: 0;
}
.stat-value { font-family: 'Fredoka', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 500px at 85% -10%, rgba(255, 138, 0, .16), transparent 60%),
                radial-gradient(900px 500px at 0% 0%, rgba(22, 180, 242, .18), transparent 60%), #fff;
    padding: 4.5rem 0 4rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -.5px; }
.hero-logo { width: 100%; max-width: 420px; filter: drop-shadow(0 20px 40px rgba(11, 42, 91, .15)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-badge { display: inline-flex; gap: .5rem; align-items: center; background: #FFF3E0; color: #C45F00; font-weight: 800; padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; }
.feature-icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; margin-bottom: 1rem; }

/* ---------- Game cards ---------- */
.game-card {
    position: relative; display: block; text-decoration: none; color: inherit;
    background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow); padding: 1.4rem; height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: inherit; }
.game-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--game-color, var(--blue)); }
.game-icon {
    width: 62px; height: 62px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; background: var(--game-color, var(--blue));
    box-shadow: 0 10px 22px -8px var(--game-color, var(--blue));
}
.game-card h3 { font-size: 1.2rem; margin: 1rem 0 .35rem; }
.game-card p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.game-card .play-link { font-weight: 800; color: var(--game-color, var(--blue)); }
.game-best { font-size: .8rem; font-weight: 800; color: var(--muted); }

/* Difficulty cards */
.level-card {
    border: 2px solid var(--border); border-radius: var(--radius); padding: 1.4rem; background: #fff; height: 100%;
    cursor: pointer; transition: all .2s ease; display: block; text-decoration: none; color: inherit;
}
.level-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.level-card .level-name { font-family: 'Fredoka', sans-serif; font-size: 1.4rem; font-weight: 700; }
.level-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.level-meta span { background: #F1F5FC; border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; font-weight: 700; color: var(--navy-2); }
.level-easy .level-name { color: #12A150; }
.level-medium .level-name { color: #E08600; }
.level-hard .level-name { color: #E0342B; }

.rules-list { list-style: none; padding: 0; margin: 0; }
.rules-list li { padding: .55rem 0 .55rem 2.1rem; position: relative; border-bottom: 1px dashed var(--border); }
.rules-list li:last-child { border-bottom: 0; }
.rules-list li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: .45rem; color: #12A150; font-size: 1.15rem; }

.scoring-table td { padding: .4rem .25rem; }

/* ---------- Tables ---------- */
.table-modern { margin: 0; }
.table-modern thead th { background: #F6F9FE; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); padding: .8rem 1rem; white-space: nowrap; }
.table-modern td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--border); }
.table-modern tbody tr:hover { background: #FAFCFF; }

/* ---------- Leaderboard ---------- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; margin-bottom: 2rem; }
.podium-item { text-align: center; flex: 1; max-width: 190px; }
.podium-bar { border-radius: 16px 16px 0 0; color: #fff; font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; display: flex; align-items: flex-start; justify-content: center; padding-top: .6rem; }
.podium-1 .podium-bar { height: 150px; background: var(--grad-orange); }
.podium-2 .podium-bar { height: 110px; background: var(--grad-blue); }
.podium-3 .podium-bar { height: 80px; background: linear-gradient(135deg, #8BC34A, #4E9A1E); }
.podium-item .avatar { width: 58px; height: 58px; font-size: 1.2rem; margin-bottom: .4rem; }
.rank-badge { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: #EEF2F8; color: var(--navy); }
.rank-badge.r1 { background: #FFD54F; color: #6B4A00; }
.rank-badge.r2 { background: #CFD8DC; color: #37474F; }
.rank-badge.r3 { background: #FFCC80; color: #7A3E00; }
.row-me { background: #EAF4FF !important; }
.nav-pills-brand .nav-link { border-radius: 999px; font-weight: 700; color: var(--muted); }
.nav-pills-brand .nav-link.active { background: var(--navy); color: #fff; }

/* ---------- Achievements ---------- */
.ach-card { border-radius: var(--radius); border: 1px solid var(--border); background: #fff; padding: 1.25rem; height: 100%; text-align: center; position: relative; }
.ach-icon { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto .75rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; background: var(--grad-orange); box-shadow: 0 10px 24px -8px rgba(255, 138, 0, .7); }
.ach-card.locked .ach-icon { background: #D5DCE8; box-shadow: none; }
.ach-card.locked { opacity: .82; }
.ach-card h5 { font-size: 1.05rem; margin-bottom: .25rem; }
.progress-thin { height: 8px; border-radius: 99px; background: #EEF2F8; }
.progress-thin .progress-bar { background: var(--grad-brand); border-radius: 99px; }

/* ---------- Result ---------- */
.result-hero { background: var(--grad-blue); color: #fff; border-radius: 24px; padding: 2.5rem 1.5rem; text-align: center; position: relative; overflow: hidden; }
.result-hero h1, .result-hero h2 { color: #fff; }
.result-score { font-family: 'Fredoka', sans-serif; font-size: clamp(3.5rem, 10vw, 5.5rem); font-weight: 700; line-height: 1; }
.stars { font-size: 2.4rem; letter-spacing: .3rem; }
.stars .bi-star-fill { color: var(--yellow); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .2)); }
.stars .bi-star { color: rgba(255, 255, 255, .5); }
.metric { background: #fff; border-radius: 16px; padding: 1rem; text-align: center; border: 1px solid var(--border); height: 100%; }
.metric .v { font-family: 'Fredoka', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.metric .l { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.new-achievement { background: #FFF8E6; border: 2px dashed var(--orange); border-radius: 16px; padding: .9rem 1rem; display: flex; gap: .85rem; align-items: center; }
.new-achievement .ach-icon { width: 48px; height: 48px; font-size: 1.3rem; margin: 0; }

/* ---------- Auth ---------- */
.auth-bg {
    background: radial-gradient(900px 500px at 100% 0%, rgba(255, 138, 0, .18), transparent 60%),
                radial-gradient(900px 600px at 0% 100%, rgba(22, 180, 242, .2), transparent 60%), var(--bg);
}
.auth-card { max-width: 460px; margin: 3rem auto; border-radius: 24px; border: 0; box-shadow: var(--shadow-lg); }
.auth-logo { width: 150px; }

/* Login / sign-up: fit on one screen, card vertically centred */
.auth-page { min-height: 100vh; min-height: 100dvh; }
.auth-page .app-main, .auth-page > .container { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.auth-page .auth-card { width: 100%; margin: auto; } /* auto margins centre without ever clipping */
.auth-page .auth-logo { width: 96px; }
.auth-page .form-label { margin-bottom: .3rem; }
.auth-page .form-control { padding: .55rem .85rem; }
.auth-page .invalid-feedback { margin-top: .15rem; }
.auth-page .app-main > .container { padding-top: .75rem; padding-bottom: .75rem; }
.auth-page .app-main > .container.pt-3 { position: absolute; top: 80px; left: 0; right: 0; z-index: 10; }
@media (max-height: 820px) {
    .auth-page .auth-logo { width: 72px; }
    .auth-page .auth-card .card-body { padding: 1.25rem 1.5rem !important; }
    .auth-page .auth-card .mb-3 { margin-bottom: .7rem !important; }
    .auth-page .btn-lg { padding: .65rem 1.4rem; }
}
@media (max-height: 700px) {
    .auth-page .auth-logo { width: 56px; }
    .auth-page .auth-card .text-center.mb-3 p { display: none; }
    .auth-page .app-navbar { padding: .3rem 0; }
}
.form-control, .form-select { border-radius: 12px; border: 1.5px solid var(--border); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(30, 115, 232, .15); }
.form-label { font-weight: 700; color: var(--navy); font-size: .92rem; }

/* ---------- Misc ---------- */
.badge-level { font-weight: 800; border-radius: 8px; padding: .35em .6em; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 3rem; display: block; margin-bottom: .75rem; color: #C6D2E4; }
.app-footer { background: #fff; border-top: 1px solid var(--border); }
.streak-flame { color: var(--orange-2); }
.page-head { padding: 2rem 0 1rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; background: #F1F5FC; color: var(--navy-2); padding: .3rem .75rem; border-radius: 999px; font-size: .82rem; font-weight: 800; }

@media (max-width: 575.98px) {

    .podium { gap: .5rem; }
    .podium-bar { font-size: 1.5rem; }
}

/* Full logo (admin login / forgot / reset) - larger so the wordmark stays readable */
.auth-page .auth-logo.auth-logo-full { width: 190px; margin: -8px 0 -10px; }
@media (max-height: 820px) { .auth-page .auth-logo.auth-logo-full { width: 160px; } }
@media (max-height: 700px) { .auth-page .auth-logo.auth-logo-full { width: 130px; } }

/* ---------- Mobile tables: rows become stacked cards (no sideways scrolling) ---------- */
@media (max-width: 767.98px) {
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack thead { display: none; }
    .table-stack tbody tr { padding: .6rem 0; border-bottom: 1px solid var(--border); }
    .table-stack tbody tr:last-child { border-bottom: 0; }
    .table-stack td {
        display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        padding: .3rem 1rem !important; border: 0 !important; text-align: right !important;
        min-width: 0; word-break: break-word;
    }
    .table-stack td::before {
        content: attr(data-label); flex-shrink: 0; text-align: left;
        font-size: .72rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted);
    }
    .table-stack td:not([data-label])::before { content: none; }
    .table-stack td.td-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: .5rem !important; }
    .table-stack td.td-full { justify-content: center; text-align: center !important; }
    .table-stack td > * { max-width: 100%; }
    .table-stack td .d-flex { justify-content: flex-end; }
    .table-stack td form.collapse, .table-stack td form.collapsing { flex-basis: 100%; }
    .table-stack code.json { text-align: left; }
}

/* ---------- Story page (full width) ---------- */
.story-page .app-main { padding-bottom: 0; }
.story-hero {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
    background: radial-gradient(1100px 450px at 90% -10%, rgba(255, 138, 0, .16), transparent 60%),
                radial-gradient(900px 450px at 0% 0%, rgba(22, 180, 242, .18), transparent 60%), #fff;
}
.story-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.1; }
.story-hero-logo { width: 100%; max-width: 330px; filter: drop-shadow(0 18px 36px rgba(11, 42, 91, .14)); }
.story-section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.story-text { font-size: 1.08rem; line-height: 1.8; }
.story-text p { margin-bottom: 1.1rem; }
.story-founder { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.story-founder-photo { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #EAF4FF, #FFF3E3); }
.story-founder-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5px; background: var(--grad-brand); }
.story-founder-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; mix-blend-mode: multiply; }
.story-founder figcaption { display: flex; align-items: baseline; justify-content: center; gap: .45rem; padding: .95rem .9rem; text-align: center; white-space: nowrap; }
.story-founder-role { color: #C45F00; font-weight: 800; font-size: clamp(.78rem, 1vw, .9rem); } .story-founder-sep { color: var(--muted); font-weight: 800; }
.story-founder-name { font-family: "Fredoka", sans-serif; font-weight: 700; color: var(--navy); font-size: clamp(1rem, 1.3vw, 1.1rem); }
@media (min-width: 992px) and (max-width: 1199.98px), (max-width: 359.98px) { .story-founder figcaption { gap: .3rem; padding-left: .5rem; padding-right: .5rem; } .story-founder-name { font-size: .9rem; } .story-founder-role { font-size: .7rem; } }
@media (min-width: 576px) and (max-width: 991.98px) { .story-founder { max-width: 420px; margin-left: auto; margin-right: auto; } }
@media (min-width: 992px) { .story-founder { position: sticky; top: 96px; } }
.story-quote { margin-bottom: 1.5rem; }
.story-moment { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 18px; padding: 1.2rem 1.3rem; font-size: 1.12rem; line-height: 1.7; }
.story-moment-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: var(--grad-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.story-quote { position: relative; padding: 1.3rem 1.4rem 1.3rem 3.4rem; border-radius: 18px; background: #FFF6EA; border-left: 5px solid var(--orange); font-family: "Fredoka", sans-serif; font-weight: 500; font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.5; color: var(--navy); }
.story-quote::before { content: "“"; position: absolute; left: 1rem; top: .2rem; font-size: 3.4rem; line-height: 1; color: var(--orange); font-family: Georgia, serif; }
.story-h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.8rem 0 1rem; }
.story-highlight { display: flex; gap: .9rem; align-items: center; background: var(--grad-blue); color: #fff; border-radius: 16px; padding: 1.1rem 1.3rem; margin: .4rem 0 1.4rem; font-size: 1.1rem; line-height: 1.6; }
.story-highlight i { font-size: 1.6rem; color: var(--yellow); flex-shrink: 0; }
.story-games-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.story-game { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; height: 100%; padding: 1.3rem .8rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg); border-top: 4px solid var(--game-color, var(--blue)); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
a.story-game:hover { transform: translateY(-4px); box-shadow: var(--shadow); background: #fff; color: inherit; }
.story-game-emoji { font-size: 2.2rem; line-height: 1.2; }
.story-game-name { font-weight: 800; color: var(--navy); font-size: 1rem; line-height: 1.25; }
.story-game-skill { font-size: .8rem; font-weight: 700; color: var(--game-color, var(--muted)); }
.story-vision { padding: clamp(3rem, 7vw, 5rem) 0; color: #fff; background: radial-gradient(800px 400px at 100% 0%, rgba(255, 138, 0, .25), transparent 60%), linear-gradient(135deg, #0B2A5B, #173F7E 55%, #1E73E8); }
.story-vision h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.story-vision p { font-size: 1.15rem; line-height: 1.7; opacity: .9; max-width: 720px; margin: 0 auto 1.4rem; }
.story-vision-icon { width: 62px; height: 62px; margin: 0 auto .9rem; border-radius: 50%; background: var(--grad-orange); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.story-motto { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(1.25rem, 3.4vw, 1.9rem); line-height: 1.5; }
.story-motto span { white-space: nowrap; }
.story-motto-end { color: var(--yellow); }

/* Navbar on mid-size screens (992-1199px): keep every item on one line */
.app-navbar .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-navbar .nav-link { padding: .45rem .6rem !important; }
    .app-navbar .nav-link .bi { display: none; }
    .app-navbar .user-chip > .fw-bold { display: none !important; }
}


/* Compact footer on phones */
@media (max-width: 575.98px) {
    .app-footer .container { padding-top: .6rem !important; padding-bottom: .6rem !important; gap: .15rem !important; text-align: center; }
    .app-footer .footer-tagline { display: none; }
    .app-footer .footer-copy { font-size: .75rem; }
}
.app-navbar .navbar-toggler { padding: .35rem .5rem; margin-right: -.5rem; }
.mobile-brand { padding: 0; margin: 0; line-height: 0; }
.mobile-brand img { width: 46px; height: 46px; display: block; mix-blend-mode: multiply; }
.app-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(30, 115, 232, .2); }

/* Menu spacing */
.app-navbar .navbar-nav { gap: .5rem; }
.app-navbar .nav-link { padding: .55rem 1.05rem !important; }
.app-navbar .nav-link .bi { margin-right: .35rem !important; }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-navbar .navbar-nav { gap: .3rem; }
    .app-navbar .nav-link { padding: .5rem .8rem !important; }
}
@media (max-width: 991.98px) {
    .app-navbar .navbar-nav { gap: .25rem; padding: .5rem 0 .75rem; }
    .app-navbar .nav-link { padding: .65rem 1rem !important; }
}

/* Active menu item: brand gradient (matches the admin sidebar) */
.app-navbar .nav-link { transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.app-navbar .nav-link:hover { color: var(--navy); background: rgba(255, 255, 255, .7); }
.app-navbar .nav-link.active,
.app-navbar .nav-link.active:hover {
    color: #fff !important;
    background: var(--grad-blue);
    box-shadow: 0 6px 16px rgba(30, 115, 232, .35);
}

/* Footer name styled like the logo wordmark */
.footer-brand { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -.2px; line-height: 1; }
.footer-brand .text-blue { color: #1565E0 !important; }
.footer-brand .text-orange { color: #FF8A00 !important; }
