:root {
    --bg: #0f172a;
    --bg-soft: #172554;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #dbe4ee;
    --primary: #14b8a6;
    --primary-dark: #0f766e;
    --secondary: #1d4ed8;
    --danger: #dc2626;
    --warning: #f59e0b;
    --success: #16a34a;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --maxw: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg, rgba(20,184,166,0.12) 0%, rgba(20,184,166,0) 240px),
        linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: var(--text);
}

#standingsTable thead th {
    position: sticky;
    top: 0;              /* ← THIS is key */
    z-index: 5;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* FORCE compact rows */
#standingsTable.dataTable tbody td {
    padding: 4px 8px !important;
    line-height: 1.2 !important;
}

.login-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #facc15;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Header slightly smaller */
#standingsTable.dataTable thead th {
    padding: 4px 8px !important;
    font-size: 12px !important;
    line-height: 1.1;
}

/* Body text (normal size) */
#standingsTable.dataTable tbody td {
    font-size: 14px !important;
}

#standingsTable td {
    font-size: 14px;
}

.site-shell { width: 100%; }
.site-topbar {
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.site-topbar-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.brand-wrap { display: flex; flex-direction: column; gap: 4px; }
.brand-title {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .4px;
}
.brand-subtitle {
    margin: 0;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}
.admin-bar {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}
.top-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.top-nav a {
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s ease;
}
.top-nav a:hover, .top-nav a.active {
    background: var(--primary);
    color: #062b29;
}
.page-wrap {
    max-width: var(--maxw);
    margin: 6px auto 26px;
    padding: 0 18px 30px;
}


.hero-card {
    background: linear-gradient(135deg, #1abc9c 0%, #2563eb 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.hero-card h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.hero-card p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.9;
}
.hero-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-main {
    flex: 1 1 420px;
}

.hero-stat-boxes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat {
    min-width: 130px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.hero-stat-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
    margin-bottom: 4px;
}

.hero-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.card {
    background: var(--card);
    border: 1px solid rgba(219, 228, 238, 0.9);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
	margin-top: 18px;
}
.card h2, .card h3 { margin-top: 0; margin-bottom: 14px; color: #0f172a; }
.card.narrow { max-width: 760px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 14px;

    padding: 10px 12px;   /* ↓ reduced from ~18px */
    box-shadow: 0 4px 12px rgba(15,23,42,0.06); /* lighter */
}
.stat-card .label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.stat-card .value, .big { font-size: 34px; font-weight: 800; line-height: 1; color: #0f172a; }
label { display: block; font-weight: 700; margin-bottom: 8px; color: #0f172a; }
.stack { display: grid; gap: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(20,184,166,0.12);
}
.button, button, input[type=submit] {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    background: var(--primary);
    color: #052e2b;
    transition: transform .12s ease, opacity .12s ease;
}
.button:hover, button:hover, input[type=submit]:hover { opacity: .95; transform: translateY(-1px); }
.button.secondary { background: #e2e8f0; color: #0f172a; }
.button.danger { background: var(--danger); color: #fff; }
.button.warning { background: var(--warning); color: #422006; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.inline-form.compact input, .inline-form.compact select { width: auto; min-width: 120px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.alert, .notice, .success, .error {
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 700;
    margin-bottom: 14px;
}
.alert.success, .success { background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; }
.alert.error, .error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.notice { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.muted { color: var(--muted); }
.prose { line-height: 1.6; }
.table-wrap, .standings-scroll { overflow: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: #f8fafc; color: #0f172a; font-size: 14px; font-weight: 800; }
tbody tr:nth-child(even) { background: #fbfdff; }
tbody tr:hover { background: #f3f8fb; }

/* ----------------------------------------------------
   STANDINGS STATUS COLORS
   ---------------------------------------------------- */

/* 1. Eliminated Picks */
.loss { 
    background: #FF6251 !important; 
}

.duplicate,
.no_pick {
    background: #ffd8a8 !important;
    font-weight: normal !important;
}

/* 2. Survivor Row Highlight (Green) */
/* Protects the red/orange cells from turning green */
tr.survivor td:not(.loss):not(.duplicate):not(.no_pick) { 
    background: #d1fae5 !important; 
    font-weight: 700 !important; 
    color: #065f46;
}

/* 3. Hover Effect (Light Blue) */
/* Only highlights empty or "alive" cells when hovered */
#standingsTable tbody tr:hover td:not(.loss):not(.duplicate):not(.no_pick) {
    background-color: #eef6ff !important;
}

.pill {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0,0,0,.08);
}
.table-cell-hidden { color: #777; font-style: italic; }
#standingsTable { width: 100% !important; border-collapse: separate; border-spacing: 0; }
#standingsTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #1abc9c;
    color: #fff;
}

#standingsTable th:first-child,
#standingsTable td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    white-space: nowrap;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
    box-shadow: 2px 0 0 rgba(0,0,0,0.06);
}


#standingsTable th:nth-child(2),
#standingsTable td:nth-child(2) {
    min-width: 110px;
    max-width: 110px;
    width: 110px;
}

#standingsTable th,
#standingsTable td {
    padding: 8px 8px;
}

#standingsTable th:not(:first-child):not(:nth-child(2)),
#standingsTable td:not(:first-child):not(:nth-child(2)) {
    min-width: 72px;
    max-width: 72px;
    width: 72px;
    text-align: center;
}

#standingsTable tbody tr:nth-child(even) td { background: #f8fafc; }
#standingsTable tbody tr:nth-child(even) td:first-child { background: #f8fafc; }
.dataTables_wrapper { margin-top: 8px; }
.dataTables_wrapper .dataTables_filter { margin-bottom: 10px; }
.dataTables_wrapper .dataTables_filter input { margin-left: 6px; }
.site-footer {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 10px 18px 28px;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    text-align: center;
}

.quick-nav {
    margin-top: 16px;
}

.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.admin-tile {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dbe4ee;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.admin-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    border-color: #93c5fd;
    text-decoration: none;
}

.tile-title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.tile-subtitle {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}
.tile-meta {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 8px;
}

.grid.cols-4 {
    margin-bottom: 1px;
}

.tile-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card .label {
    font-size: 11px;
    margin-bottom: 2px;   /* tighter */
    color: #64748b;
}

.stat-card .value {
    font-size: 20px;      /* was likely 24+ */
    font-weight: 800;
    line-height: 1.1;
}

.stat-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15,23,42,0.10);
    border-color: #93c5fd;
    text-decoration: none;
}

.stat-link .label,
.stat-link .value {
    color: inherit;
}

.top-gap { margin-top: 8px; }
ul { margin-top: 8px; }
@media (max-width: 900px) {
    .site-topbar-inner { align-items: flex-start; flex-direction: column; }
    .brand-title { font-size: 24px; }
    .hero-card h2 { font-size: 26px; }
}
