:root {
    --navy-950: #06152f;
    --navy-900: #0a2147;
    --blue-700: #145ca8;
    --blue-500: #2a7ac8;
    --gold: #d4aa45;
    --gold-soft: #f4e3ae;
    --surface: #ffffff;
    --canvas: #edf3f9;
    --line: #dbe4ef;
    --text: #10213c;
    --muted: #6b7890;
    --success: #198754;
    --danger: #b42336;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(42, 122, 200, .12), transparent 28rem),
        var(--canvas);
}

a {
    color: inherit;
}

.topbar {
    min-height: 78px;
    padding: 14px clamp(18px, 5vw, 70px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    background: var(--navy-950);
    border-bottom: 5px solid var(--gold);
}

.brand-kicker {
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .13em;
    color: var(--gold-soft);
}

.brand-title {
    margin-top: 3px;
    font-weight: 800;
}

.top-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-actions a {
    text-decoration: none;
    font-size: .9rem;
    font-weight: 800;
}

.logout-button {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
}

.app-shell {
    width: min(1240px, calc(100% - 30px));
    margin: 28px auto 55px;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 12px;
}

.alert-success {
    color: var(--success);
    background: #e7f5ed;
}

.hero {
    position: relative;
    min-height: 280px;
    padding: clamp(28px, 5vw, 58px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    border-radius: 26px;
    color: white;
    background:
        linear-gradient(120deg, rgba(6, 21, 47, .99), rgba(20, 92, 168, .92)),
        var(--navy-900);
    box-shadow: 0 22px 50px rgba(24, 53, 91, .18);
}

.hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -145px;
    width: 380px;
    height: 380px;
    border: 46px solid rgba(255,255,255,.06);
    border-radius: 50%;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-eyebrow,
.section-kicker {
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .14em;
    color: var(--gold-soft);
}

.hero h1 {
    margin: 12px 0;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: .98;
}

.hero p {
    margin: 0;
    color: #dce8f7;
    font-size: 1.05rem;
}

.hero-meta {
    margin-top: 23px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-meta span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-size: .86rem;
}

.hero-identity {
    position: relative;
    z-index: 2;
    min-width: 170px;
    display: grid;
    place-items: center;
}

.profile-photo,
.team-shield,
.identity-placeholder {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,.72);
    box-shadow: 0 18px 35px rgba(0,0,0,.24);
}

.team-shield {
    padding: 12px;
    background: white;
    object-fit: contain;
}

.identity-placeholder {
    display: grid;
    place-items: center;
    color: var(--navy-950);
    background: var(--gold-soft);
    font-size: 4rem;
    font-weight: 900;
}

.mini-shield {
    position: absolute;
    right: 2px;
    bottom: -4px;
    width: 58px;
    height: 58px;
    object-fit: contain;
    padding: 5px;
    border-radius: 50%;
    border: 3px solid white;
    background: white;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.stat-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(34, 65, 104, .08);
}

.stat-card {
    min-height: 132px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    margin: 4px 0;
    font-size: 2.25rem;
}

.stat-card small {
    color: var(--muted);
}

.stat-card-accent {
    color: white;
    background: linear-gradient(145deg, var(--navy-900), var(--blue-700));
}

.stat-card-accent span,
.stat-card-accent small {
    color: #d9e6f5;
}

.dashboard-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr);
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.panel {
    padding: 24px;
}

.panel-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.section-kicker {
    color: var(--blue-700);
}

.panel h2 {
    margin: 5px 0 0;
    font-size: 1.35rem;
}

.status-badge,
.count-badge {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 900;
}

.status-badge {
    color: #0c5b3e;
    background: #ddf5e9;
}

.count-badge {
    color: var(--blue-700);
    background: #e7f1fb;
}

.match-stage {
    min-height: 190px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 22px;
    align-items: center;
    padding: 22px;
    border-radius: 18px;
    color: white;
    background:
        linear-gradient(125deg, rgba(6, 21, 47, .98), rgba(20, 92, 168, .9));
}

.match-team {
    display: grid;
    justify-items: center;
    text-align: center;
}

.match-team strong {
    margin-top: 10px;
}

.match-team span,
.match-center small,
.match-date {
    color: #d9e6f5;
    font-size: .82rem;
}

.team-disc {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--navy-950);
    background: var(--gold-soft);
    font-size: 1.8rem;
    font-weight: 900;
}

.match-center {
    min-width: 135px;
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
}

