* {
    box-sizing: border-box;
}


:root {

    --red: #a51d2d;
    --red-dark: #851522;

    --black: #111318;
    --black-2: #181b21;

    --background: #f5f6f8;

    --white: #ffffff;

    --text: #17191d;

    --muted: #7b818c;

    --border: #e5e7eb;

    --green: #15803d;
    --blue: #2563eb;
    --purple: #7c3aed;

    --sidebar-width: 250px;
}


html,
body {

    margin: 0;

    padding: 0;

    min-height: 100%;
}


body {

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);

    color: var(--text);
}


a {

    color: inherit;

    text-decoration: none;
}


/* =====================================================
   APP SHELL
===================================================== */

.app-shell {

    display: flex;

    min-height: 100vh;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {

    position: fixed;

    left: 0;

    top: 0;

    bottom: 0;

    width: var(--sidebar-width);

    background: var(--black);

    color: white;

    display: flex;

    flex-direction: column;

    z-index: 100;
}


.sidebar-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 25px 20px;

    border-bottom:
        1px solid
        rgba(255,255,255,.07);
}


.brand-symbol {

    width: 42px;

    height: 42px;

    display: grid;

    place-items: center;

    border-radius: 11px;

    background: var(--red);

    font-size: 13px;

    font-weight: 900;
}


.brand-text strong {

    display: block;

    font-size: 14px;

    letter-spacing: .08em;
}


.brand-text span {

    display: block;

    margin-top: 3px;

    color: #858b96;

    font-size: 10px;
}


.sidebar-section {

    padding: 22px 12px 0;
}


.sidebar-label {

    display: block;

    padding:
        0 10px 8px;

    color: #656b75;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .13em;
}


.sidebar-section a {

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 42px;

    padding:
        0 11px;

    margin-bottom: 3px;

    border-radius: 9px;

    color: #9ca2ad;

    font-size: 12px;

    font-weight: 600;

    transition: .2s;
}


.sidebar-section a i {

    width: 17px;

    text-align: center;

    font-size: 13px;
}


.sidebar-section a:hover {

    background:
        rgba(255,255,255,.05);

    color: white;
}


.sidebar-section a.active {

    background: var(--red);

    color: white;

    box-shadow:
        0 5px 15px
        rgba(165,29,45,.25);
}


.nav-live {

    margin-left: auto;

    padding: 3px 6px;

    border-radius: 4px;

    background:
        rgba(255,255,255,.12);

    color: #ff9ba7;

    font-size: 8px;

    font-weight: 800;
}


.sidebar-bottom {

    margin-top: auto;

    padding: 15px;

    border-top:
        1px solid
        rgba(255,255,255,.07);
}


.sidebar-user {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 8px;
}


.user-avatar {

    width: 34px;

    height: 34px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #292d35;

    color: white;

    font-size: 12px;

    font-weight: 800;
}


.sidebar-user strong {

    display: block;

    max-width: 130px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 11px;
}


.sidebar-user span {

    display: block;

    margin-top: 2px;

    color: #707681;

    font-size: 9px;
}


.logout-link {

    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 8px;

    padding: 9px;

    color: #777d87;

    font-size: 11px;
}


.logout-link:hover {

    color: #ff8b98;
}


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

.main-content {

    width: calc(
        100% - var(--sidebar-width)
    );

    margin-left: var(--sidebar-width);

    min-height: 100vh;
}


.topbar {

    height: 68px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 32px;

    background: white;

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


.breadcrumb {

    color: var(--muted);

    font-size: 11px;

    font-weight: 600;
}


.breadcrumb span {

    padding: 0 8px;

    color: #c5c8cd;
}


.system-status {

    display: flex;

    align-items: center;

    gap: 7px;

    color: #626872;

    font-size: 10px;

    font-weight: 700;
}


.status-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: #16a34a;

    box-shadow:
        0 0 0 4px
        rgba(22,163,74,.1);
}


.mobile-menu {

    display: none;

    border: 0;

    background: none;

    font-size: 18px;
}


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

.page-content {

    padding: 32px;
}


.page-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 20px;

    margin-bottom: 28px;
}


.eyebrow {

    color: var(--red);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: .14em;
}


.page-header h1 {

    margin: 5px 0 5px;

    font-size: 30px;

    letter-spacing: -.035em;
}


.page-header p {

    margin: 0;

    color: var(--muted);

    font-size: 12px;
}


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

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 40px;

    padding:
        0 16px;

    border-radius: 9px;

    font-size: 11px;

    font-weight: 800;

    border: 0;

    cursor: pointer;
}


.btn-primary {

    background: var(--red);

    color: white;

    box-shadow:
        0 5px 14px
        rgba(165,29,45,.18);
}


.btn-primary:hover {

    background: var(--red-dark);
}


.btn-light {

    background: white;

    color: var(--text);

    border:
        1px solid
        rgba(255,255,255,.5);
}


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

.stat-grid {

    display: grid;

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

    gap: 16px;

    margin-bottom: 20px;
}


