/* ==========================================================================
   FEST MANAGER PRO — COMPONENT LIBRARY v2
   ========================================================================== */

/* ─── Keyframe Animations ────────────────────────────────────────────────── */
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes scale-pop {
    0%   { transform: scale(0.90); opacity: 0; }
    60%  { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes shine {
    from { background-position: -200% center; }
    to   { background-position: 200% center; }
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(59,110,248,0.35); }
    70%  { box-shadow: 0 0 0 10px rgba(59,110,248,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,110,248,0); }
}

@keyframes shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position: 800px 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(120%); }
}

@keyframes badge-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ─── Header / Topbar ────────────────────────────────────────────────────── */
.topbar {
    height: var(--header-h);
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: slide-down 250ms ease;
}

.topbar__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-5);
    gap: var(--s-4);
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.topbar__logo {
    width: 34px;
    height: 34px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
    flex-shrink: 0;
}

.topbar__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.025em;
}

.topbar__subtitle {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
    margin-top: -1px;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

/* Connection indicator */
.conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
    transition: background var(--t-base);
    flex-shrink: 0;
}
.conn-dot.live  { background: var(--green); animation: pulse-ring 2s infinite; }
.conn-dot.mock  { background: var(--amber); }
.conn-dot.error { background: var(--red); }

.conn-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
}

.card > :first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.card > :last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(59,110,248,0.12);
}

.card--interactive {
    cursor: pointer;
}

.card--interactive:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card--interactive:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.card--selected {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px var(--blue-glow), var(--shadow-md) !important;
}

.card--flat {
    box-shadow: none;
    border-color: var(--border);
}

.card--inset {
    background: var(--surface-2);
    border-color: transparent;
}

.card__header {
    padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
}

.card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.card__title-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--blue-soft);
    color: var(--blue);
}

.card__body {
    padding: var(--s-6);
}

.card__footer {
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

/* Stat Cards */
.stat-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s-5) var(--s-6);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    transition: box-shadow var(--t-base), transform var(--t-base);
    animation: slide-up 220ms ease both;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-2);
}

.stat-card__value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-0);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-card__sub {
    font-size: 12px;
    color: var(--text-2);
}

.stat-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: var(--s-2);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    height: 36px;
    padding: 0 var(--s-4);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background var(--t-fast),
        color var(--t-fast),
        border-color var(--t-fast),
        box-shadow var(--t-fast),
        transform var(--t-fast);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    letter-spacing: -0.005em;
    text-decoration: none;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.btn:active {
    transform: scale(0.96);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--t-fast);
    border-radius: inherit;
}
.btn:hover::before { background: rgba(255,255,255,0.07); }

/* Primary */
.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59,110,248,0.3);
}
.btn-primary:hover {
    background: var(--blue-dim);
    box-shadow: var(--shadow-blue);
}

/* Secondary */
.btn-secondary {
    background: var(--surface-2);
    color: var(--text-1);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--surface-3);
    border-color: rgba(59,110,248,0.2);
    color: var(--blue);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text-0);
    border-color: var(--border);
}

/* Danger */
.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border-color: rgba(239,68,68,0.15);
}
.btn-danger:hover {
    background: var(--red);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

/* Success */
.btn-success {
    background: var(--green-soft);
    color: var(--green);
    border-color: rgba(16,185,129,0.15);
}
.btn-success:hover {
    background: var(--green);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

/* Amber */
.btn-amber {
    background: var(--amber-soft);
    color: var(--amber);
    border-color: rgba(245,158,11,0.2);
}
.btn-amber:hover {
    background: var(--amber);
    color: #fff;
}

/* Icon button */
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--r-md);
    font-size: 16px;
}

/* Sizes */
.btn-sm {
    height: 30px;
    padding: 0 var(--s-3);
    font-size: 12px;
    border-radius: var(--r-sm);
}

.btn-lg {
    height: 44px;
    padding: 0 var(--s-6);
    font-size: 15px;
    border-radius: var(--r-lg);
}

.btn-xl {
    height: 52px;
    padding: 0 var(--s-8);
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--r-xl);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Loading state */
.btn.loading {
    pointer-events: none;
    color: transparent !important;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    filter: brightness(10);
}

/* ─── Form Elements ──────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.form-input,
.form-textarea,
.form-select,
.form-control {
    width: 100%;
    height: 40px;
    padding: 0 var(--s-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-0);
    outline: none;
    transition:
        border-color var(--t-fast),
        background var(--t-fast),
        box-shadow var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-3);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: rgba(59,110,248,0.2);
    background: var(--surface-1);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-textarea {
    height: auto;
    min-height: 96px;
    padding: var(--s-3) var(--s-4);
    resize: vertical;
    line-height: 1.6;
}

/* Custom select wrapper */
.select-wrap {
    position: relative;
}
.select-wrap::after {
    content: '▾';
    position: absolute;
    right: var(--s-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-2);
    pointer-events: none;
    font-size: 12px;
    transition: transform var(--t-fast);
}
.select-wrap:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--blue);
}
.select-wrap .form-select {
    padding-right: var(--s-8);
    cursor: pointer;
}

/* Search input */
.search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 13px;
    pointer-events: none;
    transition: color var(--t-fast);
    z-index: 2;
}
.search-wrap:focus-within .search-icon {
    color: var(--blue);
}
.search-wrap input,
.search-wrap .form-input,
.search-wrap .form-control {
    padding-left: 36px !important;
}

/* ─── Member Roster Dual Filter Toolbar ──────────────────────────────────── */
.roster-toolbar {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.roster-toolbar-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
}

.roster-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.roster-filter-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.roster-select {
    min-width: 140px;
    height: 32px;
    font-size: 12.5px;
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--text-0);
    border: 1px solid var(--border);
    padding: 0 10px;
    cursor: pointer;
}

.roster-select:focus {
    border-color: var(--blue);
    outline: none;
}

.chip--warning {
    border-color: rgba(245, 158, 11, 0.25) !important;
}

.chip--warning.selected {
    background: var(--amber-soft) !important;
    color: var(--amber) !important;
    border-color: var(--amber) !important;
}

/* Checkbox */
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.checkbox-wrap input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
    border-radius: var(--r-sm);
}

.checkbox-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    cursor: pointer;
}

.toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle__track {
    width: 38px;
    height: 22px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    transition: background var(--t-fast), border-color var(--t-fast);
    flex-shrink: 0;
}

.toggle__thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: left var(--t-base);
}

.toggle input:checked ~ .toggle__track {
    background: var(--blue);
    border-color: var(--blue);
}

.toggle input:checked ~ .toggle__track .toggle__thumb {
    left: 18px;
}

.toggle__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 4px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.tab,
.tab-btn {
    flex: 1;
    min-width: 80px;
    height: 34px;
    padding: 0 var(--s-4);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: var(--font);
    transition:
        color var(--t-fast),
        background var(--t-fast),
        box-shadow var(--t-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    outline: none;
}

.tab:hover,
.tab-btn:hover {
    color: var(--text-0);
    background: rgba(255,255,255,0.6);
}

.tab.active,
.tab-btn.active {
    background: var(--surface-1);
    color: var(--blue);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: slide-up 200ms ease;
}

.tab-content.active {
    display: block;
}

/* Underline tabs variant */
.tabs-underline {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.tabs-underline .tab {
    background: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    height: 40px;
    flex: 0 0 auto;
    padding: 0 var(--s-5);
}

.tabs-underline .tab:hover {
    background: none;
    color: var(--text-0);
    border-bottom-color: rgba(59,110,248,0.25);
}

.tabs-underline .tab.active {
    background: none;
    box-shadow: none;
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* ─── Badges / Pills ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 var(--s-2);
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform var(--t-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge--dot::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-blue    { background: var(--blue-soft); color: var(--blue); }
.badge-green   { background: var(--green-soft); color: var(--green); }
.badge-red     { background: var(--red-soft); color: var(--red); }
.badge-amber   { background: var(--amber-soft); color: var(--amber); }
.badge-teal    { background: var(--teal-soft); color: var(--teal); }
.badge-violet  { background: var(--violet-soft); color: var(--violet); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }

/* Rank badges */
.rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #cd7c2f, #a05c1e); color: #fff; }
.rank-n { background: var(--surface-3); color: var(--text-2); }

/* ─── Table ──────────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    padding: var(--s-3) var(--s-4);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--border);
    color: var(--text-1);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--t-fast);
}

.table tbody tr:hover {
    background: var(--surface-2);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table--compact th,
.table--compact td {
    padding: var(--s-2) var(--s-3);
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    animation: fade-in 180ms ease;
}

.overlay.hidden { display: none; }

.modal {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scale-pop 250ms ease;
    overflow: hidden;
}

.modal--lg { max-width: 720px; }
.modal--sm { max-width: 380px; }

.modal__header {
    padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.02em;
}

.modal__close {
    width: 30px;
    height: 30px;
    border-radius: var(--r-md);
    border: none;
    background: var(--surface-2);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: var(--font);
    line-height: 1;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.modal__close:hover {
    background: var(--red-soft);
    color: var(--red);
}

.modal__body {
    padding: var(--s-6);
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}

.modal__footer {
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s-2);
    flex-shrink: 0;
    background: var(--surface-2);
}

/* ─── Dropdown / Popover ─────────────────────────────────────────────────── */
.dropdown-wrap {
    position: relative;
    display: inline-flex;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + var(--s-2));
    right: 0;
    min-width: 180px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--s-2);
    z-index: 300;
    animation: scale-in 160ms ease;
    transform-origin: top right;
}

.dropdown-menu.hidden { display: none; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--surface-2);
    color: var(--text-0);
}

.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-soft); }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: var(--s-2) 0;
}

/* ─── Toast Notifications ────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: var(--s-6);
    right: var(--s-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-5);
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-lg);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    pointer-events: all;
    animation: toast-in 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 340px;
    border: 1px solid rgba(255,255,255,0.08);
}

.toast.dismissing {
    animation: toast-out 180ms ease forwards;
}

.toast__icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-success .toast__icon { color: var(--green); }
.toast-error   .toast__icon { color: var(--red); }
.toast-warning .toast__icon { color: var(--amber); }
.toast-info    .toast__icon { color: var(--blue); }

/* ─── Empty / Skeleton States ────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    padding: var(--s-12) var(--s-6);
    text-align: center;
    animation: fade-in 300ms ease;
}

.empty-state__icon {
    font-size: 36px;
    opacity: 0.3;
}

.empty-state__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-2);
}

.empty-state__sub {
    font-size: 13px;
    color: var(--text-3);
    max-width: 280px;
    line-height: 1.6;
}

.skeleton {
    background: linear-gradient(90deg,
        var(--surface-3) 25%,
        rgba(255,255,255,0.6) 50%,
        var(--surface-3) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--r-md);
}

/* ─── Separator / Divider ────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: var(--s-5) 0;
}

.divider-label {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: var(--s-5) 0;
}
.divider-label::before,
.divider-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── Quota / Progress ───────────────────────────────────────────────────── */
.quota-row {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.quota-row__label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
}

.quota-track {
    height: 5px;
    background: var(--surface-3);
    border-radius: var(--r-full);
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width var(--t-slow);
}

.quota-fill--ok    { background: var(--green); }
.quota-fill--warn  { background: var(--amber); }
.quota-fill--full  { background: var(--red); }

/* ─── Section Chips (program type selector) ──────────────────────────────── */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    height: 32px;
    padding: 0 var(--s-3);
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background var(--t-fast),
        color var(--t-fast),
        border-color var(--t-fast),
        transform var(--t-spring);
    user-select: none;
    -webkit-user-select: none;
}

.chip:hover {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: rgba(59,110,248,0.2);
}

.chip.selected {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(59,110,248,0.3);
    transform: scale(1.03);
}

/* ─── Login Page ─────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 30%, rgba(77, 0, 68, 0.55) 0%, rgba(20, 2, 18, 0.94) 65%, rgba(11, 1, 9, 0.98) 100%);
    padding: var(--s-5);
}

.login-card {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border: 1px solid rgba(77, 0, 68, 0.08);
    border-radius: 24px;
    padding: 2.25rem 1.85rem;
    box-shadow: 0 24px 60px -12px rgba(11, 1, 9, 0.28), 0 0 0 1px rgba(229, 185, 0, 0.18);
    position: relative;
    overflow: hidden;
    animation: silmPortalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    box-sizing: border-box;
}

[data-theme="dark"] .login-card {
    background: #160415;
    border-color: rgba(229, 185, 0, 0.25);
    box-shadow: 0 28px 70px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(178, 11, 65, 0.2), 0 0 0 1px rgba(229, 185, 0, 0.3);
}

.login-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
}

.login-brand__logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #B20B41 0%, #4D0044 100%);
    border: 1px solid rgba(229, 185, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.05em;
    box-shadow: 0 4px 16px rgba(178, 11, 65, 0.35);
}

.login-brand__name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.03em;
}

.login-brand__tag {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
}

.login-code-input {
    font-size: 22px;
    font-family: var(--font-mono);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    height: 56px;
}

.login-roles {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
    background: var(--surface-2);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.login-role-item {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-1);
}

.login-role-item__icon {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.login-role-item__text {
    font-size: 12px;
}

.login-role-item__label {
    font-weight: 700;
    color: var(--text-0);
}

.login-role-item__hint {
    color: var(--text-3);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* ─── Stagger Animation Helpers ──────────────────────────────────────────── */
.stagger > * {
    animation: slide-up 220ms ease both;
}
.stagger > *:nth-child(1)  { animation-delay:   0ms; }
.stagger > *:nth-child(2)  { animation-delay:  40ms; }
.stagger > *:nth-child(3)  { animation-delay:  80ms; }
.stagger > *:nth-child(4)  { animation-delay: 120ms; }
.stagger > *:nth-child(5)  { animation-delay: 160ms; }
.stagger > *:nth-child(6)  { animation-delay: 200ms; }
.stagger > *:nth-child(7)  { animation-delay: 240ms; }
.stagger > *:nth-child(8)  { animation-delay: 280ms; }

/* ─── Infobar (replaces disclaimer/note boxes) ───────────────────────────── */
.infobar {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.infobar-blue   { background: var(--blue-soft); color: var(--blue); border-color: rgba(59,110,248,0.15); }
.infobar-amber  { background: var(--amber-soft); color: #92670a; border-color: rgba(245,158,11,0.2); }
.infobar-green  { background: var(--green-soft); color: #0a7a53; border-color: rgba(16,185,129,0.2); }
.infobar-red    { background: var(--red-soft); color: var(--red); border-color: rgba(239,68,68,0.15); }

.infobar__icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.infobar__body { flex: 1; line-height: 1.5; }
.infobar__title { font-weight: 700; margin-bottom: 2px; }

/* ─── Page Header ────────────────────────────────────────────────────────── */
.page-header {
    margin-bottom: var(--s-6);
    animation: slide-down 200ms ease;
}

.page-header__eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--blue);
    margin-bottom: var(--s-1);
}

.page-header__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.03em;
    margin-bottom: var(--s-1);
}

.page-header__sub {
    font-size: 13px;
    color: var(--text-2);
}

/* ─── Section Dividers ───────────────────────────────────────────────────── */
.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-2);
    margin-bottom: var(--s-3);
    display: flex;
    align-items: center;
    gap: var(--s-3);
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── Scrollable area (panel) ────────────────────────────────────────────── */
.scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ─── Mobile Responsiveness ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tabs { gap: 2px; }
    .tab  { min-width: 60px; font-size: 12px; height: 32px; }
    .modal { border-radius: var(--r-lg); }
    #toast-container { left: var(--s-4); right: var(--s-4); bottom: var(--s-4); }
    .topbar__subtitle { display: none; }
}

/* --- Extended Compatibility & Utility Aliases --- */
.btn-teal {
    background: var(--teal-soft);
    color: var(--teal);
    border-color: rgba(6, 182, 212, 0.2);
}
.btn-teal:hover {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-purple {
    background: var(--violet-soft);
    color: var(--violet);
    border-color: rgba(139, 92, 246, 0.2);
}
.btn-purple:hover {
    background: var(--violet);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.btn-dark {
    background: var(--ink-light);
    color: #fff;
    border-color: var(--ink-muted);
}
.btn-dark:hover {
    background: var(--ink);
    color: #fff;
}

.form-control {
    width: 100%;
    height: 40px;
    padding: 0 var(--s-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-0);
    outline: none;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.form-control:hover {
    border-color: rgba(59,110,248,0.2);
    background: var(--surface-1);
}
.form-control:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--blue-glow);
}
select.form-control {
    cursor: pointer;
}

.tab-container {
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 4px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
    margin-bottom: var(--s-6);
}

.tab-btn {
    flex: 1;
    min-width: 100px;
    height: 38px;
    padding: 0 var(--s-4);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: var(--font);
    transition: color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    outline: none;
}
.tab-btn:hover {
    color: var(--text-0);
    background: rgba(255,255,255,0.7);
}
.tab-btn.active {
    background: var(--surface-1);
    color: var(--blue);
    box-shadow: var(--shadow-sm);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
    animation: fade-in 180ms ease;
}
.modal-overlay.hidden { display: none !important; }

.modal-dialog {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scale-pop 250ms ease;
    overflow-y: auto;
    position: relative;
    padding: var(--s-6);
}

.modal-close-btn {
    position: absolute;
    top: var(--s-5);
    right: var(--s-5);
    width: 30px;
    height: 30px;
    border-radius: var(--r-md);
    border: none;
    background: var(--surface-2);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: var(--font);
    line-height: 1;
    transition: background var(--t-fast), color var(--t-fast);
}
.modal-close-btn:hover {
    background: var(--red-soft);
    color: var(--red);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--surface-1);
}

.toast-container {
    position: fixed;
    bottom: var(--s-6);
    right: var(--s-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    pointer-events: none;
}

.app-header {
    height: var(--header-h);
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-5);
    gap: var(--s-4);
}
.header-brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}
.header-logo-img {
    height: 34px;
    border-radius: var(--r-sm);
}
.header-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 var(--s-3);
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.role-admin  { background: var(--blue-soft); color: var(--blue); }
.role-judge  { background: var(--violet-soft); color: var(--violet); }
.role-leader { background: var(--amber-soft); color: var(--amber); }
.role-member { background: var(--green-soft); color: var(--green); }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: var(--s-2); }
.gap-md { gap: var(--s-4); }
.gap-lg { gap: var(--s-6); }
.text-center { text-align: center; }

/* ==========================================================================
   CUSTOM FLOATING SELECT CARDS (Replaces boxy native dropdowns)
   ========================================================================== */

.custom-select-wrap {
    position: relative;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
    display: block;
    vertical-align: middle;
}

