/* ── Shared admin/stewarding components ─────────────────────────────────────
   Used by: all admin pages (style.css stack) and stewarding_main (modern stack)
   Served at: /admin.css
   ───────────────────────────────────────────────────────────────────────── */

/* ── League colour variable (overridden by JS after fetching /colortheme) ── */
:root {
    --admin-color: #2980b9;
}

/* ── Override style.css hardcoded blues with the variable ─────────────────── */
.row.blue           { background: var(--admin-color); }
.menuitem           { border-left-color: var(--admin-color); }
.dropdown-content   { border-color: var(--admin-color); }
iframe              { border-color: var(--admin-color); background: var(--admin-color); }

/* ── Stewarding interface: modern CSS stack additions ────────────────────────
   These rules only apply when the modern navbar (.navbar) and/or the
   stewarding body class (.stew-interface) are present.
   ───────────────────────────────────────────────────────────────────────── */

/* Navbar always dark — no transparent-until-scroll for tool interfaces */
.navbar {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Second bar containing the 8 tool links — a floating rounded card so it
   reads as a distinct control surface instead of blending into the page */
.stew-toolbar {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    z-index: 99;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

#stew-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 16px 0 0;
    gap: 4px;
}

#stew-nav-links li a {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: 46px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-family: 'Geist', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 8px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

#stew-nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-bottom-color: var(--admin-color);
}

#stew-nav-links li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--admin-color);
}

/* Icon-only Home link — sits first in the toolbar, set off from the text links */
.nav-icon-link {
    padding: 0 16px !important;
    margin-right: 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px 0 0 11px !important;
}

/* ── Admin Home dashboard ─────────────────────────────────────────────────── */
.admin-home-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.admin-home-standings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .admin-home-standings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .admin-home-standings-grid {
        grid-template-columns: 1fr;
    }
}

.admin-home-standings-grid > p {
    grid-column: 1 / -1;
}

.standings-class-block {
    background: #141414;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 16px 18px;
}

.standings-class-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-color);
    margin-bottom: 10px;
}

.standings-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Geist', sans-serif;
    font-size: 0.85rem;
}

.standings-mini-table td {
    padding: 5px 0;
    color: #e0e0e0;
    border-bottom: 1px solid #232323;
}

.standings-mini-table tr:last-child td {
    border-bottom: none;
}

.standings-mini-table td.standings-pos {
    color: #888;
    width: 28px;
}

.standings-mini-table td.standings-points {
    text-align: right;
    font-weight: 600;
    color: var(--admin-color);
    white-space: nowrap;
}

.admin-home-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.admin-home-card {
    background: #141414;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 20px 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.admin-home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    border-color: var(--admin-color);
}

.admin-home-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.admin-home-card-desc {
    font-family: 'Geist', sans-serif;
    font-size: 0.8rem;
    color: #999;
    line-height: 1.4;
    flex-grow: 1;
}

.admin-home-card-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Geist', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--admin-color);
}

.admin-home-card-action svg {
    transition: transform 0.2s;
}

.admin-home-card:hover .admin-home-card-action svg {
    transform: translateX(4px);
}

/* "Stewarding" section label beside the logo */
.nav-section-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 10px;
    vertical-align: baseline;
}

/* Right-side user meta strip (username, league id, logout) */
.nav-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Geist', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.nav-meta a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-meta a:hover { color: #fff; }

.nav-logout { font-weight: 600; }

.nav-league-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--admin-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Body padding clears both the 70px navbar and the floating tool bar below it */
body.stew-interface {
    padding-top: 138px;
}

/* Content area fills the remaining viewport below both bars */
#stew-content {
    min-height: calc(100vh - 138px);
}

/* ── Header image banner (legacy admin pages) ───────────────────────────── */
.header_img {
    height: 80px;
    vertical-align: middle;
    background-position: center;
    background-size: contain;
    background-image: url('header.png');
}

/* ── Modal system ───────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

.modal-message {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.modal-btn {
    background-color: var(--admin-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(66, 133, 244, 0.3);
    text-align: center;
    width: auto;
    float: none;
    margin-left: 0;
}

.modal-btn:hover {
    background-color: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(66, 133, 244, 0.4);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-btn.error {
    background-color: #f44336;
    box-shadow: 0 4px 6px rgba(244, 67, 54, 0.3);
}

.modal-btn.error:hover {
    background-color: #da190b;
    box-shadow: 0 6px 10px rgba(244, 67, 54, 0.4);
}

/* ── Form rows ──────────────────────────────────────────────────────────── */
.form-row {
    margin: 15px 0;
}

.form-row label {
    display: inline-block;
    width: 200px;
    font-weight: bold;
    color: #fff;
}

.form-row input,
.form-row select {
    width: 300px;
    padding: 5px;
}

