/* =========================================================
   FRANKLIN FOOTBALL PORTAL
   Admin / Coach shared portal styles
   ========================================================= */

:root {
    --lhs-green: #981b32;
    --lhs-green-dark: #731327;
    --lhs-green-deep: #241b20;
    --lhs-green-mid: #981b32;

    --lhs-gold: #c4c7cc;
    --lhs-gold-light: #eceef1;

    --lhs-page-bg: #f5f5f7;
    --lhs-card-bg: #ffffff;

    --lhs-text: #202126;
    --lhs-muted: #656670;

    --lhs-border: #dfe6dd;
}


/* =========================================================
   PAGE
   ========================================================= */

.portal-body {
    background: var(--lhs-page-bg);
    color: var(--lhs-text);
    min-height: 100vh;
}


/* =========================================================
   TOP HEADER
   ========================================================= */

.portal-top {
    height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 8px 22px;

    background:
        linear-gradient(
            90deg,
            var(--lhs-green-deep),
            var(--lhs-green-mid),
            var(--lhs-green-deep)
        );

    border-bottom: 2px solid var(--lhs-gold);

    position: sticky;
    top: 0;
    z-index: 80;
}


/* =========================================================
   BRAND
   ========================================================= */

.portal-brand {
    display: flex;
    align-items: center;

    gap: 12px;

    color: #fff;

    text-decoration: none;
}

.portal-brand:hover,
.portal-brand:focus {
    color: #fff;
    text-decoration: none;
}

.portal-brand img {
    width: 58px;
    height: 58px;

    object-fit: cover;
    object-position: left top;

    border-radius: 6px;
}

.portal-brand span {
    display: grid;
}

.portal-brand strong {
    color: #fff;

    font-size: 1.2rem;

    letter-spacing: .05em;
}

.portal-brand small {
    color: var(--lhs-gold);

    font-weight: 800;

    letter-spacing: .16em;
}


/* =========================================================
   USER AREA
   ========================================================= */

.portal-user {
    display: flex;
    align-items: center;

    gap: 15px;

    font-size: .88rem;
}

.portal-user > span {
    color: #dbe7dc;
}

.portal-user > a {
    color: #fff;

    text-decoration: none;

    font-weight: 800;
}

.portal-user > a:hover,
.portal-user > a:focus {
    color: var(--lhs-gold);
}


/* =========================================================
   PORTAL SHELL
   ========================================================= */

.portal-shell {
    display: grid;

    grid-template-columns:
        230px
        minmax(0, 1fr);

    min-height:
        calc(
            100vh
            - 82px
        );
}


/* =========================================================
   SIDE NAVIGATION
   ========================================================= */

.portal-nav {
    background: var(--lhs-green-dark);

    border-right:
        1px solid
        rgba(
            218,
            188,
            94,
            .25
        );

    padding: 18px 10px;
}

.portal-nav nav {
    display: grid;

    gap: 5px;

    position: sticky;
    top: 100px;
}

.portal-nav a {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 12px 14px;

    border-radius: 11px;

    color: #e9f0e9;

    text-decoration: none;

    font-weight: 700;
}

.portal-nav a b {
    width: 24px;

    color: var(--lhs-gold);

    text-align: center;
}

.portal-nav a:hover,
.portal-nav a.active {
    background: var(--lhs-gold);

    color: #122313;
}

.portal-nav a:hover b,
.portal-nav a.active b {
    color: #122313;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.portal-main {
    min-width: 0;

    padding: 28px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.portal-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 22px;
}

.portal-page-head .eyebrow {
    color: #517054;

    font-size: .76rem;
    font-weight: 900;

    letter-spacing: .13em;
}

.portal-page-head h1 {
    margin:
        4px
        0
        0;

    color: var(--lhs-green);

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.7rem
        );
}


/* =========================================================
   STAT CARDS
   ========================================================= */

.stat-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            1fr
        );

    gap: 15px;

    margin-bottom: 20px;
}

.stat-card,
.portal-card {
    background: var(--lhs-card-bg);

    border:
        1px solid
        var(--lhs-border);

    border-radius: 16px;

    box-shadow:
        0
        7px
        24px
        rgba(
            0,
            50,
            0,
            .06
        );
}

.stat-card {
    padding: 20px;
}

.stat-card small {
    display: block;

    color: #6b786d;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .08em;
}