.custom-select-wrap--sm {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

.custom-select-wrap.is-open {
    z-index: 10050;
}

.custom-select-trigger {
    width: 100%;
    height: 42px;
    padding: 0 var(--s-4);
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-family: var(--font);
    color: var(--text-0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    cursor: pointer;
    transition:
        border-color var(--t-fast),
        box-shadow var(--t-fast),
        background var(--t-fast),
        transform var(--t-fast);
    outline: none;
    text-align: left;
    box-shadow: var(--shadow-xs);
    box-sizing: border-box;
}

.custom-select-trigger--sm {
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: var(--r-sm, 6px);
    gap: 6px;
}

.custom-select-trigger:hover {
    border-color: rgba(59, 110, 248, 0.35);
    background: var(--surface-1);
    box-shadow: 0 3px 10px rgba(59, 110, 248, 0.08);
}

.custom-select-wrap.is-open .custom-select-trigger,
.custom-select-trigger:focus-visible {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
    background: var(--surface-1);
}

.custom-select-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.custom-select-label.is-placeholder {
    color: var(--text-3);
    font-weight: 400;
}

.custom-select-arrow {
    font-size: 11px;
    color: var(--text-2);
    transition: transform var(--t-base), color var(--t-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.custom-select-wrap.is-open .custom-select-arrow {
    transform: rotate(180deg);
    color: var(--blue);
}

/* Floating Popover Card */
.custom-select-popover {
    position: fixed;
    width: 100%;
    min-width: 240px;
    background: var(--surface-1, #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--r-lg, 12px);
    box-shadow: 0 20px 40px -4px rgba(10, 14, 26, 0.28), 0 8px 18px rgba(0, 0, 0, 0.12);
    z-index: 9999999;
    padding: 6px;
    animation: select-pop 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: top center;
    box-sizing: border-box;
    overflow: hidden;
}

.custom-select-popover.popover-up {
    transform-origin: bottom center;
    animation-name: select-pop-up;
}

@keyframes select-pop {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes select-pop-up {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-select-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 2px;
}

/* Individual Option Card */
.custom-select-option {
    padding: 9px 12px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.custom-select-option:hover {
    background: var(--blue-soft);
    color: var(--blue);
    transform: translateX(3px);
}

.custom-select-option.is-selected {
    background: rgba(59, 110, 248, 0.1);
    color: var(--blue);
    font-weight: 700;
}

.custom-select-option-text {
    flex: 1;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.custom-select-check {
    display: none;
    font-size: 11px;
    color: var(--blue);
}

.custom-select-option.is-selected .custom-select-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-select-header {
    padding: 6px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.custom-select-empty {
    padding: var(--s-4);
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
}

/* ─── Compact Custom Select for Dual Filter Rows ─────────────────────────── */
.reg-dual-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: var(--s-2);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.reg-dual-filter-row .select-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.reg-dual-filter-row .select-wrap::after {
    display: none !important;
}
.reg-filter-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: 32px !important;
    padding: 0 18px 0 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: var(--surface-1) !important;
    color: var(--text-1) !important;
    border: 1px solid var(--border) !important;
    cursor: pointer;
    transition: all var(--t-fast);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: 30px;
}
.reg-filter-select:hover {
    border-color: rgba(59, 110, 248, 0.35) !important;
    background: var(--surface-2) !important;
}
.reg-filter-select:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 2px var(--blue-glow) !important;
    outline: none;
}
.reg-filter-select.filter-active {
    border-color: var(--blue) !important;
    color: var(--blue) !important;
    background: var(--blue-soft, rgba(59, 110, 248, 0.08)) !important;
    font-weight: 700 !important;
}

.reg-dual-filter-row .custom-select-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}
.reg-dual-filter-row .custom-select-trigger {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 6px 0 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: var(--surface-1) !important;
    color: var(--text-1) !important;
    border: 1px solid var(--border) !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
.reg-dual-filter-row .custom-select-trigger:hover {
    border-color: rgba(59, 110, 248, 0.35) !important;
    background: var(--surface-2) !important;
}
.reg-dual-filter-row .custom-select-wrap.is-open .custom-select-trigger,
.reg-dual-filter-row .custom-select-trigger:focus-visible {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 2px var(--blue-glow) !important;
}
.reg-dual-filter-row .custom-select-label {
    flex: 1 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}
.reg-dual-filter-row .custom-select-arrow {
    width: 12px !important;
    height: 12px !important;
    font-size: 8.5px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.reg-dual-filter-row .reg-filter-select.filter-active + .custom-select-wrap .custom-select-trigger,
.reg-dual-filter-row .custom-select-wrap.filter-active .custom-select-trigger {
    border-color: var(--blue) !important;
    color: var(--blue) !important;
    background: var(--blue-soft, rgba(59, 110, 248, 0.08)) !important;
    font-weight: 700 !important;
}
.reg-dual-filter-row .reg-filter-select.filter-active + .custom-select-wrap .custom-select-arrow,
.reg-dual-filter-row .custom-select-wrap.filter-active .custom-select-arrow {
    color: var(--blue) !important;
}

/* ─── Programme Repository Modern UI ─────────────────────────────────────── */
.prog-toolbar {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.prog-toolbar::-webkit-scrollbar {
    display: none;
}

.prog-toolbar .chip {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.prog-toolbar .chip-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.desk-filter-divider {
    height: 18px;
    width: 1px;
    background: var(--border);
    margin: 0 2px;
    flex-shrink: 0;
}

.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-2);
    margin-left: 3px;
    min-width: 16px;
}

.chip.selected .chip-count {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.prog-item {
    border-bottom: 1px solid var(--border);
    transition: background var(--t-fast);
}

.prog-item:last-child {
    border-bottom: none;
}

.prog-item:hover {
    background: rgba(37, 99, 235, 0.015);
}

.prog-item--expanded {
    background: rgba(37, 99, 235, 0.025);
}

.prog-item--just-updated {
    background: rgba(13, 148, 136, 0.08) !important;
    outline: 2px solid var(--teal) !important;
    outline-offset: -2px;
    border-radius: var(--r-md);
    transition: all 0.4s ease;
}

.prog-item__bar {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prog-item__info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.prog-chevron-btn {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-3);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 11px;
    transition: color var(--t-fast), background var(--t-fast);
    flex-shrink: 0;
}

.prog-chevron-btn:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.prog-chevron-placeholder {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
}

.prog-chevron-icon {
    transition: transform var(--t-fast);
}

.prog-code-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 2px 7px;
    border-radius: var(--r-sm);
    border: 1px solid rgba(59, 110, 248, 0.18);
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.prog-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-0);
    margin-right: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.prog-pill-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    line-height: 1.3;
}

.prog-pill--topic {
    background: rgba(245, 158, 11, 0.09);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.prog-pill--criteria {
    background: rgba(59, 110, 248, 0.08);
    color: var(--blue);
    border: 1px solid rgba(59, 110, 248, 0.2);
}

.prog-item__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-xs {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    border-radius: var(--r-sm);
}

/* Collapsible Drawer */
.prog-drawer {
    padding: 12px 18px 16px 48px;
    background: var(--surface-1);
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slide-down 160ms ease;
}

.prog-drawer-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.prog-drawer-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.prog-drawer-method-text {
    font-size: 12.5px;
    color: var(--text-1);
    background: rgba(6, 182, 212, 0.05);
    border-left: 3px solid #06b6d4;
    padding: 6px 12px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    line-height: 1.5;
    word-break: break-word;
}

.prog-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prog-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.4;
    unicode-bidi: isolate;
    max-width: 100%;
}

.prog-chip--topic {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.prog-chip-idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.prog-chip--criteria {
    background: rgba(59, 110, 248, 0.05);
    border: 1px solid rgba(59, 110, 248, 0.18);
    color: var(--blue);
    font-weight: 500;
}

.prog-drawer-rules {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    background: rgba(245, 158, 11, 0.07);
    border-left: 3px solid #f59e0b;
    padding: 6px 12px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--text-1);
    line-height: 1.5;
}

/* ==========================================================================
   MINIMALIST SIDEBAR & DASHBOARD SHELL
   ========================================================================== */
.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: clip;
    max-width: 100vw;
    position: relative;
}

/* ─── Left Sidebar ───────────────────────────────────────────────────────── */
.app-sidebar {
    width: 270px;
    flex-shrink: 0;
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    transition: transform var(--t-fast), left var(--t-fast);
}

.sidebar__brand {
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    height: var(--header-h, 62px);
    box-sizing: border-box;
    flex-shrink: 0;
    transition: background var(--t-fast);
}

.sidebar__brand:hover {
    background: var(--surface-2);
}

.sidebar__logo {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--blue), #6366f1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(59, 110, 248, 0.35);
    flex-shrink: 0;
}

.sidebar__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sidebar__tagline {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar__nav-section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overscroll-behavior: contain;
}

.sidebar__group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 14px 10px 4px 10px;
}

.sidebar__group-label:first-child {
    padding-top: 2px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--r-md);
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background var(--t-fast), color var(--t-fast);
    user-select: none;
    outline: none;
    position: relative;
}

.sidebar-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: var(--text-3);
    transition: color var(--t-fast);
    flex-shrink: 0;
}

.sidebar-item:hover {
    background: var(--surface-2);
    color: var(--text-0);
}

.sidebar-item:hover i {
    color: var(--blue);
}

.sidebar-item.active {
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 600;
}

.sidebar-item.active i {
    color: var(--blue);
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--blue);
}

.sidebar-item .sidebar-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sidebar-badge {
    flex: 0 0 auto !important;
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item.active .sidebar-badge {
    background: rgba(59, 110, 248, 0.18);
    color: var(--blue);
}

/* Sleek Sidebar Live Status Pill */
.sidebar-live-pill {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #059669;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

[data-theme="dark"] .sidebar-live-pill {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

/* Universal Inline Live Status Pill */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

[data-theme="dark"] .live-pill {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.sidebar-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #059669;
    position: relative;
    flex-shrink: 0;
}

[data-theme="dark"] .sidebar-live-dot {
    background: #34d399;
}

.sidebar-live-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.35);
    animation: live-pulse-ring 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes live-pulse-ring {
    0% { transform: scale(0.8); opacity: 0.9; }
    70% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

.sidebar__footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--surface-1);
    box-sizing: border-box;
    height: 56px;
    flex-shrink: 0;
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.sidebar__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar__user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar__user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-role {
    font-size: 10.5px;
    color: var(--text-3);
}

.sidebar__logout-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    border: none;
    background: transparent;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}

.sidebar__logout-btn:hover {
    background: var(--red-soft);
    color: var(--red);
}

/* ─── Main Area ──────────────────────────────────────────────────────────── */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: 270px;
    width: calc(100% - 270px);
    overflow-x: clip;
}

.app-header {
    height: 56px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.app-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle-btn {
    display: none;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-2);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--r-sm);
}

.sidebar-toggle-btn:hover {
    background: var(--surface-2);
    color: var(--text-0);
}

.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-root {
    color: var(--text-3);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--text-3);
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--text-0);
    font-weight: 600;
}

.app-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-content {
    flex: 1;
    padding: 24px;
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: hidden;
}

/* ─── View Header (Unified Section Banner) ───────────────────────────────── */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.view-header__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.3;
}

.view-header__subtitle {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 2px;
}

.view-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── Mobile / Tablet Responsive Drawer ──────────────────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 95;
    backdrop-filter: blur(2px);
}

@media (max-width: 1180px) {
    .app-sidebar {
        position: fixed;
        left: -270px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        z-index: 99;
        transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .app-sidebar.open {
        left: 0;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .sidebar-toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw;
    }

    .app-content {
        padding: clamp(12px, 2vw, 20px) !important;
    }

    /* Topbar Header & Command Palette on Tablet */
    .app-header {
        padding: 0 14px;
        gap: 8px;
    }
    .app-header__left {
        gap: 10px;
        min-width: 0;
        flex: 1;
    }
    .app-breadcrumb {
        max-width: 320px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13.5px;
    }
    .breadcrumb-current {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 700;
    }
    .cmd-palette-trigger {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: var(--r-md);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: var(--surface-2);
        border: 1px solid var(--border);
    }
    .cmd-palette-trigger span,
    .cmd-palette-trigger kbd {
        display: none !important;
    }
    .cmd-palette-trigger i {
        font-size: 13px;
        color: var(--text-2);
        margin: 0;
    }
    .app-header__right {
        gap: 6px;
        flex-shrink: 0;
    }

    /* Clean Table Edge Gutters & Scrolling on Tablet / Narrow Windows */
    .card > .table-responsive {
        border: none !important;
        border-radius: 0 0 var(--r-lg) var(--r-lg);
    }
    .table th:first-child,
    .table td:first-child {
        padding-left: 18px !important;
    }
    .table th:last-child,
    .table td:last-child {
        padding-right: 18px !important;
    }
    .table-responsive {
        border-radius: var(--r-md);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .table {
        min-width: 760px;
    }
    #approvalsDeskTable {
        min-width: 1080px !important;
    }
    .competition-desk-table {
        min-width: 1020px !important;
    }

    /* Symmetrical 2x2 Metric Cards Grid on Tablet */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .judge-stat-card {
        padding: 14px 16px;
    }

    /* Communications Hub Composer Toolbar on Tablet */
    .comms-composer-toolbar {
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 8px 10px !important;
    }
    .comms-priority-selector {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .comms-timer-selector {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .comms-dispatch-action-group {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Touch-friendly Scrolling Podium Cards Track */
    .reports-podium-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        gap: 12px;
        margin-bottom: 20px;
        padding: 4px 0 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .podium-card {
        min-width: 190px;
    }
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */
.theme-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}

.theme-toggle-btn:hover {
    background: var(--surface-3);
    color: var(--blue);
    border-color: var(--blue);
    transform: scale(1.05);
}

/* ==========================================================================
   COMMAND PALETTE (Spotlight Ctrl + K)
   ========================================================================== */
.cmd-palette-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 5px 12px;
    border-radius: var(--r-md);
    font-size: 12.5px;
    cursor: pointer;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
    outline: none;
    height: 32px;
}

.cmd-palette-trigger:hover {
    border-color: var(--blue);
    background: var(--surface-1);
    color: var(--text-0);
    box-shadow: 0 2px 8px var(--blue-glow);
}

.cmd-palette-trigger i {
    font-size: 12px;
    color: var(--text-3);
}

.cmd-palette-trigger:hover i {
    color: var(--blue);
}

.cmd-kbd {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-3);
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    margin-left: 4px;
}

.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: fade-in 140ms ease;
}

.cmd-palette-overlay.hidden {
    display: none !important;
}

.cmd-palette-container {
    width: 100%;
    max-width: 620px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(59, 110, 248, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scale-pop 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
}

.cmd-palette-icon {
    font-size: 16px;
    color: var(--blue);
    flex-shrink: 0;
}

.cmd-palette-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-0);
    outline: none;
}

.cmd-palette-input::placeholder {
    color: var(--text-3);
    font-size: 14px;
}

.cmd-kbd-esc {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 6px;
    cursor: pointer;
}

.cmd-palette-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cmd-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 10px 10px 4px 10px;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast);
    gap: 12px;
    user-select: none;
}

.cmd-item:hover,
.cmd-item.is-selected {
    background: var(--blue-soft);
}

.cmd-item.is-selected .cmd-item-title {
    color: var(--blue);
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.cmd-item-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background var(--t-fast), color var(--t-fast);
}

.cmd-item:hover .cmd-item-icon,
.cmd-item.is-selected .cmd-item-icon {
    background: var(--blue);
    color: #fff;
}

.cmd-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cmd-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-subtitle {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.cmd-palette-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 11.5px;
    color: var(--text-3);
}

.cmd-footer-hints {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cmd-footer-hints kbd {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 4px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-right: 2px;
    color: var(--text-2);
}

.cmd-footer-brand {
    font-weight: 600;
    font-size: 11px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   LIVE STAGE RADAR HUD
   ========================================================================== */
.stage-radar-wrap {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-fast);
}

.stage-radar-wrap:hover {
    box-shadow: var(--shadow-md);
}

.stage-radar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-radar-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stage-radar-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.stage-radar-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    margin-right: 4px;
}

.stage-radar-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.stage-radar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.stage-radar-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stage-radar-card:hover {
    border-color: var(--blue);
    background: var(--surface-1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--blue-glow);
}

.stage-radar-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stage-radar-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stage-radar-card__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
}

.stage-radar-card.is-live .stage-radar-card__status-dot {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.stage-radar-card.is-active .stage-radar-card__status-dot {
    background: var(--amber);
    box-shadow: 0 0 6px var(--amber);
}

.stage-radar-card__prog {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-radar-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-2);
}

.judge-dots-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.judge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background var(--t-fast);
}

.judge-dot.scored {
    background: var(--green);
}

.judge-dot.pending {
    background: var(--amber);
}

/* ==========================================================================
   1-CLICK COPY BADGE & MICRO-METERS
   ========================================================================== */
.copy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-1);
    font-family: var(--font-mono);
    font-size: 11.5px;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
    user-select: none;
}

.copy-badge:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
}

.copy-badge i {
    font-size: 10.5px;
    color: var(--text-3);
    transition: color var(--t-fast);
}

.copy-badge:hover i {
    color: var(--blue);
}

.copy-badge.copied {
    background: var(--green-soft) !important;
    border-color: var(--green) !important;
    color: var(--green) !important;
}

.copy-badge.copied i {
    color: var(--green) !important;
}

/* Quota Micro-Meter Pills */
.quota-meter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    line-height: 1.2;
}

.quota-meter-pill.under {
    background: var(--green-soft);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.quota-meter-pill.at-limit {
    background: var(--amber-soft);
    border-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.quota-meter-pill.over {
    background: var(--red-soft);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.quota-bar-mini {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: inline-block;
}

.quota-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: currentColor;
}

/* ==========================================================================
   PROGRAMME LIFECYCLE (Draft -> Live -> Finished)
   ========================================================================== */

/* ─── Lifecycle Segment Tabs ─────────────────────────────────────────────── */
.lifecycle-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: var(--r-xl);
    margin-bottom: 20px;
}

@media (max-width: 820px) {
    .lifecycle-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lifecycle-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--r-lg);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
    outline: none;
    font-family: var(--font);
}

.lifecycle-nav-btn:hover {
    background: var(--surface-3);
    color: var(--text-0);
}

.lifecycle-nav-btn.active {
    background: var(--surface-1);
    color: var(--text-0);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.lifecycle-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: var(--surface-3);
    color: var(--text-2);
    min-width: 22px;
}

.lifecycle-nav-btn.active .lifecycle-nav-badge {
    background: var(--blue-soft);
    color: var(--blue);
}

.lifecycle-nav-badge.live {
    background: var(--green-soft);
    color: var(--green);
}

.lifecycle-nav-badge.finished {
    background: rgba(245, 158, 11, 0.14);
    color: var(--amber);
}

.lifecycle-nav-badge.published {
    background: rgba(13, 148, 136, 0.14);
    color: var(--teal);
}

.live-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.live-dot-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* ─── Lifecycle Cards ────────────────────────────────────────────────────── */
.lifecycle-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.lifecycle-card:hover {
    border-color: rgba(59, 110, 248, 0.3);
    box-shadow: var(--shadow-sm);
}

.lifecycle-card-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.lifecycle-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lifecycle-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.3;
}

.lifecycle-subtext {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-dot {
    color: var(--text-3);
    font-weight: 700;
    font-size: 11px;
    user-select: none;
}

.lifecycle-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-2);
}

.lifecycle-meta-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-2);
}

.lifecycle-meta-text b {
    font-weight: 600;
    color: var(--text-0);
}

.lifecycle-card-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    align-self: center;
    flex-wrap: wrap;
}

/* ─── Winner Indicator on Finished Cards ─────────────────────────────────── */
.winner-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
}

.winner-text b {
    color: var(--text-0);
    font-weight: 700;
}

[data-theme="dark"] .winner-text {
    color: #fbbf24;
}

.live-pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==============================================================================
   PROGRAMME-LEVEL APPROVALS WORKFLOW (CLEAN UI)
   ============================================================================== */

/* ─── Approval KPI Bar ──────────────────────────────────────────────────────── */
.approval-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.approval-kpi-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.approval-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.approval-kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.approval-kpi-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-2);
}

.approval-kpi-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-0);
    font-family: var(--font-mono);
}

.approval-kpi-icon {
    font-size: 18px;
    background: var(--surface-2);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Programme Approval Cards Grid ─────────────────────────────────────────── */
.approval-prog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}

@media (max-width: 640px) {
    .approval-prog-grid {
        grid-template-columns: 1fr;
    }
}

.approval-prog-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.approval-prog-card:hover {
    border-color: var(--border-hover, #94a3b8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

[data-theme="dark"] .approval-prog-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.approval-prog-card.has-pending {
    border-left: 3.5px solid var(--amber);
}

.approval-prog-card.all-approved {
    border-left: 3.5px solid var(--green);
}

.approval-prog-card.has-issues {
    border-left: 3.5px solid var(--red);
}

.approval-prog-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.approval-prog-card__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.approval-prog-card__name {
    font-weight: 700;
    font-size: 15.5px;
    color: var(--text-0);
    line-height: 1.3;
}

.approval-prog-card__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.approval-team-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
    background: var(--surface-2);
    padding: 8px 10px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.04));
}

[data-theme="dark"] .approval-team-chips-grid {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

.approval-team-chip,
.approval-team-row {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    flex: 1 1 200px;
    min-width: 0;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.approval-team-chip:hover,
.approval-team-row:hover {
    border-color: var(--border-hover, #94a3b8);
}

.approval-team-chip__left,
.approval-team-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.approval-team-chip__name {
    font-weight: 600;
    color: var(--text-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12.5px;
}

.approval-team-chip__code {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

.approval-team-chip__badge,
.approval-team-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}

.approval-team-chip__badge.pending,
.approval-team-badge.pending {
    background: var(--amber-soft);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .approval-team-chip__badge.pending,
[data-theme="dark"] .approval-team-badge.pending {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.approval-team-chip__badge.approved,
.approval-team-badge.approved {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .approval-team-chip__badge.approved,
[data-theme="dark"] .approval-team-badge.approved {
    border-color: rgba(16, 185, 129, 0.35);
}

.approval-prog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    gap: 10px;
    flex-wrap: wrap;
}

.approval-prog-card__total {
    font-size: 12.5px;
    color: var(--text-muted);
}

.approval-prog-card__total b {
    color: var(--text-0);
}

.approval-prog-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Approval Drilldown Modal ────────────────────────────────────────────── */
.approval-modal-header {
    padding-right: 48px; /* Dedicated clearance for modal close button */
}

.approval-modal-team-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 10px);
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.approval-modal-team-header {
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.approval-modal-team-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-0);
}

.approval-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.approval-status-pill.pending {
    background: var(--amber-soft);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .approval-status-pill.pending {
    color: #fbbf24;
}

.approval-status-pill.approved {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.approval-status-pill.issues {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modern Candidate List in Modal */
.approval-candidate-list {
    display: flex;
    flex-direction: column;
}

.approval-candidate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.04));
    gap: 12px;
    transition: background 0.15s ease;
}

.approval-candidate-row:last-child {
    border-bottom: none;
}

.approval-candidate-row:hover {
    background: var(--surface-2);
}

.approval-candidate-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.approval-chest-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-1);
    white-space: nowrap;
    min-width: 48px;
    text-align: center;
}

.approval-candidate-name-col {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.approval-candidate-name {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-0);
}

.approval-candidate-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── Stage Microphone Announcement Cue Sheet Modal ───────────────────────── */
.stage-announce-guidance-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ─── Stage Announcer Broadcast Cue Cards ─── */
.podium-card,
.cue-stage-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: var(--surface-1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.podium-card:hover,
.cue-stage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.podium-rank-1,
.cue-stage-card.podium-1 {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(254, 243, 199, 0.25) 50%, var(--surface-1) 100%) !important;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15) !important;
}

.podium-rank-2,
.cue-stage-card.podium-2 {
    border-color: #94a3b8 !important;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.08) 0%, rgba(241, 245, 249, 0.4) 50%, var(--surface-1) 100%) !important;
    box-shadow: 0 4px 16px rgba(148, 163, 184, 0.12) !important;
}

.podium-rank-3,
.cue-stage-card.podium-3 {
    border-color: #b45309 !important;
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.08) 0%, rgba(254, 237, 213, 0.3) 50%, var(--surface-1) 100%) !important;
    box-shadow: 0 4px 16px rgba(180, 83, 9, 0.12) !important;
}