.stat-card {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 19px;

    background: white;

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

    border-radius: 14px;
}


.stat-icon {

    width: 43px;

    height: 43px;

    display: grid;

    place-items: center;

    border-radius: 11px;

    font-size: 15px;
}


.stat-icon.red {

    background: #fdecef;

    color: var(--red);
}


.stat-icon.blue {

    background: #eff6ff;

    color: var(--blue);
}


.stat-icon.green {

    background: #ecfdf3;

    color: var(--green);
}


.stat-icon.purple {

    background: #f5f3ff;

    color: var(--purple);
}


.stat-label {

    display: block;

    color: var(--muted);

    font-size: 9px;

    font-weight: 700;
}


.stat-value {

    display: block;

    margin-top: 2px;

    font-size: 23px;

    letter-spacing: -.03em;
}


.stat-card small {

    color: #9a9fa7;

    font-size: 8px;
}


/* =====================================================
   ACTIVE SESSION
===================================================== */

.active-session-card {

    display: flex;

    align-items: center;

    gap: 30px;

    padding: 23px 25px;

    margin-bottom: 20px;

    border-radius: 15px;

    background:
        linear-gradient(
            110deg,
            #9f1c2b,
            #7e1623
        );

    color: white;

    box-shadow:
        0 10px 25px
        rgba(100,20,30,.15);
}


.session-main {

    flex: 1;
}


.live-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: #ffc7cd;

    font-size: 8px;

    font-weight: 900;

    letter-spacing: .12em;
}


.live-badge span {

    width: 6px;

    height: 6px;

    border-radius: 50%;

    background: #ffb1ba;
}


.session-main h2 {

    margin: 7px 0;

    font-size: 21px;
}


.session-main p {

    margin: 0;

    color: #e8afb6;

    font-size: 10px;
}


.session-main p span {

    padding: 0 5px;
}


.session-metrics {

    display: flex;

    gap: 28px;

    padding:
        0 25px;

    border-left:
        1px solid
        rgba(255,255,255,.15);
}


.session-metrics div {

    text-align: center;
}


.session-metrics strong {

    display: block;

    font-size: 21px;
}


.session-metrics span {

    color: #e3a8af;

    font-size: 9px;
}


/* =====================================================
   EMPTY SESSION
===================================================== */

.empty-session {

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 20px;

    margin-bottom: 20px;

    background: white;

    border:
        1px dashed #d8dbe0;

    border-radius: 14px;
}


.empty-icon {

    width: 42px;

    height: 42px;

    display: grid;

    place-items: center;

    border-radius: 10px;

    background: #fdf0f2;

    color: var(--red);
}


.empty-session h3 {

    margin: 0 0 3px;

    font-size: 13px;
}


.empty-session p {

    margin: 0;

    color: var(--muted);

    font-size: 10px;
}


.empty-session .btn {

    margin-left: auto;
}


/* =====================================================
   DASHBOARD GRID
===================================================== */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        1.1fr .9fr;

    gap: 20px;

    margin-bottom: 20px;
}


.panel {

    background: white;

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

    border-radius: 14px;

    overflow: hidden;
}


.panel-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 19px 20px;

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


.panel-eyebrow {

    color: var(--red);

    font-size: 8px;

    font-weight: 900;

    letter-spacing: .13em;
}


.panel-header h2 {

    margin: 3px 0 0;

    font-size: 14px;
}


.panel-link {

    color: var(--red);

    font-size: 9px;

    font-weight: 800;
}


/* =====================================================
   COURTS
===================================================== */

.court-grid {

    display: grid;

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

    gap: 10px;

    padding: 15px;
}


.court-card {

    padding: 15px;

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

    border-radius: 11px;
}


.court-playing {

    background: #fff8f9;

    border-color: #f2c8ce;
}


.court-available {

    background: #fbfcfd;
}