.stat-card strong {
    display: block;

    margin-top: 7px;

    color: var(--lhs-green);

    font-size: 1.9rem;
}


/* =========================================================
   STANDARD CARD
   ========================================================= */

.portal-card {
    padding: 20px;

    margin-bottom: 18px;
}

.portal-card h1,
.portal-card h2,
.portal-card h3,
.portal-card h4 {
    color: var(--lhs-green);
}

.portal-card h2 {
    margin-top: 0;
}


/* =========================================================
   TABLES
   ========================================================= */

.portal-table-wrap {
    overflow: auto;
}

.portal-table {
    width: 100%;

    min-width: 650px;

    border-collapse: collapse;
}

.portal-table th,
.portal-table td {
    padding: 12px 10px;

    border-bottom:
        1px solid
        #e4e9e3;

    text-align: left;
}

.portal-table th {
    color: var(--lhs-muted);

    font-size: .77rem;

    text-transform: uppercase;

    letter-spacing: .07em;
}


/* =========================================================
   FORMS
   ========================================================= */

.portal-form {
    display: grid;

    gap: 13px;
}

.portal-form .form-row {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 12px;
}

.portal-form label {
    color: #243528;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    background: #fff;

    color: #111;
}


/* Bootstrap form controls inside portal */

.portal-main .form-control,
.portal-main .form-select {
    background-color: #fff;

    color: #111;
}

.portal-main .form-control::placeholder {
    color: #6c757d;

    opacity: 1;
}


/* =========================================================
   ACTIONS / BUTTONS
   ========================================================= */

.portal-actions {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding:
        0
        16px;

    border: 0;

    border-radius: 10px;

    background: var(--lhs-green);

    color: #fff;

    text-decoration: none;

    font-weight: 800;

    cursor: pointer;
}

.portal-btn:hover,
.portal-btn:focus {
    background: #002600;

    color: #fff;
}

.portal-btn.gold {
    background: var(--lhs-gold);

    color: #10200f;
}

.portal-btn.gold:hover,
.portal-btn.gold:focus {
    background: #c9aa4e;

    color: #10200f;
}

.portal-btn.ghost {
    background: #eef2ed;

    color: var(--lhs-green);
}

.portal-btn.ghost:hover,
.portal-btn.ghost:focus {
    background: #e1e8df;

    color: var(--lhs-green);
}


/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    padding: 13px 16px;

    margin-bottom: 16px;

    border-radius: 10px;

    background: #e9f5e9;

    color: #16461b;
}

.alert.error {
    background: #fee8e8;

    color: #8a1f1f;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    background: #eef3ed;

    color: #315535;

    font-size: .8rem;
    font-weight: 800;

    line-height: 1.1;
}


/* Gold / neutral badge */

.badge.gold {
    background: var(--lhs-gold-light);

    color: #5b4610;
}


/* Bootstrap success status */

.badge.bg-success,
.bg-success.badge {
    background-color: #198754 !important;

    color: #fff !important;
}

.badge.bg-success *,
.bg-success.badge * {
    color: #fff !important;
}


/* Bootstrap warning status */

.badge.bg-warning,
.bg-warning.badge {
    color: #111 !important;
}

.badge.bg-warning * {
    color: #111 !important;
}


/* Bootstrap danger */

.badge.bg-danger,
.bg-danger.badge {
    color: #fff !important;
}


/* Bootstrap secondary */

.badge.bg-secondary,
.bg-secondary.badge {
    color: #fff !important;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 30px;

    color: #6a776c;

    text-align: center;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.portal-mobile-nav {
    display: none;
}


/* =========================================================
   ARCHIVE BROWSER
   ========================================================= */

.archive-subtitle {
    margin:
        .45rem
        0
        0;

    color: #667269;
}

.archive-banner {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 16px 18px;

    margin:
        0
        0
        20px;

    border:
        2px solid
        var(--lhs-gold);

    border-radius: 14px;

    background: #fff9e7;

    color: #46380d;
}

.archive-banner-icon {
    display: grid;
    place-items: center;

    flex:
        0
        0
        42px;

    width: 42px;
    height: 42px;

    border-radius: 10px;

    background: var(--lhs-gold);

    color: var(--lhs-green);

    font-size: 1.3rem;
    font-weight: 900;
}

.archive-banner strong {
    display: block;

    color: var(--lhs-green);

    letter-spacing: .07em;
}

.archive-banner span {
    display: block;

    margin-top: 3px;

    line-height: 1.45;
}

.archive-badge {
    background: #ece9df;

    color: #5b5140;

    border:
        1px solid
        #d0c7b2;

    letter-spacing: .05em;
}

.archive-season-card {
    border-color: #d7cfbc;

    background: #fffefa;
}

.archive-section-heading,
.archive-toolbar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;
}