.match-center strong {
    font-size: 2rem;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.record-grid div {
    padding: 16px;
    border-radius: 14px;
    background: #f3f7fb;
}

.record-grid strong,
.record-grid span {
    display: block;
}

.record-grid strong {
    font-size: 1.7rem;
}

.record-grid span {
    margin-top: 2px;
    color: var(--muted);
    font-size: .82rem;
}

.match-list,
.roster-list {
    display: grid;
}

.match-row,
.roster-row {
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--line);
}

.match-row:first-child,
.roster-row:first-child {
    border-top: 0;
}

.match-row strong,
.match-row small,
.roster-row strong,
.roster-row small {
    display: block;
}

.match-row small,
.roster-row small {
    color: var(--muted);
}

.score {
    margin: 0 8px;
    color: var(--blue-700);
    font-size: 1.1rem;
}

.match-result {
    text-align: right;
}

.match-result span {
    display: inline-block;
    margin-bottom: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue-700);
    background: #e7f1fb;
    font-size: .74rem;
    font-weight: 900;
}

.roster-row {
    justify-content: flex-start;
}

.avatar-small {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--blue-700);
    font-weight: 900;
}

.roster-row > div:nth-child(2) {
    flex: 1;
}

.active-dot,
.inactive-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.active-dot {
    background: #22a06b;
}

.inactive-dot {
    background: #aeb8c7;
}

.empty-state {
    padding: 30px;
    border: 1px dashed #c8d5e4;
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .topbar {
        align-items: flex-start;
    }

    .top-actions a:first-child {
        display: none;
    }

    .hero {
        text-align: center;
        flex-direction: column-reverse;
        gap: 24px;
    }

    .hero-meta {
        justify-content: center;
    }

    .profile-photo,
    .team-shield,
    .identity-placeholder {
        width: 112px;
        height: 112px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 17px;
    }

    .match-stage {
        grid-template-columns: 1fr;
    }

    .match-center {
        order: -1;
    }

    .match-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-result {
        text-align: left;
    }
}


/* Fase 2: navegación, calendario, escudos y fechas */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 24px;
}

.top-actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-actions a {
    white-space: nowrap;
}

.match-shield {
    width: 70px;
    height: 70px;
    padding: 7px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.78);
    background: white;
}

.calendar-panel {
    margin-top: 18px;
}

.calendar-list {
    display: grid;
    gap: 10px;
}

