/* ============================================================
   CALL OF DUTY TACTICAL HUD - ADMIN DASHBOARD
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

:root {
    --cod-bg-deep: #05080d;
    --cod-bg-dark: #0a0f18;
    --cod-bg-panel: #0d1420;
    --cod-bg-card: #111c2c;
    --cod-bg-hover: #162236;
    --cod-bg-input: #0b1219;
    --cod-border: #1c2d42;
    --cod-border-accent: #2a4060;
    --cod-accent: #d4a021;
    --cod-accent-glow: rgba(212, 160, 33, 0.35);
    --cod-orange: #e8720c;
    --cod-orange-glow: rgba(232, 114, 12, 0.35);
    --cod-red: #c62828;
    --cod-red-bright: #ff3d3d;
    --cod-green: #2e7d32;
    --cod-green-bright: #4caf50;
    --cod-blue: #1565c0;
    --cod-blue-bright: #42a5f5;
    --cod-cyan: #00acc1;
    --cod-text: #c8d6e5;
    --cod-text-dim: #6b7f96;
    --cod-text-bright: #edf2f7;
    --cod-sidebar-w: 260px;
    --cod-font: 'Rajdhani', 'Segoe UI', sans-serif;
    --cod-font-mono: 'Share Tech Mono', monospace;
    --cod-font-display: 'Orbitron', sans-serif;
}

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

body.cod-admin {
    background: var(--cod-bg-deep);
    color: var(--cod-text);
    font-family: var(--cod-font);
    font-weight: 500;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scanline overlay */
body.cod-admin::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
}

/* ---- SCROLLBAR (vertical + horizontal) ---- */
body.cod-admin::-webkit-scrollbar,
body.cod-admin *::-webkit-scrollbar { width: 6px; height: 6px; }
body.cod-admin::-webkit-scrollbar-track,
body.cod-admin *::-webkit-scrollbar-track { background: var(--cod-bg-deep); }
body.cod-admin::-webkit-scrollbar-thumb,
body.cod-admin *::-webkit-scrollbar-thumb { background: var(--cod-border-accent); border-radius: 3px; }
body.cod-admin::-webkit-scrollbar-thumb:hover,
body.cod-admin *::-webkit-scrollbar-thumb:hover { background: var(--cod-accent); }
body.cod-admin::-webkit-scrollbar-corner,
body.cod-admin *::-webkit-scrollbar-corner { background: var(--cod-bg-deep); }

/* Firefox scrollbar styling */
body.cod-admin,
body.cod-admin * { scrollbar-width: thin; scrollbar-color: var(--cod-border-accent) var(--cod-bg-deep); }

/* ---- SIDEBAR ---- */
.cod-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cod-sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, #080c14 0%, #0a1020 50%, #060a12 100%);
    border-right: 1px solid var(--cod-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.cod-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--cod-accent) 50%, transparent 100%);
    opacity: 0.4;
}

.cod-sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--cod-border);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cod-sidebar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--cod-accent) 0%, var(--cod-orange) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #000;
    font-weight: 800;
    font-family: var(--cod-font-display);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.cod-sidebar-brand .brand-text {
    font-family: var(--cod-font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--cod-text-bright);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.1;
}

.cod-sidebar-brand .brand-sub {
    font-family: var(--cod-font);
    font-size: 10px;
    color: var(--cod-accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.cod-nav { padding: 12px 10px; flex: 1; }

.cod-nav-section {
    font-family: var(--cod-font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--cod-text-dim);
    padding: 12px 14px 6px;
    opacity: 0.6;
}

.cod-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--cod-text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    position: relative;
    margin: 2px 0;
    border: 1px solid transparent;
}

.cod-nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.15s ease;
}

.cod-nav-link:hover {
    color: var(--cod-text-bright);
    background: rgba(255,255,255,0.04);
    border-color: var(--cod-border);
}

.cod-nav-link:hover i { opacity: 1; color: var(--cod-accent); }

.cod-nav-link.active {
    color: var(--cod-accent);
    background: rgba(212, 160, 33, 0.08);
    border-color: rgba(212, 160, 33, 0.25);
    text-shadow: 0 0 12px rgba(212, 160, 33, 0.3);
}

.cod-nav-link.active i { opacity: 1; }

.cod-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--cod-accent);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--cod-accent-glow);
}

.cod-sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--cod-border);
}

.cod-live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--cod-red-bright);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    border: 1px solid rgba(198, 40, 40, 0.3);
    background: rgba(198, 40, 40, 0.06);
    margin-bottom: 8px;
}

.cod-live-indicator:hover {
    background: rgba(198, 40, 40, 0.12);
    border-color: var(--cod-red-bright);
    color: var(--cod-red-bright);
    text-shadow: 0 0 10px rgba(255, 61, 61, 0.3);
}

.cod-live-dot {
    width: 8px;
    height: 8px;
    background: var(--cod-red-bright);
    border-radius: 50%;
    animation: codPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 61, 61, 0.6);
}

@keyframes codPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.cod-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--cod-text-dim);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    border: 1px solid var(--cod-border);
    background: transparent;
    cursor: pointer;
    width: 100%;
    font-family: var(--cod-font);
}

.cod-logout-btn:hover {
    color: var(--cod-red-bright);
    border-color: rgba(198, 40, 40, 0.4);
    background: rgba(198, 40, 40, 0.06);
}

/* ---- MAIN CONTENT ---- */
.cod-main {
    margin-left: var(--cod-sidebar-w);
    min-height: 100vh;
    padding: 24px 32px;
    background: var(--cod-bg-dark);
    position: relative;
}

.cod-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 160, 33, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- PAGE HEADER ---- */
.cod-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cod-border);
    position: relative;
}

.cod-page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--cod-accent), transparent);
}

.cod-page-title {
    font-family: var(--cod-font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--cod-text-bright);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.cod-page-title i { color: var(--cod-accent); margin-right: 10px; }

/* ---- STAT CARDS ---- */
.cod-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.cod-stat-card {
    background: var(--cod-bg-panel);
    border: 1px solid var(--cod-border);
    border-radius: 8px;
    padding: 20px 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.cod-stat-card:hover {
    border-color: var(--cod-border-accent);
    transform: translateY(-2px);
}

.cod-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cod-accent), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.cod-stat-card:hover::before { opacity: 1; }

.cod-stat-value {
    font-family: var(--cod-font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--cod-text-bright);
    line-height: 1;
    margin-bottom: 6px;
}

.cod-stat-value.accent { color: var(--cod-accent); }
.cod-stat-value.green { color: var(--cod-green-bright); }
.cod-stat-value.blue { color: var(--cod-blue-bright); }
.cod-stat-value.orange { color: var(--cod-orange); }
.cod-stat-value.red { color: var(--cod-red-bright); }
.cod-stat-value.cyan { color: var(--cod-cyan); }

.cod-stat-label {
    font-family: var(--cod-font-display);
    font-size: 10px;
    font-weight: 600;
    color: var(--cod-text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cod-stat-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(212, 160, 33, 0.15);
    color: var(--cod-accent);
    border: 1px solid rgba(212, 160, 33, 0.25);
}

/* ---- STAT ICON / CARD LAYOUT ---- */
.cod-stat-card {
    background: linear-gradient(160deg, #101a2b 0%, var(--cod-bg-panel) 60%) !important;
}
.cod-stat-card > div:first-of-type { min-width: 0; }
.cod-stat-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--cod-text-dim);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--cod-border);
    border-radius: 8px;
    opacity: 0.85;
}
.cod-stat-icon i { transition: transform 0.2s ease; }
.cod-stat-card:hover .cod-stat-icon i { transform: scale(1.15); }
.cod-stat-card .cod-stat-label { padding-right: 48px; }
.cod-stat-card .cod-stat-badge { position: relative; }