/* Card Header Strip */
.cue-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 10px;
}

[data-theme="dark"] .cue-card-top {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cue-card-prize-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.podium-rank-1 .cue-card-prize-tag,
.cue-stage-card.podium-1 .cue-card-prize-tag { color: #b45309; }
.podium-rank-2 .cue-card-prize-tag,
.cue-stage-card.podium-2 .cue-card-prize-tag { color: #475569; }
.podium-rank-3 .cue-card-prize-tag,
.cue-stage-card.podium-3 .cue-card-prize-tag { color: #9a3412; }
[data-theme="dark"] .podium-rank-1 .cue-card-prize-tag,
[data-theme="dark"] .cue-stage-card.podium-1 .cue-card-prize-tag { color: #fbbf24; }
[data-theme="dark"] .podium-rank-2 .cue-card-prize-tag,
[data-theme="dark"] .cue-stage-card.podium-2 .cue-card-prize-tag { color: #cbd5e1; }
[data-theme="dark"] .podium-rank-3 .cue-card-prize-tag,
[data-theme="dark"] .cue-stage-card.podium-3 .cue-card-prize-tag { color: #f97316; }

.cue-card-prize-icon {
    font-size: 22px;
    line-height: 1;
}

.cue-card-points-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
    font-family: var(--font-mono, monospace);
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Big Hero Student Name */
.cue-card-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 2px 0;
}

.cue-card-student-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-0);
    letter-spacing: -0.4px;
    line-height: 1.2;
}

/* Badges Deck */
.cue-card-badges-deck {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cue-badge-chest {
    font-family: var(--font-mono, monospace);
    font-size: 13.5px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--blue);
    border: 1.5px solid rgba(37, 99, 235, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cue-badge-team {
    font-size: 13.5px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid currentColor;
}

.cue-badge-grade {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--surface-3);
    color: var(--text-1);
    border: 1px solid var(--border);
}

.podium-badge-2 {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

[data-theme="dark"] .podium-badge-2 {
    color: #cbd5e1;
}

.podium-badge-3 {
    background: rgba(180, 83, 9, 0.18);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.35);
}

.podium-details {
    flex: 1;
    min-width: 0;
}

.podium-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.podium-score {
    text-align: right;
    flex-shrink: 0;
}

.podium-score-val {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 18px;
    color: var(--blue);
}

.announcer-copy-card {
    padding: 10px 14px;
    border-radius: var(--r-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.announcer-script-content {
    white-space: pre-wrap;
    line-height: 1.5;
    color: var(--text-1);
    background: var(--surface-1);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    max-height: 120px;
    overflow-y: auto;
}

/* ─── 5-Mode Scoring System Selector (Sleek Horizontal Option Cards) ─────── */
.scoring-options-list,
.scoring-mode-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.scoring-option-card {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}

.scoring-option-card:hover {
    border-color: rgba(59, 110, 248, 0.4);
    background: var(--surface-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.scoring-option-card.active {
    border-color: var(--blue);
    background: rgba(37, 99, 235, 0.04);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), 0 2px 8px rgba(37, 99, 235, 0.06);
}

.scoring-option-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.scoring-option-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-strong, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    background: var(--surface-1);
}

.scoring-option-card.active .scoring-option-radio {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
}

.scoring-option-info {
    flex: 1;
    min-width: 0;
}

.scoring-option-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.scoring-option-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.scoring-option-desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.45;
}

.scoring-option-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.scoring-preview-pill {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.scoring-option-card.active .scoring-preview-pill {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--blue-dim, #1e3bbd);
    font-weight: 600;
}

[data-theme="dark"] .scoring-option-card.active .scoring-preview-pill {
    color: #93c5fd;
    background: rgba(59, 110, 248, 0.16);
    border-color: rgba(59, 110, 248, 0.35);
}

.scoring-exact-note {
    font-size: 11px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.scoring-mode-preview-box {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--r-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 900px) {
    .scoring-option-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .scoring-option-right {
        align-items: flex-start;
        width: 100%;
    }
    .scoring-preview-pill {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }
}

/* ==============================================================================
   PARTICIPANT CANCELLATION / ABSENT SYSTEM
   Low opacity, non-touchable inputs, clear red badges, and accessible undo action
   ============================================================================== */
.participant-cancelled {
    opacity: 0.45 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    transition: opacity var(--t-normal), background-color var(--t-normal);
}

.participant-cancelled td {
    color: var(--text-3, #94a3b8) !important;
}

.participant-cancelled input,
.participant-cancelled select,
.participant-cancelled textarea {
    pointer-events: none !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: var(--surface-2, #1e293b) !important;
    border-color: var(--border, #334155) !important;
    box-shadow: none !important;
}

.participant-cancelled .btn-restore,
.participant-cancelled button.btn-restore {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: pointer !important;
    font-weight: 600 !important;
}

.badge-red {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
    font-weight: 700;
}

[data-theme="dark"] .badge-red,
.dark .badge-red {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .participant-cancelled,
.dark .participant-cancelled {
    background-color: rgba(239, 68, 68, 0.09) !important;
}

/* ==============================================================================
   OFFICIAL PRINT & PUBLICATIONS DESK
   ============================================================================== */
.print-desk-card {
    border: 1px solid var(--border);
    border-radius: var(--r-xl, 14px);
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
    margin-bottom: 60px;
}

.print-desk-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md, 8px);
    background: rgba(13, 148, 136, 0.12);
    color: var(--teal, #0d9488);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.print-desk-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
}

@media (max-width: 900px) {
    .print-desk-grid {
        grid-template-columns: 1fr;
    }
}

.print-desk-section {
    background: var(--surface-2, #f8fafc);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: var(--r-lg, 10px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[data-theme="dark"] .print-desk-section,
.dark .print-desk-section {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.print-desk-section--grand {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03) 0%, rgba(244, 63, 94, 0.06) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .print-desk-section--grand,
.dark .print-desk-section--grand {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(244, 63, 94, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.print-desk-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
}

[data-theme="dark"] .print-desk-section__header,
.dark .print-desk-section__header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.print-desk-section__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0);
}

.print-desk-section__controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.print-desk-select-wrap {
    width: 100%;
}

.print-desk-select-wrap .custom-select-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

.print-desk-select-wrap .custom-select-trigger {
    width: 100%;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md, 8px);
    background: var(--surface-1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.print-desk-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.print-desk-btn {
    flex: 1;
    min-width: 160px;
    min-height: 38px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--r-md, 8px);
}

.print-desk-grand-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.print-desk-btn-grand {
    width: 100%;
    min-height: 40px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--r-md, 8px);
}

/* ================================================================== */
/* REPORTS DRILL-DOWN: Member Profile & Team Detail Modals            */
/* ================================================================== */

/* --- Member Search Bar in Reports --- */
.reports-member-search {
    position: relative;
    max-width: 480px;
}
.reports-member-search .search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface-1);
    color: var(--text-1);
    font-size: 13px;
    font-family: var(--font);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    outline: none;
}
.reports-member-search .search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-glow);
}
.reports-member-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}
.reports-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}
.reports-search-results.active {
    display: block;
}
.reports-search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--t-fast);
    border-bottom: 1px solid var(--border);
}
.reports-search-result-item:last-child {
    border-bottom: none;
}
.reports-search-result-item:hover {
    background: var(--surface-2);
}
.reports-search-result-item .result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple, #8b5cf6));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.reports-search-result-item .result-info {
    flex: 1;
    min-width: 0;
}
.reports-search-result-item .result-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-1);
}
.reports-search-result-item .result-meta {
    font-size: 11px;
    color: var(--text-muted);
}
.reports-search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* --- Clickable Table Rows --- */
.clickable-row {
    cursor: pointer;
    transition: background var(--t-fast);
}
.clickable-row:hover {
    background: var(--surface-2) !important;
}
.clickable-row:active {
    background: var(--blue-glow) !important;
}

/* --- Drill-down Modal (wider for data tables) --- */
.drilldown-modal .modal-dialog {
    max-width: 760px;
    width: 95%;
    padding: var(--s-6);
    position: relative;
}

/* Ensure modal close button has top z-index and doesn't get covered */
.drilldown-modal .modal-close-btn {
    z-index: 10;
    top: 18px;
    right: 18px;
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* --- Profile Header Card inside Modal --- */
.drilldown-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    padding-right: 56px; /* Clearance for close button */
    background: var(--surface-2);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    position: relative;
}
.drilldown-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.drilldown-profile-info {
    flex: 1;
    min-width: 0;
}
.drilldown-profile-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-0, #0f172a);
    line-height: 1.3;
}
.drilldown-profile-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* --- Grade Badge Pills --- */
.grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.2px;
    line-height: 1;
    flex-shrink: 0;
}
.grade-pill--aplus { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.grade-pill--a { background: rgba(37, 99, 235, 0.12); color: #2563eb; border: 1px solid rgba(37, 99, 235, 0.25); }
.grade-pill--bplus { background: rgba(139, 92, 246, 0.12); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.25); }
.grade-pill--b { background: rgba(245, 158, 11, 0.12); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.grade-pill--cplus { background: rgba(249, 115, 22, 0.12); color: #ea580c; border: 1px solid rgba(249, 115, 22, 0.25); }
.grade-pill--c { background: rgba(239, 68, 68, 0.12); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }
.grade-pill--none { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* --- Podium Pills (for 1st, 2nd, 3rd place in drilldown tables) --- */
.podium-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 11.5px;
    white-space: nowrap;
    line-height: 1.2;
}
.podium-pill--gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15);
}
.podium-pill--silver {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #334155;
    border: 1px solid #94a3b8;
    box-shadow: 0 1px 3px rgba(148, 163, 184, 0.15);
}
.podium-pill--bronze {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #9a3412;
    border: 1px solid #f97316;
    box-shadow: 0 1px 3px rgba(249, 115, 22, 0.15);
}
.podium-pill--other {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-weight: 600;
    padding: 2px 8px;
    font-size: 11px;
}

/* --- Summary Stats Row inside Modal --- */
.drilldown-summary-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    margin-top: 12px;
    margin-bottom: 14px;
}
.drilldown-summary-stat {
    text-align: center;
    padding: 4px;
}
.drilldown-summary-stat .stat-value {
    font-size: 19px;
    font-weight: 800;
    color: var(--blue);
    font-family: var(--font-mono);
    line-height: 1.2;
}
.drilldown-summary-stat .stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* --- Team detail header --- */
.team-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    padding-right: 56px; /* Clearance for close button */
    background: var(--surface-2);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    margin-bottom: 14px;
    position: relative;
}
.team-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.team-detail-points-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.team-detail-points-card {
    text-align: center;
    padding: 12px 8px;
    background: var(--surface-1);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.team-detail-points-card .pts-value {
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1.2;
}
.team-detail-points-card .pts-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}
.team-detail-points-card.pts-total {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(139, 92, 246, 0.08));
    border-color: rgba(37, 99, 235, 0.3);
}
.team-detail-points-card.pts-total .pts-value {
    color: var(--blue);
}
.team-detail-points-card.pts-event {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.2);
}
.team-detail-points-card.pts-event .pts-value {
    color: #1d4ed8;
}
.team-detail-points-card.pts-disc {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.2);
}
.team-detail-points-card.pts-disc .pts-value {
    color: var(--green);
}

/* --- Discipline Breakdown Card --- */
.discipline-breakdown-card {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.discipline-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}
.discipline-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Team Category & Section Breakdown Card (Modal) --- */
.team-category-breakdown-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.team-breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.team-breakdown-header {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.team-breakdown-grid {
    display: grid;
    gap: 8px;
    width: 100%;
}
.team-breakdown-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}
.team-breakdown-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 580px) {
    .team-breakdown-grid--2,
    .team-breakdown-grid--3 {
        grid-template-columns: 1fr;
    }
}
.team-breakdown-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-0);
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}
.team-breakdown-chip .chip-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-1);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.team-breakdown-chip .chip-pts {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.team-breakdown-chip .chip-pts small {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 2px;
}
/* Category Accents */
.team-breakdown-chip.chip-stage {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.22);
}
.team-breakdown-chip.chip-stage .chip-pts { color: #1d4ed8; }
.team-breakdown-chip.chip-stage .chip-title i { color: #2563eb; }

.team-breakdown-chip.chip-nonstage {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.25);
}
.team-breakdown-chip.chip-nonstage .chip-pts { color: #d97706; }
.team-breakdown-chip.chip-nonstage .chip-title i { color: #f59e0b; }

.team-breakdown-chip.chip-group {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.22);
}
.team-breakdown-chip.chip-group .chip-pts { color: #059669; }
.team-breakdown-chip.chip-group .chip-title i { color: #10b981; }

.team-breakdown-chip.chip-senior {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.25);
}
.team-breakdown-chip.chip-senior .chip-pts { color: #7c3aed; }
.team-breakdown-chip.chip-senior .chip-title i { color: #8b5cf6; }

.team-breakdown-chip.chip-junior {
    background: rgba(20, 184, 166, 0.05);
    border-color: rgba(20, 184, 166, 0.25);
}
.team-breakdown-chip.chip-junior .chip-pts { color: #0d9488; }
.team-breakdown-chip.chip-junior .chip-title i { color: #14b8a6; }

.team-breakdown-chip.chip-general {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
}
.team-breakdown-chip.chip-general .chip-pts { color: #2563eb; }
.team-breakdown-chip.chip-general .chip-title i { color: #3b82f6; }

/* --- Download button in modals --- */
.drilldown-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--r-lg);
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: background var(--t-fast), transform var(--t-fast);
}
.drilldown-download-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}
.drilldown-download-btn:active {
    transform: translateY(0);
}
.drilldown-download-btn--green {
    background: #059669;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}
.drilldown-download-btn--green:hover {
    background: #047857;
}

/* --- Championship download button in card header --- */
.btn-championship-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--r-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--t-fast);
}
.btn-championship-download:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* ================================================================== */
/* OFFICIAL JUDGES REGISTRY & TERMINAL CONSOLES UPGRADE               */
/* ================================================================== */

/* --- Terminal Consoles Reference Strip --- */
.terminal-strip-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(37, 99, 235, 0.05));
    border: 1.5px dashed var(--border);
    border-radius: var(--r-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.terminal-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.terminal-strip-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
}
.terminal-strip-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.4;
}
.terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.terminal-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all var(--t-fast);
}
.terminal-card:hover {
    border-color: var(--blue);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
}
.terminal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.terminal-badge {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--violet);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
}
.terminal-passcode-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.terminal-current-user {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-current-prog {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Evaluator Profile Cell --- */
.evaluator-profile-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.evaluator-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.25);
}
.evaluator-name {
    font-weight: 800;
    font-size: 13.5px;
    color: var(--text-0);
    line-height: 1.2;
}
.evaluator-phone {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.evaluator-specialization {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--violet);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Assigned Programme Pills --- */
.evaluator-prog-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-1);
    margin: 2px;
}
.evaluator-prog-pill--live {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.3);
    color: #15803d;
}
.evaluator-seat-tag {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.12);
    color: var(--blue);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==============================================================================
   DEPLOY MODAL - EXECUTIVE JUDGE SELECTING CARD & EVALUATOR PICKER
   ============================================================================== */
.deploy-judge-section {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.deploy-judge-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.deploy-judge-section-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--violet);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.deploy-judge-section-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deploy-judge-registry-hint {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.deploy-btn-add-registry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: var(--surface-1);
    color: var(--violet);
    border: 1px solid rgba(112, 26, 43, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.deploy-btn-add-registry:hover {
    background: var(--violet);
    color: #ffffff;
    border-color: var(--violet);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.deploy-judge-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Judge Assignment Card */
.deploy-judge-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: relative;
}

.deploy-judge-card:hover {
    border-color: rgba(112, 26, 43, 0.28);
    box-shadow: 0 3px 10px rgba(112, 26, 43, 0.06);
}

.deploy-judge-card:focus-within {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(112, 26, 43, 0.12), 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Card Header: Seat Identity, Terminal Select & Status */
.deploy-judge-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 9px;
    margin-bottom: 9px;
    border-bottom: 1px solid var(--border);
}

.deploy-seat-header-left {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.deploy-seat-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(112, 26, 43, 0.12), rgba(194, 65, 12, 0.1));
    color: var(--violet);
    font-weight: 800;
    font-size: 11px;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(112, 26, 43, 0.2);
    flex-shrink: 0;
}

[data-theme="dark"] .deploy-seat-avatar {
    background: rgba(255, 255, 255, 0.08);
    color: #fca5a5;
    border-color: rgba(255, 255, 255, 0.18);
}

.deploy-seat-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-0);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.deploy-seat-sep {
    color: var(--text-3, #9ca3af);
    font-size: 12px;
    line-height: 1;
    user-select: none;
    opacity: 0.7;
}

/* Slim, non-chunky judge code dropdown */
.deploy-judge-code-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--violet);
    background: rgba(112, 26, 43, 0.05);
    border: 1px solid rgba(112, 26, 43, 0.2);
    border-radius: 5px;
    padding: 2px 18px 2px 7px;
    height: 23px;
    line-height: 1.1;
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23701a2b' d='M0 0l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 7px 4px;
}

.deploy-judge-code-select:hover {
    background-color: rgba(112, 26, 43, 0.09);
    border-color: var(--violet);
}

.deploy-judge-code-select:focus {
    background-color: var(--surface-1);
    border-color: var(--violet);
    box-shadow: 0 0 0 2px rgba(112, 26, 43, 0.12);
}

[data-theme="dark"] .deploy-judge-code-select {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fca5a5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23fca5a5' d='M0 0l4 4 4-4z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .deploy-judge-code-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fca5a5;
}

[data-theme="dark"] .deploy-judge-code-select:focus {
    background-color: #1e293b;
    border-color: #fca5a5;
    box-shadow: 0 0 0 2px rgba(252, 165, 165, 0.15);
}

.deploy-judge-code-select option {
    background: var(--surface-1);
    color: var(--text-0);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 6px;
}

[data-theme="dark"] .deploy-judge-code-select option {
    background: #1e293b;
    color: #f3f4f6;
}

/* Subtle, slim click-to-copy passcode chip */
.deploy-seat-passcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    height: 23px;
    border-radius: 5px;
    background: transparent;
    border: 1px dashed rgba(112, 26, 43, 0.22);
    color: var(--text-2);
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

.deploy-seat-passcode-btn:hover {
    background: rgba(112, 26, 43, 0.08);
    border-style: solid;
    border-color: var(--violet);
    color: var(--violet);
}

.deploy-seat-passcode-btn i.fa-key {
    font-size: 9px;
    color: var(--violet);
    opacity: 0.85;
}

.deploy-seat-passcode-btn code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    color: var(--violet);
    background: none;
    border: none;
    padding: 0;
}

[data-theme="dark"] .deploy-seat-passcode-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-2);
}

[data-theme="dark"] .deploy-seat-passcode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fca5a5;
    color: #fca5a5;
}

[data-theme="dark"] .deploy-seat-passcode-btn i.fa-key,
[data-theme="dark"] .deploy-seat-passcode-btn code {
    color: #fca5a5;
}

.deploy-judge-status-badge {
    margin-left: auto;
    flex-shrink: 0;
}

.deploy-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    height: 22px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

.deploy-status-pill.is-graded {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.28);
}

.deploy-status-pill.is-pending {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

/* Combobox Box & Inputs */
.deploy-judge-combobox-wrap {
    position: relative;
    width: 100%;
}

.deploy-judge-input-box {
    display: flex;
    align-items: center;
    background: var(--surface-0);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0 8px 0 12px;
    transition: all 0.2s ease;
    height: 40px;
    gap: 8px;
}

.deploy-judge-card:focus-within .deploy-judge-input-box {
    border-color: var(--violet);
    background: var(--surface-1);
    box-shadow: 0 0 0 2px rgba(112, 26, 43, 0.1);
}

.deploy-judge-input-icon {
    font-size: 13px;
    color: var(--text-3);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.deploy-judge-card:focus-within .deploy-judge-input-icon {
    color: var(--violet);
}

.deploy-judge-name-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-0);
    font-family: inherit;
    padding: 6px 0;
    width: 100%;
}

.deploy-judge-name-input::placeholder {
    color: var(--text-3);
    font-weight: 400;
    font-size: 12.5px;
}