.calendar-row {
    min-height: 88px;
    display: grid;
    grid-template-columns: 82px minmax(170px, 1fr) 90px minmax(170px, 1fr) minmax(190px, .85fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbfe;
}

.calendar-round span,
.calendar-round strong,
.calendar-score strong,
.calendar-score small,
.calendar-detail strong,
.calendar-detail small {
    display: block;
}

.calendar-round span,
.calendar-score small,
.calendar-detail small {
    color: var(--muted);
    font-size: .76rem;
}

.calendar-round strong {
    margin-top: 2px;
    font-size: 1.35rem;
}

.calendar-club {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-club-away {
    justify-content: flex-end;
    text-align: right;
}

.calendar-club img,
.calendar-club > span {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
    padding: 4px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--line);
}

.calendar-club > span {
    display: grid;
    place-items: center;
    color: white;
    background: var(--blue-700);
    font-weight: 900;
}

.calendar-score {
    text-align: center;
}

.calendar-score strong {
    font-size: 1.35rem;
}

.calendar-detail {
    text-align: right;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (max-width: 1050px) {
    .topbar {
        align-items: flex-start;
    }

    .top-actions {
        max-width: 72%;
    }

    .calendar-row {
        grid-template-columns: 70px 1fr 72px 1fr;
    }

    .calendar-detail {
        grid-column: 1 / -1;
        padding-top: 10px;
        text-align: center;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .topbar {
        position: static;
        flex-direction: column;
    }

    .top-actions {
        width: 100%;
        max-width: none;
        justify-content: flex-start;
        gap: 8px;
    }

    .top-actions a {
        padding: 8px 10px;
        border-radius: 999px;
        background: rgba(255,255,255,.08);
        font-size: .78rem;
    }

    .calendar-row {
        grid-template-columns: 1fr 62px 1fr;
        text-align: center;
    }

    .calendar-round {
        grid-column: 1 / -1;
    }

    .calendar-club,
    .calendar-club-away {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .calendar-detail {
        grid-column: 1 / -1;
    }

    .match-shield {
        width: 60px;
        height: 60px;
    }
}


/* =========================================================
   ACREDITACIÓN DIGITAL
   ========================================================= */
.credential-shell {
    width: min(1120px, calc(100% - 30px));
    margin: 30px auto 60px;
}

.credential-toolbar {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.credential-toolbar h1 {
    margin: 5px 0 8px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.credential-toolbar p {
    margin: 0;
    color: var(--muted);
}

.credential-toolbar button {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
}

.digital-credential {
    overflow: hidden;
    border-radius: 28px;
    color: white;
    background:
        linear-gradient(120deg, rgba(6,21,47,.99), rgba(20,92,168,.94));
    box-shadow: 0 26px 65px rgba(20, 52, 92, .25);
}

.credential-ribbon {
    padding: 13px 28px;
    color: var(--navy-950);
    background: linear-gradient(90deg, var(--gold), #f0d98e);
    font-size: .85rem;
    font-weight: 900;
    letter-spacing: .16em;
}

.credential-main {
    min-height: 390px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 220px;
    align-items: center;
    gap: 32px;
    padding: 42px;
}

.credential-photo-wrap {
    position: relative;
    display: grid;
    place-items: center;
}

.credential-photo {
    width: 180px;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    border: 5px solid rgba(255,255,255,.82);
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

.credential-shield {
    object-fit: contain;
    padding: 18px;
    background: white;
}

.credential-initial {
    display: grid;
    place-items: center;
    color: var(--navy-950);
    background: var(--gold-soft);
    font-size: 5rem;
    font-weight: 900;
}

.credential-mini-shield {
    position: absolute;
    right: 2px;
    bottom: -12px;
    width: 72px;
    height: 72px;
    padding: 7px;
    object-fit: contain;
    border-radius: 50%;
    border: 4px solid white;
    background: white;
}

.credential-role {
    color: var(--gold-soft);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.credential-info h2 {
    margin: 10px 0 22px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.credential-info dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
    margin: 0;
}

.credential-info dl div {
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255,255,255,.09);
}

.credential-info dt {
    color: #cddced;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.credential-info dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.credential-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-weight: 800;
}

.status-active,
.status-inactive {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-active {
    background: #36d58a;
}

.status-inactive {
    background: #ff6b7b;
}

.credential-qr-area {
    display: grid;
    justify-items: center;
    text-align: center;
}

.credential-qr {
    width: 184px;
    min-height: 184px;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 16px;
    background: white;
}

.credential-qr img,
.credential-qr canvas {
    max-width: 100%;
    height: auto;
}

.credential-qr-area span {
    margin-top: 12px;
    font-weight: 800;
}

.credential-qr-area small {
    margin-top: 4px;
    color: #cddced;
}

.credential-footer {
    display: grid;
    grid-template-columns: 170px 170px 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px 28px;
    color: var(--navy-950);
    background: #f7f9fc;
}

.credential-footer span,
.credential-footer strong {
    display: block;
}

.credential-footer span {
    color: var(--muted);
    font-size: .72rem;
    text-transform: uppercase;
}

.credential-footer-brand {
    text-align: right;
    font-weight: 900;
    letter-spacing: .08em;
}

.credential-help {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

.credential-help p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* Validación pública */
.validation-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(145deg, var(--navy-950), var(--blue-700));
}

.validation-card {
    width: min(520px, 100%);
    padding: 34px;
    border-radius: 24px;
    text-align: center;
    background: white;
    box-shadow: 0 25px 70px rgba(0,0,0,.28);
}

.validation-logo {
    color: var(--blue-700);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .15em;
}

.validation-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 22px auto 16px;
    border-radius: 50%;
    color: white;
    font-size: 3rem;
    font-weight: 900;
}

.validation-icon.valid {
    background: #1fa66c;
}

.validation-icon.invalid {
    background: var(--danger);
}

.validation-card h1 {
    margin-bottom: 5px;
}

.validation-folio {
    color: var(--muted);
    font-weight: 800;
}

.validation-photo {
    width: 130px;
    height: 150px;
    margin: 20px auto;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid var(--line);
}

.validation-shield {
    object-fit: contain;
    padding: 12px;
}

.validation-data {
    margin: 22px 0 0;
    text-align: left;
}

.validation-data div {
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
}

.validation-data dt {
    color: var(--muted);
}

.validation-data dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.validation-message {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 850px) {
    .credential-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .credential-info dl {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .credential-footer {
        grid-template-columns: 1fr 1fr;
    }

    .credential-footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .credential-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .credential-toolbar button {
        width: 100%;
    }

    .credential-main {
        padding: 28px 20px;
    }

    .credential-info dl {
        grid-template-columns: 1fr;
    }

    .credential-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .credential-footer-brand {
        grid-column: auto;
    }
}

@media print {
    body {
        background: white;
    }

    .no-print {
        display: none !important;
    }

    .credential-shell {
        width: 100%;
        margin: 0;
    }

    .digital-credential {
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ==========================================================================
   ENCABEZADO DEL PORTAL MI LIGA
   Basado en la navegación pública de Deportivo Morelos
   ========================================================================== */

.portal-header {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    min-height: 112px;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 130px;
    align-items: center;
    gap: 26px;
    padding: 12px clamp(24px, 6vw, 110px);
    color: var(--navy-950);
    background: #ffffff;
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 8px 28px rgba(6, 21, 47, .08);
}

.portal-header-logo {
    width: 100px;
    height: 84px;
    display: flex;
    align-items: center;
}

.portal-header-logo-emporio {
    justify-self: start;
    justify-content: flex-start;
}

.portal-header-logo-morelos {
    justify-self: end;
    justify-content: flex-end;
}

.portal-header-logo img {
    width: 92px;
    height: 82px;
    display: block;
    object-fit: contain;
}

.portal-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(13px, 1.45vw, 25px);
}

.portal-nav a {
    position: relative;
    color: var(--navy-950);
    font-size: clamp(.76rem, .82vw, .9rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: color .22s ease;
}

.portal-nav a:not(.portal-logout-button)::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: -9px;
    left: 50%;
    height: 2px;
    background: var(--gold);
    transition: right .22s ease, left .22s ease;
}

.portal-nav a:not(.portal-logout-button):hover,
.portal-nav a:not(.portal-logout-button):focus-visible {
    color: var(--blue-700);
}

.portal-nav a:not(.portal-logout-button):hover::after,
.portal-nav a:not(.portal-logout-button):focus-visible::after {
    right: 0;
    left: 0;
}

.portal-logout-button {
    padding: 10px 15px;
    border: 1px solid rgba(212, 170, 69, .75);
    border-radius: 999px;
    color: var(--navy-950);
    background: #ffffff;
    transition:
        color .22s ease,
        background .22s ease,
        border-color .22s ease,
        transform .22s ease;
}

.portal-logout-button:hover,
.portal-logout-button:focus-visible {
    color: #ffffff;
    background: var(--navy-950);
    border-color: var(--navy-950);
    transform: translateY(-1px);
}

.portal-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(6, 21, 47, .16);
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.portal-menu-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 99px;
    background: var(--navy-950);
    transition: transform .25s ease, opacity .25s ease;
}

.portal-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.portal-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.portal-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

html {
    scroll-padding-top: 132px;
}

@media (max-width: 1180px) {
    .portal-header {
        grid-template-columns: 105px minmax(0, 1fr) 105px;
        gap: 16px;
        padding-right: 26px;
        padding-left: 26px;
    }

    .portal-header-logo {
        width: 86px;
    }

    .portal-header-logo img {
        width: 82px;
        height: 76px;
    }

    .portal-nav {
        gap: 12px;
    }

    .portal-nav a {
        font-size: .76rem;
    }

    .portal-logout-button {
        padding: 9px 12px;
    }
}

@media (max-width: 980px) {
    .portal-header {
        min-height: 88px;
        grid-template-columns: 86px 1fr 86px;
        gap: 12px;
        padding: 8px 18px;
    }

    .portal-header-logo {
        width: 72px;
        height: 68px;
    }

    .portal-header-logo img {
        width: 68px;
        height: 64px;
    }

    .portal-menu-toggle {
        display: inline-flex;
        justify-self: center;
    }

    .portal-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        flex-direction: column;
        gap: 0;
        padding: 10px 20px 22px;
        background: #ffffff;
        border-top: 1px solid #edf0f4;
        border-bottom: 4px solid var(--gold);
        box-shadow: 0 22px 40px rgba(6, 21, 47, .16);
    }

    .portal-nav.show {
        display: flex;
    }

    .portal-nav a {
        width: min(460px, 100%);
        padding: 14px 16px;
        border-bottom: 1px solid #edf0f4;
        font-size: .9rem;
        text-align: center;
    }

    .portal-nav a:not(.portal-logout-button)::after {
        display: none;
    }

    .portal-logout-button {
        margin-top: 12px;
        border-bottom: 1px solid var(--gold) !important;
        background: #fffaf0;
    }

    body.portal-menu-open {
        overflow: hidden;
    }

    html {
        scroll-padding-top: 105px;
    }
}

@media (max-width: 520px) {
    .portal-header {
        min-height: 78px;
        grid-template-columns: 70px 1fr 70px;
        padding: 6px 12px;
    }

    .portal-header-logo {
        width: 60px;
        height: 58px;
    }

    .portal-header-logo img {
        width: 58px;
        height: 56px;
    }

    .portal-menu-toggle {
        width: 42px;
        height: 42px;
    }

    .portal-nav {
        max-height: calc(100vh - 82px);
    }
}

@media print {
    .portal-header {
        display: none !important;
    }
}