/* ---- STAT BADGE VARIANTS ---- */
.cod-stat-badge.cyan-badge { background: rgba(0, 172, 193, 0.12); color: var(--cod-cyan); border-color: rgba(0, 172, 193, 0.25); }
.cod-stat-badge.blue-badge { background: rgba(21, 101, 192, 0.15); color: var(--cod-blue-bright); border-color: rgba(21, 101, 192, 0.3); }
.cod-stat-badge.red-badge { background: rgba(198, 40, 40, 0.15); color: var(--cod-red-bright); border-color: rgba(198, 40, 40, 0.3); }

/* ---- COMMAND BAR ---- */
.cod-command-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 16px;
    background: linear-gradient(90deg, rgba(212, 160, 33, 0.08), rgba(0,0,0,0.2));
    border: 1px solid var(--cod-border);
    border-left: 3px solid var(--cod-accent);
    border-radius: 6px;
    font-family: var(--cod-font-display);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--cod-text-dim);
    flex-wrap: wrap;
}
.cod-command-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cod-text-bright);
}
.cod-command-online {
    color: var(--cod-green-bright);
    font-weight: 700;
}
.cod-command-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--cod-text-dim);
    flex-wrap: wrap;
}
.cod-command-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cod-command-meta b { color: var(--cod-accent); }
#codClock { font-family: var(--cod-font-mono); }

/* ---- CARD FOOTER ---- */
.cod-card-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--cod-border);
    background: rgba(0,0,0,0.1);
}

/* ---- NOTIF TYPE DOT ---- */
.cod-notif {
    padding-left: 16px;
    position: relative;
}
.cod-notif-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    margin-right: 12px;
    background: var(--cod-text-dim);
    box-shadow: 0 0 6px currentColor;
}
.cod-notif-dot.new_team { background: var(--cod-green-bright); color: var(--cod-green-bright); }
.cod-notif-dot.tour_started { background: var(--cod-cyan); color: var(--cod-cyan); }
.cod-notif-dot.tour_filled { background: var(--cod-blue-bright); color: var(--cod-blue-bright); }
.cod-notif-dot.spectator_request { background: var(--cod-orange); color: var(--cod-orange); }
.cod-notif-dot.ticket { background: var(--cod-red-bright); color: var(--cod-red-bright); }
.cod-notif-dot.pending { background: var(--cod-orange); color: var(--cod-orange); }
.cod-notif-dot.default { background: var(--cod-text-dim); color: var(--cod-text-dim); }

/* ---- CARDS / PANELS ---- */
.cod-card {
    background: var(--cod-bg-panel);
    border: 1px solid var(--cod-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.cod-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--cod-border);
    background: rgba(0,0,0,0.15);
}

.cod-card-header-title {
    font-family: var(--cod-font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--cod-text-bright);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cod-card-header-title i { color: var(--cod-accent); }

.cod-card-body { padding: 18px; }
.cod-card-body.flush { padding: 0; }

/* ---- TABS / NAV PILLS ---- */
.cod-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--cod-bg-panel);
    border: 1px solid var(--cod-border);
    border-radius: 8px;
    overflow-x: auto;
}

.cod-tab {
    padding: 8px 18px;
    border-radius: 6px;
    color: var(--cod-text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    font-family: var(--cod-font);
    background: transparent;
    cursor: pointer;
}

.cod-tab:hover {
    color: var(--cod-text-bright);
    background: rgba(255,255,255,0.03);
}

.cod-tab.active {
    color: var(--cod-accent);
    background: rgba(212, 160, 33, 0.1);
    border-color: rgba(212, 160, 33, 0.25);
}

/* ---- TABLES ---- */
.cod-table-wrap {
    overflow-x: auto;
}

.cod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cod-table thead th {
    font-family: var(--cod-font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cod-text-dim);
    padding: 12px 16px;
    border-bottom: 1px solid var(--cod-border);
    background: rgba(0,0,0,0.2);
    white-space: nowrap;
}

.cod-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(28, 45, 66, 0.5);
    vertical-align: middle;
    color: var(--cod-text);
}

.cod-table tbody tr {
    transition: background 0.1s ease;
}

.cod-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.cod-table tbody tr:last-child td { border-bottom: none; }

.cod-table a {
    color: var(--cod-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.cod-table a:hover {
    color: var(--cod-text-bright);
    text-decoration: underline;
}

.cod-table .cod-muted { color: var(--cod-text-dim); }
.cod-table code {
    font-family: var(--cod-font-mono);
    font-size: 12px;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--cod-cyan);
}

/* ---- BADGES ---- */
.cod-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: var(--cod-font-display);
    border: 1px solid transparent;
}

.cod-badge.running { background: rgba(46, 125, 50, 0.15); color: var(--cod-green-bright); border-color: rgba(46, 125, 50, 0.3); }
.cod-badge.register { background: rgba(21, 101, 192, 0.15); color: var(--cod-blue-bright); border-color: rgba(21, 101, 192, 0.3); }
.cod-badge.finished { background: rgba(107, 127, 150, 0.15); color: var(--cod-text-dim); border-color: rgba(107, 127, 150, 0.3); }
.cod-badge.cancelled { background: rgba(198, 40, 40, 0.15); color: var(--cod-red-bright); border-color: rgba(198, 40, 40, 0.3); }
.cod-badge.pending { background: rgba(212, 160, 33, 0.15); color: var(--cod-accent); border-color: rgba(212, 160, 33, 0.3); }
.cod-badge.accepted { background: rgba(46, 125, 50, 0.15); color: var(--cod-green-bright); border-color: rgba(46, 125, 50, 0.3); }
.cod-badge.rejected { background: rgba(198, 40, 40, 0.1); color: #ef5350; border-color: rgba(198, 40, 40, 0.25); }
.cod-badge.open { background: rgba(46, 125, 50, 0.15); color: var(--cod-green-bright); border-color: rgba(46, 125, 50, 0.3); }
.cod-badge.closed { background: rgba(107, 127, 150, 0.1); color: var(--cod-text-dim); border-color: rgba(107, 127, 150, 0.25); }
.cod-badge.live-badge { background: rgba(198, 40, 40, 0.2); color: var(--cod-red-bright); border-color: rgba(198, 40, 40, 0.4); animation: codPulse 1.5s ease-in-out infinite; }
.cod-badge.new-badge { background: rgba(232, 114, 12, 0.15); color: var(--cod-orange); border-color: rgba(232, 114, 12, 0.3); }
.cod-badge.neutral { background: rgba(107, 127, 150, 0.12); color: var(--cod-text-dim); border-color: rgba(107, 127, 150, 0.25); }

/* ---- PAGE SUBTITLE / META ---- */
.cod-page-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--cod-text-dim);
}
.cod-page-subtitle i { color: var(--cod-accent); }
.cod-page-title--with-sub { line-height: 1.2; }

/* ---- TAB COUNTS ---- */
.cod-tab .tab-count {
    margin-left: 6px;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(107, 127, 150, 0.15);
    color: var(--cod-text-dim);
}
.cod-tab.active .tab-count { background: rgba(212, 160, 33, 0.2); color: var(--cod-accent); }

/* ---- ACTION CELL button group ---- */
.cod-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}
.cod-table td .cod-btn { white-space: nowrap; }