.deploy-judge-btn-clear,
.deploy-judge-btn-toggle {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: var(--text-3);
    font-size: 11px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.deploy-judge-btn-clear:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.deploy-judge-btn-toggle:hover {
    background: rgba(112, 26, 43, 0.08);
    color: var(--violet);
}

/* Profile Chip Strip (Below Input) */
.deploy-judge-profile-strip {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
}

.deploy-judge-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    border-radius: 6px;
    padding: 2px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deploy-judge-chip.is-matched {
    background: rgba(112, 26, 43, 0.07);
    color: var(--violet);
    border: 1px solid rgba(112, 26, 43, 0.16);
}

.deploy-judge-chip.is-custom {
    background: rgba(194, 65, 12, 0.08);
    color: var(--amber);
    border: 1px solid rgba(194, 65, 12, 0.2);
}

.deploy-judge-chip.is-empty {
    font-size: 11px;
    color: var(--text-3);
    padding: 0 4px;
}

.chip-desig {
    font-weight: 700;
}

.chip-phone {
    color: var(--text-2);
}

.chip-verified {
    font-size: 10px;
    font-weight: 700;
    color: #0d9488;
    background: rgba(13, 148, 136, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 2px;
}

/* Custom Floating Dropdown Menu */
.deploy-judge-dropdown-menu {
    position: absolute;
    top: 43px;
    left: 0;
    right: 0;
    background: var(--surface-1);
    border: 1.5px solid var(--border-hover, rgba(112, 26, 43, 0.25));
    border-radius: 10px;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.18), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
    z-index: 1200;
    overflow: hidden;
    animation: slide-down 0.15s ease-out;
}

.deploy-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
}

.deploy-menu-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-1);
    color: var(--violet);
    border: 1px solid rgba(112, 26, 43, 0.2);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.deploy-menu-add-btn:hover {
    background: var(--violet);
    color: #ffffff;
}

.deploy-menu-list {
    max-height: 210px;
    overflow-y: auto;
    padding: 4px 0;
}

.deploy-judge-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.deploy-judge-menu-item:last-child {
    border-bottom: none;
}

.deploy-judge-menu-item:hover,
.deploy-judge-menu-item.is-highlighted {
    background: rgba(112, 26, 43, 0.07);
}

.deploy-judge-menu-item.is-selected {
    background: rgba(13, 148, 136, 0.08);
}

.deploy-item-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

.deploy-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(112, 26, 43, 0.15), rgba(194, 65, 12, 0.15));
    color: var(--violet);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deploy-item-details {
    min-width: 0;
    flex: 1;
}

.deploy-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deploy-item-desig {
    font-size: 11px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.deploy-item-right {
    flex-shrink: 0;
    margin-left: 8px;
}

.deploy-item-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.deploy-item-badge.is-current {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.25);
}

.deploy-item-badge.is-in-use {
    background: rgba(194, 65, 12, 0.1);
    color: var(--amber);
    border: 1px solid rgba(194, 65, 12, 0.2);
}

.deploy-menu-empty {
    padding: 14px 12px;
    text-align: center;
}

.deploy-menu-footer {
    padding: 6px 12px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    font-size: 10.5px;
    color: var(--text-3);
    text-align: center;
}

/* Dark mode adjustments */
[data-theme="dark"] .deploy-judge-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .deploy-judge-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .deploy-judge-input-box {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .deploy-judge-dropdown-menu {
    background: #1e1014;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .deploy-menu-header,
[data-theme="dark"] .deploy-menu-footer {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .deploy-judge-menu-item:hover,
[data-theme="dark"] .deploy-judge-menu-item.is-highlighted {
    background: rgba(255, 255, 255, 0.08);
}

/* ==============================================================================
   JUDGE SUBMISSION & AUDIT STATUS BANNERS
   ============================================================================== */
.judge-submission-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--r-lg, 12px);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.judge-submission-banner__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.judge-submission-banner__content {
    flex: 1;
}

.judge-submission-banner__title {
    font-size: 14px;
    font-weight: 800;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

[data-theme="dark"] .judge-submission-banner__title {
    color: #34d399;
}

.judge-submission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
    font-family: var(--font-mono, monospace);
}

[data-theme="dark"] .judge-submission-badge {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.25);
}

.judge-submission-banner__desc {
    font-size: 12.5px;
    color: #047857;
    line-height: 1.5;
    opacity: 0.95;
}

[data-theme="dark"] .judge-submission-banner__desc {
    color: #a7f3d0;
}

.judge-revision-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.06));
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--r-lg, 12px);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}

.judge-revision-banner__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.judge-revision-banner__content {
    flex: 1;
}

.judge-revision-banner__title {
    font-size: 14px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
}

[data-theme="dark"] .judge-revision-banner__title {
    color: #fbbf24;
}

.judge-revision-banner__desc {
    font-size: 12.5px;
    color: #b45309;
    line-height: 1.5;
}

[data-theme="dark"] .judge-revision-banner__desc {
    color: #fde68a;
}

/* Form Input Error Validation Shake */
.input-error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.04) !important;
    animation: input-shake 0.3s ease-in-out;
}

@keyframes input-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ==============================================================================
   UNIVERSAL SCORING MODE SECURITY MODAL — REFINED UI
   ============================================================================== */
#scoringModeConfirmModal .modal-dialog {
    max-width: 500px;
    width: 95%;
    border-radius: 16px;
    overflow-x: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

#scoringModeConfirmModal .modal__body {
    overflow-x: hidden;
    padding: 6px 0;
}

/* --- High-Impact Security Notice --- */
.scoring-mode-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    margin-bottom: 14px;
}

[data-theme="dark"] .scoring-mode-alert {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.scoring-mode-alert__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

[data-theme="dark"] .scoring-mode-alert__icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.scoring-mode-alert__title {
    font-size: 12.5px;
    font-weight: 800;
    color: #991b1b;
    margin-bottom: 2px;
}

[data-theme="dark"] .scoring-mode-alert__title {
    color: #fca5a5;
}

.scoring-mode-alert__text {
    font-size: 12px;
    line-height: 1.45;
    color: #b91c1c;
}

[data-theme="dark"] .scoring-mode-alert__text {
    color: #fecaca;
}

/* --- State Transition Comparison Grid --- */
.scoring-transition-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 14px;
}

.scoring-transition-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.scoring-transition-col--old {
    text-align: left;
}

.scoring-transition-col--new {
    text-align: right;
}

.scoring-col-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.scoring-col-badge--new {
    color: var(--blue, #2563eb);
}

.scoring-col-name {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-0);
    word-break: break-word;
}

.scoring-transition-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scoring-arrow-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue, #2563eb);
    font-size: 13px;
    flex-shrink: 0;
}

/* --- Rule Formula & Chips Card --- */
.scoring-rule-summary-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.scoring-rule-summary-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.scoring-rule-summary-desc {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.5;
    margin-bottom: 12px;
}

.scoring-rule-chips-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.scoring-rule-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-0);
    white-space: normal;
}

/* --- Passcode Input Group --- */
.scoring-passcode-group {
    margin-bottom: 8px;
}

.scoring-passcode-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 6px;
}

.scoring-passcode-input-wrap {
    position: relative;
    width: 100%;
}

.scoring-passcode-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.scoring-passcode-input {
    width: 100%;
    padding: 10px 14px 10px 38px !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--border) !important;
    background: var(--surface-1) !important;
    color: var(--text-0) !important;
    transition: all 0.18s ease;
}

.scoring-passcode-input:focus {
    border-color: var(--blue, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none;
}

.scoring-passcode-error {
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   FESTIVAL RESULTS & CHAMPIONSHIP COMMAND CENTER
   Modern Redesign for Results & Data (Reports)
   ========================================================================== */

/* --- Executive Results Header & Command Ribbon --- */
.reports-command-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.reports-command-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.reports-header-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reports-command-header__strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 14px;
    background: var(--surface-1, #ffffff);
    border: 1px solid var(--border, rgba(112, 26, 43, 0.1));
    border-radius: var(--r-lg, 12px);
    box-shadow: var(--shadow-xs, 0 1px 3px rgba(0, 0, 0, 0.02));
    flex-wrap: wrap;
}

.reports-header-kpis {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reports-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Split Button Pill (Download + Direct Print Joined) --- */
.btn-group-split {
    display: inline-flex;
    align-items: stretch;
    vertical-align: middle;
    border-radius: var(--r-md, 8px);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.btn-group-split > .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}

.btn-group-split > .btn-split-print {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-group-split > .btn-primary.btn-split-print {
    border-left: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.btn-group-split > .btn-danger.btn-split-print {
    border-left: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.btn-group-split > .btn-split-print:hover {
    filter: brightness(0.92);
}

/* --- Top 3 Championship Podium Showcase (Single Line 5-Column Grid) --- */
.reports-podium-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.podium-card {
    position: relative;
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 12px);
    padding: 14px 14px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.podium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.podium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.8;
}

/* Podium Card Variants */
.podium-card--gold {
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(175deg, rgba(254, 243, 199, 0.35) 0%, var(--surface-1) 45%);
}
.podium-card--gold:hover {
    border-color: #f59e0b;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}

.podium-card--silver {
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.35);
    background: linear-gradient(175deg, rgba(241, 245, 249, 0.45) 0%, var(--surface-1) 45%);
}
.podium-card--silver:hover {
    border-color: #94a3b8;
    box-shadow: 0 12px 28px rgba(100, 116, 139, 0.15);
}

.podium-card--bronze {
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.3);
    background: linear-gradient(175deg, rgba(254, 237, 213, 0.35) 0%, var(--surface-1) 45%);
}
.podium-card--bronze:hover {
    border-color: #d97706;
    box-shadow: 0 12px 28px rgba(180, 83, 9, 0.15);
}

.podium-card--mvp {
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.3);
    background: linear-gradient(175deg, rgba(243, 232, 255, 0.35) 0%, var(--surface-1) 45%);
}
.podium-card--mvp:hover {
    border-color: #8b5cf6;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.15);
}

.podium-card--junior {
    color: #0d9488;
    border-color: rgba(13, 148, 136, 0.35);
    background: linear-gradient(175deg, rgba(204, 251, 241, 0.45) 0%, var(--surface-1) 45%);
}
.podium-card--junior:hover {
    border-color: #0d9488;
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.18);
}

.podium-card--senior {
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.35);
    background: linear-gradient(175deg, rgba(237, 233, 254, 0.45) 0%, var(--surface-1) 45%);
}
.podium-card--senior:hover {
    border-color: #7c3aed;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.18);
}

/* Inside Podium Card */
.podium-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.podium-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    white-space: nowrap;
}

.podium-card--gold .podium-tag {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}
.podium-card--silver .podium-tag {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}
.podium-card--bronze .podium-tag {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}
.podium-card--mvp .podium-tag {
    background: rgba(139, 92, 246, 0.15);
    color: #6d28d9;
}
.podium-card--junior .podium-tag {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}
.podium-card--senior .podium-tag {
    background: rgba(124, 58, 237, 0.15);
    color: #6d28d9;
}

/* --- Individual Champions Section Filter Pills --- */
.indiv-section-pills {
    display: inline-flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.indiv-section-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s ease;
    user-select: none;
}

.indiv-section-pill:hover {
    color: var(--text-0);
}

.indiv-section-pill.active {
    background: var(--surface-1);
    color: var(--text-0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.indiv-section-pill--junior.active {
    color: #0d9488 !important;
}

.indiv-section-pill--senior.active {
    color: #7c3aed !important;
}

.podium-trophy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0.9;
}

.podium-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
    line-height: 1.25;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-score-wrap {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.podium-score-val {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    color: var(--text-0);
    letter-spacing: -0.5px;
}

.podium-score-unit {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Margin Indicator */
.podium-margin-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
}
.podium-margin-pill--lead {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.podium-margin-pill--behind {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
}

/* --- Unified Podium Card Stats Block --- */
.podium-stats-block {
    background: rgba(0, 0, 0, 0.025);
    border-radius: 8px;
    padding: 7px 10px;
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    margin-top: 8px;
    box-sizing: border-box;
}

.podium-stats-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.podium-stats-primary span {
    white-space: nowrap;
}

.podium-stats-primary span strong {
    color: var(--text-0);
    font-family: var(--font-mono);
}

.podium-stats-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
}

.podium-stats-secondary span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    min-width: 0;
}

.podium-stats-secondary span strong {
    color: var(--text-0);
    font-family: var(--font-mono);
    font-size: 10.5px;
}

.podium-footer-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light, rgba(0,0,0,0.06));
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
}

.podium-footer-action i {
    transition: transform 0.18s ease;
}

.podium-card:hover .podium-footer-action i {
    transform: translateX(3px);
}

/* --- Sub-Tab Navigation Bar --- */
.reports-subnav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg, 12px);
    padding: 6px 8px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.02));
}

.reports-subnav-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.reports-subnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.18s ease;
    user-select: none;
}

.reports-subnav-pill:hover {
    color: var(--text-0);
    background: var(--surface-2);
}

.reports-subnav-pill.active {
    background: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.reports-subnav-pill.active .badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --- Sub-Tab Panes --- */
.reports-pane {
    animation: reportsPaneFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reports-pane.hidden {
    display: none !important;
}

@keyframes reportsPaneFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Metallic Rank Badges for Tables --- */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-mono);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    border: 1.5px solid #d97706;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #334155;
    border: 1.5px solid #94a3b8;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #fed7aa, #fb923c);
    color: #7c2d12;
    border: 1.5px solid #ea580c;
}

.rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reports-command-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .reports-command-header__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .reports-header-top-actions {
        width: 100%;
    }
    .reports-header-top-actions > .btn {
        width: 100%;
        justify-content: center;
    }
    .reports-command-header__strip {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 10px 12px;
    }
    .reports-header-kpis {
        width: 100%;
        justify-content: flex-start;
    }
    .reports-header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .reports-header-actions > .btn-group-split {
        width: 100%;
    }
    .reports-header-actions > .btn-group-split > .btn:first-child {
        flex: 1;
        justify-content: center;
    }
    .reports-subnav-pills {
        width: 100%;
    }
    .reports-subnav-pill {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ==========================================================================
   FESTIVAL SETTINGS & COMPETITION RULES HUB
   Modern Executive Settings Area UI/UX
   ========================================================================== */

/* --- Status Overview Ribbon --- */
.settings-overview-ribbon {
    display: grid;
    grid-template-columns: auto repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg, 12px);
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.02));
}

@media (max-width: 1180px) {
    .settings-overview-ribbon {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .settings-ribbon-label {
        grid-column: 1 / -1;
        margin-bottom: 2px;
    }
}

.settings-ribbon-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 4px 6px 4px 2px;
}

.settings-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    white-space: nowrap;
    transition: all 0.18s ease;
    text-overflow: ellipsis;
    overflow: hidden;
}

.settings-status-chip i {
    font-size: 11.5px;
    opacity: 0.85;
}

.settings-status-chip b {
    font-weight: 700;
}

.settings-status-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.settings-status-chip--open {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

.settings-status-chip--closed {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.settings-status-chip--enforced {
    background: rgba(112, 26, 43, 0.08);
    border-color: rgba(112, 26, 43, 0.25);
    color: #701a2b;
}

.settings-status-chip--scale {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
}

.settings-status-chip--scope {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    color: #4338ca;
}

.settings-status-chip--tie {
    background: rgba(194, 65, 12, 0.08);
    border-color: rgba(194, 65, 12, 0.25);
    color: #c2410c;
}

/* --- Settings Category Navigation Bar --- */
.settings-subnav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg, 12px);
    padding: 5px 8px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.02));
}

.settings-subnav-pills {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.settings-subnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.settings-subnav-pill:hover {
    color: var(--text-0);
    background: var(--surface-2);
}

.settings-subnav-pill.active {
    background: var(--blue, #701a2b);
    color: #ffffff;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(112, 26, 43, 0.25);
}

[data-theme="dark"] .settings-subnav-pill.active,
.dark .settings-subnav-pill.active {
    background: #d94e6c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(217, 78, 108, 0.3);
}

.settings-subnav-meta {
    padding-right: 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    font-weight: 700;
    font-size: 11px;
}

/* --- Settings Section & Groups --- */
.settings-group {
    margin-bottom: 28px;
    animation: settingsFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-group.hidden {
    display: none !important;
}

@keyframes settingsFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-left: 4px;
}

.settings-group-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Settings Row & Distinct Card Components --- */
.settings-card-item {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md, 12px);
    box-shadow: 0 1px 4px rgba(112, 26, 43, 0.03);
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-card-item:hover {
    border-color: var(--border-hover, rgba(112, 26, 43, 0.25));
    box-shadow: 0 4px 14px rgba(112, 26, 43, 0.05);
}

.settings-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
}

.settings-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.settings-row-item:last-child {
    border-bottom: none;
}

.settings-row-item:hover {
    background: rgba(0, 0, 0, 0.015);
}

.settings-row-main {
    flex: 1;
    min-width: 0;
}

.settings-row-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-row-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 680px;
}

.settings-row-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.settings-pill-fixed {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* --- Modern Sliding Toggle Switch --- */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.settings-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.settings-switch input:checked + .settings-slider {
    background-color: var(--green, #10b981);
}

.settings-switch input:focus + .settings-slider {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.settings-switch input:checked + .settings-slider::before {
    transform: translateX(22px);
}

/* Variant for Blue / Violet Switches */
.settings-switch--violet input:checked + .settings-slider {
    background-color: var(--violet, #8b5cf6);
}

/* --- Quota Studio Cards --- */
.quota-studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.quota-card {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 14px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.03));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.quota-card:hover {
    border-color: var(--border-hover, rgba(0,0,0,0.15));
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.quota-card--junior {
    border-top: 4px solid #c2410c;
}

.quota-card--senior {
    border-top: 4px solid #701a2b;
}

.quota-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.quota-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
}

.quota-card-body {
    padding: 20px;
}

.quota-inputs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.quota-input-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quota-input-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.quota-stepper-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-1);
    transition: all 0.15s ease;
}

.quota-stepper-wrap:focus-within {
    border-color: #701a2b;
    box-shadow: 0 0 0 3px rgba(112, 26, 43, 0.12);
}

.quota-step-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 800;
    width: 32px;
    height: 38px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.quota-step-btn:hover {
    background: var(--surface-2);
    color: var(--text-0);
}

.quota-step-btn:active {
    background: var(--border);
}

.quota-stepper-wrap .quota-input-field {
    border: none;
    border-radius: 0;
    box-shadow: none;
    height: 38px;
    padding: 4px 6px;
}

.quota-input-field {
    width: 100%;
    padding: 8px 10px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-mono);
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--surface-1);
    color: var(--text-0);
    transition: all 0.15s ease;
}

.quota-input-field:focus {
    border-color: #701a2b;
    box-shadow: 0 0 0 3px rgba(112, 26, 43, 0.12);
    outline: none;
}

.quota-hint-sub {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.quota-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.quota-summary-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   FESTIVAL TIE RESOLUTION PROTOCOL — MODERN OPTION TILES
   ========================================================================== */
.tie-policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.tie-option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: var(--r-lg, 12px);
    border: 1.5px solid var(--border);
    background: var(--surface-1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.02));
}