.archive-section-heading h2,
.archive-toolbar-head h2 {
    margin-bottom: 4px;
}

.archive-section-heading p,
.archive-toolbar-head p {
    margin: 0;

    color: #6a746c;
}

.archive-tabs {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin:
        18px
        0;

    padding-bottom: 10px;

    border-bottom:
        1px solid
        var(--lhs-border);
}

.archive-tab {
    min-height: 44px;

    padding:
        0
        14px;

    border:
        1px solid
        #d7dfd5;

    border-radius: 10px;

    background: #f5f7f4;

    color: #244329;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}

.archive-tab.active {
    background: var(--lhs-green);

    border-color: var(--lhs-green);

    color: #fff;
}

.archive-search-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        110px;

    gap: 12px;

    align-items: end;

    margin-bottom: 12px;
}

.archive-search,
.archive-per-page {
    display: grid;

    gap: 6px;

    color: #34473a;

    font-weight: 800;
}

.archive-search span,
.archive-per-page span {
    font-size: .8rem;

    text-transform: uppercase;

    letter-spacing: .06em;
}

.archive-search input,
.archive-per-page select {
    width: 100%;

    min-height: 46px;

    padding: 10px 12px;

    border:
        1px solid
        #cfd9cd;

    border-radius: 10px;

    background: #fff;

    color: #17271a;

    font: inherit;
}

.archive-status {
    min-height: 26px;

    margin:
        4px
        0
        8px;

    color: var(--lhs-muted);

    font-size: .9rem;
    font-weight: 700;
}

.archive-sort {
    padding: 0;

    border: 0;

    background: transparent;

    color: inherit;

    font: inherit;
    font-weight: inherit;

    text-align: left;

    text-transform: inherit;

    letter-spacing: inherit;

    cursor: pointer;
}

.archive-sort.active {
    color: var(--lhs-green);
}

.archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    margin-top: 16px;
}

.archive-pagination span {
    color: #435248;

    font-weight: 800;
}

.archive-pagination button:disabled {
    opacity: .45;

    cursor: not-allowed;
}

.archive-table-wrap.is-loading,
.is-loading {
    opacity: .6;
}

.archive-audit-list {
    display: grid;

    gap: 10px;
}

.archive-audit-item {
    display: flex;

    gap:
        10px
        16px;

    flex-wrap: wrap;

    padding: 12px 0;

    border-bottom:
        1px solid
        #e4e9e3;
}

.archive-audit-item:last-child {
    border-bottom: 0;
}

.archive-audit-item strong {
    color: var(--lhs-green);
}

.archive-audit-item span {
    color: var(--lhs-muted);
}

.archive-stat-grid .stat-card small {
    min-height: 2.2em;
}

.archive-stat-grid .stat-card strong {
    margin-top: 10px;
}


/* =========================================================
   ACCOUNT DROPDOWN
   ========================================================= */

.portal-user .dropdown-menu {
    background: #fff;

    color: #212529;
}

.portal-user .dropdown-menu .dropdown-item {
    background-color: transparent;

    color: var(--lhs-green) !important;

    font-weight: 700;
}

.portal-user .dropdown-menu .dropdown-item i {
    color: var(--lhs-green);
}

.portal-user .dropdown-menu .dropdown-item:hover,
.portal-user .dropdown-menu .dropdown-item:focus {
    background-color: #f1f5f1;

    color: var(--lhs-green) !important;
}


/* Sign Out */

.portal-user .dropdown-menu .dropdown-item.text-danger {
    color: #dc3545 !important;
}

.portal-user .dropdown-menu .dropdown-item.text-danger i {
    color: #dc3545;
}

.portal-user .dropdown-menu .dropdown-item.text-danger:hover,
.portal-user .dropdown-menu .dropdown-item.text-danger:focus {
    background-color: #fff1f2;

    color: #b02a37 !important;
}