.help-text {
    display: block;
    margin-left: 200px;
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
}

/* ── Loading spinner ────────────────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Class sections (licencepoints_admin, licence) ──────────────────────── */
.class-section {
    margin-bottom: 20px;
}

.class-title {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 10px 0;
    padding: 10px;
    background-color: #2a2a2a;
    color: white;
}

/* ── Wrapper heading ────────────────────────────────────────────────────── */
.wrapper h2 {
    color: white;
    font-size: 18px;
}

/* ── League list (admin_home) ───────────────────────────────────────────── */
.league-list {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.league-item {
    background: #3b3b3b;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-left: 4px solid #2980b9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.league-item:hover {
    background: #4b4b4b;
}

.league-item a {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
}

.league-item a:hover {
    text-decoration: underline;
}

.league-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.status-active {
    background: #27ae60;
    color: white;
}

.status-hidden {
    background: #7f8c8d;
    color: white;
}

.status-completed {
    background: #2980b9;
    color: white;
}

.no-leagues {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* ── Action buttons ─────────────────────────────────────────────────────── */
.admin-btn {
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    float: none;
    width: auto;
}

.admin-btn:disabled {
    background-color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

.admin-btn.green  { background-color: #4CAF50; }
.admin-btn.green:hover:not(:disabled)  { background-color: #45a049; }

.admin-btn.blue   { background-color: #4285f4; }
.admin-btn.blue:hover:not(:disabled)   { background-color: #3367d6; }

.admin-btn.red    { background-color: #f44336; }
.admin-btn.red:hover:not(:disabled)    { background-color: #da190b; }

/* ── Generic admin data table ────────────────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 16px;
}

.admin-table th {
    background: #3a3a3a;
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--admin-color);
}

.admin-table td {
    color: #ccc;
    padding: 8px 12px;
    border-bottom: 1px solid #3a3a3a;
}

.admin-table tr:hover td {
    background: #2f2f2f;
}

/* Form-style label/value tables (Config, edit/detail forms) shouldn't
   highlight rows on hover — that's only useful for scannable data tables. */
.stew-detail-table tr:hover td {
    background: transparent;
}

.admin-table td {
    vertical-align: middle;
}

.admin-table td .admin-btn {
    padding: 6px 24px;
    min-width: 120px;
}

.admin-table td.col-action {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Detail modal (sessions, etc.) ─────────────────────────────────────────── */
.detail-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    overflow-y: auto;
}

.detail-modal {
    position: relative;
    margin: 60px auto;
    max-width: 640px;
    background: #1a1a1a;
    border: 1px solid var(--admin-color);
    border-radius: 8px;
    padding: 28px 32px;
}

.detail-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.detail-modal-title {
    color: var(--admin-color);
    margin: 0 0 20px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.detail-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.detail-modal-label {
    color: #aaa;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-modal-value {
    color: #eee;
    font-size: 0.9rem;
    word-break: break-word;
}

.detail-modal-input {
    background: #2a2a2a;
    border: 1px solid var(--admin-color);
    color: #eee;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.detail-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.detail-modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-modal-btn.primary {
    background: var(--admin-color);
    color: #fff;
}

.detail-modal-btn.secondary {
    background: #444;
    color: #eee;
}

/* ── Non-race event confirmation modal ──────────────────────────────────── */
.confirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.confirm-modal-overlay.show {
    display: flex;
}

.confirm-modal-container {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 480px;
    width: 90%;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.confirm-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-modal-title {
    font-size: 22px;
    margin-bottom: 12px;
    color: #e67e22;
}

.confirm-modal-message {
    color: #ccc;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.confirm-modal-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.confirm-modal-btn {
    padding: 10px 56px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    float: none;
    width: auto;
}

.confirm-modal-btn--cancel {
    background-color: #555;
    color: #fff;
}

.confirm-modal-btn--cancel:hover {
    background-color: #666;
}

.confirm-modal-btn--proceed {
    background-color: var(--admin-color, #e67e22);
    color: #fff;
}

.confirm-modal-btn--proceed:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ── Stewarding page layout ──────────────────────────────────────────────── */
.stew-view {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

.stew-panel-left {
    flex: 0 0 380px;
}

.stew-panel-right {
    flex: 1;
    min-width: 0;
}

.stew-panel-title {
    font-family: 'Geist', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--admin-color);
    margin: 0 0 12px;
}

.stew-panel-subtitle {
    font-family: 'Geist', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--admin-color);
    margin: 0 0 12px;
}

.stew-detail-card {
    background: #141414;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 20px 24px;
}

.stew-divider {
    border: none;
    border-top: 1px solid #252525;
    margin: 20px 0;
}

/* Protest list: clickable rows with selected highlight */
#protest_tbody tr {
    cursor: pointer;
}

#protest_tbody tr.selected td {
    background: #1c2535;
}

/* Detail table: label column on the left, value on the right */
.stew-detail-table th {
    background: transparent;
    color: #888;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: 180px;
    white-space: nowrap;
    border-bottom: 1px solid #252525;
    padding: 9px 16px 9px 0;
    vertical-align: top;
}

.stew-detail-table td {
    border-bottom: 1px solid #252525;
    padding: 8px 0;
    color: #eee;
}

.stew-select {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 6px 8px;
    width: 100%;
    font-size: 0.88rem;
}

.stew-input-num {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 5px 8px;
    width: 64px;
    font-size: 0.88rem;
    text-align: center;
}

.stew-textarea {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 8px;
    width: 100%;
    font-size: 0.88rem;
    resize: vertical;
    box-sizing: border-box;
    font-family: 'Geist', sans-serif;
}

.stew-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.stew-field-hint {
    color: #888;
    font-size: 0.78rem;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Driver-picker rows (Teams add/edit) ─────────────────────────────────── */
.drivers-list {
    margin: 10px 0;
}

.driver-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.driver-row select.stew-select {
    min-width: 200px;
    width: auto;
}

.driver-row input.stew-select {
    width: 100px;
}

.driver-row span {
    color: #888;
    font-size: 0.85rem;
}

.driver-row .remove-driver-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.driver-row .remove-driver-btn:hover {
    background-color: #da190b;
}

/* ── Scored-event rows (Scoring add/edit) ────────────────────────────────── */
.events-table-wrap {
    margin-top: 18px;
    background: #333;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    overflow: hidden;
}

.events-list {
    margin: 0;
    padding: 8px;
}

.event-row-header {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    background: #3a3a3a;
    border-bottom: 2px solid var(--admin-color);
}

.event-row-header .event-col-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.event-row-header .event-col-label.event-col-name {
    width: 160px;
    flex-shrink: 0;
}

.event-row-header .event-col-label.event-col-session {
    min-width: 110px;
    flex-shrink: 0;
}

.event-row-header .event-col-label.event-col-points {
    flex: 1 1 200px;
    min-width: 0;
}

.event-row-header .event-col-label.event-col-actions {
    width: 168px;
    flex-shrink: 0;
}

.event-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.event-row:last-child {
    margin-bottom: 0;
}

.event-row input.stew-select {
    width: 160px;
    flex-shrink: 0;
}

.event-row select.stew-select {
    width: auto;
    min-width: 110px;
    flex-shrink: 0;
}

.event-row .event-points-select {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.event-row .event-move-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 5px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.event-row .event-move-btn:hover:not(:disabled) {
    background-color: #444;
}

.event-row .event-move-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.event-row .remove-event-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.event-row .remove-event-btn:hover {
    background-color: #da190b;
}

/* ── Filter bar (penalties, protests) ───────────────────────────────────── */
.stew-filter-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #141414;
    border: 1px solid #252525;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stew-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stew-filter-group label {
    color: #888;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.stew-search {
    background: #2a2a2a;
    color: #eee;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.88rem;
    width: 130px;
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.stew-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.stew-badge.resolved {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.stew-badge.unresolved {
    background: rgba(230, 126, 34, 0.12);
    color: #e67e22;
    border: 1px solid rgba(230, 126, 34, 0.25);
}

/* ── Config status strip (off-tracks page) ───────────────────────────────── */
.config-status {
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.config-status.ok {
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    color: #2ecc71;
}

.config-status.warn {
    background: rgba(230, 126, 34, 0.1);
    border-left: 3px solid #e67e22;
    color: #e67e22;
}

/* ── Off-tracks preview table row states ─────────────────────────────────── */
.admin-table tr.has-penalty td { background: rgba(231, 76, 60, 0.08); }
.admin-table tr.has-penalty:hover td { background: rgba(231, 76, 60, 0.14); }
.admin-table tr.no-penalty td { color: #555; }
.admin-table tr.unmatched td { color: #e67e22; }

/* ── Move buttons (mid-race, result order pages) ─────────────────────────── */
.move-btn {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.9em;
    width: auto;
    float: none;
}

.move-btn:hover:not(:disabled) { background: #666; }
.move-btn:disabled { opacity: 0.35; cursor: default; }

td.new-pos {
    font-weight: bold;
    color: #7ecfff;
}

/* ── Info banner (mid-race, result override pages) ───────────────────────── */
.banner-orange {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.92em;
    line-height: 1.5;
    background-color: #3d2400;
    border-left: 4px solid #e67e22;
    color: #f0c080;
}

.banner-blue {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.92em;
    line-height: 1.5;
    background-color: #0d3472;
    border-left: 4px solid #3498db;
    color: #b6cff5;
}