/* ---- BUTTONS ---- */
.cod-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-family: var(--cod-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.cod-btn-primary {
    background: linear-gradient(135deg, var(--cod-accent), #b8891a);
    color: #000;
    border-color: var(--cod-accent);
}
.cod-btn-primary:hover { background: linear-gradient(135deg, #e0ad28, var(--cod-accent)); box-shadow: 0 0 16px var(--cod-accent-glow); color: #000; text-decoration: none; }

.cod-btn-ghost {
    background: transparent;
    color: var(--cod-text-dim);
    border-color: var(--cod-border);
}
.cod-btn-ghost:hover { color: var(--cod-text-bright); border-color: var(--cod-border-accent); background: rgba(255,255,255,0.03); text-decoration: none; }

.cod-btn-success {
    background: rgba(46, 125, 50, 0.2);
    color: var(--cod-green-bright);
    border-color: rgba(46, 125, 50, 0.4);
}
.cod-btn-success:hover { background: rgba(46, 125, 50, 0.3); text-decoration: none; }

.cod-btn-danger {
    background: rgba(198, 40, 40, 0.15);
    color: var(--cod-red-bright);
    border-color: rgba(198, 40, 40, 0.35);
}
.cod-btn-danger:hover { background: rgba(198, 40, 40, 0.25); text-decoration: none; }

.cod-btn-outline-danger {
    background: transparent;
    color: var(--cod-red-bright);
    border-color: rgba(198, 40, 40, 0.35);
}
.cod-btn-outline-danger:hover { background: rgba(198, 40, 40, 0.1); text-decoration: none; }

.cod-btn-info {
    background: rgba(0, 172, 193, 0.15);
    color: var(--cod-cyan);
    border-color: rgba(0, 172, 193, 0.35);
}
.cod-btn-info:hover { background: rgba(0, 172, 193, 0.25); text-decoration: none; }

.cod-btn-sm { padding: 5px 12px; font-size: 12px; }
.cod-btn-xs { padding: 3px 8px; font-size: 11px; }

/* ---- FORMS ---- */
.cod-input, .cod-select, .cod-textarea {
    background: var(--cod-bg-input);
    border: 1px solid var(--cod-border);
    border-radius: 6px;
    color: var(--cod-text-bright);
    font-family: var(--cod-font);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.cod-input:focus, .cod-select:focus, .cod-textarea:focus {
    border-color: var(--cod-accent);
    box-shadow: 0 0 0 2px var(--cod-accent-glow);
}

.cod-input::placeholder { color: var(--cod-text-dim); opacity: 0.6; }

.cod-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7f96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.cod-select option {
    background: var(--cod-bg-panel);
    color: var(--cod-text);
}

.cod-label {
    display: block;
    font-family: var(--cod-font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cod-text-dim);
    margin-bottom: 6px;
}

.cod-textarea {
    resize: vertical;
    min-height: 80px;
}

.cod-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cod-form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--cod-accent);
    flex-shrink: 0;
}

.cod-sample-picker .cod-grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 16px;
}

.cod-sample-picker .cod-form-check {
    min-width: 0;
    align-items: flex-start;
}

.cod-sample-picker .cod-form-check span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
    word-break: keep-all;
}

/* ---- ALERTS ---- */
.cod-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    position: relative;
}

.cod-alert-success {
    background: rgba(46, 125, 50, 0.1);
    color: var(--cod-green-bright);
    border-color: rgba(46, 125, 50, 0.3);
}

.cod-alert-danger {
    background: rgba(198, 40, 40, 0.1);
    color: var(--cod-red-bright);
    border-color: rgba(198, 40, 40, 0.3);
}

.cod-alert-warning {
    background: rgba(255, 179, 0, 0.1);
    color: var(--cod-amber-bright, #ffb300);
    border-color: rgba(255, 179, 0, 0.3);
}

.cod-alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    font-size: 18px;
}

.cod-alert-close:hover { opacity: 1; }

/* ---- LIST GROUP ---- */
.cod-list { list-style: none; padding: 0; margin: 0; }

.cod-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(28, 45, 66, 0.5);
    transition: background 0.1s;
}

.cod-list-item:last-child { border-bottom: none; }
.cod-list-item:hover { background: rgba(255,255,255,0.02); }

.cod-list-item a {
    color: var(--cod-accent);
    text-decoration: none;
    font-weight: 600;
}

.cod-list-item a:hover { color: var(--cod-text-bright); text-decoration: underline; }

/* ---- NOTIFICATION ITEMS ---- */
.cod-notif {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(28, 45, 66, 0.5);
    transition: background 0.1s;
    text-decoration: none;
    color: inherit;
}

.cod-notif:hover { background: rgba(255,255,255,0.02); color: inherit; text-decoration: none; }
.cod-notif:last-child { border-bottom: none; }

.cod-notif-title {
    font-weight: 700;
    color: var(--cod-text-bright);
    font-size: 14px;
    margin-bottom: 2px;
}

.cod-notif-msg { color: var(--cod-text-dim); font-size: 13px; }
.cod-notif-time { color: var(--cod-text-dim); font-size: 12px; opacity: 0.6; }

/* ---- PAGINATION ---- */
.cod-pagination {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    border-top: 1px solid var(--cod-border);
    flex-wrap: wrap;
}

.cod-pagination a, .cod-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cod-text-dim);
    text-decoration: none;
    border: 1px solid var(--cod-border);
    transition: all 0.15s;
}

.cod-pagination a:hover { color: var(--cod-text-bright); border-color: var(--cod-border-accent); background: rgba(255,255,255,0.03); }
.cod-pagination .active { color: var(--cod-accent); border-color: var(--cod-accent); background: rgba(212, 160, 33, 0.1); }
.cod-pagination .disabled { opacity: 0.3; pointer-events: none; }

/* ---- MISC ---- */
.cod-divider {
    height: 1px;
    background: var(--cod-border);
    margin: 16px 0;
}

.cod-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--cod-text-dim);
    font-size: 14px;
}

.cod-empty i { font-size: 32px; display: block; margin-bottom: 12px; opacity: 0.3; }

.cod-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

.cod-split-2-1 {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

/* ---- MOBILE TOP BAR / NAV ---- */
.cod-mobile-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1100;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #0a1020, #080c14);
    border-bottom: 1px solid var(--cod-border);
}
.cod-menu-btn {
    background: var(--cod-bg-panel);
    border: 1px solid var(--cod-border);
    color: var(--cod-text-bright);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.cod-mobile-brand {
    font-family: var(--cod-font-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cod-text-bright);
}
.cod-mobile-spacer { flex: 1; }
.cod-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1040;
}
.cod-sidebar-backdrop.show { display: block; }

@media (min-width: 769px) {
    .cod-sidebar.open { display: flex; }
}

@media (max-width: 768px) {
    .cod-mobile-bar { display: flex; }
    .cod-grid-2 { grid-template-columns: 1fr; }
    .cod-sidebar {
        display: flex;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.4);
        z-index: 1050;
    }
    .cod-sidebar.open { transform: translateX(0); }
    .cod-main { margin-left: 0; padding: 16px; }
    .cod-split-1-2 { grid-template-columns: 1fr; }
    .cod-split-2-1 { grid-template-columns: 1fr; }
    .cod-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .cod-page-header > div:last-child {
        flex-wrap: wrap;
        width: 100%;
    }
    .cod-page-title { font-size: 18px; word-break: break-word; line-height: 1.3; }
    .cod-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cod-stat-card { padding: 16px 14px; }
    .cod-dl dt, .cod-dl dd { word-break: break-word; }
    .cod-card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .cod-card-body { padding: 14px; }
    .cod-table tbody td, .cod-table thead th { padding: 10px 12px; }
    .cod-notif { flex-direction: column; align-items: flex-start; }
    .scorecard-row { grid-template-columns: 1fr 1fr; }
    .scorecard-row > div:first-child { grid-column: 1 / -1; }
    .scorecard-row .remove-row { margin-top: 4px !important; }
}

@media (max-width: 1199px) {
    .cod-split-1-2 { grid-template-columns: 1fr; }
    .cod-grid-2 { grid-template-columns: 1fr; }
    .cod-split-2-1 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .cod-stats-grid { grid-template-columns: 1fr 1fr; }
    .cod-main { padding: 12px; }
    .cod-stat-value { font-size: 20px; }
    .cod-btn { padding: 8px 10px; }
}

/* ---- SPLIT LAYOUT (1fr / 2fr) ---- */
.cod-split-1-2 {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: 20px;
}