.court-top {

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.court-number {

    font-size: 9px;

    color: var(--muted);

    font-weight: 800;
}


.court-status {

    display: flex;

    align-items: center;

    gap: 5px;

    font-size: 8px;

    font-weight: 800;
}


.court-status span {

    width: 5px;

    height: 5px;

    border-radius: 50%;
}


.court-status.playing {

    color: var(--red);
}


.court-status.playing span {

    background: var(--red);
}


.court-status.available {

    color: var(--green);
}


.court-status.available span {

    background: var(--green);
}


.court-card h3 {

    margin: 15px 0 13px;

    font-size: 13px;
}


.court-game {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-top: 10px;

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


.court-game span {

    color: var(--muted);

    font-size: 8px;

    font-weight: 800;
}


.court-game strong {

    font-size: 12px;
}


/* =====================================================
   QUEUE
===================================================== */

.queue-list {

    padding: 6px 15px 10px;
}


.queue-row {

    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 55px;

    border-bottom:
        1px solid #f0f1f3;
}


.queue-row:last-child {

    border-bottom: 0;
}


.queue-position {

    width: 19px;

    color: #9ba0a8;

    font-size: 9px;

    font-weight: 800;

    text-align: center;
}


.queue-avatar {

    width: 31px;

    height: 31px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #f2f3f5;

    color: #6f747d;

    font-size: 9px;

    font-weight: 800;
}


.queue-player {

    flex: 1;

    min-width: 0;
}


.queue-player strong {

    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 10px;
}


.queue-player span {

    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 8px;
}


.queue-games {

    text-align: right;
}


.queue-games strong {

    display: block;

    font-size: 11px;
}


.queue-games span {

    color: var(--muted);

    font-size: 7px;
}


/* =====================================================
   TABLE
===================================================== */

.table-wrapper {

    overflow-x: auto;
}


.data-table {

    width: 100%;

    border-collapse: collapse;

    font-size: 10px;
}


.data-table th {

    padding:
        11px 15px;

    background: #fafbfc;

    color: #898f98;

    text-align: left;

    font-size: 8px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .05em;
}


.data-table td {

    padding:
        13px 15px;

    border-top:
        1px solid #f0f1f3;

    vertical-align: middle;
}


.score {

    font-weight: 900;
}


.score b {

    padding: 0 3px;

    color: #b1b5bc;
}


.table-status {

    display: inline-flex;

    padding:
        5px 8px;

    border-radius: 5px;

    font-size: 7px;

    font-weight: 800;
}


.table-status.completed {

    background: #ecfdf3;

    color: #15803d;
}


.table-empty {

    padding: 30px !important;

    text-align: center;

    color: var(--muted);
}


/* =====================================================
   QUICK ACTIONS
===================================================== */

.quick-actions {

    display: grid;

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

    gap: 10px;

    margin-top: 20px;
}


.quick-action {

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 13px;

    background: white;

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

    border-radius: 10px;

    font-size: 9px;

    font-weight: 800;

    transition: .2s;
}


.quick-action:hover {

    border-color: #d2a0a7;

    transform: translateY(-1px);
}


.quick-action div {

    width: 31px;

    height: 31px;

    display: grid;

    place-items: center;

    border-radius: 8px;

    background: #fdf0f2;

    color: var(--red);
}


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

.empty-state {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 160px;

    color: var(--muted);

    font-size: 10px;
}


/* =====================================================
   LOGIN
===================================================== */

.login-page {

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at top right,
            rgba(165,29,45,.12),
            transparent 35%
        ),
        #101216;
}


.login-card {

    width: 100%;

    max-width: 440px;

    padding: 38px;

    background: white;

    border-radius: 22px;

    box-shadow:
        0 30px 80px
        rgba(0,0,0,.25);
}


.login-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 42px;
}


.login-heading span {

    color: var(--red);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .12em;
}


.login-heading h1 {

    margin: 7px 0;

    font-size: 32px;
}


.login-heading p {

    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


.form-group {

    margin-bottom: 18px;
}


.form-group label {

    display: block;

    margin-bottom: 7px;

    font-size: 12px;

    font-weight: 700;
}


.form-group input {

    width: 100%;

    height: 48px;

    padding: 0 14px;

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

    border-radius: 10px;

    outline: none;

    font: inherit;
}


.form-group input:focus {

    border-color: var(--red);

    box-shadow:
        0 0 0 3px
        rgba(165,29,45,.1);
}


.login-button {

    width: 100%;

    height: 50px;

    border: 0;

    border-radius: 10px;

    background: var(--red);

    color: white;

    font-weight: 800;

    cursor: pointer;
}


.login-error {

    padding: 12px 14px;

    margin-bottom: 20px;

    border-radius: 9px;

    background: #fdebed;

    color: #9b1d2a;

    font-size: 13px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {

    .stat-grid {

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

    .dashboard-grid {

        grid-template-columns: 1fr;
    }

}


@media (max-width: 800px) {

    :root {

        --sidebar-width: 250px;
    }


    .sidebar {

        transform:
            translateX(-100%);

        transition: .25s;
    }


    .sidebar.open {

        transform:
            translateX(0);
    }


    .main-content {

        width: 100%;

        margin-left: 0;
    }


    .mobile-menu {

        display: block;
    }


    .topbar {

        padding: 0 18px;
    }


    .page-content {

        padding: 20px;
    }


    .page-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .active-session-card {

        align-items: flex-start;

        flex-direction: column;
    }


    .session-metrics {

        width: 100%;

        padding: 15px 0 0;

        border-left: 0;

        border-top:
            1px solid
            rgba(255,255,255,.15);

        justify-content: space-between;
    }


    .quick-actions {

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

}


@media (max-width: 520px) {

    .stat-grid {

        grid-template-columns: 1fr;
    }


    .court-grid {

        grid-template-columns: 1fr;
    }


    .quick-actions {

        grid-template-columns: 1fr;
    }


    .page-content {

        padding: 15px;
    }


    .topbar-right {

        display: none;
    }

}