@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

html { background-color: #0a0a0a; }

:root {
    --primary: #CCFF00;
    --primary-dark: #B3E600;
    --primary-glow: rgba(204, 255, 0, 0.12);
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-input: #0e0e0e;
    --bg-sidebar: #0e0e0e;
    --border: rgba(255, 255, 255, 0.06);
    --border-primary: rgba(204, 255, 0, 0.15);
    --text: #ffffff;
    --text-secondary: #999;
    --text-muted: #666;
    --red: #ff4d4d;
    --green: #00cc88;
    --yellow: #f59e0b;
    --blue: #3b82f6;
    --purple: #a855f7;
    --radius: 10px;
    --radius-sm: 6px;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
}

/* ═══════════════ SIDEBAR ═══════════════ */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}
.admin-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-sidebar-header img { height: 22px; }
.admin-sidebar-header .admin-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--primary);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.sidebar-close {
    display: none;
    background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer;
}

.admin-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.admin-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem 0.4rem;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.admin-nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}
.admin-nav-link.active {
    color: var(--primary);
    background: var(--primary-glow);
    border-left-color: var(--primary);
}
.admin-nav-link i { width: 18px; text-align: center; font-size: 0.9rem; }
.admin-nav-link .nav-count {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.admin-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.admin-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}
.admin-user-info strong { font-size: 0.8rem; display: block; }
.admin-user-info small { font-size: 0.7rem; color: var(--text-muted); }
.admin-logout {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
    text-decoration: none;
}
.admin-logout:hover { color: var(--red); }

/* ═══════════════ MAIN ═══════════════ */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: border-color 0.3s, background 0.3s;
}
.mobile-toggle:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.admin-content {
    padding: 2rem 1.5rem 3rem;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    animation: contentFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════ PAGE HEADER ═══════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ═══════════════ STAT CARDS ═══════════════ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-primary); }
.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}
.stat-card-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.stat-card-change.up { color: var(--green); }
.stat-card-change.down { color: var(--red); }

/* ═══════════════ CARDS ═══════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-body { padding: 1.25rem; }
.card-body-flush { padding: 0; }

/* ═══════════════ TABLES ═══════════════ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.admin-table tr:last-child td { border-bottom: none; }

/* ═══════════════ BADGES ═══════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}
.badge-active { background: rgba(0, 204, 136, 0.12); color: var(--green); }
.badge-inactive { background: rgba(255, 77, 77, 0.12); color: var(--red); }
.badge-pending { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.badge-paid { background: rgba(0, 204, 136, 0.12); color: var(--green); }
.badge-refunded { background: rgba(255, 77, 77, 0.12); color: var(--red); }
.badge-draft { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }
.badge-published { background: rgba(59, 130, 246, 0.12); color: var(--blue); }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #000;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger {
    background: rgba(255, 77, 77, 0.1);
    color: var(--red);
    border: 1px solid rgba(255, 77, 77, 0.2);
}
.btn-danger:hover { background: rgba(255, 77, 77, 0.2); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.75rem; }
.btn-sm:not(.btn) {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.85rem;
}
.btn-sm:not(.btn):hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.btn-sm:not(.btn):disabled { opacity: 0.35; cursor: not-allowed; }
.btn-sm:not(.btn):disabled:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary); }
.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-icon.danger:hover { color: var(--red); border-color: rgba(255, 77, 77, 0.3); }

/* ═══════════════ FORMS ═══════════════ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.input-icon-wrap {
    position: relative;
}
.input-icon-wrap > i {
    position: absolute;
    left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.input-icon-wrap .form-input { padding-left: 2.2rem; }

/* ═══════════════ MODALS ═══════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.visible { display: flex; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ═══════════════ ALERTS ═══════════════ */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success { background: rgba(0, 204, 136, 0.1); border: 1px solid rgba(0, 204, 136, 0.2); color: var(--green); }
.alert-error { background: rgba(255, 77, 77, 0.1); border: 1px solid rgba(255, 77, 77, 0.2); color: var(--red); }