/* ---- TICKET MESSAGES ---- */
.cod-msg { margin-bottom: 12px; display: flex; }
.cod-msg.admin { justify-content: flex-end; }
.cod-msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.cod-msg.admin .cod-msg-bubble {
    background: rgba(21, 101, 192, 0.15);
    border: 1px solid rgba(21, 101, 192, 0.3);
    color: var(--cod-blue-bright);
    border-bottom-right-radius: 2px;
}
.cod-msg.user .cod-msg-bubble {
    background: var(--cod-bg-card);
    border: 1px solid var(--cod-border);
    color: var(--cod-text);
    border-bottom-left-radius: 2px;
}
.cod-msg-time {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 4px;
}

/* ---- DL (definition list) ---- */
.cod-dl dt {
    font-family: var(--cod-font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cod-text-dim);
    margin-top: 10px;
}
.cod-dl dt:first-child { margin-top: 0; }
.cod-dl dd {
    margin: 2px 0 0 0;
    font-size: 14px;
    color: var(--cod-text-bright);
}
.cod-dl dd code {
    font-family: var(--cod-font-mono);
    font-size: 12px;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--cod-cyan);
}

/* ---- HORIZONTAL ROW FORMS ---- */
.cod-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.cod-form-group { flex: 1; min-width: 100px; }
.cod-form-group .cod-input,
.cod-form-group .cod-select { width: 100%; }

/* ---- SCORECARD IMPORT ROWS ---- */
.scorecard-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 10px;
    align-items: end;
}
.scorecard-row > div { min-width: 0; }
.scorecard-row .cod-input,
.scorecard-row .cod-select { width: 100%; }

/* ---- LOGIN ---- */
.cod-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cod-bg-deep);
    position: relative;
}

.cod-login-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(212, 160, 33, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(232, 114, 12, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.cod-login-card {
    background: var(--cod-bg-panel);
    border: 1px solid var(--cod-border);
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.cod-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cod-accent), transparent);
}

.cod-login-title {
    font-family: var(--cod-font-display);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cod-text-bright);
    margin-bottom: 8px;
}

.cod-login-sub {
    text-align: center;
    font-size: 12px;
    color: var(--cod-text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

/* ============================================================
   CUSTOM DATETIME PICKER (TACTICAL HUD)
   ============================================================ */
.cod-dtp-wrap { position: relative; }

.cod-dtp-trigger {
    width: 100%;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23d4a021' d='M8 3a5 5 0 1 0 0 10A5 5 0 0 0 8 3zm0-1a6 6 0 1 1 0 12A6 6 0 0 1 8 2zm.5 3a.5.5 0 0 0-1 0v2.3L5.6 8.2a.5.5 0 1 0 .8.6l1.6-1.3a.5.5 0 0 0 .5-.5V5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.cod-dtp-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1300;
    width: 320px;
    background: linear-gradient(170deg, #101a2b 0%, var(--cod-bg-panel) 60%);
    border: 1px solid var(--cod-border-accent);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(212,160,33,0.08);
    display: none;
    font-family: var(--cod-font);
}
.cod-dtp-pop.open { display: block; }

/* header */
.cod-dtp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cod-dtp-title {
    font-family: var(--cod-font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cod-text-bright);
}
.cod-dtp-nav {
    display: flex;
    gap: 6px;
}
.cod-dtp-nav-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--cod-border);
    background: rgba(255,255,255,0.03);
    color: var(--cod-text-dim);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}
.cod-dtp-nav-btn:hover { color: var(--cod-accent); border-color: var(--cod-accent); }

/* month nav bar */
.cod-dtp-monthbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cod-dtp-month {
    font-family: var(--cod-font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--cod-accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* weekday + day grid */
.cod-dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cod-dtp-dow {
    font-family: var(--cod-font-display);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cod-text-dim);
    text-align: center;
    padding: 4px 0;
}
.cod-dtp-day {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--cod-text);
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.1s ease;
    background: transparent;
}
.cod-dtp-day:hover { background: rgba(212,160,33,0.12); color: var(--cod-text-bright); }
.cod-dtp-day.out { color: var(--cod-text-dim); opacity: 0.4; }
.cod-dtp-day.today { border-color: rgba(212,160,33,0.4); color: var(--cod-accent); }
.cod-dtp-day.selected {
    background: linear-gradient(135deg, var(--cod-accent), #b8891a);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 12px var(--cod-accent-glow);
}

/* time section */
.cod-dtp-time {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--cod-border);
}
.cod-dtp-timelabel {
    font-family: var(--cod-font-display);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cod-text-dim);
    margin-bottom: 6px;
}
.cod-dtp-timegrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.cod-dtp-time-box { text-align: center; }
.cod-dtp-time-box label {
    display: block;
    font-family: var(--cod-font-display);
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cod-text-dim);
    margin-bottom: 3px;
}
.cod-dtp-time-box select {
    width: 100%;
    appearance: none;
    background: var(--cod-bg-input);
    border: 1px solid var(--cod-border);
    color: var(--cod-text-bright);
    font-family: var(--cod-font-mono);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 4px;
    outline: none;
    text-align: center;
}
.cod-dtp-time-box select:focus { border-color: var(--cod-accent); }

/* footer */
.cod-dtp-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 8px;
}
.cod-dtp-now {
    font-family: var(--cod-font-mono);
    font-size: 11px;
    color: var(--cod-text-dim);
}
.cod-dtp-clear {
    border: 1px solid var(--cod-border);
    background: transparent;
    color: var(--cod-text-dim);
    font-family: var(--cod-font);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
}
.cod-dtp-clear:hover { color: var(--cod-red-bright); border-color: rgba(198,40,40,0.4); }

/* ============================================================
   SETTINGS / RECORD SAMPLES (responsive)
   ============================================================ */
.cod-settings-layout {
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

@media (max-width: 991px) {
    .cod-settings-layout { grid-template-columns: 1fr; }
}

.cod-settings-group { margin-bottom: 22px; }
.cod-settings-group:last-child { margin-bottom: 0; }

.cod-settings-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.cod-settings-group-title {
    font-family: var(--cod-font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--cod-text-bright);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cod-settings-group-title i { color: var(--cod-accent); }

.cod-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

@media (max-width: 480px) {
    .cod-sample-grid { grid-template-columns: 1fr; }
}

.cod-sample {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cod-border, #232a3a);
    border-radius: 8px;
    overflow: hidden;
    background: var(--cod-bg-card, #0b1322);
    min-width: 0;
}

.cod-sample-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    display: block;
}
.cod-sample-media img,
.cod-sample-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cod-sample-type {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cod-accent);
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(212,160,33,0.35);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.cod-sample-del {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(198,40,40,0.45);
    background: rgba(0,0,0,0.65);
    color: #ef5350;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.12s ease;
}
.cod-sample-del:hover {
    background: rgba(198,40,40,0.3);
    color: #fff;
}

.cod-sample-body {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cod-sample-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--cod-text-bright, #e8edf5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: left;
    text-decoration: none;
}
.cod-sample-name:hover { color: var(--cod-accent); text-decoration: none; }
.cod-sample-meta {
    font-size: 11px;
    color: var(--cod-text-dim);
    white-space: nowrap;
}

.cod-upload-zone {
    margin-top: 14px;
    border: 1px dashed var(--cod-border-accent, #3a4458);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255,255,255,0.015);
}
.cod-upload-zone .cod-form-row { margin: 0; }
.cod-upload-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--cod-text-dim);
    margin-top: 8px;
}

.cod-progress {
    display: none;
    margin-top: 10px;
}
.cod-progress-track {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}
.cod-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0a8f4d, #2e7d32);
    transition: width 0.2s linear;
}
.cod-progress-status {
    font-size: 12px;
    color: var(--cod-text-dim);
    margin-top: 6px;
}
.cod-upload-error {
    font-size: 12px;
    color: #ef5350;
    margin-top: 8px;
}