.tie-option-card:hover {
    border-color: var(--blue, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.tie-option-card.active {
    border-color: var(--blue, #2563eb) !important;
    background: rgba(37, 99, 235, 0.035) !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.tie-option-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tie-option-radio-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Custom visual radio circle */
.tie-radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: var(--surface-1);
}

.tie-radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue, #2563eb);
    opacity: 0;
    transform: scale(0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tie-option-card.active .tie-radio-custom {
    border-color: var(--blue, #2563eb);
}

.tie-option-card.active .tie-radio-custom::after {
    opacity: 1;
    transform: scale(1);
}

.tie-option-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tie-icon-chip {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.tie-icon-chip--manual {
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue, #2563eb);
}

.tie-icon-chip--joint {
    background: rgba(13, 148, 136, 0.1);
    color: var(--teal, #0d9488);
}

.tie-option-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    padding-left: 30px;
}

.tie-feature-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 30px;
}

.tie-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: var(--surface-2, #f1f5f9);
    border: 1px solid var(--border-light, #e2e8f0);
    color: var(--text-0);
}

/* Guarantee Alert Box */
.tie-guarantee-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid var(--amber, #d97706);
    border-radius: var(--r-md, 10px);
}

.tie-guarantee-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tie-guarantee-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.tie-guarantee-text {
    font-size: 12px;
    color: #78350f;
    line-height: 1.45;
}

/* ==========================================================================
   OFFICIAL JUDGES REGISTRY & TERMINAL CONSOLES COMMAND CENTER
   ========================================================================== */

/* --- Executive Metric Cards --- */
.judge-stat-card {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 12px);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.02));
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.judge-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-color: var(--border-hover, rgba(0,0,0,0.15));
}

.judge-stat-card--violet { border-top: 3.5px solid #8b5cf6; }
.judge-stat-card--green  { border-top: 3.5px solid #10b981; }
.judge-stat-card--blue   { border-top: 3.5px solid #3b82f6; }
.judge-stat-card--amber  { border-top: 3.5px solid #f59e0b; }

.judge-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.judge-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.judge-stat-icon--violet { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.judge-stat-icon--green  { background: rgba(16, 185, 129, 0.12); color: #059669; }
.judge-stat-icon--blue   { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.judge-stat-icon--amber  { background: rgba(245, 158, 11, 0.12); color: #d97706; }

.judge-stat-value {
    font-size: 26px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--text-0);
    line-height: 1.1;
    margin-bottom: 4px;
}

.judge-stat-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.judge-stat-sub {
    font-size: 11.5px;
    color: var(--text-muted);
}

.judge-stat-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* --- Upgraded Terminal Station Consoles HUD --- */
.terminal-strip-card {
    background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 14px);
    padding: 18px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.03));
}

.terminal-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.terminal-strip-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-strip-desc {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.45;
    margin-top: 3px;
}

.terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.terminal-card {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md, 10px);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    position: relative;
}

.terminal-card:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.terminal-card--live {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(180deg, var(--surface-1), rgba(16, 185, 129, 0.02));
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
}

.terminal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.terminal-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    color: var(--violet);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.terminal-card--live .terminal-badge {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
}

.terminal-passcode-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
}

.terminal-passcode-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-0);
}

.terminal-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.terminal-copy-btn:hover {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.1);
}

.terminal-current-user {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 7px;
}

.terminal-current-prog {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Evaluators Card Toolbar & Search --- */
.judge-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.judge-search-wrap {
    position: relative;
    width: 270px;
    max-width: 100%;
}

.judge-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.judge-search-input {
    width: 100%;
    padding: 6px 14px 6px 32px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--surface-1);
    color: var(--text-0);
    font-size: 12.5px;
    transition: all 0.15s ease;
    font-family: var(--font, inherit);
}

.judge-search-input:focus {
    outline: none;
    border-color: var(--blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* --- Filter Pills Toolbar --- */
.judge-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.judge-filter-pills::-webkit-scrollbar {
    display: none;
}

.judge-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid var(--border);
    background: var(--surface-1);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.judge-filter-pill:hover {
    color: var(--text-0);
    border-color: var(--blue);
}

.judge-filter-pill.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.judge-filter-pill--live.active {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.judge-filter-pill--assigned.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.judge-filter-pill--available.active {
    background: var(--surface-3, #64748b);
    border-color: var(--surface-3, #64748b);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

/* --- Specialization Preset Chips (Modals) --- */
.judge-preset-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.judge-preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.judge-preset-chip:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--violet);
    color: var(--violet);
}

/* ==============================================================================
   MANAGE STAGES & VENUES MODAL HUD
   ============================================================================== */
.stage-modal-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.2));
    color: var(--blue, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.stage-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg, 10px);
    padding: 4px 6px 4px 12px;
    transition: all 0.18s ease;
    box-shadow: var(--shadow-sm);
}

.stage-input-container:focus-within {
    border-color: var(--blue, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.stage-input-container input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 7px 4px !important;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-0);
    flex: 1;
}

.stage-input-container input::placeholder {
    color: var(--text-dim, #94a3b8);
    font-size: 13px;
}

.stage-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.stage-add-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
}

.stage-preset-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 14px;
}

.stage-preset-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stage-preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.stage-preset-chip:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: var(--blue, #2563eb);
    color: var(--blue, #2563eb);
    transform: translateY(-1px);
}

/* --- Venue Cards --- */
.stage-venue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--r-lg, 10px);
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    margin-bottom: 9px;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}

.stage-venue-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.stage-venue-card--live {
    border-left: 4px solid var(--green, #10b981) !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, var(--surface-1) 70%);
    border-color: rgba(16, 185, 129, 0.35);
}

.stage-venue-card--assigned {
    border-left: 4px solid var(--blue, #2563eb) !important;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.03) 0%, var(--surface-1) 70%);
    border-color: rgba(37, 99, 235, 0.3);
}

.stage-venue-card--available {
    border-left: 4px solid var(--border) !important;
}

.stage-venue-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.stage-venue-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.stage-venue-card--live .stage-venue-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green, #10b981);
    border-color: rgba(16, 185, 129, 0.3);
}

.stage-venue-card--assigned .stage-venue-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue, #2563eb);
    border-color: rgba(37, 99, 235, 0.25);
}

.stage-venue-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.stage-venue-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-venue-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.2px;
}

.stage-live-radar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: stage-radar-pulse 1.8s ease infinite;
}

@keyframes stage-radar-pulse {
    0% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
    100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4); }
}

.stage-venue-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-venue-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stage-venue-badge--live {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stage-venue-badge--assigned {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.stage-venue-badge--available {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.stage-venue-live-prog {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-1);
    background: rgba(16, 185, 129, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stage-venue-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    flex-shrink: 0;
}

.stage-venue-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stage-venue-action-btn:hover {
    background: var(--surface-2);
    color: var(--text-0);
    border-color: var(--border-hover, #cbd5e1);
}

.stage-venue-action-btn--edit:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
    transform: scale(1.06);
}

.stage-venue-action-btn--delete:hover,
.stage-venue-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.06);
}

.stage-venue-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stage-empty-state {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: var(--r-lg, 10px);
    background: var(--surface-2);
    margin: 8px 0;
}

.stage-empty-state i {
    font-size: 32px;
    color: var(--text-dim, #94a3b8);
    margin-bottom: 10px;
    display: block;
}

/* ==============================================================================
   COMMUNICATIONS & DISPATCH HUB (Chat, Notifications, Pop-up Cards, Drawers)
   ============================================================================== */

/* --- Layout Grid --- */
#tabContent_comms {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


/* --- Ultra-Compact Smart Command Header --- */
.comms-smart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.comms-smart-brand {
    user-select: none;
    margin-right: 4px;
}

.comms-smart-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    box-shadow: 0 1px 3px rgba(59, 110, 248, 0.18);
}

.comms-smart-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.comms-smart-tabs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 3px;
    border-radius: var(--r-md);
}

.comms-smart-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--r-sm);
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    font-family: var(--font);
    white-space: nowrap;
}

.comms-smart-tab:hover {
    color: var(--text-0);
    background: var(--surface-3);
}

.comms-smart-tab.active {
    background: var(--surface-1);
    color: var(--blue);
    box-shadow: var(--shadow-xs);
}

.comms-smart-tab .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    animation: pulse 1.5s infinite;
}

.comms-subnav-badge {
    background: var(--blue-soft);
    color: var(--blue);
    border: 1px solid rgba(59, 110, 248, 0.2);
    padding: 1px 7px;
    border-radius: var(--r-full);
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-mono);
}

.comms-smart-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- Viewport Height Fit for Communications Hub --- */
body.comms-active {
    overflow: hidden !important;
}

body.comms-active .app-main {
    overflow: hidden !important;
    height: 100vh;
}

body.comms-active .app-content {
    padding: 10px 20px 10px;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#tabContent_comms:not(.hidden) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden !important;
}

#commsHubView_dispatch {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

#commsHubView_arena {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.comms-smart-header {
    flex-shrink: 0;
    margin-bottom: 8px;
}

/* --- 2-Pane Live Console & Channels Workspace --- */
.comms-console-grid {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 980px) {
    .comms-console-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

/* --- Left Channels Sidebar Card --- */
.comms-sidebar-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

.comms-sidebar-header {
    padding: 10px 10px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.comms-sidebar-search {
    position: relative;
    width: 100%;
}

.comms-sidebar-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-3);
    pointer-events: none;
}

.comms-sidebar-search input {
    width: 100%;
    padding: 6px 10px 6px 28px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-0);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.comms-sidebar-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.comms-category-pills {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
}

.comms-cat-pill {
    padding: 2.5px 8px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
}

.comms-cat-pill:hover {
    color: var(--text-0);
    background: var(--surface-3);
}

.comms-cat-pill.active {
    background: var(--surface-1);
    border-color: var(--border);
    color: var(--blue);
    box-shadow: var(--shadow-xs);
}

.comms-channels-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- Right Stream & Docked Composer Card --- */
.comms-stream-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    position: relative;
}

.comms-stream-header {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    min-height: 42px;
}

.comms-stream-recipient {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-0);
}

/* --- Stream Feed (Scrollable Thread) --- */
.comms-stream-feed {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Smart Docked Composer --- */
.comms-smart-composer {
    border-top: 1px solid var(--border);
    background: var(--surface-1);
    padding: 8px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-shrink: 0;
}

.comms-templates-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
}

.comms-templates-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.comms-templates-scroll {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.comms-templates-scroll::-webkit-scrollbar { display: none; }

.comms-tpl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-1);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.comms-tpl-btn svg {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.comms-tpl-btn:hover {
    background: var(--blue-soft);
    border-color: rgba(59, 110, 248, 0.35);
    color: var(--blue);
}

.comms-tpl-btn:hover svg {
    transform: scale(1.12);
}

/* Individual SVG colors inside presets */
.comms-svg-delay { color: #8b5cf6; }
.comms-svg-call { color: #ec4899; }
.comms-svg-pause { color: #3b82f6; }
.comms-svg-resume { color: #10b981; }
.comms-svg-results { color: #f59e0b; }
.comms-svg-venue { color: #06b6d4; }
.comms-svg-schedule { color: #0ea5e9; }

/* --- Unified Modern Dispatch Card --- */
.comms-composer-box {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    display: flex;
    flex-direction: column;
}

.comms-composer-box:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

/* Headline Row */
.comms-composer-subject-wrap {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
}

.comms-subject-icon {
    font-size: 10.5px;
    color: var(--text-3);
    margin-right: 7px;
    flex-shrink: 0;
}

.comms-composer-subject {
    width: 100%;
    padding: 6px 0;
    height: 29px;
    border: none !important;
    background: transparent !important;
    color: var(--text-0);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.comms-composer-subject::placeholder {
    color: var(--text-3);
    font-weight: 500;
}

/* Body / Textarea Row */
.comms-composer-body-wrap {
    background: var(--surface-1);
}

.comms-composer-textarea {
    width: 100%;
    height: 44px;
    min-height: 38px;
    max-height: 95px;
    padding: 7px 10px;
    border: none !important;
    background: transparent !important;
    color: var(--text-0);
    font-size: 12.5px;
    line-height: 1.45;
    font-family: var(--font);
    resize: none;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.comms-composer-textarea::placeholder {
    color: var(--text-3);
}

/* Bottom Integrated Toolbar */
.comms-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 9px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.comms-priority-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comms-priority-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-right: 2px;
}

.comms-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-2);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

.comms-priority-pill:hover {
    color: var(--text-0);
    background: var(--surface-3);
}

.comms-priority-pill.active[data-priority="normal"] {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: rgba(59, 110, 248, 0.4);
    font-weight: 700;
}

.comms-priority-pill.active[data-priority="alert"] {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.4);
    font-weight: 700;
}

.comms-priority-pill.active[data-priority="urgent"] {
    background: var(--red-soft);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.4);
    font-weight: 700;
}

.p-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    display: inline-block;
}
.p-normal { background: var(--blue); }
.p-alert { background: var(--amber); }
.p-urgent { background: var(--red); }

.comms-timer-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.comms-timer-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-right: 2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.comms-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2.5px 7.5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-2);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

.comms-timer-pill:hover {
    color: var(--text-0);
    background: var(--surface-3);
}

.comms-timer-pill.active {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.45);
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.comms-tpl-btn--timer {
    border-color: rgba(245, 158, 11, 0.35) !important;
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
    font-weight: 700 !important;
}

.comms-tpl-btn--timer:hover {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
}

.comms-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.comms-timer-badge--active {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.4);
}

.comms-timer-badge--expired {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Custom Time Picker Modal Styles */
.comms-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 8px 0 14px;
}

.comms-quick-pill {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-1);
    cursor: pointer;
    text-align: center;
    transition: all var(--t-fast);
}

.comms-quick-pill:hover {
    background: var(--surface-3);
    color: var(--text-0);
    border-color: var(--border-strong);
}

.comms-quick-pill.active {
    background: rgba(245, 158, 11, 0.14) !important;
    color: #d97706 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

.comms-time-stepper-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 14px 0;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.comms-stepper-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.comms-stepper-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.comms-stepper-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface-1);
    overflow: hidden;
}

.comms-step-btn {
    width: 36px;
    height: 38px;
    border: none;
    background: var(--surface-2);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    color: var(--text-1);
    transition: background var(--t-fast);
}

.comms-step-btn:hover {
    background: var(--surface-3);
    color: var(--text-0);
}

.comms-step-input {
    width: 60px;
    height: 38px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 19px;
    font-weight: 900;
    color: var(--text-0);
    outline: none;
    -moz-appearance: textfield;
}
.comms-step-input::-webkit-outer-spin-button,
.comms-step-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.comms-stepper-colon {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-muted);
    margin-top: 14px;
}

.comms-target-time-strip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 10px 0;
}

.comms-time-preview-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    padding: 11px 15px;
    margin: 12px 0 0;
}

.comms-dispatch-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comms-kbd-hint {
    font-size: 10.5px;
    color: var(--text-3);
    user-select: none;
}

.comms-kbd-hint kbd {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 9px;
    font-family: var(--font-mono);
}

.comms-dispatch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5.5px 13px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
    transition: all var(--t-fast);
}

.comms-dispatch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 110, 248, 0.35);
}

.comms-dispatch-btn:active {
    transform: translateY(0);
}

/* --- Dispatched Audit Panel (History View) --- */
.comms-audit-panel {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 640px;
    height: 640px;
    width: 100%;
    box-sizing: border-box;
}

.comms-audit-panel[style*="display: block"],
.comms-audit-panel[style*="display: flex"] {
    display: flex !important;
}

.comms-audit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.comms-audit-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.comms-audit-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.01em;
}

.comms-audit-subtitle {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.comms-audit-search-wrap {
    position: relative;
    width: 250px;
}

.comms-audit-search-wrap i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-3);
    pointer-events: none;
}

.comms-audit-search-wrap input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    font-size: 12.5px;
    font-weight: 500;
    outline: none;
    transition: all var(--t-fast);
}

.comms-audit-search-wrap input:focus {
    background: var(--surface-1);
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.comms-audit-table-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--surface-1);
}

.comms-audit-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.comms-audit-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

.comms-audit-table th {
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    box-shadow: 0 1px 0 var(--border);
}

.comms-audit-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-1);
    font-size: 13px;
    transition: background var(--t-fast);
}

.comms-audit-table tr:hover td {
    background: rgba(59, 130, 246, 0.025);
}

/* Row elements */
.comms-time-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comms-time-date {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-0);
    white-space: nowrap;
}

.comms-time-clock {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.comms-audit-recipient {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3.5px 8px;
    border-radius: var(--r-sm);
    font-size: 11.5px;
    font-weight: 700;
    max-width: 155px;
}

.comms-recipient-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.comms-recipient-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comms-recipient--broadcast {
    background: var(--blue-soft);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.comms-recipient--member {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.comms-recipient--judge {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.22);
}

.comms-recipient--leader {
    background: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.comms-prio-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.comms-prio-tag .p-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comms-prio--normal {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.comms-prio--normal .p-normal {
    background: var(--text-3);
}

.comms-prio--alert {
    background: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.comms-prio--alert .p-alert {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.comms-prio--urgent {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.comms-prio--urgent .p-urgent {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.comms-audit-message-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comms-audit-headline {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.35;
}

.comms-audit-body {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.45;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comms-audit-body--notitle {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-1);
}

.comms-reach-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 7px;
    border-radius: var(--r-sm);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.comms-reach--confirmed {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.comms-reach--sent {
    background: var(--surface-2);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.comms-action-del-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--t-fast);
}

.comms-action-del-btn:hover {
    background: var(--red-soft);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.comms-action-del-btn:active {
    transform: scale(0.95);
}


/* --- Left Channels Sidebar Card --- */
.comms-channels-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    height: 640px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.comms-channels-header {
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.comms-channel-search {
    position: relative;
    width: 100%;
}

.comms-channel-search i.fa-search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.comms-channel-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface-1);
    color: var(--text-0);
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.comms-channel-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.comms-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comms-section-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    padding: 8px 8px 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comms-channel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    min-height: 34px;
    border-radius: var(--r-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s ease;
    user-select: none;
    position: relative;
}

.comms-channel-item:hover {
    background: var(--surface-2);
}

.comms-channel-item.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.22);
}

.comms-channel-item.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 6px;
    bottom: 6px;
    width: 3.5px;
    border-radius: 3px;
    background: var(--blue);
}

.comms-channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: transform 0.12s ease;
}

.comms-channel-item:hover .comms-channel-icon {
    transform: scale(1.04);
}

.comms-channel-icon--broadcast {
    background: rgba(37, 99, 235, 0.12);
    color: var(--blue);
}

.comms-channel-icon--judge {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.comms-channel-icon--leader {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

.comms-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

.comms-standby-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-3);
    display: inline-block;
    flex-shrink: 0;
}

.comms-channel-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.comms-channel-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.comms-channel-subtext {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-3);
    margin-left: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comms-channel-meta {
    display: none;
}

.comms-channel-badge {
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    margin-left: auto;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

/* --- Right Chat & Dispatch Panel Card --- */
.comms-chat-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    min-height: 640px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.comms-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    box-sizing: border-box;
}

.comms-chat-header-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comms-header-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

/* Modern Segmented Control for Chat vs Alert */
.comms-mode-pills {
    display: inline-flex;
    background: var(--surface-2);
    padding: 3px;
    border-radius: 9px;
    border: 1px solid var(--border);
    gap: 2px;
}

.comms-mode-pill {
    padding: 5px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.comms-mode-pill:hover {
    color: var(--text-0);
}

.comms-mode-pill.active {
    background: var(--surface-1);
    color: var(--blue);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* --- Chat Conversation / Dispatch Feed Body --- */
.comms-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface-2);
    min-height: 240px;
    box-sizing: border-box;
}

/* Empty Dispatch Notice */
.comms-empty-dispatch-notice {
    text-align: center;
    padding: 16px 14px;
    background: var(--surface-1);
    border: 1px dashed var(--border);
    border-radius: var(--r-md);
    margin: auto;
    max-width: 380px;
}

.comms-empty-dispatch-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue);
    margin: 0 auto 6px;
}

.comms-feed-divider {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 4px 0 6px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

/* Channel Welcome Hero Banner (Legacy) */
.comms-thread-hero {
    text-align: center;
    padding: 14px 12px 8px;
    margin: 0 auto 8px;
    max-width: 440px;
}

.comms-thread-hero-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 6px;
}

.comms-thread-hero-icon--broadcast { background: rgba(37, 99, 235, 0.12); color: var(--blue); }
.comms-thread-hero-icon--judge { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.comms-thread-hero-icon--leader { background: rgba(16, 185, 129, 0.12); color: var(--green); }

.comms-thread-hero-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    margin-bottom: 2px;
}

.comms-thread-hero-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

.comms-thread-hero-divider {
    position: relative;
    text-align: center;
    margin-top: 10px;
}

.comms-thread-hero-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    right: 0;
    height: 1px;
    background: var(--border);
}

.comms-thread-hero-divider span {
    position: relative;
    background: var(--surface-2);
    padding: 0 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

/* Chat Message Rows & Bubbles */
.comms-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 76%;
    animation: comms-fade-in 0.18s ease;
}

@keyframes comms-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.comms-msg-row--admin {
    align-self: flex-end;
    align-items: flex-end;
}

.comms-msg-row--peer {
    align-self: flex-start;
    align-items: flex-start;
}

.comms-msg-bubble {
    padding: 10px 15px;
    font-size: 13.5px;
    line-height: 1.48;
    position: relative;
    word-break: break-word;
    border-radius: 16px;
}

.comms-msg-bubble--admin {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.22);
}

.comms-msg-bubble--peer {
    background: var(--surface-1);
    color: var(--text-0);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.comms-msg-bubble--urgent {
    border-left: 4px solid #ef4444;
    background: #fef2f2 !important;
    color: #991b1b !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18) !important;
}

.comms-msg-bubble--alert {
    border-left: 4px solid #f59e0b;
    background: #fffbeb !important;
    color: #92400e !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18) !important;
}

.comms-msg-title {
    font-size: 12.5px;
    font-weight: 800;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

.comms-msg-meta {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comms-msg-meta--admin {
    justify-content: flex-end;
}

.comms-msg-tag {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
}

.comms-msg-tag--urgent { background: #fee2e2; color: #b91c1c; }
.comms-msg-tag--alert { background: #fef3c7; color: #b45309; }
.comms-msg-tag--broadcast { background: rgba(37, 99, 235, 0.1); color: var(--blue); }

/* --- Alert Mode Extended Form Panel & Quick Templates --- */
.comms-alert-form-panel {
    padding: 12px 18px;
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comms-alert-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.comms-alert-form-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comms-quick-templates {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.comms-template-chip {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    cursor: pointer;
    transition: all 0.14s ease;
}

.comms-template-chip:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
}

/* Empty Thread Starters */
.comms-empty-thread {
    text-align: center;
    padding: 32px 16px;
    margin: auto;
    max-width: 440px;
}

.comms-starter-tips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.comms-starter-pill {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px dashed var(--border);
    background: var(--surface-1);
    color: var(--text-0);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.comms-starter-pill:hover {
    border-style: solid;
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(37, 99, 235, 0.06);
}

/* --- Chat Composer Bar --- */
.comms-chat-composer {
    padding: 14px 20px 16px;
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comms-composer-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.comms-priority-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comms-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.comms-priority-pill:hover {
    color: var(--text-0);
    border-color: var(--text-muted);
}

.comms-priority-pill.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 1px 6px rgba(37, 99, 235, 0.3);
}

.comms-priority-pill--alert.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.3);
}

.comms-priority-pill--urgent.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 1px 6px rgba(239, 68, 68, 0.3);
}

.comms-composer-input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.comms-composer-textarea {
    flex: 1;
    min-height: 46px;
    max-height: 120px;
    padding: 11px 15px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text-0);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.45;
    resize: none;
    outline: none;
    transition: all 0.16s ease;
}

.comms-composer-textarea:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.comms-send-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.16s ease;
    height: 46px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.comms-send-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.comms-send-btn:active {
    transform: translateY(0);
}

/* --- Dispatch & Arena Top Nav Strip --- */
.comms-hub-top-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
    max-width: 100%;
    flex-wrap: wrap;
}

.comms-hub-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.comms-hub-top-btn:hover {
    color: var(--text-0);
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .comms-hub-top-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comms-hub-top-btn.active {
    background: var(--surface-0);
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comms-hub-top-btn .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

/* --- Official Notification Dispatch Card (Composer & Sent Feed) --- */
.dispatch-composer-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.dispatch-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, border-color 0.15s ease;
    border-left: 4px solid var(--blue);
}

.dispatch-card.urgent {
    border-left-color: #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.03), var(--surface-1) 20%);
}

.dispatch-card.alert {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.03), var(--surface-1) 20%);
}

.dispatch-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.dispatch-card__target-badge {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dispatch-card__title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-0);
    margin-bottom: 6px;
    line-height: 1.35;
}

.dispatch-card__body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-1);
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.dispatch-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
    padding-top: 8px;
    margin-top: 6px;
}

