:root {
    --bg-dark: #0b0d14;
    --card-bg: rgba(22, 26, 40, 0.75);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --fire-orange: #ff5722;
    --fire-yellow: #ffb300;
    --accent-red: #ff3366;
    --status-green: #22c55e;
    --status-yellow: #eab308;
    --status-red: #ef4444;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 87, 34, 0.16) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 51, 102, 0.14) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px 16px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.header-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    width: 100%;
}

/* Latest Data Pushed Banner */
.sync-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    padding: 7px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.18);
    backdrop-filter: blur(10px);
}

.sync-banner .sync-label {
    color: #94a3b8;
    font-weight: 500;
}

.sync-banner strong {
    color: #4ade80;
    font-weight: 700;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #22c55e;
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #22c55e; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fire-icon {
    display: inline-block;
    filter: drop-shadow(0 0 12px rgba(255, 87, 34, 0.9));
    animation: flameFlicker 1.4s infinite alternate;
}

@keyframes flameFlicker {
    0% { transform: scale(1) rotate(-4deg); }
    100% { transform: scale(1.18) rotate(4deg); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-btn {
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    transition: all 0.2s ease;
}

.nav-btn.active, .nav-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #ff5722, #ff3366);
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(255, 87, 34, 0.45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-box input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #fff;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #ff5722;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.6;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 240px;
}

.select-wrapper select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(0, 0, 0, 0.45);
    color: #f8fafc;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 11px 36px 11px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.select-wrapper select:focus,
.select-wrapper select:hover {
    border-color: #ff5722;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 14px rgba(255, 87, 34, 0.35);
}

.select-wrapper select option {
    background-color: #121524;
    color: #f8fafc;
    padding: 10px;
    font-size: 0.92rem;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: #ff8a65;
    pointer-events: none;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active {
    background: #ff5722;
    color: #fff;
    border-color: #ff5722;
    box-shadow: 0 2px 10px rgba(255, 87, 34, 0.35);
}

.filter-chip:hover:not(.active) {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.table-responsive {
    overflow-x: auto;
}

.streax-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.streax-table th {
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sortable column headers */
.streax-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.streax-table th.sortable:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.streax-table th.sortable .sort-arrow {
    display: inline-block;
    margin-left: 6px;
    opacity: 0.35;
    font-size: 0.75rem;
}

.streax-table th.sortable.sorted {
    color: #ffb74d;
}

.streax-table th.sortable.sorted .sort-arrow {
    opacity: 1;
}

.streax-table td {
    padding: 16px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 87, 34, 0.15);
    border: 1px solid rgba(255, 87, 34, 0.4);
    color: #ff8a65;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
}

/* Missed Dates Tag Badges */
.missed-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.missed-tag {
    display: inline-block;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: monospace;
}

.missed-more-tag {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
}

.no-missed-tag {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.panel-footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer a {
    color: #ff8a65;
    text-decoration: none;
}