/* ─── LOTTERY ─────────────────────────────────────────── */

.cod-winner-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cod-bg-hover);
    border: 1px solid rgba(212,160,33,0.35);
    border-radius: 8px;
    padding: 6px 12px 6px 6px;
    font-size: 13px;
}
.cod-winner-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cod-accent), var(--cod-orange));
    color: #000;
    font-weight: 800;
    font-size: 12px;
}

.cod-draw-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cod-border);
    border-radius: 14px;
    background:
        radial-gradient(1000px 480px at 50% -10%, rgba(212,160,33,0.16), transparent 60%),
        linear-gradient(170deg, #0e1626 0%, var(--cod-bg-deep) 70%);
    padding: 30px 22px 36px;
    text-align: center;
}
.cod-draw-glow {
    position: absolute;
    left: 50%;
    top: -180px;
    width: 620px;
    height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, var(--cod-accent-glow), transparent 70%);
    pointer-events: none;
    animation: codGlowPulse 3.2s ease-in-out infinite;
}
@keyframes codGlowPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.cod-draw-meta { position: relative; }
.cod-draw-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--cod-accent), #ffe08a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cod-draw-prize {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #f5e6c4;
}
.cod-draw-prize i { color: var(--cod-accent); }
.cod-draw-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.cod-draw-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--cod-border);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 12px;
    color: var(--cod-text-dim);
}
.cod-draw-stat b { color: var(--cod-accent); font-size: 14px; }

.cod-draw-reel-zone {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 30px 0 20px;
}
.cod-draw-reel-wrap { position: relative; width: min(560px, 100%); }
.cod-draw-reel {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    color: #f8e7bd;
    background: linear-gradient(160deg, #141c2c, #0b1220);
    border: 1px solid rgba(212,160,33,0.45);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5), 0 0 24px rgba(212,160,33,0.18);
    transition: transform 0.25s ease, border-color 0.2s ease;
    word-break: break-word;
}
.cod-draw-reel.spinning {
    border-color: rgba(232,114,12,0.7);
    animation: codReelShake 0.12s linear infinite;
}
@keyframes codReelShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotate(-0.3deg); }
    75% { transform: translateX(2px) rotate(0.3deg); }
}
.cod-draw-reel.revealed {
    animation: codReelPop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
    border-color: var(--cod-accent);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5), 0 0 44px var(--cod-accent-glow);
}
@keyframes codReelPop {
    0% { transform: scale(0.85); opacity: 0.4; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}
.cod-draw-spin-caption {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cod-accent);
    min-height: 20px;
}

.cod-draw-actions { position: relative; margin: 6px 0 26px; }
.cod-btn-lg { padding: 12px 26px; font-size: 15px; }

.cod-draw-podium {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 0;
}
.cod-draw-podium-card {
    width: 200px;
    max-width: 100%;
    padding: 14px 12px;
    border-radius: 12px;
    background: var(--cod-bg-card);
    border: 1px solid rgba(212,160,33,0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.cod-draw-podium-card .pos {
    font-size: 12px;
    font-weight: 800;
    color: var(--cod-accent);
    margin-bottom: 8px;
}
.cod-draw-podium-card .name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    direction: ltr;
}
.cod-draw-podium-card.pos-1 { border-color: var(--cod-accent); }
.cod-draw-podium-card.enter { animation: codDrawCardIn 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes codDrawCardIn {
    0% { transform: translateY(26px) scale(0.6); opacity: 0; }
    70% { transform: translateY(-4px) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}

.cod-draw-notice {
    position: relative;
    margin-top: 22px;
    font-size: 13px;
    color: var(--cod-orange);
    min-height: 18px;
}
.cod-draw-notice.error { color: #ef5350; font-weight: 600; }

/* --- LIVE LOTTO DRAW (v2) ------------------------------ */

.cod-lotto-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cod-border);
    border-radius: 16px;
    background:
        radial-gradient(1200px 520px at 50% -12%, rgba(212,160,33,0.18), transparent 62%),
        radial-gradient(700px 500px at 88% 108%, rgba(232,114,12,0.12), transparent 60%),
        linear-gradient(172deg, #0d1526 0%, #060a12 78%);
    padding: 26px 20px 34px;
    text-align: center;
    min-height: 560px;
}
.cod-lotto-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.cod-lotto-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(46px);
    pointer-events: none;
    opacity: 0.55;
}
.cod-lotto-orb.orb-a { width: 320px; height: 320px; left: -90px; top: -80px; background: rgba(212,160,33,0.17); animation: codOrbFloat 9s ease-in-out infinite; }
.cod-lotto-orb.orb-b { width: 260px; height: 260px; right: -70px; top: 140px; background: rgba(73, 201, 240, 0.13); animation: codOrbFloat 12s ease-in-out infinite reverse; }
.cod-lotto-orb.orb-c { width: 210px; height: 210px; left: 34%; bottom: -90px; background: rgba(239, 71, 111, 0.11); animation: codOrbFloat 10s ease-in-out infinite 1s; }
@keyframes codOrbFloat {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-34px) translateX(16px) scale(1.08); }
}