/* --- Arena Studio Dedicated Workspace (Full Viewport Command Center) --- */
.arena-studio-card {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 0;
}

.arena-subtab-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 48px;
    flex-shrink: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    position: static;
}

.arena-subtab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.arena-subtab-btn:hover {
    color: var(--text-0);
    background: var(--surface-1);
}

.arena-subtab-btn.active {
    background: var(--surface-1);
    color: var(--blue);
    border-color: var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.arena-subtab-btn.active.arena-btn--quiz {
    color: #d97706;
}

.arena-subtab-btn.active.arena-btn--poll {
    color: #0d9488;
}

.arena-pane-content {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

/* ==============================================================================
   FRONT-OF-APP NOTIFICATION POP-UP CARD (Judge & Leader Tablets/Consoles)
   ============================================================================== */

.front-notif-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: front-notif-pop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes front-notif-pop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.front-notif-card {
    background: var(--surface-1);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    border: 1.5px solid var(--border);
    animation: front-notif-card-shake 0.35s ease;
}

@keyframes front-notif-card-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.front-notif-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.front-notif-header--urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
}

.front-notif-header--alert {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
}

.front-notif-header--normal {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #fff !important;
}

.front-notif-header-title {
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.front-notif-close-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    opacity: 0.85;
    transition: opacity 0.15s;
    line-height: 1;
}

.front-notif-close-btn:hover {
    opacity: 1;
}

.front-notif-body {
    padding: 22px 24px 18px;
}

/* Front-of-App Live Countdown Timer Banner */
.front-notif-timer-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(217, 119, 6, 0.05));
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.front-timer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.front-timer-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #d97706;
    display: flex;
    align-items: center;
    gap: 6px;
}

.front-timer-digits {
    font-family: var(--font-mono, monospace);
    font-size: 21px;
    font-weight: 900;
    color: #d97706;
    letter-spacing: 1px;
    line-height: 1;
}

.front-timer-progress-track {
    width: 100%;
    height: 6.5px;
    background: rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.front-timer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    border-radius: 999px;
    transition: width 0.4s linear;
}

.front-timer-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.front-notif-timer-banner--expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(185, 28, 28, 0.06)) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.front-notif-timer-banner--expired .front-timer-title,
.front-notif-timer-banner--expired .front-timer-digits {
    color: #ef4444 !important;
}

.front-notif-timer-banner--expired .front-timer-progress-track {
    background: rgba(239, 68, 68, 0.2) !important;
}

.front-notif-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-0);
    margin-bottom: 8px;
    line-height: 1.35;
}

.front-notif-message {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-1);
    background: var(--surface-2);
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.front-notif-meta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.front-notif-reply-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.front-notif-reply-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--surface-1);
    color: var(--text-0);
    font-size: 12.5px;
    outline: none;
}

.front-notif-reply-input:focus {
    border-color: var(--blue);
}

.front-notif-reply-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.front-notif-actions {
    display: flex;
    gap: 10px;
}

.front-notif-ack-btn {
    flex: 1;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    border: none;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.front-notif-ack-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ==============================================================================
   NOTIFICATION ARCHIVE DRAWER (Judge & Leader Portals)
   ============================================================================== */

.notif-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.notif-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--surface-1);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: notif-drawer-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notif-drawer-slide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.notif-drawer-header {
    padding: 16px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-drawer-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-drawer-list {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-drawer-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.notif-drawer-item:hover {
    border-color: var(--blue);
    background: var(--surface-1);
}

.notif-drawer-item--urgent {
    border-left: 4px solid #ef4444;
}

.notif-drawer-item--alert {
    border-left: 4px solid #f59e0b;
}

.notif-drawer-item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0);
    margin-bottom: 4px;
}

.notif-drawer-item-msg {
    font-size: 12px;
    color: var(--text-1);
    line-height: 1.45;
    margin-bottom: 6px;
}

.notif-drawer-item-meta {
    font-size: 10.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-badge-bubble {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--surface-1);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* ==============================================================================
   CHAT SPACE DRAWER & PEER BUBBLES (Judge & Leader Portals)
   ============================================================================== */

.chat-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    z-index: 9999;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.2s ease;
}

.chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92vw;
    height: 100vh;
    background: var(--surface-1);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.22);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: notif-drawer-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer-header {
    padding: 14px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-drawer-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-drawer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-drawer-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    line-height: 1.25;
}

.chat-drawer-status {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    margin-top: 2px;
}

.chat-drawer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    display: inline-block;
}

.chat-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--surface-bg, #f8fafc);
}

[data-theme="dark"] .chat-drawer-body {
    background: #0b1120;
}

.chat-drawer-empty {
    margin: auto;
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

.chat-drawer-empty i {
    font-size: 34px;
    color: var(--text-dim, #94a3b8);
    margin-bottom: 12px;
    display: block;
}

.chat-drawer-footer {
    padding: 12px 16px;
    background: var(--surface-1);
    border-top: 1px solid var(--border);
}

.chat-drawer-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-drawer-input {
    flex: 1;
    min-height: 42px;
    max-height: 110px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-0);
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.15s ease;
}

.chat-drawer-input:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-drawer-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.chat-drawer-send-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.chat-drawer-send-btn:active {
    transform: translateY(0);
}

/* User-facing chat bubble alignments (In Judge & Leader consoles) */
.comms-msg-row--self {
    align-self: flex-end;
    align-items: flex-end;
}

.comms-msg-row--desk {
    align-self: flex-start;
    align-items: flex-start;
}

.comms-msg-bubble--self {
    background: var(--blue) !important;
    color: #ffffff !important;
    border-bottom-right-radius: 2px !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.comms-msg-bubble--desk {
    background: var(--surface-1) !important;
    color: var(--text-0) !important;
    border: 1px solid var(--border) !important;
    border-bottom-left-radius: 2px !important;
    box-shadow: var(--shadow-sm);
}

/* ==============================================================================
   MULTILINGUAL OFFICIAL TYPOGRAPHY (MALAYALAM, KANNADA, ARABIC, URDU, ENGLISH)
   ============================================================================== */
.lang-ml, [lang="ml"], .ml-text {
    font-family: 'Noto Sans Malayalam', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.65 !important;
}

.lang-kn, [lang="kn"], .kn-text {
    font-family: 'Noto Sans Kannada', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.65 !important;
}

/* Base chat, notifications & modal typography with robust script fallbacks */
.comms-chat-body, .comms-message-bubble, .comms-alert-card, 
.notif-item-body, .quiz-question-text, .poll-question-text {
    font-family: 'Inter', 'Noto Sans Malayalam', 'Noto Sans Kannada', 'Noto Sans Arabic', 'Noto Naskh Arabic', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.62 !important;
    word-break: break-word;
}

/* Bold official headers for chat & notifications */
.comms-chat-header-title, .comms-message-title, .notif-item-title, 
.quiz-title, .poll-title, .quiz-question-heading, .notif-drawer-title,
.quiz-eval-heading, .poll-eval-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Noto Sans Malayalam', 'Noto Sans Kannada', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em;
}

/* ==============================================================================
   ADMIN COMMUNICATIONS: INSTANT QUIZ & LIVE POLL PANELS
   ============================================================================== */
.comms-quiz-panel, .comms-poll-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-1);
    overflow-y: auto;
    padding: 16px 20px;
    gap: 16px;
}

.comms-subtab-strip {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.comms-subtab-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comms-subtab-btn:hover {
    background: var(--surface-3);
    color: var(--text-0);
}

.comms-subtab-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 110, 248, 0.25);
}

/* ==============================================================================
   LIVE ARENA STUDIO DESIGN SYSTEM — FULL-VIEWPORT 2-PANE WORKBENCH (SCREEN-FIT)
   ============================================================================== */

#arenaPane_quiz,
#arenaPane_poll {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#arenaPane_history {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 24px;
    box-sizing: border-box;
}

.comms-quiz-panel,
.comms-poll-panel {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    overflow: hidden;
    padding: 0;
    gap: 0;
}

/* ─── Studio Contextual Top Toolbar ──────────────────────────────────────── */
.studio-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    flex-shrink: 0;
}

.studio-brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.studio-icon-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.studio-icon--quiz {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.studio-icon--poll {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.studio-title-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.studio-heading {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.01em;
    margin: 0;
}

.quiz-live-tag,
.poll-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.quiz-live-tag {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.poll-live-tag {
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: #0d9488;
}

.quiz-live-pulse-dot,
.poll-live-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: livePulseDot 1.8s infinite;
}

.quiz-live-pulse-dot {
    background: #059669;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.poll-live-pulse-dot {
    background: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.3);
}

@keyframes livePulseDot {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
}

/* ─── Mode Segmented Controls ────────────────────────────────────────────── */
.quiz-mode-segmented,
.poll-mode-segmented {
    display: inline-flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.quiz-mode-btn,
.poll-mode-btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quiz-mode-btn:hover,
.poll-mode-btn:hover {
    color: var(--text-0);
}

.quiz-mode-btn.active {
    background: var(--surface-1);
    color: var(--blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.poll-mode-btn.active {
    background: var(--surface-1);
    color: #0d9488;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.quiz-counter-badge,
.poll-counter-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
}

.quiz-counter-badge {
    background: var(--amber-soft);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.poll-counter-badge {
    background: rgba(13, 148, 136, 0.15);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.3);
}

/* ==============================================================================
   ARENA WORKSPACE: 2-PANE STUDIO COMMAND CENTER (LEFT: SETUP, RIGHT: WORKBENCH)
   ============================================================================== */

.arena-workspace-grid {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.arena-workspace-grid.hidden,
.quiz-eval-view.hidden,
.poll-live-view.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .arena-workspace-grid {
        flex-direction: column;
        overflow-y: auto !important;
    }
}

/* --- Left Pane: Setup Canvas (Question & Parameters) --- */
.studio-pane-setup {
    flex: 1 1 50%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    box-sizing: border-box;
    overflow-y: auto;
}

.studio-pane-section {
    display: flex;
    flex-direction: column;
}

.studio-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.studio-field-label {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
}

.studio-field-sub {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
    margin-left: 6px;
}

.quiz-header-pills,
.poll-header-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quiz-lang-pill,
.poll-lang-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-3);
}

.quiz-char-badge,
.poll-char-badge {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--text-3);
}

/* Question Prompt Canvas */
.studio-question-textarea {
    width: 100%;
    min-height: 72px;
    height: 80px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    line-height: 1.4;
    outline: none;
    box-sizing: border-box;
    transition: all var(--t-fast);
    resize: none;
}

.studio-question-textarea:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

/* Config Section Card */
.studio-config-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.studio-param-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.studio-param-label {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 55px;
}

.quiz-format-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quiz-format-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--surface-1);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    user-select: none;
}

.quiz-format-pill input[type="radio"] {
    display: none;
}

.quiz-format-pill:hover {
    color: var(--text-0);
    border-color: var(--border-hover, var(--border));
}

.quiz-format-pill.active {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
    box-shadow: 0 1px 4px rgba(59, 110, 248, 0.15);
}

.quiz-timer-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quiz-timer-pill {
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-1);
    cursor: pointer;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
}

.quiz-timer-pill:hover {
    border-color: var(--amber);
    color: var(--text-0);
}

.quiz-timer-pill.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: #ffffff;
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.28);
}

.studio-param-anticheat {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.quiz-anticheat-compact-label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(59, 110, 248, 0.04);
    border: 1.5px solid rgba(59, 110, 248, 0.2);
    cursor: pointer;
    user-select: none;
    transition: all var(--t-fast);
    box-sizing: border-box;
}

.quiz-anticheat-compact-label:hover {
    background: rgba(59, 110, 248, 0.08);
    border-color: rgba(59, 110, 248, 0.35);
}

.quiz-anticheat-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.quiz-anticheat-shield-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(59, 110, 248, 0.12);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-anticheat-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-0);
}

.quiz-anticheat-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

/* --- Right Pane: Workbench (Options & Docked Launch CTA) --- */
.studio-pane-workbench {
    flex: 1 1 50%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px 18px;
    box-sizing: border-box;
    border-left: 1px solid var(--border);
    background: var(--surface-0);
    overflow: hidden;
}

@media (max-width: 900px) {
    .studio-pane-workbench {
        border-left: none;
        border-top: 1px solid var(--border);
        overflow: visible;
    }
}

.studio-options-box {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.studio-options-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 4px;
    padding-bottom: 2px;
}

.quiz-add-opt-btn,
.poll-add-opt-btn {
    border: 1px dashed var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
    padding: 4px 10px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    display: inline-flex;
    align-items: center;
}

.poll-add-opt-btn {
    border-color: #0d9488;
    background: rgba(13, 148, 136, 0.1);
    color: #0d9488;
}

.quiz-add-opt-btn:hover {
    background: var(--blue);
    color: #ffffff;
    border-style: solid;
}

.poll-add-opt-btn:hover {
    background: #0d9488;
    color: #ffffff;
    border-style: solid;
}

/* Option Row Tiles (Compact & Space-Optimized) */
.quiz-option-row,
.poll-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-1);
    padding: 4px 10px;
    min-height: 38px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    transition: all var(--t-fast);
    box-sizing: border-box;
    flex-shrink: 0;
}

.quiz-option-row:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.poll-option-row:focus-within {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.quiz-option-row.is-correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 0 1.5px rgba(16, 185, 129, 0.25);
}

.quiz-option-letter,
.poll-option-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-option-letter.letter-a { background: rgba(59, 110, 248, 0.12); color: #2563eb; border: 1px solid rgba(59, 110, 248, 0.25); }
.quiz-option-letter.letter-b { background: rgba(13, 148, 136, 0.12); color: #0d9488; border: 1px solid rgba(13, 148, 136, 0.25); }
.quiz-option-letter.letter-c { background: rgba(245, 158, 11, 0.12); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.quiz-option-letter.letter-d { background: rgba(139, 92, 246, 0.12); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.25); }
.quiz-option-letter.letter-e { background: rgba(236, 72, 153, 0.12); color: #db2777; border: 1px solid rgba(236, 72, 153, 0.25); }
.quiz-option-letter.letter-f { background: rgba(14, 165, 233, 0.12); color: #0284c7; border: 1px solid rgba(14, 165, 233, 0.25); }

.quiz-option-input-wrap,
.poll-option-input-wrap {
    flex: 1;
}

.quiz-option-text-input,
.poll-option-text-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-0);
    outline: none;
    padding: 2px 0;
}

.quiz-option-correct-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    user-select: none;
    white-space: nowrap;
}

.quiz-option-correct-label input[type="radio"] {
    display: none;
}

.quiz-option-correct-label:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.quiz-option-row.is-correct .quiz-option-correct-label {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 1px 6px rgba(16, 185, 129, 0.35);
}

.quiz-option-delete-btn,
.poll-option-delete-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--t-fast);
}

.quiz-option-delete-btn:hover,
.poll-option-delete-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* Write-in Box */
.studio-writein-box {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.quiz-writein-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    transition: all var(--t-fast);
}

.quiz-writein-input:focus {
    border-color: var(--blue);
    background: var(--surface-1);
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.quiz-writein-hint {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 8px;
    line-height: 1.45;
}

/* Pinned Docked Launch Action Bar */
.studio-launch-bar {
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.studio-launch-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 9px;
    border: none;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-sizing: border-box;
    transition: all var(--t-fast);
    letter-spacing: 0.01em;
}

.quiz-launch-action-btn {
    background: linear-gradient(135deg, #3b6ef8 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 110, 248, 0.35);
}

.quiz-launch-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59, 110, 248, 0.45);
}

.quiz-launch-action-btn:active {
    transform: translateY(0);
}

.quiz-launch-icon-glow {
    color: #f59e0b;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
    display: inline-flex;
    align-items: center;
}

/* ─── Quiz Quick Presets Strip (Guaranteed Single-Line Nowrap) ─────────────── */
.quiz-presets-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    width: 100%;
}

.quiz-presets-strip::-webkit-scrollbar {
    display: none;
}

.quiz-quick-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.quiz-preset-btn {
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-1);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    user-select: none;
}

.quiz-preset-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-soft);
    transform: translateY(-1px);
}

.quiz-preset-btn svg {
    flex-shrink: 0;
}

/* Live Round Readiness Card (Docked in Workbench right above Launch Button) */
.quiz-readiness-card {
    margin-top: 0;
    margin-bottom: 6px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    flex-shrink: 0;
}

.quiz-readiness-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.quiz-readiness-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

@media (max-width: 1100px) {
    .quiz-readiness-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quiz-readiness-pill {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 3px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.quiz-readiness-pill-lbl {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-3);
}

.quiz-readiness-pill-val {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-launch-caption {
    text-align: center;
    font-size: 10px;
    color: var(--text-3);
    margin-top: 4px;
    line-height: 1.3;
}

/* ─── Live Evaluation Desk Billboard & Feeds ──────────────────────────────── */
.quiz-eval-view {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.quiz-eval-billboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-eval-round-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.quiz-live-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #34d399;
}

.quiz-eval-question-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.quiz-eval-question-display {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
}

.quiz-eval-billboard-status {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quiz-countdown-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 6px 14px;
    text-align: center;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

.quiz-countdown-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.quiz-countdown-digits {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 900;
    color: #38bdf8;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.quiz-desk-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-desk-status-pill.active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.quiz-desk-status-pill.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.quiz-eval-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0;
}

.quiz-eval-incoming-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    display: inline-flex;
    align-items: center;
}

.quiz-eval-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-champion-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
    border: 1.5px solid #f59e0b;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18);
}

.quiz-champion-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quiz-champion-trophy {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    flex-shrink: 0;
}

.quiz-champion-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d97706;
}

.quiz-champion-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
    margin-top: 2px;
}

.quiz-responses-feed {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--border);
}

.quiz-empty-feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-3);
}

.quiz-empty-icon {
    font-size: 32px;
    color: var(--text-3);
    margin-bottom: 12px;
    opacity: 0.6;
}

.quiz-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.quiz-empty-sub {
    font-size: 12px;
    color: var(--text-3);
    max-width: 320px;
}

.quiz-response-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    transition: all var(--t-fast);
}

.quiz-response-row:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-hover);
}

.quiz-response-row.correct {
    border-left: 4px solid var(--green);
    background: rgba(16, 185, 129, 0.03);
}

.quiz-response-row.wrong {
    border-left: 4px solid var(--red);
    opacity: 0.8;
}

.quiz-response-row.disqualified {
    border-left: 4px solid #d97706;
    background: rgba(245, 158, 11, 0.04);
}

/* ==============================================================================
   MEMBER PORTAL: FLOATING LIVE QUIZ BAR & WINNER BANNER
   ============================================================================== */
.member-quiz-bar {
    background: linear-gradient(135deg, #7c3aed 0%, #3b6ef8 100%);
    color: #ffffff;
    padding: 12px 16px;
    margin: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: all var(--t-fast);
    animation: pulseQuizBar 2.5s infinite;
}

.member-quiz-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(124, 58, 237, 0.38);
}

@keyframes pulseQuizBar {
    0% { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28); }
    50% { box-shadow: 0 6px 24px rgba(59, 110, 248, 0.48); }
    100% { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28); }
}

