:root {
    --primary: #0d6efd;
    --bg: #f7f9fc;
    --card: #ffffff;
    --text: #222;
    --muted: #666;
    --today: #fff3cd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ===============================
   Layout
================================ */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
}

/* ===============================
   Header
================================ */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.subtitle {
    color: var(--muted);
    margin-top: 0.3rem;
}

/* ===============================
   Controls
================================ */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: center;
    background: var(--card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.control-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.control-group label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

select {
    padding: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    padding: 0.55rem 1.2rem;
    font-size: 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* ===============================
   Status
================================ */
.status {
    text-align: center;
    margin: 0.8rem 0;
}

.status.loading {
    color: var(--muted);
}

.status.error {
    color: #b00020;
}

/* ===============================
   Table
================================ */
.table-wrapper {
    overflow-x: auto;
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

thead {
    background: #f1f3f6;
    position: sticky;
    top: 0;
    z-index: 1;
}

th, td {
    padding: 0.65rem;
    text-align: center;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #f9fbff;
}

.today-row {
    background: var(--today);
    font-weight: 600;
}

/* ===============================
   Mobile
================================ */
@media (max-width: 768px) {

    .page-header h1 {
        font-size: 1.4rem;
    }

    table {
        min-width: 600px;
    }

    th, td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
    }
}
/* ===============================
   Friday / Today Highlights
================================ */

/* Regular Friday (NOT today) */
tr[data-friday="1"]:not([data-today-friday="1"]) td {
    background-color: #c9d8e5;
    font-weight: 600;
    color: #0a1a33;
}

/* Today (NOT Friday) */
tr[data-today="1"]:not([data-today-friday="1"]) td {
    background-color: #e8f5e9;
    font-weight: 600;
    color: #0f3d1f;
}

/* 🔥 TODAY + FRIDAY (ONLY one row ever) */
tr[data-today-friday="1"] td {
    background-color: #0d6efd;
    color: #ffffff;
    font-weight: 700;
}

/* ===============================
   Preserve highlight on hover
================================ */

tr[data-friday="1"]:not([data-today-friday="1"]):hover td {
    background-color: #c9d8e5 !important;
    color: #0a1a33 !important;
}

tr[data-today="1"]:not([data-today-friday="1"]):hover td {
    background-color: #e8f5e9 !important;
    color: #0f3d1f !important;
}

tr[data-today-friday="1"]:hover td {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

/* ===============================
   Mobile (tap-safe)
================================ */
@media (max-width: 768px) {

    tr[data-friday="1"]:not([data-today-friday="1"]) td {
        background-color: #c9d8e5 !important;
    }

    tr[data-today="1"]:not([data-today-friday="1"]) td {
        background-color: #e8f5e9 !important;
    }

    tr[data-today-friday="1"] td {
        background-color: #0d6efd !important;
        color: #ffffff !important;
        font-weight: 700;
    }
}