.cod-lotto-meta { position: relative; z-index: 2; }
.cod-lotto-title {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, var(--cod-accent), #ffe08a 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cod-lotto-prize { margin-top: 6px; font-size: 16px; font-weight: 700; color: #f6e6c2; }
.cod-lotto-prize i { color: var(--cod-accent); }
.cod-lotto-stats { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.cod-lotto-stat {
    background: rgba(255,255,255,0.045);
    border: 1px solid var(--cod-border);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 12px;
    color: var(--cod-text-dim);
}
.cod-lotto-stat b { color: var(--cod-accent); font-size: 14px; }

.cod-lotto-studio { position: relative; z-index: 2; margin-top: 24px; }

.cod-lotto-machine {
    position: relative;
    width: min(420px, 88vw);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}
.cod-lotto-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 6px;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(212,160,33,0.85) 40deg, transparent 90deg, transparent 180deg, rgba(232,114,12,0.7) 220deg, transparent 270deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: codRingSpin 9s linear infinite;
    opacity: 0.9;
}
@keyframes codRingSpin { to { transform: rotate(360deg); } }

.cod-lotto-balls {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #152036ee 0%, #0a0f1a 78%);
    box-shadow: inset 0 0 44px rgba(0,0,0,0.65), 0 0 34px rgba(212,160,33,0.16);
    transition: opacity 0.25s ease;
}

.cod-lotto-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background:
        radial-gradient(circle at 50% 30%, #ffe9ac 0%, var(--cod-accent) 46%, #7a4b06 100%);
    box-shadow: 0 0 44px var(--cod-accent-glow), inset 0 0 22px rgba(255,255,255,0.4);
    border: 3px solid #ffe08a;
    pointer-events: none;
    z-index: 3;
}
.cod-lotto-reveal.show {
    animation: codMedallionPop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
}
.cod-lotto-reveal.hide { animation: codMedallionOut 0.3s ease forwards; }
@keyframes codMedallionPop {
    0% { transform: translate(-50%, -50%) scale(0.35) rotate(-14deg); opacity: 0; }
    62% { transform: translate(-50%, -50%) scale(1.08) rotate(2deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes codMedallionOut {
    to { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}
.cod-lotto-reveal-badge {
    font-size: clamp(11px, 1.6vw, 13px);
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #4a2c00;
    background: #fff3cf;
    border-radius: 999px;
    padding: 2px 12px;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.cod-lotto-reveal-pos { font-size: clamp(20px, 3.6vw, 30px); line-height: 1; color: #3a2300; font-weight: 800; }
.cod-lotto-reveal-name {
    font-size: clamp(15px, 2.6vw, 21px);
    font-weight: 800;
    color: #3a2300;
    direction: ltr;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cod-lotto-reveal-note { font-size: 11px; font-weight: 700; color: #5a3c00; }
.cod-lotto-reveal-note.ok { color: #0c6b3a; }
.cod-lotto-reveal-note.fail { color: #a80f22; }

.cod-lotto-display { max-width: 520px; margin: 26px auto 0; position: relative; }
.cod-lotto-countdown {
    position: absolute;
    left: 50%;
    top: -92px;
    transform: translateX(-50%);
    font-size: 88px;
    font-weight: 900;
    color: var(--cod-accent);
    text-shadow: 0 0 30px var(--cod-accent-glow), 0 0 70px var(--cod-accent-glow);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}
.cod-lotto-countdown.show { opacity: 1; display: block; }
.cod-lotto-countdown.pop { animation: codCountPop 0.8s cubic-bezier(0.2, 1, 0.3, 1); }
@keyframes codCountPop {
    0% { transform: translateX(-50%) scale(2.4); opacity: 0; }
    30% { transform: translateX(-50%) scale(1); opacity: 1; }
    85% { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.15); opacity: 0.85; }
}

.cod-lotto-reel {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 800;
    color: #f8e7bd;
    background: rgba(10, 15, 26, 0.85);
    border: 1px solid rgba(212,160,33,0.4);
    box-shadow: inset 0 0 26px rgba(0,0,0,0.55);
    word-break: break-word;
    direction: ltr;
}
.cod-lotto-reel.spinning {
    animation: codReelFlicker 0.12s linear infinite;
    border-color: rgba(232,114,12,0.8);
    filter: blur(1.3px) saturate(1.3);
    box-shadow: inset 0 0 26px rgba(0,0,0,0.55), 0 0 26px rgba(232,114,12,0.28);
}
.cod-lotto-reel.settled {
    animation: codReelSettle 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
    color: #ffe9ac;
    border-color: var(--cod-accent);
    box-shadow: inset 0 0 26px rgba(0,0,0,0.55), 0 0 40px var(--cod-accent-glow);
}
@keyframes codReelFlicker {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-1.5px); color: #8fa3ff; }
    50% { transform: translateY(0); }
    75% { transform: translateY(1.5px); color: #ffd27a; }
}
@keyframes codReelSettle {
    0% { transform: scale(0.88); filter: blur(2px); }
    60% { transform: scale(1.06); filter: blur(0); }
    100% { transform: scale(1); }
}
.cod-lotto-caption {
    margin-top: 10px;
    min-height: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--cod-accent);
}

.cod-lotto-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 24px 0 4px; }
.cod-lotto-announce {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--cod-text-dim);
    cursor: pointer;
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--cod-border);
    border-radius: 999px;
    padding: 5px 14px;
}
.cod-lotto-announce input { accent-color: var(--cod-accent); cursor: pointer; }
.cod-lotto-announce:has(input:checked) { border-color: rgba(212,160,33,0.5); color: #f0dcae; }
.cod-lotto-start {
    animation: codStartPulse 2.2s ease-in-out infinite;
}
.cod-lotto-start:disabled { animation: none; opacity: 0.7; }
@keyframes codStartPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,160,33,0.35); }
    50% { box-shadow: 0 0 0 14px rgba(212,160,33,0); }
}

.cod-lotto-podium {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
    min-height: 0;
}
.cod-lotto-podium-card {
    width: 210px;
    max-width: 100%;
    padding: 16px 12px 12px;
    border-radius: 14px;
    background: linear-gradient(160deg, #141c2c, #0c1220);
    border: 1px solid rgba(212,160,33,0.4);
    box-shadow: 0 10px 26px rgba(0,0,0,0.4), 0 0 18px rgba(212,160,33,0.08);
    opacity: 0;
}
.cod-lotto-podium-card.enter { animation: codCardIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes codCardIn {
    0% { transform: translateY(34px) scale(0.55) rotate(-3deg); opacity: 0; }
    70% { transform: translateY(-6px) scale(1.06) rotate(1deg); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.cod-lotto-card-pos { font-size: 13px; font-weight: 800; color: var(--cod-accent); margin-bottom: 8px; }
.cod-lotto-card-avatar {
    width: 58px;
    height: 58px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #3a2300;
    background: linear-gradient(135deg, var(--cod-accent), var(--cod-orange));
    border: 2px solid #ffe08a;
    box-shadow: 0 0 16px var(--cod-accent-glow);
}
.cod-lotto-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cod-lotto-card-badge {
    margin: 10px auto 0;
    width: max-content;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    min-height: 19px;
}
.cod-lotto-card-badge.na { color: var(--cod-text-dim); background: rgba(255,255,255,0.06); }
.cod-lotto-card-badge.ok { color: #7df2b1; background: rgba(6, 214, 160, 0.14); border: 1px solid rgba(6, 214, 160, 0.35); }
.cod-lotto-card-badge.fail { color: #ff9aa5; background: rgba(239, 71, 111, 0.14); border: 1px solid rgba(239, 71, 111, 0.35); }

.cod-lotto-notice {
    position: relative;
    z-index: 2;
    margin-top: 20px;
    min-height: 18px;
    font-size: 13px;
    color: var(--cod-orange);
}
.cod-lotto-notice.error { color: #ef5350; font-weight: 600; }

/* --- LIVE LOTTERY STUDIO (v3) --------------------------- */

.cod-lot-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cod-border);
    border-radius: 16px;
    background:
        radial-gradient(900px 420px at 50% -18%, rgba(212,160,33,0.16), transparent 60%),
        linear-gradient(175deg, #0c1322 0%, #05080f 88%);
    min-height: 620px;
    display: flex;
    flex-direction: column;
}
.cod-lot-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.cod-lot-corners { position: absolute; inset: 10px; z-index: 3; pointer-events: none; }
.cod-lot-corners span {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 0 solid var(--cod-accent);
    filter: drop-shadow(0 0 6px var(--cod-accent-glow));
    opacity: 0.85;
    animation: codLotBracket 3.4s ease-in-out infinite;
}
.cod-lot-corners .tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.cod-lot-corners .tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; animation-delay: .5s; }
.cod-lot-corners .bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; animation-delay: 1s; }
.cod-lot-corners .br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; animation-delay: 1.5s; }
@keyframes codLotBracket { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

.cod-lot-top {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}
.cod-lot-live {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ffd166;
    background: rgba(212,160,33,0.12);
    border: 1px solid rgba(212,160,33,0.4);
    border-radius: 999px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cod-lot-live .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #ff4d6d;
    box-shadow: 0 0 8px #ff4d6d;
    animation: codLotBlink 1s ease-in-out infinite;
}
@keyframes codLotBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }
.cod-lot-title {
    font-size: clamp(17px, 2.6vw, 24px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--cod-accent), #ffe08a 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cod-lot-crown { -webkit-text-fill-color: initial; }
.cod-lot-prize { font-size: 13px; font-weight: 700; color: #f6e6c2; }
.cod-lot-gift { margin-right: 4px; }
.cod-lot-tools { display: flex; gap: 8px; }
.cod-lot-iconbtn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--cod-border);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s;
}
.cod-lot-iconbtn:hover { transform: scale(1.08); border-color: var(--cod-accent); }

.cod-lot-main { position: relative; z-index: 2; flex: 1; padding: 22px 20px 18px; }

.cod-lot-intro { text-align: center; padding: 38px 10px 20px; }
.cod-lot-intro-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5em;
    color: var(--cod-orange);
    animation: codLotGlowText 2.4s ease-in-out infinite;
}
@keyframes codLotGlowText { 0%,100% { opacity: .7; text-shadow: 0 0 10px rgba(232,114,12,.4); } 50% { opacity: 1; text-shadow: 0 0 22px rgba(232,114,12,.9); } }
.cod-lot-intro-h1 {
    margin: 12px 0 4px;
    font-size: clamp(34px, 7vw, 60px);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.05;
    background: linear-gradient(120deg, #f5d78a, #ffe08a 35%, #fff 50%, #ffe08a 65%, #d4a021);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: codLotShimmer 5s linear infinite;
}
.cod-lot-intro-h1 span { display: block; }
@keyframes codLotShimmer { 0% { background-position: 0% 0; } 100% { background-position: 300% 0; } }
.cod-lot-intro-sub { color: var(--cod-text-dim); font-size: 14px; margin: 10px 0 18px; }
.cod-lot-intro-sub b { color: var(--cod-accent); }
.cod-lot-groupbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--cod-text-dim);
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--cod-border);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    margin-bottom: 22px;
}
.cod-lot-groupbox input { accent-color: var(--cod-accent); cursor: pointer; }
.cod-lot-bigbtn {
    position: relative;
    display: block;
    margin: 0 auto;
    padding: 18px 46px;
    font-size: 19px;
    font-weight: 800;
    color: #2a1a00;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffe08a, var(--cod-accent) 60%, #b8891a);
    box-shadow: 0 0 0 0 rgba(212,160,33,0.5), 0 10px 30px rgba(0,0,0,0.45), 0 0 30px var(--cod-accent-glow);
    transition: transform .15s ease, box-shadow .2s ease;
    animation: codLotStartPulse 2s ease-in-out infinite;
    overflow: hidden;
}
.cod-lot-bigbtn:hover { transform: translateY(-2px) scale(1.04); }
.cod-lot-bigbtn:disabled { animation: none; transform: none; opacity: .65; cursor: default; }
.cod-lot-bigbtn::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.7), transparent);
    transform: skewX(-20deg);
    animation: codLotShine 2.6s ease-in-out infinite;
}
@keyframes codLotShine { 0% { left: -120%; } 55%,100% { left: 140%; } }
@keyframes codLotStartPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(212,160,33,0.45), 0 10px 30px rgba(0,0,0,0.45), 0 0 30px var(--cod-accent-glow); }
    50% { box-shadow: 0 0 0 16px rgba(212,160,33,0), 0 10px 30px rgba(0,0,0,0.45), 0 0 46px var(--cod-accent-glow); }
}
.cod-lot-intro-hint { margin-top: 14px; font-size: 11px; color: var(--cod-text-dim); opacity: .7; }

