*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange: #ff6b12;
    --orange-2: #f04d0c;
    --green: #16b957;
    --green-2: #0b8f3f;
    --blue: #0d43b6;
    --blue-2: #2363f4;
    --red: #d71937;
    --purple: #6c38d8;
    --ink: #020915;
    --panel: #061324;
    --panel-2: #0a192b;
    --panel-3: #0f2035;
    --line: #173154;
    --line-soft: rgba(42, 72, 112, .55);
    --text: #f6f8ff;
    --muted: #91a2bb;
    --subtle: #657893;
    --saffron: var(--orange);
    --saffron-light: #ff8a35;
    --green-light: #45e57c;
    --navy: var(--ink);
    --navy-card: var(--panel);
    --navy-border: var(--line);
    --navy-hover: var(--panel-3);
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --text-muted: var(--subtle);
    --danger: var(--red);
    --warning: #d69e2e;
    --sidebar-w: 250px;
    --topbar-h: 76px;
    --radius: 8px;
    --radius-sm: 5px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

html { min-height: 100%; background: var(--ink); }
body {
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(6, 19, 36, .95), rgba(2, 9, 21, 1)),
        var(--ink);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.app-wrapper { min-height: 100vh; display: flex; }
.sidebar {
    width: var(--sidebar-w);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    background: #04111f;
    border-right: 1px solid var(--line);
    z-index: 100;
/*Added new*/
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff6a00 #1a1f2b;
}
/*Added new for New Scrollbar*/
    /* Chrome, Edge, Safari */
    .sidebar::-webkit-scrollbar {
        width: 10px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #1a1f2b;
        border-radius: 20px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: linear-gradient( 180deg, #ff7b00, #ff4d00 );
        border-radius: 20px;
        border: 2px solid #1a1f2b;
        transition: 0.3s;
    }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: linear-gradient( 180deg, #ff9a1f, #ff5e00 );
        }

    .sidebar::-webkit-scrollbar-corner {
        background: transparent;
    }
/*--------------------*/
.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.brand-logo-img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: 64px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    flex: 0 0 auto;
}
.brand-mark { position: relative; width: 54px; height: 38px; display: inline-block; }
.brand-mark span {
    position: absolute;
    width: 39px;
    height: 13px;
    border: 5px solid var(--orange);
    border-radius: 20px;
    transform-origin: center;
}
.brand-mark span:nth-child(1) { left: 4px; top: 11px; transform: rotate(-42deg); }
.brand-mark span:nth-child(2) { left: 13px; top: 11px; transform: rotate(42deg); }
.brand-mark span:nth-child(3) { left: 8px; top: 18px; transform: rotate(0); border-color: #ff8a35; }
.brand-name {
    display: block;
    font-family: Rajdhani, sans-serif;
    font-size: 25px;
    line-height: 1;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
}
.brand-sub {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}
.sidebar-nav { flex: 1; padding: 18px 12px; overflow-y: auto; }
.nav-section-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    padding: 8px 12px 10px;
}
.nav-link {
    min-height: 41px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    color: #e7edf8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
}
.nav-link i:first-child { width: 20px; text-align: center; font-size: 17px; }
.nav-link span { flex: 1; min-width: 0; }
    .nav-link:hover,
    /*.nav-link.active { background: linear-gradient(90deg, var(--orange), var(--orange-2)); color: #fff; }*/
    .nav-link.active {
        background: linear-gradient(135deg,#ff6a00,#ff4500);
        color: white !important;
        border-radius: 12px;
    }
.sub-link.active-sub {
    color: #ff6a00 !important;
    font-weight: 600;
}
.nav-caret { margin-left: auto; font-size: 12px; color: currentColor; }
.nav-sub {
    display: none;
    margin: -2px 0 10px 26px;
    padding-left: 16px;
    border-left: 1px solid var(--line);
}
.nav-group.open .nav-sub { display: grid; gap: 2px; }
.nav-sub a {
    color: #c4cede;
    text-decoration: none;
    padding: 8px 8px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}
.nav-sub a:hover { color: #fff; background: var(--panel-3); }
.operation-link:nth-of-type(1) i { color: #75d96c; }
.operation-link:nth-of-type(2) i { color: #ffb13c; }
.operation-link:nth-of-type(3) i { color: #a580ff; }
.theme-toggle {
    margin: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #eef4ff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.theme-toggle span:first-child { display: flex; align-items: center; gap: 9px; }
.toggle-track {
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #182843;
    border: 1px solid #405675;
    padding: 2px;
}
.toggle-track span { display: block; width: 14px; height: 14px; border-radius: 50%; background: #dbe4f4; }

.main-content { margin-left: var(--sidebar-w); min-height: 100vh; flex: 1; display: flex; flex-direction: column; }
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    border: 0;
    background: rgba(2, 9, 21, .68);
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #061324;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.page-title {
    font-family: Rajdhani, sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}
.icon-btn, .notification-btn, .profile-logout {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.icon-btn i { font-size: 24px; }
.notification-btn { position: relative; }
.notification-btn i { font-size: 21px; }
.notification-btn span {
    position: absolute;
    top: 3px;
    right: 4px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.admin-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f6c7a0, #7c4e3d);
    font-weight: 800;
}
.user-name { font-size: 14px; font-weight: 800; }
.user-role { font-size: 12px; color: var(--muted); }
.profile-logout { width: 22px; color: #cbd5e1; }
.content-body { flex: 1; padding: 18px 24px 34px; }
.app-footer {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    color: #9cadc4;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.card {
    background: rgba(8, 24, 42, .96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(255,255,255,.015) inset;
    margin-bottom: 18px;
}
.card-header {
    min-height: 46px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
}
.card-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: Rajdhani, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
}
.card > :not(.card-header):not(.table-responsive):not(.table-footer-link) { padding: 20px; }
.card-link, .table-footer-link, .stat-link {
    color: #d8e4f5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.table-footer-link {
    display: block;
    text-align: center;
    padding: 13px;
    border-top: 1px solid var(--line);
}

.dashboard-stats { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.stats-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.stat-card {
    min-height: 116px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 20px;
    text-decoration: none;
    color: #fff;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .18s, border-color .18s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #315a8e; }
.stat-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-size: 27px;
}
.stat-card.purple .stat-icon { background: linear-gradient(135deg, #7a4df0, #4e28c9); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #65c83b, #24942c); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, #ff8c17, #e94a0a); }
.stat-card.blue .stat-icon { background: linear-gradient(135deg, #3b78ff, #2457cf); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, #ef3057, #c51537); }
.stat-copy { display: grid; gap: 5px; }
.stat-label {
    color: #c4d0e1;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}
.stat-value {
    font-family: Rajdhani, sans-serif;
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
}
.stat-link { color: #ccd8e8; font-weight: 500; }
.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); gap: 14px; }

.table-responsive { width: 100%; overflow-x: auto; }
.ke-table { width: 100%; border-collapse: collapse; }
.ke-table th {
    padding: 14px 20px;
    text-align: left;
    background: #0d1d31;
    color: #c4d0e1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.ke-table td {
    padding: 13px 20px;
    border-top: 1px solid rgba(42, 72, 112, .45);
    color: #edf3fb;
    font-size: 14px;
    vertical-align: middle;
}
.ke-table.compact th, .ke-table.compact td { padding: 12px 16px; font-size: 12px; }
.ke-table tr:hover td { background: rgba(18, 39, 64, .55); }
.table-main { font-weight: 700; }
.team-token {
    width: 35px;
    height: 35px;
    margin-right: 12px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ce1e2e, #07152a);
    border: 1px solid #314a70;
    font: 700 12px Rajdhani, sans-serif;
}
.metric-pill {
    display: inline-grid;
    min-width: 32px;
    place-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
}
.metric-pill.blue { background: #173c74; color: #bcd8ff; }
.metric-pill.purple { background: #3d236b; color: #e5d7ff; }
.empty-row { text-align: center; color: var(--muted) !important; padding: 24px !important; }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 5px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.badge-live { color: #fff; background: linear-gradient(90deg, #ec1939, #b70d26); }
.badge-green { color: #d8ffdf; background: #0b6f2d; }
.badge-blue { color: #cfe4ff; background: #174785; }
.badge-orange { color: #ffe3c8; background: #8f4607; }
.badge-muted { color: #c9d5e5; background: #334257; }
.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    background: #16e05e;
    box-shadow: 0 0 14px rgba(22,224,94,.75);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
.btn-primary { background: linear-gradient(180deg, #ff7b18, #ec520c); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset; }
.btn-success { background: linear-gradient(180deg, #18b85a, #0e8b3f); }
.btn-danger { background: linear-gradient(180deg, #d71937, #9f1025); }
.btn-outline { border-color: var(--line); background: #091a2d; color: #dbe6f6; }
.btn-outline:hover { border-color: #38628f; background: #10243b; }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.icon-action {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #081a2f;
}
.icon-action.view { color: #5ea1ff; }
.icon-action.edit { color: #ffba3b; }
.icon-action.live, .icon-action.delete { color: #ff566c; }

.quick-panel { display: grid; gap: 10px; }
.quick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #0a1a2e;
    color: #edf4ff;
    font-weight: 700;
}
.quick-row span { display: inline-flex; align-items: center; gap: 9px; }

.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    margin-bottom: 7px;
    color: #b7c6da;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.form-control {
    width: 100%;
    min-height: 41px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #07172a;
    color: #fff;
    outline: none;
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,18,.14); }
.form-control:disabled,
.form-control[disabled] {
    color: #8fa0b7;
    border-color: rgba(132, 151, 176, .26);
    border-style: dashed;
    background:
        linear-gradient(180deg, rgba(7, 18, 33, .9), rgba(4, 13, 25, .94));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
    cursor: not-allowed;
    opacity: 1;
}

select.form-control:disabled,
select.form-control[disabled] {
    color: #9aa9bd;
}

input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: .45;
}
.form-control option { background: #07172a; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-error, .field-validation-error { color: #ff8a9c; font-size: 12px; }

.live-edit-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 184, 0, .48);
    border-left: 5px solid #ffb800;
    border-radius: var(--radius-sm);
    color: #fff6d8;
    background:
        linear-gradient(90deg, rgba(255, 107, 18, .18), rgba(255, 184, 0, .08)),
        #081a2f;
    box-shadow: 0 0 0 1px rgba(255, 184, 0, .08) inset, 0 10px 24px rgba(0, 0, 0, .18);
}

.live-edit-notice i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 6px;
    color: #07111f;
    background: #ffb800;
    font-size: 18px;
}

.live-edit-notice strong,
.live-edit-notice span {
    display: block;
}

.live-edit-notice strong {
    margin-bottom: 2px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.live-edit-notice span {
    color: #ffe7a3;
    font-size: 14px;
    font-weight: 700;
}

.team-form-card { max-width: 980px; }
.team-player-panel {
    margin: 4px 0 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #07172a;
}
.team-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.team-player-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.team-player-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.selected-player-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}
.selected-player-chip {
    min-height: 54px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: #0a1a2e;
}
.selected-player-chip strong,
.player-picker-copy strong {
    display: block;
    overflow: hidden;
    color: #f5f8ff;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.selected-player-chip small,
.player-picker-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}
.player-jersey {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ff7b18, #d7440c);
    font: 800 12px Rajdhani, sans-serif;
}
.remove-player-btn {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #ff9aac;
    background: #081a2f;
    cursor: pointer;
}
.empty-selected-players {
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-align: center;
}
.team-player-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    z-index: 200;
}
.team-player-modal.open { display: flex; }
.team-player-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 9, 21, .76);
}
.team-player-dialog {
    position: relative;
    width: min(780px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #061324;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.add-player-dialog {
    width: min(820px, 100%);
    max-height: min(700px, calc(100vh - 70px));
    grid-template-rows: auto minmax(0, 1fr) auto;
}
.add-player-form {
    min-height: 0;
    display: contents;
}
.add-player-body {
    display: grid;
    gap: 14px;
    padding: 18px 26px;
    overflow: auto;
}
.add-player-body .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}
.add-player-body .form-group {
    margin-bottom: 0;
}
.add-player-body .form-label {
    margin-bottom: 7px;
}
.add-player-body .form-control {
    height: 46px;
}
.add-player-body textarea.form-control {
    height: 90px;
    min-height: 90px;
}
.modal-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.team-player-modal-header,
.team-player-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.add-player-dialog .team-player-modal-header,
.add-player-dialog .team-player-modal-footer {
    padding-inline: 26px;
}
.add-player-dialog .team-player-modal-footer {
    background: rgba(8, 26, 47, .96);
}
.team-player-modal-header h2 {
    font-family: Rajdhani, sans-serif;
    font-size: 20px;
    line-height: 1;
    text-transform: uppercase;
}
.team-player-modal-header span,
.team-player-modal-footer span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.team-player-modal-tools { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.team-player-modal-footer { border-top: 1px solid var(--line-soft); border-bottom: 0; }
.team-player-modal-footer span { color: #ffb0be; }
.player-picker-list {
    display: grid;
    gap: 8px;
    padding: 14px 18px;
    overflow: auto;
}
.player-picker-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 20px 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: #081a2f;
    cursor: pointer;
}
.player-picker-row:hover,
.player-picker-row.selected {
    border-color: var(--orange);
    background: #10243b;
}
.player-picker-row input { accent-color: var(--orange); }

.card-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.assignment-user-picker {
    max-width: 640px;
    margin-bottom: 18px;
}

.match-assignment-panel {
    margin: 8px 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #07172a;
    overflow: hidden;
}

.match-assignment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.match-assignment-head small,
.match-assignment-head > span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.match-assignment-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    padding: 12px 14px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 184, 0, .72) rgba(8, 26, 47, .9);
}

.match-assignment-list::-webkit-scrollbar {
    width: 9px;
}

.match-assignment-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(8, 26, 47, .9);
}

.match-assignment-list::-webkit-scrollbar-thumb {
    border: 2px solid rgba(8, 26, 47, .9);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd45f, #ff7a00);
}

.match-assignment-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: #081a2f;
    cursor: pointer;
}

.match-assignment-row:hover,
.match-assignment-row.selected {
    border-color: var(--orange);
    background: #10243b;
}

.match-assignment-row input {
    accent-color: var(--orange);
}

.match-assignment-copy {
    min-width: 0;
}

.match-assignment-copy strong,
.match-assignment-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-assignment-copy strong {
    color: #f5f8ff;
    font-size: 13px;
}

.match-assignment-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.roles-permissions-grid {
    display: grid;
    gap: 18px;
}

.permission-section {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #07172a;
}

.permission-section h3 {
    margin: 0 0 12px;
    color: #f5f8ff;
    font-family: Rajdhani, sans-serif;
    font-size: 20px;
    text-transform: uppercase;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.permission-list span {
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    color: #dce9ff;
    background: #081a2f;
    font-size: 13px;
    font-weight: 800;
}

.permission-notes {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.permission-notes li + li {
    margin-top: 8px;
}

.alert-toast {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #0a1a2e;
    font-size: 13px;
    font-weight: 700;
    transition: opacity .4s;
}
.alert-toast.success { color: #8bffac; border-color: rgba(22,185,87,.45); }
.alert-toast.error { color: #ff93a3; border-color: rgba(215,25,55,.45); }

.match-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.match-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 999px;
    color: #76ff9b;
    background: rgba(16, 122, 54, .35);
    font-weight: 900;
    text-transform: uppercase;
}
.match-live-chip span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #18f264;
    box-shadow: 0 0 14px rgba(24, 242, 100, .8);
}
.match-info-strip {
    display: grid;
    grid-template-columns: 2fr .8fr 1.55fr .9fr 1fr 1.2fr;
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #061324;
    overflow: hidden;
}
.match-info-strip div {
    min-height: 70px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 13px 22px;
    border-right: 1px solid var(--line);
}
.match-info-strip div:last-child { border-right: 0; }
.match-info-strip span {
    color: #798aa5;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.match-info-strip strong {
    color: #fff;
    font-size: 15px;
    text-transform: uppercase;
}

.score-display {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #04111f;
}
.score-team {
    min-height: 102px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
}
.score-team.home { background: linear-gradient(90deg, #0b3ea8, #08245e); }
.score-team.away { background: linear-gradient(90deg, #9f0d1d, #d71937); text-align: right; }
.score-team-name {
    font-family: Rajdhani, sans-serif;
    font-size: 25px;
    font-weight: 700;
    text-transform: uppercase;
}
.score-breakdown { color: #d8e4f5; font-size: 12px; font-weight: 600; }
.score-center {
    display: grid;
    place-items: center;
    padding: 12px;
    border: 1px solid #29496e;
    border-radius: var(--radius);
    background: #07172a;
}
.score-numbers { display: flex; align-items: center; gap: 9px; }
.score-num {
    min-width: 64px;
    display: inline-grid;
    place-items: center;
    padding: 6px 8px;
    border-radius: var(--radius);
    background: #f5f7fb;
    color: #07111f !important;
    font-family: Rajdhani, sans-serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
}
.score-sep { color: #fff; font: 700 28px Rajdhani, sans-serif; }
.score-half { color: #67aaff; font: 700 15px Rajdhani, sans-serif; text-transform: uppercase; }
.score-status { margin-top: 5px; }
.scoresheet-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.event-form-card, .event-log {
    background: #061324;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.event-form-card { padding: 18px; }
.event-form-title, .event-log-title {
    font-family: Rajdhani, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}
.event-types-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.event-type-btn {
    min-height: 42px;
    padding: 8px;
    border: 1px solid #234468;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(180deg, #0e45b9, #083178);
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
}
.event-type-btn.tackle { background: linear-gradient(180deg, #119444, #0a642f); }
.event-type-btn:hover, .event-type-btn.selected { outline: 2px solid #ffd365; }
.player-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.player-pill {
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 4px;
    border: 1px solid #25496f;
    background: #091c31;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}
.player-pill.selected { border-color: #ffd365; color: #ffd365; }
.player-pill .jersey { color: #8fc1ff; margin-right: 5px; }
.event-log { overflow: hidden; }
.event-log-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.event-log-body { max-height: 620px; overflow-y: auto; }
.event-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid rgba(42,72,112,.45); }
.event-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; flex: 0 0 10px; }
.event-dot.home { background: #135cff; }
.event-dot.away { background: #f3183d; }
.event-info { flex: 1; min-width: 0; }
.event-type-label { font-weight: 800; }
.event-player, .event-time { color: var(--muted); font-size: 12px; }
.event-pts { font: 700 20px Rajdhani, sans-serif; color: #ffd365; }
.event-pts.zero { color: var(--subtle); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.login-card { width: min(420px, 100%); padding: 34px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .icon { display: block; font-size: 42px; color: var(--orange); }
.login-logo .title { display: block; color: var(--orange); font: 700 30px Rajdhani, sans-serif; }
.login-logo .subtitle { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.login-error { color: #ff93a3; border: 1px solid rgba(215,25,55,.45); background: rgba(215,25,55,.1); padding: 10px; border-radius: var(--radius-sm); margin-bottom: 14px; }

.text-muted { color: var(--muted) !important; }
.text-orange { color: var(--orange) !important; }
.text-green { color: var(--green) !important; }
.text-danger { color: var(--red) !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1200px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-bottom-grid, .scoresheet-grid { grid-template-columns: 1fr; }
    .score-display { grid-template-columns: 1fr; }
    .match-info-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
        width: min(310px, 84vw);
        transform: translateX(-100%);
        transition: transform .24s ease;
        box-shadow: 16px 0 38px rgba(0, 0, 0, .38);
    }
    body.sidebar-open { overflow: hidden; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .main-content { margin-left: 0; }
    .topbar { padding: 0 16px; }
    .menu-toggle-btn {
        border: 1px solid rgba(145, 162, 187, .3);
        border-radius: 6px;
        background: rgba(15, 32, 53, .68);
    }
    .topbar-right { gap: 8px; }
    .admin-profile .user-details { display: none; }
    .content-body { padding: 14px; }
    .dashboard-stats, .stats-grid, .form-row, .event-types-grid { grid-template-columns: 1fr; }
    .match-info-strip { grid-template-columns: 1fr; }
    .match-info-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
    .app-footer { padding: 16px; display: grid; gap: 6px; }
}

/* Full-screen match dashboard, matching the scorer reference screen */
.match-dashboard-page {
    min-height: 100vh;
    padding: 16px;
    background: #010b18;
    color: #fff;
    font-family: Rajdhani, Inter, sans-serif;
}
.match-dash-header {
    min-height: 82px;
    display: grid;
    grid-template-columns: 390px minmax(280px, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.match-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}
.match-brand-logo {
    display: block;
    width: 340px;
    max-width: 100%;
    height: 78px;
    object-fit: cover;
    object-position: 44% center;
    border-radius: 6px;
    flex: 0 0 auto;
}
.match-brand .brand-mark { width: 62px; height: 44px; }
.match-brand strong {
    display: block;
    color: #ff6b12;
    font-size: 25px;
    line-height: 1;
}
.match-brand small {
    display: block;
    color: #fff;
    font: 800 12px Inter, sans-serif;
}
.match-dash-header h1 {
    text-align: center;
    text-transform: uppercase;
    font-size: 30px;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 2px 8px rgba(255,255,255,.18);
}
.match-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}
.match-gear {
    color: #d9e5f7;
    text-decoration: none;
    font-size: 26px;
}

.match-report-link {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #315579;
    border-radius: 6px;
    color: #ffb13b;
    background: #091a2d;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.match-report-link:hover {
    border-color: #ff7a1a;
    color: #fff;
    background: #ff6a00;
}
.match-dashboard-page .match-live-chip {
    padding: 10px 18px;
    background: #073f28;
    color: #56ff85;
    font-size: 18px;
}
.match-info-strip.dash-version {
    /* grid-template-columns: 2.3fr .9fr 1.8fr 1fr 1.25fr 1.25fr;*/
    grid-template-columns: 2.3fr 1.5fr 1.0fr 1.0fr 0.6fr 2.15fr 0.8fr;
    margin-bottom: 22px;
    background: #031126;
}
.match-info-strip.dash-version div {
    min-height: 68px;
    padding: 12px 22px;
}
.match-info-strip.dash-version strong { font-size: 16px; }

.dash-score-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}
.dash-team-panel, .dash-timer-panel, .raid-table, .match-events, .quick-actions-panel, .dash-entry-panel {
    border: 1px solid #143057;
    border-radius: 8px;
    background: #031126;
    box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset;
}
.dash-team-main {
    min-height: 74px;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 102px;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 8px;
}
.dash-team-panel.home .dash-team-main { background: linear-gradient(90deg, #0639a8, #0b58d4); }
.dash-team-panel.away .dash-team-main {
    grid-template-columns: 102px minmax(0, 1fr) 70px;
    background: linear-gradient(90deg, #d70f2c, #aa071d);
    text-align: right;
}



.team-badge {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.25);
    font-size: 22px;
    font-weight: 800;
}
.dash-team-main span {
    display: block;
    color: #d8e4f5;
    font: 800 14px Inter, sans-serif;
    text-transform: uppercase;
}
.dash-team-main h2 {
    margin-top: 3px;
    color: #fff;
    font-size: 27px;
    line-height: 1;
    text-transform: uppercase;
}
.dash-team-panel.away h2 { color: #fff; }
.mat-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 4px 11px;
    border: 1px solid rgba(120, 255, 168, .36);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(19, 95, 63, .82), rgba(8, 53, 48, .9));
    color: #eafff2;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 5px 18px rgba(0,0,0,.22);
    text-transform: uppercase;
    white-space: nowrap;
}
.dash-team-panel.away .mat-indicator {
    border-color: rgba(255, 203, 214, .34);
    background: linear-gradient(180deg, rgba(103, 20, 38, .82), rgba(55, 8, 22, .9));
}
.mat-indicator > i {
    color: #38ef7d;
    font-size: 17px;
    line-height: 1;
}
.dash-team-panel.away .mat-indicator > i {
    color: #ffbdc9;
}
.mat-indicator.not-started,
.dash-team-panel.away .mat-indicator.not-started {
    border-color: rgba(160, 174, 192, .28);
    background: linear-gradient(180deg, rgba(44, 55, 70, .72), rgba(18, 25, 36, .82));
    color: #d5deea;
}
.mat-indicator.not-started > i,
.dash-team-panel.away .mat-indicator.not-started > i {
    color: #a7b4c5;
}
.mat-indicator-dots {
    display: flex;
    justify-content: center;
    gap: 3px;
}
.mat-indicator-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    border: 1px solid rgba(255,255,255,.22);
}
.mat-indicator-dots span.active {
    background: #28e06b;
    border-color: #70ff9b;
    box-shadow: 0 0 8px rgba(40,224,107,.45);
}
.mat-indicator-dots span.out {
    background: #8b98aa;
    border-color: #b1bccb;
    opacity: .65;
}
.mat-indicator:not(.not-started) .mat-indicator-dots span.out {
    background: #ffb020;
    border-color: #ffd36b;
}
.mat-indicator strong {
    color: #fff;
    font: 900 18px Rajdhani, sans-serif;
    line-height: 1;
}
.mat-indicator small {
    color: rgba(255,255,255,.76);
    font: 900 10px Inter, sans-serif;
    line-height: 1;
    text-transform: uppercase;
}
.dash-score {
    width: 102px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f4f6fb;
    color: #07111f;
    font-size: 58px;
    line-height: 1;
}
.dash-player-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 8px 12px;
}
.dash-player-btn, .raid-list button, .raid-list span, .raid-labels button, .sub-row span {
    min-height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #173b6c;
    border-radius: 5px;
    color: #fff;
    background: #071832;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}
.raid-list button {
    justify-items: stretch;
    padding: 0 8px;
}
.board-player {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}
.board-jersey {
    min-width: 28px;
    justify-self: start;
    padding: 2px 5px;
    border-radius: 4px;
    color: #06111f;
    background: #ffc107;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}
.board-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.dash-player-btn.selected, .dash-player-btn:hover, .raid-list button.selected, .raid-list button:hover, .raid-labels button.selected, .raid-labels button:hover {
    background: linear-gradient(180deg, #16b957, #087934);
    border-color: #2feb79;
}
.sub-label {
    padding: 8px;
    text-align: center;
    text-transform: uppercase;
    color: #fff;
    background: rgba(9, 54, 118, .62);
    border-top: 1px solid #123764;
    border-bottom: 1px solid #123764;
    font-size: 18px;
    font-weight: 800;
}
.dash-team-panel.away .sub-label { background: rgba(118, 11, 27, .68); }
.sub-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    padding: 8px 18px;
}

.dash-timer-panel {
    display: grid;
    align-content: start;
    text-align: center;
    overflow: hidden;
}
.dash-timer-panel span {
    padding-top: 12px;
    color: #fff;
    text-transform: uppercase;
    font: 800 14px Inter, sans-serif;
}
.dash-timer-panel strong {
    padding: 4px 0 5px;
    font-size: 42px;
    line-height: 1;
}
.dash-timer-panel em {
    padding: 8px;
    color: #3998ff;
    background: #071832;
    border-top: 1px solid #163763;
    border-bottom: 1px solid #163763;
    font-style: normal;
    font-size: 17px;
    font-weight: 800;
}
.dash-timer-panel b {
    color: #ffd72f;
    font-size: 34px;
}
.timer-progress {
    height: 4px;
    width: 66%;
    justify-self: center;
    margin: 0 0 12px;
    border-radius: 999px;
    background: #17c85f;
}
.timer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 0 6px 8px;
}
.timer-actions button {
    min-height: 40px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    background: #063eac;
}
.timer-actions button:first-child { background: #11933f; }
.timer-actions button:nth-child(2) { background: #a81325; }
.timer-actions .timer-half-btn {
    grid-column: 1 / -1;
    color: #ffd45f;
    border: 1px solid #805615;
    background: #081425;
}

.dash-control-row {
    min-height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dash-switch {
    min-width: 174px;
    min-height: 42px;
    border: 1px solid #805615;
    border-radius: 6px;
    color: #ffd45f;
    background: #081425;
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
}

.dash-board-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.raid-table { padding: 12px; }
.raid-head {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
}
.raid-head span {
    min-height: 35px;
    display: grid;
    place-items: center;
    border: 1px solid #173b6c;
    background: #071832;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}
.raid-table.home .raid-head span:first-child { background: #0636a8; }
.raid-table.away .raid-head span:first-child, .raid-head span:nth-child(3) { background: #9f1025; }
.raid-head span:nth-child(2), .raid-head span:nth-child(4) { background: #117638; }
.raid-body {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    min-height: 210px;
}
.raid-list {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 2px;
}
.rout-list {
    display: block;
}
.rout-actions, .rout-player-list, .raider-actions, .raider-action-player-list {
    display: grid;
    align-content: start;
    gap: 2px;
}
.rout-player-list, .raider-action-player-list {
    display: none;
}
.rout-list.show-players .rout-actions {
    display: none;
}
.rout-list.show-players .rout-player-list {
    display: grid;
}
.raider-action-list {
    display: block;
}
.raider-action-list.show-players .raider-actions {
    display: none;
}
.raider-action-list.show-players .raider-action-player-list {
    display: grid;
}
.raid-list.blue button, .raid-list.blue span { background: #0636a8; }
.raid-list.red button, .raid-list.red span { background: #a31328; }
.raid-list.green button, .raid-list.green span { background: #107936; }
.raid-labels {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 2px;
}
.raid-labels span, .raid-labels button {
    min-height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid #173b6c;
    border-radius: 4px;
    color: #fff;
    background: #071832;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
.compact-actions button {
    background: #071832;
    font-size: 12px;
}
.compact-actions button.bonus {
    color: #06111f;
    background: #ffc107;
    border-color: #ffd85a;
}
.raid-action-btn.selected {
    outline: 2px solid #ffd45f;
    outline-offset: -2px;
}
.dash-mid-actions {
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 0 10px;
}
.mid-action {
    min-height: 58px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}
.mid-action.allout { background: linear-gradient(180deg, #a84a0a, #713004); }
.mid-action.tech { background: linear-gradient(180deg, #5d1787, #35105d); }
.mid-action.pp { background: linear-gradient(180deg, #0f7b68, #07483f); }

.dash-score-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.summary-table {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid #143057;
    border-radius: 5px;
    overflow: hidden;
}
.summary-table span {
    min-height: 80px;
    display: grid;
    place-items: center;
    gap: 7px;
    border-right: 1px solid #143057;
    color: #fff;
    background: #082863;
    font: 900 14px Inter, sans-serif;
    text-transform: uppercase;
}
.summary-table.away span { background: #8e1023; }
.summary-table span:last-child { border-right: 0; }
.summary-table strong {
    font-family: Rajdhani, sans-serif;
    font-size: 29px;
}
.score-update-box {
    display: grid;
    align-content: center;
    border: 1px solid #214a7d;
    border-radius: 6px;
    overflow: hidden;
    background: #081a31;
}
.score-update-box button {
    min-height: 50px;
    border: 0;
    color: #fff;
    background: #15345f;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}
.score-update-box button:disabled { opacity: .65; cursor: not-allowed; }
.score-update-box small {
    display: block;
    padding: 12px;
    color: #6fa8ff;
    text-align: center;
    text-transform: uppercase;
}
.score-update-box small span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: #18d65a;
}

.sheet-toast {
    position: fixed;
    top: 88px;
    left: 50%;
    z-index: 1800;
    width: min(680px, calc(100vw - 32px));
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
    visibility: hidden;
    text-align: center;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.sheet-toast.show {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .42);
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
}

.sheet-toast.ok {
    color: #062414;
    background: linear-gradient(180deg, #70ff9b, #1fc763);
    border-color: rgba(122, 255, 166, .72);
}

.sheet-toast.error {
    color: #fff;
    background: linear-gradient(180deg, #ff5f76, #c1112f);
    border-color: rgba(255, 137, 154, .72);
}

.sheet-toast > span {
    min-width: 0;
}

.sheet-toast-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 6px;
    color: inherit;
    background: rgba(0, 0, 0, .16);
    cursor: pointer;
    pointer-events: auto;
}

.sheet-toast.ok .sheet-toast-close {
    color: #062414;
    border-color: rgba(6, 36, 20, .32);
    background: rgba(255, 255, 255, .28);
}

.sheet-toast-close:hover {
    background: rgba(255, 255, 255, .22);
}

.dash-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
    align-items: stretch;
}
.match-events, .entry-match-events, .quick-actions-panel { overflow: hidden; }
.panel-title {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #143057;
    text-transform: uppercase;
    font-weight: 900;
}
.match-events .event-log-body, .entry-match-events .event-log-body {
    max-height: 130px;
    padding: 8px 18px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 184, 0, .72) rgba(8, 26, 47, .9);
}
.match-events .event-log-body::-webkit-scrollbar,
.entry-match-events .event-log-body::-webkit-scrollbar {
    width: 9px;
}
.match-events .event-log-body::-webkit-scrollbar-track,
.entry-match-events .event-log-body::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(8, 26, 47, .9);
}
.match-events .event-log-body::-webkit-scrollbar-thumb,
.entry-match-events .event-log-body::-webkit-scrollbar-thumb {
    border: 2px solid rgba(8, 26, 47, .9);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd45f, #ff7a00);
}
.match-events .event-item, .entry-match-events .event-item {
    display: grid;
    grid-template-columns: 92px 14px minmax(145px, .8fr) minmax(210px, 1.2fr) 76px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 7px;
    background: rgba(8, 26, 47, .42);
}
.match-events .event-item + .event-item,
.entry-match-events .event-item + .event-item {
    margin-top: 7px;
}
.match-events .event-time,
.entry-match-events .event-time,
.match-events .event-type-label,
.entry-match-events .event-type-label,
.match-events .event-player,
.entry-match-events .event-player,
.match-events .event-pts,
.entry-match-events .event-pts {
    min-width: 0;
}
.match-events .event-time strong,
.entry-match-events .event-time strong,
.match-events .event-type-label strong,
.entry-match-events .event-type-label strong,
.match-events .event-player strong,
.entry-match-events .event-player strong,
.match-events .event-pts strong,
.entry-match-events .event-pts strong {
    display: block;
    overflow: hidden;
    color: #f7fbff;
    line-height: 1.15;
    text-overflow: ellipsis;
}
.match-events .event-time small,
.entry-match-events .event-time small,
.match-events .event-type-label small,
.entry-match-events .event-type-label small,
.match-events .event-player small,
.entry-match-events .event-player small,
.match-events .event-pts small,
.entry-match-events .event-pts small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #9ab0cc;
    font-size: 11px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-events .event-time, .entry-match-events .event-time { color: #9ab0cc; }
.match-events .event-player.home, .entry-match-events .event-player.home { color: #58a3ff; }
.match-events .event-commentary,
.entry-match-events .event-commentary {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #ffd45f;
    font-size: 11px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-events .event-pts,
.entry-match-events .event-pts {
    text-align: right;
}
.match-events .event-pts strong,
.entry-match-events .event-pts strong {
    color: #ffd45f;
    font-size: 18px;
}
.event-type-panel .event-types-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 12px 14px 14px;
}
.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 10px 12px 12px; }
.quick-action {
    min-height: 46px;
    display: grid;
    place-items: center;
    gap: 2px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
}
.quick-action strong, .quick-action i { font-size: 16px; line-height: 1; }
.quick-action span { font-size: 9px; }
.quick-action.raid, .quick-action.bonus { background: #0b7c35; }
.quick-action.tackle { background: #0636a8; }
.quick-action.allout { background: #be3514; }
.quick-action.undo { background: #45127a; }
.quick-action.notes { background: #112c53; }
.quick-action.selected { outline: 2px solid #ffd45f; }

.dash-entry-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(260px, .55fr);
    gap: 16px;
    padding: 16px;
    margin-bottom: 0;
}
.dash-entry-panel .event-form-title { margin-bottom: 12px; }
.dash-entry-panel .player-grid { margin: 0; }
.dash-empty {
    color: #8197b5;
    font: 600 15px Inter, sans-serif;
    padding: 10px 0;
}
.entry-fields {
    display: grid;
    gap: 10px;
}
.entry-fields label {
    display: grid;
    gap: 6px;
    color: #b8c7dc;
    font-weight: 800;
    text-transform: uppercase;
}
.dash-status {
    min-height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-top: 1px solid #214a7d;
    color: #dcecff;
    background: #06152a;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
}
.dash-status.ok {
    display: flex;
    color: #052912;
    background: linear-gradient(180deg, #54ff8a, #18b84f);
    border-top-color: #79ff9e;
}
.dash-status.error {
    display: flex;
    color: #fff;
    background: linear-gradient(180deg, #ff4964, #b70f2b);
    border-top-color: #ff768b;
}

@media (max-width: 1200px) {
    .match-dash-header, .dash-score-stage, .dash-board-grid, .dash-score-summary, .dash-bottom-grid, .dash-entry-panel {
        grid-template-columns: 1fr;
    }
    .match-dash-header h1 { order: -1; }
    .match-head-actions, .match-brand { justify-content: center; }
}

/* Compact scorer dashboard tuning */
.match-dashboard-page {
    padding: 10px 14px 14px;
    overflow-x: hidden;
    height: 100vh;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.match-dash-header {
    min-height: 76px;
    grid-template-columns: 380px minmax(260px, 1fr) auto;
    margin-bottom: 8px;
}
.match-brand { gap: 10px; }
.match-brand .brand-mark {
    width: 50px;
    height: 34px;
    transform: scale(.88);
    transform-origin: left center;
}
.match-brand strong { font-size: 22px; }
.match-brand small { font-size: 11px; }
.match-dash-header h1 {
    font-size: 27px;
    margin: 0;
}
.match-head-actions { gap: 14px; }
.match-dashboard-page .match-live-chip {
    padding: 8px 16px;
    font-size: 16px;
}
.match-gear { font-size: 24px; }
.match-info-strip.dash-version {
    margin-bottom: 10px;
}
    .match-info-strip.dash-version div {
        min-height: 52px;
        padding: 3px 6px;
        gap: 1px;
    }
.match-info-strip.dash-version span {
    font-size: 11px;
}
.match-info-strip.dash-version strong {
    font-size: 15px;
}
.dash-score-stage {
    position: sticky;
    top: 0;
    z-index: 100;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin: 0 -14px 10px;
    padding: 8px 14px 10px;
    background: linear-gradient(180deg, #010b18 0%, #010b18 88%, rgba(1, 11, 24, 0) 100%);
    border-bottom: 1px solid rgba(20, 48, 87, .8);
    box-shadow: 0 16px 28px rgba(0, 0, 0, .38);
}
.dash-score-stage > * {
    align-self: start;
}
.dash-team-panel {
    align-self: start;
    overflow: hidden;
}
.dash-team-main {
    min-height: 58px;
    grid-template-columns: 52px minmax(0, 1fr) 76px;
    gap: 10px;
    padding: 7px 12px;
}
.dash-team-panel.away .dash-team-main {
    grid-template-columns: 76px minmax(0, 1fr) 52px;
}
.team-badge {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 18px;
}
.dash-team-main span {
    font-size: 12px;
}
.dash-team-main h2 {
    font-size: 24px;
}
.dash-score {
    width: 76px;
    height: 54px;
    border-radius: 8px;
    font-size: 45px;
}
.dash-player-row {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 4px;
    padding: 4px 10px;
    display: none;
}
.dash-player-btn, .raid-list button, .raid-list span, .raid-labels button, .sub-row span {
    min-height: 28px;
    border-radius: 4px;
    font-size: 15px;
}
.board-player {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 5px;
}
.board-jersey {
    min-width: 24px;
    padding: 2px 4px;
    font-size: 11px;
}
.sub-label {
    padding: 4px;
    font-size: 14px;
}
.sub-row {
    gap: 12px;
    padding: 6px 14px;
}
.dash-timer-panel {
    align-self: start;
    min-height: 0;
}
.dash-timer-panel span {
    padding-top: 7px;
    font-size: 11px;
}
.dash-timer-panel strong {
    font-size: 31px;
}
.dash-timer-panel em {
    padding: 5px;
    font-size: 14px;
}
.dash-timer-panel b {
    font-size: 25px;
}
.timer-progress {
    margin-bottom: 6px;
}
.timer-actions {
    gap: 5px;
    padding: 0 5px 5px;
}
.timer-actions button {
    min-height: 28px;
    font-size: 11px;
}
.dash-control-row {
    min-height: 38px;
}
.dash-switch {
    min-height: 34px;
    min-width: 150px;
    font-size: 15px;
}
.dash-board-grid {
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.raid-table {
    padding: 9px;
}
.raid-head span {
    min-height: 30px;
    font-size: 14px;
}
.raid-body {
    min-height: 175px;
}
.raid-labels span, .raid-labels button {
    min-height: 25px;
    font-size: 11px;
}
.dash-mid-actions {
    gap: 10px;
    padding: 0 6px;
}
.mid-action {
    min-height: 48px;
    font-size: 13px;
}
.dash-score-summary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.summary-table span {
    min-height: 58px;
    gap: 3px;
    font-size: 12px;
}
.summary-table strong {
    font-size: 24px;
}
.score-update-box button {
    min-height: 40px;
    font-size: 15px;
}
.score-update-box small {
    padding: 7px;
    font-size: 11px;
}
.dash-bottom-grid {
    grid-template-columns: minmax(0, 1fr) 205px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.panel-title {
    min-height: 30px;
    font-size: 14px;
}
.match-events .event-log-body, .entry-match-events .event-log-body {
    max-height: 145px;
    padding: 8px 12px;
}
.match-events .event-item, .entry-match-events .event-item {
    grid-template-columns: 76px 12px minmax(125px, .85fr) minmax(190px, 1.2fr) 58px;
    gap: 8px;
    min-height: 50px;
    padding: 7px 8px;
    font-size: 13px;
}
.event-type-panel .event-types-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 10px 12px 12px;
}
.quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 9px 10px 10px;
}
.quick-action {
    min-height: 42px;
}
.quick-action strong, .quick-action i {
    font-size: 15px;
}
.quick-action span {
    font-size: 9px;
}
.dash-entry-panel {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(235px, .55fr);
    gap: 12px;
    padding: 12px;
}
.dash-entry-panel .event-form-title {
    margin-bottom: 8px;
    font-size: 15px;
}
.event-types-grid {
    gap: 6px;
}
.event-type-btn {
    min-height: 34px;
    font-size: 11px;
}
.player-pill {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
}
.entry-fields {
    gap: 8px;
}
.entry-fields label {
    font-size: 12px;
}
.dash-entry-panel .form-control {
    min-height: 34px;
    padding: 7px 10px;
}

@media (max-width: 1400px) {
    .dash-team-main h2 { font-size: 20px; }
    .dash-score-stage { grid-template-columns: minmax(0, 1fr) 135px minmax(0, 1fr); }
    .dash-board-grid { grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr); }
    .dash-timer-panel strong { font-size: 30px; }
    .dash-score { width: 68px; font-size: 40px; }
    .dash-team-main { grid-template-columns: 48px minmax(0, 1fr) 68px; }
    .dash-team-panel.away .dash-team-main { grid-template-columns: 68px minmax(0, 1fr) 48px; }
    .mat-indicator { min-height: 30px; padding: 4px 8px; gap: 5px; }
    .mat-indicator > i { font-size: 15px; }
    .mat-indicator-dots { gap: 2px; }
    .mat-indicator-dots span { width: 8px; height: 8px; }
    .mat-indicator strong { font-size: 16px; }
    .mat-indicator small { font-size: 9px; }
    .match-dashboard-page .match-squad-title { font-size: 16px; }
}

/* ===== Compact Center Timer ===== */

.compact-center-panel {
    padding-bottom: 10px;
}

.compact-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
}

    .compact-controls button {
        border: none;
        border-radius: 6px;
        height: 30px;
        font-size: 11px;
        font-weight: 800;
        cursor: pointer;
        transition: .2s ease;
    }

        .compact-controls button:hover {
            transform: translateY(-1px);
        }

.start-btn {
    background: #16a34a;
    color: #fff;
}

.stop-btn {
    background: #dc2626;
    color: #fff;
}

.reset-btn {
    background: #2563eb;
    color: #fff;
}

.half-btn {
    /*grid-column: span 2;*/
    background: #111827;
    color: #ffd42a;
}

/* remove extra top section spacing */
.dash-score-stage {
    margin-bottom: 0 !important;
    padding-bottom: 2px !important;
}

.match-dashboard-page .compact-center-panel {
    padding-bottom: 4px;
}

.match-dashboard-page .compact-controls {
    gap: 4px;
    padding: 5px 7px 6px;
}

.match-dashboard-page .compact-controls button {
    height: 26px;
    min-height: 26px;
    font-size: 10px;
}

.match-dashboard-page .dash-timer-panel span {
    padding-top: 5px;
}

.match-dashboard-page .dash-timer-panel b {
    font-size: 28px;
}

.match-dashboard-page .timer-progress {
    margin-bottom: 4px;
}

.match-dashboard-page .dash-board-grid {
    /*margin-top: -14px;*/ /*commented  on 25/06/2026*/
}

.match-dashboard-page .match-timer-info {
    display: none;
}

.match-dashboard-page .dash-score-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

.match-dashboard-page .dash-timer-panel {
    display: none !important;
}

.match-dashboard-page .raid-table {
    border: 0;
    background: linear-gradient(180deg, rgba(7, 25, 48, .96), rgba(3, 13, 30, .98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05),
        0 10px 24px rgba(0, 0, 0, .22);
}

.match-dashboard-page .raid-head span {
    border-color: rgba(255, 255, 255, .08);
}

.match-dashboard-page .raid-body {
    padding: 4px 2px 2px;
    background: rgba(2, 10, 24, .34);
    border-radius: 0 0 6px 6px;
}

.match-dashboard-page .raid-list button,
.match-dashboard-page .raid-list span,
.match-dashboard-page .raid-labels button,
.match-dashboard-page .raid-labels span {
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .22);
}

.match-dashboard-page .raid-list button:focus,
.match-dashboard-page .raid-labels button:focus {
    outline: none;
}

.match-dashboard-page .raid-list button.selected,
.match-dashboard-page .raid-labels button.selected {
    color: #06111f;
    border-color: #ffe082;
    background: linear-gradient(180deg, #ffd45f, #ff9f1a);
    box-shadow:
        inset 0 -2px 0 rgba(92, 51, 0, .28),
        0 0 0 2px rgba(255, 212, 95, .32),
        0 0 16px rgba(255, 159, 26, .35);
}

.match-dashboard-page .raid-list button.selected .board-jersey,
.match-dashboard-page .raid-labels button.selected .board-jersey {
    color: #ffd45f;
    background: #06111f;
}

.match-dashboard-page .substitute-trigger {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.match-dashboard-page .substitute-trigger:hover {
    color: #06111f;
    background: #ffc02a;
    box-shadow: 0 0 0 2px rgba(255, 192, 42, .28);
    transform: translateY(-1px);
}

.match-dashboard-page .raid-list button .substitutable-player {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
}

.match-dashboard-page .raid-list button .substitutable-player .board-jersey {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(180deg, #ff8a22, #f05b00);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, .22),
        inset 0 -2px 0 rgba(122, 47, 0, .28);
    font-size: 13px;
}

.match-dashboard-page .raid-list button .substitutable-player .board-name {
    min-height: 30px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 5px;
    background: rgba(255, 255, 255, .035);
}

.match-dashboard-page .raid-list button.selected .substitutable-player .board-jersey {
    color: #07111f;
    background: linear-gradient(180deg, #fff2b8, #ffc02a);
}

.match-dashboard-page .raid-list button.selected .substitutable-player .board-name {
    color: #07111f;
    border-color: rgba(7, 17, 31, .14);
    background: rgba(255, 255, 255, .30);
}

.match-dashboard-page .lineup-open-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.match-dashboard-page .match-dash-header {
    grid-template-columns: 230px minmax(260px, 1fr) minmax(650px, auto);
}

.match-dashboard-page .match-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.match-flow-btn {
    min-height: 34px;
    padding: 7px 10px;
    border-color: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 12px;
}

.match-flow-btn.start { background: linear-gradient(180deg, #159947, #0d6f33); }
.match-flow-btn.stop { background: linear-gradient(180deg, #dc2a2a, #a9151d); }
.match-flow-btn.half { background: linear-gradient(180deg, #ffc02a, #d88b00); color: #07111f; }
.match-flow-btn.finish { background: linear-gradient(180deg, #7c2dff, #4d168f); }
.match-flow-btn:disabled {
    opacity: .48;
    filter: grayscale(.25);
    cursor: not-allowed;
}

.dash-bottom-grid.no-advanced {
    grid-template-columns: minmax(0, 1fr) 245px minmax(0, 1fr);
}

.dash-bottom-grid.no-advanced .quick-actions {
    grid-template-columns: repeat(2, minmax(120px, 170px));
    justify-content: start;
}

.dash-entry-panel.no-selected-player {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .55fr);
}

.dash-entry-panel.no-selected-player #player-box {
    display: none !important;
}

.match-dashboard-page .match-info-strip.dash-version {
    grid-template-columns:
        minmax(310px, 2.15fr)
        minmax(240px, 1.45fr)
        minmax(165px, .9fr)
        minmax(115px, .65fr)
        minmax(300px, 1.45fr)
        minmax(105px, .55fr);
    align-items: stretch;
}

.match-dashboard-page .match-info-strip.dash-version div {
    min-width: 0;
    padding: 9px 10px;
}

.match-dashboard-page .match-info-strip.dash-version strong,
.match-dashboard-page .match-info-strip.dash-version em {
    display: block;
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-dashboard-page .match-info-strip.dash-version span {
    line-height: 1.2;
}

.match-dashboard-page .team-logo-badge {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.1);
}

.match-dashboard-page .team-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.match-dashboard-page .team-logo-badge span {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

/* remove oversized empty area */
.dash-team-panel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: fit-content !important;
    min-height: unset !important;
    display: block !important;
    align-self: start;
    margin: 0;
    padding: 0;
}
.dash-score-stage {
    align-items: start !important;
}

    /* VERY IMPORTANT */
    .dash-score-stage > * {
        align-self: start !important;
    }

/* =========================
   PAGINATION
========================= */

.custom-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #081a33;
    color: #dbe6f3;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all .25s ease;
}

    /* Hover */

    .page-btn:hover {
        background: #102544;
        color: #fff;
        transform: translateY(-2px);
    }

    /* Active */

    .page-btn.active {
        background: linear-gradient(135deg,#ff7a00,#ff4d00);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 5px 15px rgba(255,106,0,.35);
    }

    /* Disabled */

    .page-btn.disabled {
        opacity: .4;
        pointer-events: none;
        cursor: not-allowed;
    }


/* =========================
   CARD HEADER
========================= */

.custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* =========================
   TOOLBAR
========================= */

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================
   SEARCH FORM
========================= */

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================
   SEARCH BOX
========================= */

.search-box {
    width: 300px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #081a33;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 0 14px;
    transition: .25s ease;
}

.filter-box {
    width: 260px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #081a33;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 0 14px;
    transition: .25s ease;
}

    .filter-box:focus-within {
        border-color: #ff6a00;
        box-shadow: 0 0 0 3px rgba(255,106,0,.12);
    }

    .filter-box i {
        color: #ff9b3d;
        font-size: 14px;
    }

    .filter-box select {
        width: 100%;
        min-width: 0;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

        .filter-box select option {
            background: #081a33;
            color: #fff;
        }

    .search-box:focus-within {
        border-color: #ff6a00;
        box-shadow: 0 0 0 3px rgba(255,106,0,.12);
    }

    .search-box i {
        color: #7f8ea3;
        font-size: 14px;
    }

    .search-box input {
        width: 100%;
        background: none;
        border: none;
        outline: none;
        color: #fff;
        font-size: 14px;
    }

        .search-box input::placeholder {
            color: #7f8ea3;
        }

/* =========================
   SEARCH BUTTON
========================= */

.search-btn {
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg,#ff7a00,#ff4d00);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s ease;
}

    .search-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255,106,0,.35);
    }



/* =========================
   HIGHLIGHT INFO BOX
========================= */

.highlight-box {
    background: linear-gradient( 180deg, rgba(255,122,0,.08), rgba(255,122,0,.03) );
    position: relative;
}

    /* Top Accent */

    .highlight-box::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,#ff7a00,#ff4d00);
    }

/* Timer */

.highlight-value {
    color: #ffb347 !important;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Rajdhani',sans-serif;
}

/* Half Section */

.half-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Half Text */

.half-highlight {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-style: italic;
    font-weight: 700;
    font-family: 'Rajdhani',sans-serif;
}

/* Compact Button */

.half-btn {
    height: 22px;
    padding: 0 8px;
    border: none;
    border-radius: 4px;
    background: #ffb800;
    color: #111;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.match-dashboard-page .dash-player-btn {
    position: relative;
    grid-template-columns: 1fr;
}

.match-dashboard-page .dash-player-btn small {
    position: absolute;
    top: 2px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #ffc107;
    color: #07111f;
    font-size: 10px;
    line-height: 1;
}

.match-dashboard-page .sub-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    flex-wrap: nowrap;
}

.match-dashboard-page .match-squad-title {
    color: #fff;
    font: 900 18px Rajdhani, sans-serif;
    letter-spacing: .2px;
    white-space: nowrap;
}

.match-dashboard-page .lineup-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 5px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.match-dashboard-page .lineup-open-btn:hover {
    border-color: #ffc107;
    color: #ffc107;
}

.match-dashboard-page .raid-reset-inline {
    border-color: rgba(255, 184, 0, .45);
    background: rgba(255, 184, 0, .16);
    color: #ffd45f;
}

.match-dashboard-page .raid-reset-inline:hover {
    border-color: #ffdd75;
    color: #fff0b8;
}

.match-dashboard-page .sub-row {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 10px;
}

.lineup-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.match-dashboard-page .dash-team-panel.raiding,
.match-dashboard-page .raid-table.raiding {
    box-shadow: 0 0 0 2px #ffc107, 0 0 22px rgba(255, 193, 7, .24);
}

.match-dashboard-page .raid-table {
    position: relative;
    margin-top: 10px;
    transition: opacity .18s ease, box-shadow .18s ease, filter .18s ease;
}

.match-dashboard-page .raid-table.raid-inactive {
    box-shadow: inset 0 0 0 1px rgba(117, 143, 175, .16);
    filter: saturate(.58);
}

.match-dashboard-page .raid-table.raid-inactive .raid-body {
    opacity: .42;
}

.match-dashboard-page .raid-table.raid-inactive::after {
    content: "WAITING";
    position: absolute;
    top: -9px;
    right: 10px;
    z-index: 5;
    padding: 2px 7px;
    border: 1px solid rgba(159, 178, 202, .35);
    border-radius: 999px;
    color: #b7c5d8;
    background: rgba(4, 15, 31, .96);
    font-family: "Rajdhani", sans-serif;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
    pointer-events: none;
}

.match-dashboard-page .raid-table.raiding::after {
    content: "ACTIVE RAID";
    position: absolute;
    top: -9px;
    right: 10px;
    z-index: 5;
    padding: 2px 8px;
    border: 1px solid #ffc107;
    border-radius: 999px;
    color: #07111f;
    background: #ffc107;
    font-family: "Rajdhani", sans-serif;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(255, 193, 7, .28);
    pointer-events: none;
}

.match-dashboard-page button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.toss-dialog {
    width: min(620px, 100%);
}

.toss-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.toss-grid h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 16px;
}

.toss-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #183a66;
    border-radius: 7px;
    background: #081a33;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.toss-option:has(input:checked) {
    border-color: #ffc107;
    background: rgba(255, 193, 7, .14);
}

.lineup-modal.open {
    display: flex;
}

.lineup-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
}

.lineup-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid #1f477c;
    border-radius: 8px;
    background: #07111f;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

.lineup-modal-header,
.lineup-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: #091b34;
    border-bottom: 1px solid #1f477c;
}

.lineup-modal-footer {
    border-top: 1px solid #1f477c;
    border-bottom: 0;
}

.lineup-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.lineup-modal-header span,
.lineup-modal-footer span {
    color: #9fb2ca;
    font-weight: 800;
}

.lineup-modal-body {
    overflow: auto;
    padding: 12px;
}

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

.substitute-option {
    width: 100%;
    min-height: 72px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid #1d4a7e;
    border-radius: 7px;
    color: #fff;
    background: #081a33;
    text-align: left;
}

.squad-substitute-option {
    grid-template-columns: 34px 54px minmax(0, 1fr);
}

.squad-substitute-option .squad-check {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #315b8f;
    border-radius: 5px;
    color: #9fb2ca;
    background: #061426;
}

.squad-substitute-option.selected .squad-check {
    border-color: #25d366;
    color: #06111f;
    background: #25d366;
}

.substitute-option .player-jersey {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #ff6a00;
    font-weight: 900;
}

.substitute-option .lineup-player-copy strong {
    color: #fff;
    font-size: 18px;
}

.substitute-option .lineup-player-copy small {
    color: #9fb2ca;
    font-size: 13px;
}

.substitute-option:hover,
.substitute-option.selected {
    border-color: #ffc02a;
    background: #102a45;
}

.substitute-option.selected {
    box-shadow: 0 0 0 2px rgba(255, 192, 42, .28) inset;
}

.lineup-player-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #183a66;
    border-radius: 7px;
    background: #081a33;
}

.lineup-player-row + .lineup-player-row {
    margin-top: 8px;
}

.lineup-player-row.selected {
    border-color: #25d366;
    background: #0a2537;
}

.lineup-playing-toggle {
    display: grid;
    grid-template-columns: auto 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    cursor: pointer;
}

.lineup-playing-toggle input {
    width: 18px;
    height: 18px;
}

.lineup-player-copy {
    min-width: 0;
}

.lineup-player-copy strong,
.lineup-player-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-player-copy small {
    color: #9fb2ca;
    font-size: 12px;
}

.lineup-role-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lineup-role-controls label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 58px;
    justify-content: center;
    border: 1px solid #274e82;
    border-radius: 5px;
    padding: 7px 8px;
    color: #fff;
    font-weight: 900;
}

.lineup-role-controls label:has(input:checked) {
    border-color: #ffc107;
    background: #ffc107;
    color: #07111f;
}

@media (max-width: 720px) {
    .lineup-player-row {
        grid-template-columns: 1fr;
    }

    .lineup-role-controls {
        justify-content: flex-end;
    }

    .lineup-modal-footer {
        flex-wrap: wrap;
    }
}