.member-quiz-bar-title {
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-quiz-bar-timer {
    background: rgba(255, 255, 255, 0.22);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Celebratory Quiz Winner Banner */
.member-quiz-winner-banner {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #d97706 100%);
    color: #ffffff;
    padding: 14px 16px;
    margin: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.32);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.member-quiz-winner-banner::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6'/%3E%3Cpath d='M18 9h1.5a2.5 2.5 0 0 0 0-5H18'/%3E%3Cpath d='M4 22h16'/%3E%3Cpath d='M10 14.66V17c0 .55-.45 1-1 1H8v4h8v-4h-1c-.55 0-1-.45-1-1v-2.34'/%3E%3Crect x='6' y='2' width='12' height='12' rx='2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.18;
    pointer-events: none;
}

/* ==============================================================================
   MEMBER PORTAL: ANTI-CHEAT INSTANT QUIZ ARENA MODAL
   ============================================================================== */
.quiz-arena-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeInModal 0.2s ease-out;
}

.quiz-arena-card {
    background: var(--surface-1);
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.quiz-arena-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b6ef8 100%);
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-anti-cheat-pill {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quiz-timer-big-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 3px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: var(--blue);
    margin: 12px auto;
    box-shadow: 0 4px 14px rgba(59, 110, 248, 0.2);
}

.quiz-timer-big-ring.danger {
    border-color: var(--red);
    color: var(--red);
    animation: blinkTimer 0.8s infinite;
}

@keyframes blinkTimer {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.quiz-option-choice-btn {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--t-fast);
    margin-bottom: 10px;
}

.quiz-option-choice-btn:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
}

.quiz-option-choice-btn.selected {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 110, 248, 0.3);
}

.quiz-anti-cheat-lockout {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 14px;
    padding: 18px;
    color: #991b1b;
    text-align: center;
    margin: 14px 0;
}

/* ==============================================================================
   MEMBER PORTAL: NOTIFICATION DRAWER & BELL
   ============================================================================== */
.notif-bell-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--red);
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-0);
}

.member-notif-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 380px;
    background: var(--surface-1);
    z-index: 10000;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.member-notif-drawer.open {
    transform: translateX(0);
}

.notif-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.notif-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.notif-item-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    transition: all var(--t-fast);
}

.notif-item-card.urgent {
    border-left: 4px solid var(--red);
    background: rgba(239, 68, 68, 0.04);
}

.notif-item-card.alert {
    border-left: 4px solid var(--amber);
    background: rgba(245, 158, 11, 0.04);
}

/* ==============================================================================
   MEMBER PORTAL: LIVE POLL CARD
   ============================================================================== */
.member-poll-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin: 10px 12px;
    box-shadow: var(--shadow-sm);
}

.poll-option-vote-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-0);
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poll-option-vote-btn:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
}

/* ==============================================================================
   LIVE FESTIVAL POLL STUDIO (ARENA MODULE) — COMPACT FIT-TO-SCREEN
   ============================================================================== */

/* ─── Quick Presets Strip ────────────────────────────────────────────────── */
.poll-templates-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.poll-quick-label {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.poll-quick-preset-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.poll-quick-preset-btn:hover {
    border-color: #0d9488;
    color: #0d9488;
    background: rgba(13, 148, 136, 0.08);
}

.poll-vote-rule-box {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: var(--text-2);
    font-weight: 600;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

/* ─── Poll Live View Billboard & Bars (Full Viewport Screen-Fit) ────────── */
.poll-live-view {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.poll-live-billboard {
    background: linear-gradient(135deg, #042f2e 0%, #0f172a 100%);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.poll-live-billboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.poll-desk-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(13, 148, 136, 0.25);
    border: 1px solid rgba(13, 148, 136, 0.5);
    color: #2dd4bf;
    text-transform: uppercase;
}

.poll-live-votes-badge {
    font-size: 11.5px;
    font-weight: 800;
    color: #5eead4;
    font-family: var(--font-mono);
}

.poll-live-billboard-question {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    line-height: 1.35;
}

.poll-live-bars-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.poll-result-bar-wrap {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.poll-result-bar-wrap.is-leader {
    border-color: rgba(13, 148, 136, 0.5);
    background: rgba(13, 148, 136, 0.05);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}

.poll-result-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    border: none;
    margin-top: 6px;
}

.poll-result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d9488 0%, #06b6d4 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.poll-result-bar-fill.fill-leader {
    background: linear-gradient(90deg, #f59e0b 0%, #0d9488 100%);
}

.poll-live-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ─── Poll Closed Official Winner Banner ─────────────────────────────────── */
.poll-closed-winner-card {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(15, 118, 110, 0.05) 100%);
    border: 1.5px solid rgba(13, 148, 136, 0.35);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    margin: 12px 0;
}

.poll-winner-crown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0d9488;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.poll-winner-option-name {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-0);
    margin-bottom: 6px;
}

.poll-winner-votes-stat {
    font-size: 13px;
    font-weight: 700;
    color: #0d9488;
    font-family: var(--font-mono);
}

/* ─── Arena History Cards Showcase ────────────────────────────────────────── */
.arena-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 14px;
}

.arena-history-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.arena-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--t-fast);
}

.arena-filter-btn.active {
    background: var(--surface-1);
    color: var(--text-0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.arena-filter-count {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-1);
}

/* ─── Arena History Cards Showcase (Clean Modern Grid) ───────────────────── */
.arena-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
}

.arena-history-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.arena-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--t-fast);
}

.arena-filter-btn.active {
    background: var(--surface-1);
    color: var(--text-0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.arena-filter-count {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-1);
}

.arena-history-cards-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 4px 20px 2px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
    align-items: stretch;
}

/* Single Result Card */
.arena-result-card {
    background: var(--surface-1);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    box-sizing: border-box;
}

.arena-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--border-hover, #cbd5e1);
}

.arena-result-card--quiz {
    border-top: 3px solid #f59e0b;
}

.arena-result-card--poll {
    border-top: 3px solid #0d9488;
}

/* Card Header */
.arena-card-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.arena-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 999px;
}

.arena-card-tag--quiz {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.arena-card-tag--poll {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.3);
}

.arena-card-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0.45;
    transition: all var(--t-fast);
}

.arena-card-delete-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Card Question */
.arena-card-question {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
}

/* Hero Showcase Banner (No box-in-box) */
.arena-winner-hero {
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arena-winner-hero--quiz {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.03) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.arena-winner-hero--poll {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(15, 118, 110, 0.03) 100%);
    border: 1px solid rgba(13, 148, 136, 0.25);
}

.arena-winner-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.arena-crown-badge {
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 4px;
}

.arena-crown-badge--poll {
    color: #0d9488;
}

.arena-speed-badge {
    font-family: var(--font-mono);
    color: #d97706;
    font-weight: 800;
}

.arena-votes-pill {
    font-family: var(--font-mono);
    color: #0d9488;
    font-weight: 800;
}

.arena-winner-hero-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arena-winner-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.arena-winner-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
}

.arena-chest-badge {
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-1);
}

.arena-team-badge {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
}

.arena-winner-answer-row {
    font-size: 11.5px;
    color: var(--text-2);
    margin-top: 2px;
}

.arena-ans-label {
    color: var(--text-3);
}

.arena-ans-val {
    font-weight: 700;
    color: var(--text-0);
}

/* Poll Hero */
.arena-poll-winner-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.arena-poll-winner-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-0);
}

.arena-poll-winner-stat {
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #0d9488;
    white-space: nowrap;
}

.arena-poll-votes-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
}

.arena-poll-mini-track-wrap {
    width: 100%;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.arena-poll-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d9488 0%, #06b6d4 100%);
    border-radius: 999px;
}

/* Card Footer with Start and End Timestamps */
.arena-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-3);
}

.arena-footer-time {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.arena-time-sep {
    color: var(--border);
}

/* ==========================================================================
   UPLIFT INTELLIGENCE & STRATEGY STUDIO STYLES
   ========================================================================== */

/* Studio Cockpit Shell */
.uplift-studio-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.uplift-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.uplift-header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.uplift-header-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.uplift-header-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.3px;
}

.uplift-header-subtitle {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 2px;
}

.uplift-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
    font-size: 12.5px;
    font-weight: 800;
}

.uplift-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: upliftPulse 2s infinite;
}

@keyframes upliftPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Team Selector Capsule Bar & Command Deck */
.uplift-command-deck {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.uplift-selector-wrapper {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.uplift-deck-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uplift-deck-label-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.uplift-deck-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 9px;
    border-radius: 6px;
    user-select: none;
}

.uplift-deck-tag.tag-blue {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.uplift-deck-tag.tag-amber {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.18);
}

.uplift-deck-tag.tag-purple {
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    border: 1px solid rgba(124, 58, 237, 0.18);
}

.uplift-deck-hint {
    font-size: 11.5px;
    color: var(--text-3);
    font-weight: 500;
}

.uplift-filter-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.uplift-team-selector-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.uplift-team-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.uplift-team-pill:hover {
    border-color: var(--blue, #2563eb);
    background: var(--surface-2);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.uplift-team-pill.active {
    background: var(--text-0, #0f172a);
    color: #fff !important;
    border-color: var(--text-0, #0f172a);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}

.uplift-team-pill.overview-pill {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--blue, #2563eb);
}

.uplift-team-pill.overview-pill.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
    border-color: #2563eb;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.uplift-team-pill .team-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.uplift-team-pill.active .team-dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.uplift-team-pill .uplift-rank-tag {
    font-size: 10.5px;
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-2);
}

.uplift-team-pill.active .uplift-rank-tag {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.uplift-team-pill .uplift-pts-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.uplift-team-pill .uplift-pts-tag.zero-pts {
    background: transparent;
    color: var(--text-3);
    font-weight: 600;
    padding: 0 2px;
}

.uplift-team-pill.active .uplift-pts-tag {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Momentum Executive Hero Card */
.uplift-momentum-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.uplift-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.uplift-hero-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.uplift-hero-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 900;
    flex-shrink: 0;
}

.uplift-hero-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.3px;
}

.uplift-hero-subtitle {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 2px;
}

.uplift-hero-btn-all {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
    border: none;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uplift-hero-btn-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.uplift-momentum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.uplift-kpi-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.uplift-kpi-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: var(--surface-1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.uplift-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
}

.uplift-kpi-big {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-0);
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.uplift-kpi-detail {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
}

/* Programme Cards List */
.uplift-prog-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.uplift-prog-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--blue);
    opacity: 0.6;
    transition: all 0.2s ease;
}

.uplift-prog-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.uplift-prog-card:hover::before {
    width: 6px;
    opacity: 1;
}

.uplift-prog-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.uplift-prog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.uplift-prog-code-pill {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--surface-3);
    color: var(--text-1);
    border: 1px solid var(--border);
}

.uplift-prog-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: -0.2px;
}

.uplift-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-3);
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.uplift-winners-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Podium Winner Card */
.uplift-winner-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}

.uplift-winner-card.podium-1 {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.uplift-winner-card.podium-2 {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.3);
}

.uplift-winner-card.podium-3 {
    background: rgba(180, 83, 9, 0.06);
    border-color: rgba(180, 83, 9, 0.25);
}

.uplift-rank-pill {
    font-weight: 800;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.uplift-winner-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0);
}

.uplift-winner-chest {
    font-size: 11.5px;
    font-family: var(--font-mono, monospace);
    color: var(--text-3);
}

.uplift-winner-team-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid currentColor;
}

.uplift-grade-pill {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--surface-3);
    color: var(--text-2);
}

.uplift-pts-chip {
    font-size: 12px;
    font-family: var(--font-mono, monospace);
    font-weight: 800;
    color: #059669;
}

/* Right Control Deck */
.uplift-card-actions-deck {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.uplift-dist-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.uplift-dist-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
}