/* ═══════════════ ACTIVITY FEED ═══════════════ */
.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.feed-icon.green { background: rgba(0, 204, 136, 0.12); color: var(--green); }
.feed-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.feed-icon.yellow { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.feed-icon.red { background: rgba(255, 77, 77, 0.12); color: var(--red); }
.feed-text { font-size: 0.82rem; line-height: 1.4; }
.feed-text strong { font-weight: 600; }
.feed-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ═══════════════ CODE / API KEY ═══════════════ */
.api-key-box {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ═══════════════ EMPTY STATE ═══════════════ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.empty-state p { font-size: 0.85rem; }

/* ═══════════════ GRID LAYOUTS ═══════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ═══════════════ OVERLAY ═══════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
}
.sidebar-overlay.visible { display: block; }

/* ═══════════════ SEARCH BAR ═══════════════ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    max-width: 300px;
    width: 100%;
}
.search-bar i { color: var(--text-muted); font-size: 0.85rem; }
.search-bar input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    flex: 1;
    outline: none;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ═══════════════ TABS ═══════════════ */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .mobile-toggle { display: block; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 1rem; padding-top: 3.5rem; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header h1 { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ═══════════════ STAT CARDS ENHANCED ═══════════════ */
.stat-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}
.stat-card-highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.stat-card-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.stat-card-icon.green { background: rgba(0, 204, 136, 0.12); color: var(--green); }
.stat-card-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.stat-card-icon.purple { background: rgba(168, 85, 247, 0.12); color: var(--purple); }
.stat-card-icon.lime { background: var(--primary-glow); color: var(--primary); }
.stat-card-icon.yellow { background: rgba(245, 158, 11, 0.12); color: var(--yellow); }
.stat-card-icon.red { background: rgba(255, 77, 77, 0.12); color: var(--red); }

.stat-card-sub {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.stat-chip {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}
.stat-chip.green { background: rgba(0, 204, 136, 0.1); color: var(--green); }
.stat-chip.blue { background: rgba(59, 130, 246, 0.1); color: var(--blue); }
.stat-chip.yellow { background: rgba(245, 158, 11, 0.1); color: var(--yellow); }
.stat-chip.red { background: rgba(255, 77, 77, 0.1); color: var(--red); }

/* ═══════════════ REVENUE CHART ═══════════════ */
.revenue-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 180px;
    padding-bottom: 0.5rem;
}
.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    cursor: default;
}
.chart-bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(180deg, rgba(204, 255, 0, 0.3) 0%, rgba(204, 255, 0, 0.08) 100%);
    border-radius: 6px 6px 2px 2px;
    transition: all 0.3s ease;
    min-height: 4px;
}
.chart-bar:hover {
    background: linear-gradient(180deg, rgba(204, 255, 0, 0.5) 0%, rgba(204, 255, 0, 0.15) 100%);
}
.chart-bar.today {
    background: linear-gradient(180deg, var(--primary) 0%, rgba(204, 255, 0, 0.2) 100%);
}
.chart-bar-value {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    white-space: nowrap;
}
.chart-bar-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.4rem;
}
.chart-bar-label.today {
    color: var(--primary);
}

/* ═══════════════ KPI LIST ═══════════════ */
.kpi-list {
    display: flex;
    flex-direction: column;
}
.kpi-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    transition: background 0.15s;
}
.kpi-item:last-child { border-bottom: none; }
.kpi-item:hover { background: rgba(255, 255, 255, 0.02); }
.kpi-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kpi-label i { width: 16px; text-align: center; }
.kpi-value {
    font-weight: 600;
    color: var(--text);
}

/* ═══════════════ TOP CUSTOMERS ═══════════════ */
.top-customer-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.top-customer-row:last-child { border-bottom: none; }
.top-customer-row:hover { background: rgba(255, 255, 255, 0.02); }
.top-rank {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.top-customer-row:first-child .top-rank {
    background: var(--primary-glow);
    color: var(--primary);
}
.top-info {
    flex: 1;
    min-width: 0;
}
.top-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-info small {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.top-revenue {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
}

/* ═══════════════ UPCOMING EVENTS ═══════════════ */
.upcoming-event-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.upcoming-event-row:last-child { border-bottom: none; }
.upcoming-event-row:hover { background: rgba(255, 255, 255, 0.02); }
.ue-date {
    width: 42px;
    text-align: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
}
.ue-day {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}
.ue-month {
    display: block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.ue-info {
    flex: 1;
    min-width: 0;
}
.ue-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ue-info small {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.ue-stats {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ═══════════════ DEVICE BARS ═══════════════ */
.device-bars {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.device-bar-item {}
.device-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}
.device-bar-header i {
    width: 16px;
    text-align: center;
    margin-right: 0.3rem;
}
.device-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}
.device-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ═══════════════ FILTER TABS ═══════════════ */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.filter-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}
.filter-tab.active {
    color: var(--primary);
    background: var(--primary-glow);
    border-color: var(--border-primary);
}
.dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.blue { background: var(--blue); }

/* ═══════════════ SORT LINKS ═══════════════ */
.sort-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
}
.sort-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.sort-link.active { color: var(--primary); }

/* ═══════════════ COLLAPSIBLE CARD ═══════════════ */
.card.collapsed .collapse-content {
    display: none;
}
.collapse-icon {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}
.card.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* ═══════════════ SERVER LOAD ═══════════════ */
.server-load-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.load-item {}
.load-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

/* ═══════════════ RESPONSIVE OVERRIDES ═══════════════ */
@media (max-width: 768px) {
    .stat-grid-4 { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; }
    .server-load-grid { grid-template-columns: 1fr; }
    .revenue-chart { height: 140px; }
}
@media (max-width: 480px) {
    .stat-grid-4 { grid-template-columns: 1fr; }
    .stat-card-highlight { flex-direction: column; gap: 0.5rem; }
}