.cod-lot-show { position: relative; }

.cod-lot-machine {
    position: relative;
    width: min(410px, 78vw);
    aspect-ratio: 1 / 1;
    margin: 6px auto 0;
}
.cod-lot-machglow {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(212,160,33,0.16), transparent 75%);
    animation: codLotMachPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes codLotMachPulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.cod-lot-drum {
    position: absolute;
    inset: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 36%, rgba(22,34,58,0.9), #0a0f1c 82%);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.7), 0 0 40px rgba(212,160,33,0.14);
    transition: opacity .25s ease;
    z-index: 1;
}
.cod-lot-ball {
    position: absolute;
    width: 26px; height: 26px;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(255,255,255,0.55), 0 4px 10px rgba(0,0,0,0.5);
    opacity: 0;
    display: none;
    z-index: 6;
    pointer-events: none;
}
.cod-lot-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 62%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 26%, #fff3cf 0%, var(--cod-accent) 44%, #7a4b06 100%);
    border: 4px solid #ffe08a;
    box-shadow: 0 0 50px var(--cod-accent-glow), inset 0 0 26px rgba(255,255,255,0.5);
    text-align: center;
}
.cod-lot-reveal.show { animation: codLotMedalIn .6s cubic-bezier(.2,1.5,.4,1) forwards; }
.cod-lot-reveal.hide { animation: codLotMedalOut .28s ease forwards; }
@keyframes codLotMedalIn {
    0% { transform: translate(-50%,-50%) scale(.3) rotate(-16deg); opacity: 0; }
    58% { transform: translate(-50%,-50%) scale(1.12) rotate(3deg); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(1) rotate(0); opacity: 1; }
}
@keyframes codLotMedalOut { to { transform: translate(-50%,-50%) scale(.5); opacity: 0; } }
.cod-lot-super {
    font-size: clamp(11px, 1.7vw, 13px);
    font-weight: 900;
    letter-spacing: .2em;
    color: #4a2c00;
}
.cod-lot-pos { font-size: clamp(22px, 4vw, 34px); line-height: 1; color: #3a2300; font-weight: 800; }
.cod-lot-name {
    font-size: clamp(14px, 2.4vw, 20px);
    font-weight: 800;
    color: #3a2300;
    direction: ltr;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.cod-lot-note { font-size: 11px; font-weight: 700; color: #4a2c00; }
.cod-lot-note.ok { color: #0b6b3a; }
.cod-lot-note.fail { color: #a80f22; }
.cod-lot-stamp {
    position: absolute;
    right: 10px;
    bottom: 12px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    color: rgba(90,60,0,0.75);
    transform: rotate(-14deg);
    border: 2px solid rgba(90,60,0,0.5);
    border-radius: 6px;
    padding: 1px 5px;
}

.cod-lot-read { max-width: 540px; margin: 16px auto 0; position: relative; text-align: center; }
.cod-lot-count {
    font-size: 92px;
    font-weight: 900;
    line-height: 1;
    color: var(--cod-accent);
    text-shadow: 0 0 30px var(--cod-accent-glow), 0 0 70px var(--cod-accent-glow);
    opacity: 0;
    position: absolute;
    left: 50%;
    top: -96px;
    transform: translateX(-50%) scale(1.4);
    pointer-events: none;
    z-index: 8;
    display: none;
}
.cod-lot-count.show { display: block; animation: codLotCountPop .9s cubic-bezier(.2,1,.3,1) forwards; }
@keyframes codLotCountPop {
    0% { transform: translateX(-50%) scale(2); opacity: 0; }
    26% { transform: translateX(-50%) scale(1); opacity: 1; }
    82% { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.25); opacity: 0; }
}
.cod-lot-reel {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: clamp(19px, 3vw, 28px);
    font-weight: 800;
    color: #ffe9ac;
    background: rgba(9,13,22,0.88);
    border: 1px solid rgba(212,160,33,0.4);
    box-shadow: inset 0 0 26px rgba(0,0,0,0.6);
    direction: ltr;
    word-break: break-word;
}
.cod-lot-reel .idle { font-size: 34px; animation: codLotIdle 2.2s ease-in-out infinite; display: inline-block; }
@keyframes codLotIdle { 0%,100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.15); } }
.cod-lot-reel.spin {
    animation: codLotSpinFlicker .1s linear infinite;
    border-color: rgba(232,114,12,0.85);
    filter: blur(1.4px) saturate(1.4);
    box-shadow: inset 0 0 26px rgba(0,0,0,0.6), 0 0 30px rgba(232,114,12,0.3);
}
.cod-lot-reel.tap {}
@keyframes codLotSpinFlicker {
    0%,100% { transform: translateY(0); }
    25% { transform: translateY(-1.6px); box-shadow: inset 0 0 26px rgba(0,0,0,0.6), 0 0 30px rgba(76,201,240,0.4); }
    75% { transform: translateY(1.6px); box-shadow: inset 0 0 26px rgba(0,0,0,0.6), 0 0 30px rgba(255,141,175,0.4); }
}
.cod-lot-reel.settle { animation: codLotSettle .45s cubic-bezier(.2,1.4,.4,1); border-color: var(--cod-accent); box-shadow: inset 0 0 26px rgba(0,0,0,0.6), 0 0 44px var(--cod-accent-glow); }
@keyframes codLotSettle {
    0% { transform: scale(.85); filter: blur(2.4px); }
    60% { transform: scale(1.07); filter: blur(0); }
    100% { transform: scale(1); }
}
.cod-lot-cap {
    margin-top: 10px;
    min-height: 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--cod-accent);
    text-shadow: 0 0 14px var(--cod-accent-glow);
}
.cod-lot-cap .err { color: #ef5350; letter-spacing: 0; }

.cod-lot-podium {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 26px;
    min-height: 0;
}
.cod-lot-pcard {
    position: relative;
    width: 205px;
    max-width: 100%;
    padding: 30px 12px 14px;
    border-radius: 16px;
    background: linear-gradient(165deg, #151d30, #0c1222);
    border: 1px solid rgba(212,160,33,0.42);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 20px rgba(212,160,33,0.08);
    text-align: center;
    opacity: 0;
}
.cod-lot-pcard.enter { animation: codLotCardIn .65s cubic-bezier(.2,1.4,.4,1) forwards; }
.cod-lot-pcard.top { border-color: var(--cod-accent); box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 30px var(--cod-accent-glow); }
@keyframes codLotCardIn {
    0% { transform: translateY(40px) scale(.5) rotate(-4deg); opacity: 0; }
    70% { transform: translateY(-8px) scale(1.08) rotate(1.5deg); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.cod-lot-pcard .crown {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    filter: drop-shadow(0 0 10px rgba(212,160,33,0.7));
    animation: codLotCrown 2.6s ease-in-out infinite;
}
@keyframes codLotCrown { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
.cod-lot-pcard .medal { position: absolute; top: 8px; right: 10px; font-size: 20px; }
.cod-lot-pcard .avatar {
    width: 62px; height: 62px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #3a2300;
    background: linear-gradient(135deg, #ffe08a, var(--cod-accent) 55%, var(--cod-orange));
    border: 3px solid #ffe08a;
    box-shadow: 0 0 18px var(--cod-accent-glow);
}
.cod-lot-pcard .pname {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cod-lot-pcard .pbadge {
    margin: 10px auto 0;
    width: max-content;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    min-height: 19px;
}
.cod-lot-pcard .pbadge.na { color: var(--cod-text-dim); background: rgba(255,255,255,0.06); }
.cod-lot-pcard .pbadge.ok { color: #7df2b1; background: rgba(6,214,160,0.14); border: 1px solid rgba(6,214,160,0.35); }
.cod-lot-pcard .pbadge.fail { color: #ff9aa5; background: rgba(239,71,111,0.14); border: 1px solid rgba(239,71,111,0.35); }

.cod-lot-show.finale .cod-lot-pcard { animation: none; opacity: 1; }

.cod-lot-foot {
    position: relative;
    z-index: 2;
    padding: 4px 20px 20px;
    display: none;
    text-align: center;
}
.cod-lot-final {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .05em;
    color: #ffe9ac;
    text-shadow: 0 0 18px var(--cod-accent-glow);
    animation: codLotGlowText 2s ease-in-out infinite;
}

/* --- LIVE DRAW STUDIO (v4) — full-width broadcast layout ---
     Overrides the v3 widgets: machine housing, result board,
     LED reel, ticker data, and full-width podium.             */

.cod-lot-stage {
    min-height: 660px;
    border-radius: 18px;
    background:
        radial-gradient(1100px 520px at 50% -20%, rgba(212,160,33,0.18), transparent 62%),
        linear-gradient(172deg, #0c1322 0%, #060a12 72%, #04060c 100%);
}

.cod-lot-main { padding: 20px; }
.cod-lot-intro { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cod-lot-bigbtn { min-width: min(420px, 88%); padding: 20px 46px; font-size: 21px; }

.cod-lot-show { position: relative; }

.cod-lot-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 26px;
    align-items: stretch;
}
@media (max-width: 920px) {
    .cod-lot-grid { grid-template-columns: 1fr; }
}

.cod-lot-machinebox { display: flex; flex-direction: column; align-items: center; }

.cod-lot-plate {
    position: relative;
    width: 100%;
    padding: 14px 14px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    border: 1px solid var(--cod-border);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}
.cod-lot-platebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--cod-accent);
    padding-bottom: 14px;
}
.cod-lot-platebar .pt { width: 44px; height: 2px; background: linear-gradient(90deg, transparent, var(--cod-accent)); opacity: .9; }
.cod-lot-platebar .pt.pt-r { transform: scaleX(-1); }

.cod-lot-machine {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.cod-lot-stand {
    position: relative;
    width: 100%;
    height: 26px;
    margin-top: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1a2438, #0c1222);
    border: 1px solid var(--cod-border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.cod-lot-stand::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 62%;
    height: 20px;
    background: linear-gradient(180deg, rgba(212,160,33,0.55), transparent);
    filter: blur(8px);
    pointer-events: none;
}

.cod-lot-read {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0;
    text-align: left;
}
.cod-lot-boardhead {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--cod-text-dim);
}
.cod-lot-boardhead .dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ff4d6d;
    box-shadow: 0 0 10px #ff4d6d;
    animation: codLotBlink 1s ease-in-out infinite;
}
.cod-lot-reelstage {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    border-radius: 16px;
    background:
        radial-gradient(rgba(212,160,33,0.07) 1px, transparent 1px),
        linear-gradient(180deg, rgba(9,13,22,0.92), rgba(7,10,17,0.92));
    background-size: 16px 16px, auto;
    border: 1px solid rgba(212,160,33,0.4);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 30px rgba(212,160,33,0.08);
    overflow: hidden;
}
.cod-lot-reel {
    position: relative;
    min-height: 0;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: clamp(22px, 3.4vw, 34px);
    font-weight: 800;
    color: #ffe9ac;
    text-shadow: 0 0 20px rgba(255,224,138,0.4);
    direction: ltr;
    word-break: break-word;
    text-align: center;
}
.cod-lot-reel.spin {
    border-color: transparent;
    filter: blur(1.4px) saturate(1.4);
    box-shadow: none;
    animation: codLotSpinFlicker .1s linear infinite;
    text-shadow: 0 0 26px rgba(255,224,138,0.6);
}
.cod-lot-reel.settle {
    border-color: transparent;
    box-shadow: none;
    animation: codLotSettle .45s cubic-bezier(.2,1.4,.4,1);
    color: #fff;
}
@keyframes codLotSpinFlicker {
    0%,100% { transform: translateY(0); }
    25% { transform: translateY(-1.6px); text-shadow: 0 0 30px rgba(76,201,240,0.7); }
    75% { transform: translateY(1.6px); text-shadow: 0 0 30px rgba(255,141,175,0.7); }
}
@keyframes codLotSettle {
    0% { transform: scale(.85); filter: blur(2.4px); }
    60% { transform: scale(1.07); filter: blur(0); }
    100% { transform: scale(1); }
}

.cod-lot-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.4);
    font-size: clamp(70px, 12vw, 130px);
    z-index: 8;
    display: none;
    opacity: 0;
    pointer-events: none;
}
.cod-lot-count.show { display: block; animation: codLotCountPop .9s cubic-bezier(.2,1,.3,1) forwards; }
@keyframes codLotCountPop {
    0% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
    26% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    82% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
}

.cod-lot-cap {
    margin: 0;
    min-height: 20px;
    font-size: 13px;
    text-align: center;
    letter-spacing: .06em;
}
.cod-lot-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 2px;
}
.cod-lot-dcell {
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--cod-border);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    min-width: 0;
}
.cod-lot-dcell span {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .2em;
    color: var(--cod-text-dim);
    margin-bottom: 5px;
}
.cod-lot-dcell b {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ffe9ac;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cod-lot-podium {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}
.cod-lot-pcard {
    flex: 1 1 200px;
    min-width: 0;
    width: auto;
    max-width: none;
}
.cod-lot-show.finale .cod-lot-pcard { animation: none; opacity: 1; }

/* --- v5 — full-width canvases ----------------------------- */
.cod-lot-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cod-lot-drum {
    position: absolute;
    top: 10px; right: 10px; bottom: 10px; left: 10px;
    width: auto; height: auto;
    transform: none;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 36%, rgba(22,34,58,0.9), #0a0f1c 82%);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.7), 0 0 40px rgba(212,160,33,0.14);
    transition: opacity .25s ease;
    z-index: 1;
}