.uplift-dist-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.uplift-dist-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.uplift-btn-cue {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.uplift-btn-cue:hover {
    background: #f59e0b;
    color: #fff !important;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.uplift-btn-publish {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.uplift-btn-publish:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.uplift-btn-tie {
    background: #f59e0b;
    color: #fff !important;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.uplift-btn-tie:hover {
    background: #d97706;
}

@media (max-width: 960px) {
    .uplift-prog-card {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .uplift-card-actions-deck {
        justify-content: space-between;
        width: 100%;
    }
    .uplift-dist-box {
        text-align: left;
    }
    .uplift-dist-chips {
        justify-content: flex-start;
    }
}

/* Uplift Studio Lower Tier: Divider, Toolbar & Segmented Controls */
.uplift-deck-divider {
    height: 1px;
    background: var(--border);
    opacity: 0.6;
    margin: 2px 0;
}

.uplift-deck-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.uplift-toolbar-segment {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Recessed Segmented Track */
.uplift-segmented-track {
    background: var(--surface-2);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Segmented Buttons */
.uplift-segmented-btn, .uplift-choice-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.uplift-segmented-btn:hover, .uplift-choice-pill:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-0);
}

.uplift-segmented-btn.active, .uplift-choice-pill.active {
    background: var(--surface-1);
    color: var(--text-0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.04);
}

.uplift-segmented-btn.stage-btn.active, .uplift-choice-pill.stage-pill.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.uplift-segmented-btn.nonstage-btn.active, .uplift-choice-pill.nonstage-pill.active {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.uplift-segmented-btn.drama-btn.active, .uplift-choice-pill.drama-pill.active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.uplift-segmented-btn.flips-btn.active {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.uplift-segmented-btn.safe-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* Fallback legacy container support */
.uplift-control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.uplift-filter-capsule-box {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.uplift-filter-pills-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Ascent Roadmap & Reserve Vault Styling */
.uplift-ascent-roadmap-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #d97706;
    font-size: 12.5px;
    font-weight: 700;
}

.uplift-reserve-divider-box {
    margin: 24px 0 16px 0;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(245, 158, 11, 0.4);
}

.uplift-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.uplift-step-pill.step-normal {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.uplift-step-pill.step-winner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.uplift-step-pill.step-reserve {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.uplift-prog-card.reserve-card {
    opacity: 0.85;
    background: var(--surface-2);
}

.uplift-prog-card.reserve-card:hover {
    opacity: 1;
}

/* Drama & Lead-Flip Badges on Program Cards */
.uplift-drama-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.uplift-drama-tag.tag-lead-flip {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.4);
    animation: dramaPulse 2s infinite;
}
.uplift-drama-tag.tag-close-race {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.uplift-drama-tag.tag-podium-shuffle {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.uplift-drama-tag.tag-runaway-risk {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.uplift-drama-tag.tag-neutral {
    background: var(--surface-2);
    color: var(--text-3);
    border: 1px solid var(--border);
}

@keyframes dramaPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Director's Strategic Spotlight Cue Card */
.uplift-drama-spotlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(124, 58, 237, 0.08) 50%, rgba(16, 185, 129, 0.08) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}
.uplift-spotlight-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.uplift-spotlight-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}
.uplift-spotlight-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.uplift-spotlight-desc {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 3px;
    max-width: 650px;
    line-height: 1.4;
}

/* ─── Festival Branding & Header Emblems ─────────────────────────────────── */
.sidebar__brand-clean-logo {
    height: 32px;
    width: auto;
    max-width: 135px;
    object-fit: contain;
    display: block;
    transition: transform var(--t-fast);
}

.sidebar__brand:hover .sidebar__brand-clean-logo {
    transform: scale(1.03);
}

.sidebar__brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue, #3b6ef8);
    background: var(--blue-soft, rgba(59, 110, 248, 0.08));
    border: 1px solid rgba(59, 110, 248, 0.22);
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1;
    user-select: none;
    transition: all var(--t-fast);
    box-shadow: 0 1px 3px rgba(59, 110, 248, 0.08);
}

.sidebar__brand-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.sidebar__brand:hover .sidebar__brand-badge {
    border-color: var(--blue);
    background: rgba(59, 110, 248, 0.14);
}

[data-theme="dark"] .sidebar__brand-clean-logo {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

[data-theme="dark"] .sidebar__brand-badge {
    color: #60a5fa;
    background: rgba(59, 110, 248, 0.16);
    border-color: rgba(59, 110, 248, 0.35);
}

/* ─── QalamX Labs Developer Attribution & Modal ──────────────────────────── */
.sidebar__dev-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 8px 12px 10px 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(59, 130, 246, 0.07));
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar__dev-card:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.14));
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.16);
}

.sidebar__dev-logo {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.sidebar__dev-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.sidebar__dev-label {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar__dev-brand {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-0, #0f172a);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Developer Console Modal */
.developer-modal-card {
    max-width: 580px;
    width: 92%;
    border-radius: 18px;
    padding: 26px 28px;
    background: var(--surface-1, #ffffff);
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.dev-modal-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.dev-modal-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dev-modal-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dev-modal-headline {
    flex: 1;
    min-width: 0;
}

.dev-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-0, #0f172a);
    margin: 0 0 2px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dev-modal-tagline {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin: 0 0 6px 0;
    font-weight: 500;
}

/* Connect Grid Tiles */
.dev-connect-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 540px) {
    .dev-connect-grid {
        grid-template-columns: 1fr;
    }
}

.dev-connect-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-2, #f8fafc);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dev-connect-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.dev-connect-tile--web:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.06);
}
.dev-connect-tile--wa:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
}
.dev-connect-tile--ig:hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.06);
}
.dev-connect-tile--email:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

.dev-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dev-connect-tile--web .dev-tile-icon { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.dev-connect-tile--wa .dev-tile-icon { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.dev-connect-tile--ig .dev-tile-icon { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.dev-connect-tile--email .dev-tile-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.dev-tile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.dev-tile-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dev-tile-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-0, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dev-tile-arrow {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    opacity: 0.6;
    transition: all 0.2s;
}

.dev-connect-tile:hover .dev-tile-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
    color: var(--text-0);
}

/* ─── Deploy Modal: Stage Lot Requirement Card ─── */
.deploy-lot-card {
    background: var(--surface-1, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .deploy-lot-card {
    background: var(--surface-2, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
}

.deploy-lot-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.deploy-lot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.deploy-lot-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

[data-theme="dark"] .deploy-lot-icon-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.deploy-lot-card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-0, #0f172a);
    line-height: 1.25;
}

.deploy-lot-card-sub {
    font-size: 11px;
    color: var(--text-2, #64748b);
    margin-top: 1px;
    line-height: 1.2;
}

/* Custom Modern Toggle Switch */
.deploy-lot-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.deploy-lot-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.deploy-lot-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.deploy-lot-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-3, #cbd5e1);
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 22px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.deploy-lot-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.deploy-lot-switch input:checked + .deploy-lot-slider {
    background-color: var(--blue, #2563eb);
}

.deploy-lot-switch input:checked + .deploy-lot-slider:before {
    transform: translateX(16px);
}

.deploy-lot-switch input:disabled + .deploy-lot-slider {
    opacity: 0.55;
    cursor: not-allowed;
}

.deploy-lot-switch-text {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-1, #334155);
    user-select: none;
    white-space: nowrap;
}

/* Status Strips */
.deploy-lot-status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.2s;
}

.deploy-lot-status-box.is-ready {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

[data-theme="dark"] .deploy-lot-status-box.is-ready {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #4ade80;
}

.deploy-lot-status-box.is-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

[data-theme="dark"] .deploy-lot-status-box.is-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.deploy-lot-status-box.is-neutral {
    background: var(--surface-2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text-2, #475569);
}

[data-theme="dark"] .deploy-lot-status-box.is-neutral {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #94a3b8);
}

.deploy-lot-status-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.deploy-lot-status-icon.success {
    background: rgba(22, 101, 52, 0.12);
    color: #15803d;
}

[data-theme="dark"] .deploy-lot-status-icon.success {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.deploy-lot-status-icon.warning {
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
}

[data-theme="dark"] .deploy-lot-status-icon.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.deploy-lot-status-icon.neutral {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .deploy-lot-status-icon.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.deploy-lot-status-heading {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.deploy-lot-codes-preview {
    font-size: 11.5px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.deploy-lot-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-family: var(--font-mono, monospace);
    font-weight: 800;
    font-size: 10.5px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

[data-theme="dark"] .deploy-lot-pill {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

/* ==============================================================================
   SILM FESTIVAL MINIMAL LOGIN SYSTEM (Admin, Leader, Judge, Member)
   Inspired by SILM - Defending Human Disposition Brand Guidelines
   Palette: Aubergine #4D0044 · Crimson #B20B41 · Coral #EE3D2D · Gold #E5B900 · Blush #FCB9B6
   ============================================================================== */
.admin-login-overlay,
.leader-login-overlay,
.judge-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    background: radial-gradient(circle at 50% 30%, rgba(77, 0, 68, 0.55) 0%, rgba(20, 2, 18, 0.94) 65%, rgba(11, 1, 9, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.admin-login-overlay.hidden,
.leader-login-overlay.hidden,
.judge-login-overlay.hidden {
    display: none !important;
}

/* SILM Cards (Admin, Leader, Judge, Member) */
.admin-login-card,
.leader-login-card,
.judge-login-card,
.silm-login-card {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border: 1px solid rgba(77, 0, 68, 0.08);
    border-radius: 24px;
    padding: 2.25rem 1.85rem;
    box-shadow: 0 24px 60px -12px rgba(11, 1, 9, 0.28), 0 0 0 1px rgba(229, 185, 0, 0.18);
    position: relative;
    overflow: hidden;
    animation: silmPortalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

[data-theme="dark"] .admin-login-card,
[data-theme="dark"] .leader-login-card,
[data-theme="dark"] .judge-login-card,
[data-theme="dark"] .silm-login-card {
    background: #160415;
    border-color: rgba(229, 185, 0, 0.25);
    box-shadow: 0 28px 70px -12px rgba(0, 0, 0, 0.85), 0 0 40px rgba(178, 11, 65, 0.2), 0 0 0 1px rgba(229, 185, 0, 0.3);
}

/* Card Top 5 Pillars Accent Line */
.silm-card-top-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4D0044 0%, #B20B41 25%, #EE3D2D 50%, #E5B900 75%, #FCB9B6 100%);
}

/* Header & Radiating Sunburst */
.silm-sunburst-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.silm-sunburst-icon {
    width: 32px;
    height: 32px;
    color: #E5B900;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(229, 185, 0, 0.4));
}

.silm-login-brand-logo {
    height: 38px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
}

[data-theme="dark"] .silm-login-brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(255, 255, 255, 0.25));
}

.silm-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(77, 0, 68, 0.06);
    color: #4D0044;
    border: 1px solid rgba(77, 0, 68, 0.12);
    margin-bottom: 4px;
}

[data-theme="dark"] .silm-portal-badge {
    background: rgba(229, 185, 0, 0.12);
    color: #E5B900;
    border-color: rgba(229, 185, 0, 0.28);
}

.silm-portal-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #B20B41;
}

[data-theme="dark"] .silm-portal-badge-dot {
    background: #E5B900;
    box-shadow: 0 0 6px #E5B900;
}

.silm-portal-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #1e1014;
    margin: 0;
    line-height: 1.25;
}

[data-theme="dark"] .silm-portal-title {
    color: #ffffff;
}

.silm-portal-sub {
    font-size: 0.78rem;
    color: #73545d;
    margin: 2px 0 0 0;
    letter-spacing: 0.01em;
}

[data-theme="dark"] .silm-portal-sub {
    color: #d1bcc8;
}

/* Zero-Overflow Segmented Auth Switcher Tabs */
.silm-auth-tabs,
.auth-segmented-tabs {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    background: rgba(77, 0, 68, 0.05);
    border: 1px solid rgba(77, 0, 68, 0.08);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 1.25rem;
}

[data-theme="dark"] .silm-auth-tabs,
[data-theme="dark"] .auth-segmented-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.silm-auth-tab,
.auth-segmented-btn {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6b535e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

[data-theme="dark"] .silm-auth-tab,
[data-theme="dark"] .auth-segmented-btn {
    color: #cbbcc8;
}

.silm-auth-tab:hover,
.auth-segmented-btn:hover {
    color: #4D0044;
}

[data-theme="dark"] .silm-auth-tab:hover,
[data-theme="dark"] .auth-segmented-btn:hover {
    color: #ffffff;
}

.silm-auth-tab.active,
.silm-auth-tab.btn-primary,
.auth-segmented-btn.active {
    background: #ffffff !important;
    color: #4D0044 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(77, 0, 68, 0.12);
}

[data-theme="dark"] .silm-auth-tab.active,
[data-theme="dark"] .silm-auth-tab.btn-primary,
[data-theme="dark"] .auth-segmented-btn.active {
    background: linear-gradient(135deg, #B20B41, #4D0044) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(178, 11, 65, 0.4);
}

/* Minimal Form Controls */
.silm-form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.silm-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c3742;
    margin-bottom: 5px;
}

[data-theme="dark"] .silm-label {
    color: #dec8d7;
}

.silm-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #faf8f6;
    border: 1px solid rgba(77, 0, 68, 0.14);
    border-radius: 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1e1014;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

[data-theme="dark"] .silm-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.silm-input::placeholder {
    color: #a08790;
}

[data-theme="dark"] .silm-input::placeholder {
    color: #8c7684;
}

.silm-input:focus {
    background: #ffffff;
    border-color: #B20B41;
    box-shadow: 0 0 0 3px rgba(178, 11, 65, 0.15);
}

[data-theme="dark"] .silm-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #E5B900;
    box-shadow: 0 0 0 3px rgba(229, 185, 0, 0.2);
}

.silm-input-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.silm-input-hint {
    font-size: 11px;
    color: #73545d;
}

[data-theme="dark"] .silm-input-hint {
    color: #a08790;
}

/* SILM Buttons */
.silm-submit-btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #B20B41 0%, #4D0044 100%);
    color: #ffffff;
    border: 1px solid rgba(229, 185, 0, 0.28);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px -2px rgba(178, 11, 65, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.silm-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px -2px rgba(178, 11, 65, 0.48), 0 0 12px rgba(229, 185, 0, 0.25);
    filter: brightness(1.05);
}

.silm-submit-btn:active {
    transform: translateY(0);
}

.silm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* SILM Button Low Animation Error State */
@keyframes silmLowShake {
    0%, 100% { transform: translateX(0); }
    18%, 54%, 82% { transform: translateX(-4px); }
    36%, 72% { transform: translateX(4px); }
}

.silm-submit-btn.silm-btn-error {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    border-color: rgba(239, 68, 68, 0.8) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px -2px rgba(220, 38, 38, 0.45) !important;
    animation: silmLowShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

.silm-submit-btn.silm-btn-error:hover {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow: 0 8px 24px -2px rgba(220, 38, 38, 0.55) !important;
}

.silm-input.silm-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.18) !important;
}

/* Registration Studio Dual Dropdown Filter Bar */
.reg-dual-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: var(--s-2, 8px);
}
.reg-filter-select {
    width: 100%;
    height: 32px !important;
    padding: 0 22px 0 9px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: var(--surface-1) !important;
    color: var(--text-1) !important;
    border: 1px solid var(--border) !important;
    cursor: pointer;
    transition: all var(--t-fast);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: 30px;
}
.reg-filter-select:hover {
    border-color: rgba(59, 110, 248, 0.35) !important;
    background: var(--surface-2) !important;
}
.reg-filter-select:focus {
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 2px var(--blue-glow) !important;
    outline: none;
}
.reg-filter-select.filter-active {
    border-color: var(--blue) !important;
    color: var(--blue) !important;
    background: var(--blue-soft, rgba(59, 110, 248, 0.08)) !important;
    font-weight: 700 !important;
}
.reg-dual-filter-row .select-wrap {
    position: relative;
    width: 100%;
}
.reg-dual-filter-row .select-wrap::after {
    content: '▾';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    font-size: 10px;
    transition: transform var(--t-fast);
}
.reg-dual-filter-row .select-wrap:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--blue);
}

.silm-secondary-btn {
    width: 100%;
    height: 44px;
    background: transparent;
    color: #5c3742;
    border: 1px solid rgba(77, 0, 68, 0.16);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

[data-theme="dark"] .silm-secondary-btn {
    color: #d1bcc8;
    border-color: rgba(255, 255, 255, 0.12);
}

.silm-secondary-btn:hover {
    background: rgba(77, 0, 68, 0.04);
    color: #4D0044;
    border-color: rgba(77, 0, 68, 0.3);
}

[data-theme="dark"] .silm-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(229, 185, 0, 0.3);
}

/* Footer with 5 Pillars Motif */
.silm-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(77, 0, 68, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .silm-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.silm-pillars-bar {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.silm-pillars-bar span {
    width: 14px;
    height: 3px;
    border-radius: 2px;
}

.silm-footer-text {
    font-size: 10.5px;
    color: #947a86;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .silm-footer-text {
    color: #bfaab7;
}

@keyframes silmPortalFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Draggable Team Rows & Priority Controls ── */
.team-draggable-row {
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.team-draggable-row.is-dragging {
    opacity: 0.35 !important;
    background: rgba(99, 102, 241, 0.12) !important;
}
.team-draggable-row.drag-over-top td {
    border-top: 2.5px solid #6366f1 !important;
    background: rgba(99, 102, 241, 0.05);
}
.team-draggable-row.drag-over-bottom td {
    border-bottom: 2.5px solid #6366f1 !important;
    background: rgba(99, 102, 241, 0.05);
}
.team-order-cell-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    white-space: nowrap;
}
.drag-handle-icon {
    color: #94a3b8;
    cursor: grab;
    font-size: 13px;
    padding: 3px 2px;
    transition: color 0.15s ease, transform 0.15s ease;
}
.drag-handle-icon:hover {
    color: #6366f1;
    transform: scale(1.15);
}
.drag-handle-icon:active {
    cursor: grabbing;
}
.team-priority-badge {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 5px;
    padding: 2px 7px;
    min-width: 22px;
    text-align: center;
    display: inline-block;
}
.team-order-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
}
.team-order-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 1px 3px;
    border-radius: 3px;
    font-size: 9px;
    line-height: 1;
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-order-btn:hover:not(:disabled) {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}
.team-order-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

/* ===================================================================== */
/* FIDAK ADMIN AMBIENT SCREENSAVER (INTRO LOGO + TIME + DATE ONLY)       */
/* ADAPTS TO LIGHT OR DARK THEME BY ADMIN SELECTION                      */
/* ===================================================================== */
.admin-screensaver-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.admin-screensaver-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ─── LIGHT THEME (Fest Ivory Mode) ─── */
[data-theme="light"] .admin-screensaver-overlay {
    background: radial-gradient(circle at 50% 45%, #ffffff 0%, #faf6f0 55%, #f1eae0 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

[data-theme="light"] .admin-screensaver-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(234, 88, 12, 0.08) 0%, rgba(178, 11, 65, 0.04) 50%, transparent 75%);
    pointer-events: none;
    animation: adminAmbientPulse 10s ease-in-out infinite alternate;
}

[data-theme="light"] .admin-screensaver-halo {
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.12) 0%, rgba(178, 11, 65, 0.05) 50%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    animation: adminHaloBreath 6s ease-in-out infinite alternate;
}

[data-theme="light"] .admin-screensaver-intro-logo {
    filter: drop-shadow(0 12px 28px rgba(112, 26, 43, 0.12)) drop-shadow(0 4px 10px rgba(194, 65, 12, 0.15));
}

[data-theme="light"] .admin-screensaver-clock {
    color: #1c1917;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .admin-screensaver-date {
    color: #78716c;
}

/* ─── DARK THEME (Nocturnal Wine Mode) ─── */
[data-theme="dark"] .admin-screensaver-overlay,
:root:not([data-theme="light"]) .admin-screensaver-overlay {
    background: radial-gradient(circle at 50% 45%, #220c1d 0%, #13050f 55%, #080206 100%);
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
}

[data-theme="dark"] .admin-screensaver-backdrop,
:root:not([data-theme="light"]) .admin-screensaver-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(245, 158, 11, 0.14) 0%, rgba(178, 11, 65, 0.10) 50%, transparent 75%);
    pointer-events: none;
    animation: adminAmbientPulse 10s ease-in-out infinite alternate;
}

[data-theme="dark"] .admin-screensaver-halo,
:root:not([data-theme="light"]) .admin-screensaver-halo {
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(178, 11, 65, 0.15) 50%, transparent 70%);
    filter: blur(48px);
    pointer-events: none;
    animation: adminHaloBreath 6s ease-in-out infinite alternate;
}

[data-theme="dark"] .admin-screensaver-intro-logo,
:root:not([data-theme="light"]) .admin-screensaver-intro-logo {
    filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.35)) drop-shadow(0 16px 36px rgba(0, 0, 0, 0.8));
}

[data-theme="dark"] .admin-screensaver-clock,
:root:not([data-theme="light"]) .admin-screensaver-clock {
    color: #ffffff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .admin-screensaver-date,
:root:not([data-theme="light"]) .admin-screensaver-date {
    color: rgba(255, 255, 255, 0.68);
}

/* ─── CARD & SHARED ELEMENTS ─── */
.admin-screensaver-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    margin: auto;
    animation: adminScreensaverFloat 6s ease-in-out infinite alternate;
}

@keyframes adminScreensaverFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

@keyframes adminAmbientPulse {
    0% { transform: scale(0.98); opacity: 0.7; }
    100% { transform: scale(1.08); opacity: 1; }
}

@keyframes adminHaloBreath {
    0% { transform: scale(0.92); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0.95; }
}

.admin-screensaver-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.admin-screensaver-intro-logo {
    height: 300px;
    max-height: 44vh;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transition: filter 0.3s ease;
}

.admin-screensaver-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-top: 32px;
    user-select: none;
    transition: color 0.3s ease;
}

.admin-screensaver-date {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 12px;
    user-select: none;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .admin-screensaver-intro-logo {
        height: 200px;
    }
    .admin-screensaver-clock {
        font-size: 44px;
        margin-top: 20px;
    }
    .admin-screensaver-date {
        font-size: 13px;
        margin-top: 8px;
    }
}

/* ==========================================================================
   Modern Minimalist Schedule UI Overrides
   ========================================================================== */
#tabContent_schedule {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif !important;
    padding: 24px 32px !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

#tabContent_schedule .sched-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
}

#tabContent_schedule .sched-card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 18px 28px !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

#tabContent_schedule .sched-card-body {
    padding: 24px 28px !important;
}

#tabContent_schedule .form-label {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#tabContent_schedule .form-label i {
    margin-right: 2px !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
}

#tabContent_schedule .form-control {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    color: #0f172a !important;
    height: 42px !important;
    padding: 0 14px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.15s ease-in-out !important;
    box-sizing: border-box !important;
}

#tabContent_schedule .form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

/* Custom Styled Date & Time Inputs */
#tabContent_schedule input[type="date"],
#tabContent_schedule input[type="time"] {
    font-family: 'JetBrains Mono', 'Inter', monospace !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #0f172a !important;
    letter-spacing: 0.02em !important;
    color-scheme: light !important;
    cursor: pointer !important;
}

#tabContent_schedule input[type="date"]::-webkit-calendar-picker-indicator,
#tabContent_schedule input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer !important;
    filter: invert(34%) sepia(85%) saturate(1400%) hue-rotate(224deg) brightness(95%) contrast(90%) !important;
    opacity: 0.9 !important;
    padding: 4px !important;
    border-radius: 6px !important;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

#tabContent_schedule input[type="date"]::-webkit-calendar-picker-indicator:hover,
#tabContent_schedule input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
    background: #eef2ff !important;
}

/* Day Quick Select Chips */
#tabContent_schedule .day-quick-chip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

#tabContent_schedule .day-quick-chip:hover {
    background: #eef2ff !important;
    border-color: #818cf8 !important;
    color: #4f46e5 !important;
}

#tabContent_schedule .day-quick-chip.active {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3) !important;
}

/* Quick Time Slot Chips */
#tabContent_schedule .time-preset-chip {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    font-family: 'JetBrains Mono', monospace !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

#tabContent_schedule .time-preset-chip:hover {
    background: #eef2ff !important;
    border-color: #818cf8 !important;
    color: #4f46e5 !important;
}

#tabContent_schedule .btn-sched-primary {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#tabContent_schedule .btn-sched-primary:hover {
    background: #4338ca !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35) !important;
}

#tabContent_schedule .btn-sched-secondary {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 9px 18px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#tabContent_schedule .btn-sched-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

#tabContent_schedule .sched-timing-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px 24px !important;
    margin-bottom: 24px !important;
}

#tabContent_schedule .schedule-type-btn {
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

#tabContent_schedule .schedule-type-btn.active {
    background: #ffffff !important;
    color: #4f46e5 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    font-weight: 700 !important;
}

#tabContent_schedule .preset-pill {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 0 12px !important;
    height: 38px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

#tabContent_schedule .preset-pill:hover {
    background: #eef2ff !important;
    border-color: #818cf8 !important;
    color: #4f46e5 !important;
}

#tabContent_schedule .sched-inner-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px 24px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
}

#tabContent_schedule .table-sched {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#tabContent_schedule .table-sched th {
    background: #f8fafc;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

#tabContent_schedule .table-sched td {
    padding: 14px 18px;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

#tabContent_schedule .table-sched tr:last-child td {
    border-bottom: none;
}

#tabContent_schedule .sched-day-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

#tabContent_schedule .venue-timeline-block {
    margin-bottom: 24px;
}

#tabContent_schedule .venue-timeline-block:last-child {
    margin-bottom: 0;
}

/* Unified Searchable Combobox for Schedule Planner */
#tabContent_schedule .sched-combobox-wrap {
    position: relative;
    width: 100%;
}

#tabContent_schedule .sched-combobox-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#tabContent_schedule .sched-combobox-input-box:focus-within,
#tabContent_schedule .sched-combobox-input-box.open {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

#tabContent_schedule .sched-combobox-search-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
}

#tabContent_schedule .sched-combobox-input {
    width: 100%;
    height: 46px !important;
    padding-left: 40px !important;
    padding-right: 70px !important;
    border: none !important;
    background: transparent !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: none !important;
}

#tabContent_schedule .sched-combobox-actions {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

#tabContent_schedule .sched-combobox-clear-btn,
#tabContent_schedule .sched-combobox-toggle-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}

#tabContent_schedule .sched-combobox-clear-btn:hover,
#tabContent_schedule .sched-combobox-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Floating Dropdown List */
#tabContent_schedule .sched-combobox-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
}

#tabContent_schedule .sched-combobox-group-title {
    padding: 10px 12px 4px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

#tabContent_schedule .sched-combobox-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.15s ease;
    margin-bottom: 2px;
}

#tabContent_schedule .sched-combobox-item:hover,
#tabContent_schedule .sched-combobox-item.highlighted {
    background: #f1f5f9;
}

#tabContent_schedule .sched-combobox-item.selected {
    background: #e0e7ff;
    border-left: 3px solid #6366f1;
}

#tabContent_schedule .sched-combobox-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

#tabContent_schedule .sched-combobox-item-code {
    font-family: var(--font-mono, monospace);
    font-weight: 800;
    font-size: 12px;
    color: #4338ca;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
    flex-shrink: 0;
}

#tabContent_schedule .sched-combobox-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tabContent_schedule .sched-combobox-item-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#tabContent_schedule .sched-combobox-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

#tabContent_schedule .sched-combobox-chip.stage {
    background: #e0f2fe;
    color: #0369a1;
}

#tabContent_schedule .sched-combobox-chip.nonstage {
    background: #fef3c7;
    color: #b45309;
}

#tabContent_schedule .sched-combobox-chip.sec {
    background: #f1f5f9;
    color: #334155;
}

#tabContent_schedule .sched-combobox-no-results {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

#schedTabProgSelect {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Schedule Timetable Time Tag / Pill */
.sched-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.sched-time-pill i {
    font-size: 12px;
    color: #6366f1;
}

.sched-time-pill small {
    font-size: 11px;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 2px;
}

.sched-time-pill.break {
    background: #fffbe6;
    color: #92400e;
    border-color: #fde68a;
}

.sched-time-pill.break i {
    color: #d97706;
}

.sched-time-pill.break small {
    color: #b45309;
    background: #fef3c7;
    border-color: #fcd34d;
}

/* Scheduled Item Card inside Combobox Dropdown */
#tabContent_schedule .sched-combobox-item.is-scheduled {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #6366f1;
    border-radius: 10px;
    margin-bottom: 4px;
}

#tabContent_schedule .sched-combobox-item.is-scheduled:hover {
    background: #f1f5f9;
    border-color: #c7d2fe;
}

#tabContent_schedule .sched-combobox-item-code.scheduled {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

#tabContent_schedule .btn-sched-edit-chip {
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
    transition: all 0.15s ease;
}

#tabContent_schedule .sched-combobox-item:hover .btn-sched-edit-chip {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(79, 70, 229, 0.3);
}

/* ── 27-Inch Touchscreen Virtual Keyboard Styling ─────────────────────── */
.vkey-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(96%, 1080px);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    z-index: 99999;
    padding: 12px 16px 16px;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.vkey-container.hidden {
    transform: translate(-50%, 100%) !important;
    opacity: 0;
    pointer-events: none;
}

.vkey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vkey-target-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

.vkey-preview-pill {
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vkey-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vkey-hdr-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vkey-hdr-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.vkey-hdr-btn--close {
    font-size: 18px;
    padding: 0 8px;
    line-height: 1;
    color: #f87171;
}

.vkey-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vkey-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.vkey-key {
    height: 48px;
    min-width: 44px;
    flex: 1;
    max-width: 72px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.vkey-key:active, .vkey-key.is-pressed {
    background: #0d9488;
    color: #ffffff;
    transform: scale(0.95);
    border-color: #5eead4;
}

.vkey-key--wide {
    flex: 1.5;
    max-width: 100px;
    background: rgba(255, 255, 255, 0.15);
}

.vkey-key--space {
    flex: 4;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.12);
}

.vkey-key--action {
    background: rgba(13, 148, 136, 0.3);
    border-color: rgba(45, 212, 191, 0.4);
    color: #2dd4bf;
}

.vkey-key--action:active {
    background: #0d9488;
    color: #fff;
}

.btn-floating-vkey {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    transition: all 0.2s ease;
}

.btn-floating-vkey:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(13, 148, 136, 0.4);
}