/* =========================================================
   TABLE / STATUS CONTRAST
   ========================================================= */

.portal-table .badge.bg-success {
    color: #fff !important;
}

.portal-table .badge.bg-warning {
    color: #111 !important;
}


/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 980px) {

    .portal-shell {
        grid-template-columns: 1fr;
    }

    .portal-nav {
        display: none;
    }

    .portal-main {
        padding:
            18px
            14px
            82px;
    }

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

    .portal-user > span {
        display: none;
    }

    .portal-page-head {
        align-items: flex-start;

        flex-direction: column;
    }


    /* Mobile bottom nav */

    .portal-mobile-nav {
        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        z-index: 90;

        display: grid;

        grid-template-columns:
            repeat(
                4,
                1fr
            );

        padding:
            8px
            max(
                8px,
                env(
                    safe-area-inset-right
                )
            )
            calc(
                8px
                + env(
                    safe-area-inset-bottom
                )
            )
            max(
                8px,
                env(
                    safe-area-inset-left
                )
            );

        background: var(--lhs-green-dark);

        border-top:
            1px solid
            var(--lhs-gold);
    }

    .portal-mobile-nav a {
        padding: 7px 3px;

        color: #fff;

        text-align: center;

        text-decoration: none;

        font-size: .75rem;
        font-weight: 800;
    }

    .portal-mobile-nav a:hover,
    .portal-mobile-nav a:focus {
        color: var(--lhs-gold);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

    .portal-top {
        height: 72px;

        padding: 6px 10px;
    }

    .portal-brand img {
        width: 50px;
        height: 50px;
    }

    .portal-brand strong {
        font-size: 1rem;
    }

    .portal-brand small {
        font-size: .67rem;
    }

    .portal-user {
        gap: 9px;
    }

    .portal-user > a:first-of-type {
        display: none;
    }

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

        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card strong {
        font-size: 1.45rem;
    }

    .portal-card {
        padding: 15px;
    }

    .portal-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .portal-form .form-row {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   ARCHIVE MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .archive-banner {
        padding: 14px;
    }

    .archive-banner-icon {
        flex-basis: 36px;

        width: 36px;
        height: 36px;
    }

    .archive-section-heading,
    .archive-toolbar-head {
        flex-direction: column;
    }

    .archive-search-row {
        grid-template-columns:
            minmax(0, 1fr)
            88px;
    }

    .archive-table-wrap {
        overflow: visible;
    }

    .archive-table {
        min-width: 0;
    }

    .archive-table thead {
        display: none;
    }

    .archive-table,
    .archive-table tbody,
    .archive-table tr,
    .archive-table td {
        display: block;

        width: 100%;
    }

    .archive-table tr {
        margin:
            0
            0
            10px;

        padding:
            6px
            12px;

        border:
            1px solid
            var(--lhs-border);

        border-radius: 12px;

        background: #fff;
    }

    .archive-table td {
        display: grid;

        grid-template-columns:
            minmax(
                110px,
                42%
            )
            minmax(
                0,
                1fr
            );

        gap: 10px;

        padding: 9px 0;

        border-bottom:
            1px solid
            #edf0ec;

        overflow-wrap: anywhere;
    }

    .archive-table td:last-child {
        border-bottom: 0;
    }

    .archive-table td::before {
        content:
            attr(
                data-label
            );

        color: #68766a;

        font-size: .73rem;
        font-weight: 900;

        text-transform: uppercase;

        letter-spacing: .06em;
    }

    .archive-pagination {
        justify-content: space-between;
    }

    .archive-pagination .portal-btn {
        padding:
            0
            12px;
    }

    .archive-audit-item {
        display: grid;

        gap: 3px;
    }

    .archive-stat-grid .stat-card small {
        min-height: 0;
    }
}


@media (max-width: 430px) {

    .archive-tabs {
        display: grid;

        grid-template-columns: 1fr;
    }

    .archive-tab {
        width: 100%;
    }

    .archive-search-row {
        grid-template-columns: 1fr;
    }

    .archive-per-page {
        max-width: 120px;
    }

    .archive-table td {
        grid-template-columns: 1fr;

        gap: 3px;
    }

    .archive-pagination {
        flex-wrap: wrap;
    }

    .archive-pagination span {
        order: -1;

        width: 100%;

        text-align: center;
    }
}