/* ===========================
   CSS VARIABLES
   =========================== */

:root {
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --accent-primary: #ff4d00;
    --accent-secondary: #ff8533;
    --accent-tertiary: #ffa366;
    --accent-yellow: #ffb800;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-dim: #9ca3af;
    --border: #e5e7eb;
    --shadow: rgba(255, 77, 0, 0.08);
    --shadow-hover: rgba(255, 77, 0, 0.15);
}

/* Dark Theme */
body.dark-theme {
    --bg-body: #0f0f0f;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-dim: #666666;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(255, 77, 0, 0.2);
}

/* ===========================
   RESET & BASE
   =========================== */

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===========================
   SIDEBAR
   =========================== */

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 2px solid var(--border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem;
    margin-bottom: 2rem;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.1), rgba(255, 133, 51, 0.1));
    color: var(--accent-primary);
    font-weight: 700;
}

.sidebar-item i {
    font-size: 18px;
    width: 20px;
    opacity: 0.6;
}

.sidebar-item.active i,
.sidebar-item:hover i {
    opacity: 1;
}

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

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.theme-icon-dark {
    display: inline;
}

.theme-icon-light {
    display: none;
}

body.dark-theme .theme-icon-dark {
    display: none;
}

body.dark-theme .theme-icon-light {
    display: inline;
}

/* ===========================
   MAIN LAYOUT
   =========================== */

.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1600px;
    width: 100%;
    padding: 2rem;
}

/* ===========================
   PAGE HEADER
   =========================== */

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===========================
   FILTERS & SEARCH
   =========================== */

.filters-bar {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 0.6rem 1rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-primary);
    outline: none;
}

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

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--text-dim);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 16px;
}

.btn-export {
    padding: 0.6rem 1.25rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* ===========================
   TABLE
   =========================== */

.table-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
}

.leads-table thead {
    background: var(--bg-body);
}

.leads-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.leads-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.leads-table tbody tr:hover {
    background: var(--bg-body);
}

.leads-table td {
    padding: 1rem 1.25rem;
    font-size: 14px;
    color: var(--text-primary);
    position: relative;
}

/* ===========================
   TOGGLE SWITCH
   =========================== */

.toggle-switch {
    position: relative;
    width: 56px;
    height: 28px;
    cursor: pointer;
    user-select: none;
}

.toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 77, 0, 0.08);
    border-radius: 50px;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(255, 77, 0, 0.05);
}

body.dark-theme .toggle-track {
    background: rgba(255, 77, 0, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-track.active {
    background: rgba(34, 197, 94, 0.12);
    box-shadow: inset 0 2px 4px rgba(34, 197, 94, 0.08);
}

body.dark-theme .toggle-track.active {
    background: rgba(34, 197, 94, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: none;
}

body.dark-theme .toggle-thumb {
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle-track.active .toggle-thumb {
    transform: translateX(28px);
}

.toggle-thumb.moving-right {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(28px) !important;
}

.toggle-thumb.moving-left {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0) !important;
}

@keyframes subtleShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(1px) rotate(1deg); }
    75% { transform: translateX(-1px) rotate(-1deg); }
}

@keyframes subtleShakeActive {
    0%, 100% { transform: translateX(28px) rotate(0deg); }
    25% { transform: translateX(29px) rotate(1deg); }
    75% { transform: translateX(27px) rotate(-1deg); }
}

.toggle-thumb.shake-left {
    animation: subtleShake 0.3s ease-in-out;
}

.toggle-thumb.shake-right {
    animation: subtleShakeActive 0.3s ease-in-out;
}

/* ===========================
   ACTION BUTTONS
   =========================== */

.action-btn-hold {
    position: relative;
    padding: 0.5rem 0.75rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    overflow: hidden;
    user-select: none;
}

.action-btn-hold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 77, 0, 0.1), rgba(255, 77, 0, 0.2));
    transition: width 0.8s linear;
    z-index: 0;
}

.action-btn-hold.pressing::before {
    width: 100%;
}

.action-btn-hold:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.action-btn-hold span {
    position: relative;
    z-index: 1;
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
}

body.dark-theme .toast {
    background: #2a2a2a;
    border-color: #3a3a3a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dim);
    flex-shrink: 0;
    background: transparent;
    border: none;
}

.toast-close:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

/* ===========================
   BADGES
   =========================== */

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.source-yelp {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.source-thumbtack {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.source-google {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-body);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===========================
   DASHBOARD - DATE SELECTOR
   =========================== */

.date-selector {
    position: relative;
    display: inline-block;
}

.date-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.date-trigger:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow);
}

.date-trigger.active {
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.date-range-text {
    color: var(--text-primary);
    font-weight: 600;
}

.cal-panel {
    position: absolute;
    top: 110%;
    left: 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 100;
    min-width: 600px;
    overflow: hidden;
}

.cal-panel.show {
    display: flex;
}

.cal-sidebar {
    width: 180px;
    background: var(--bg-body);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.preset-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.preset-btn.active {
    background: var(--accent-primary);
    color: white;
}

.preset-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

.cal-body {
    flex: 1;
    padding: 1.5rem;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.cal-nav {
    display: flex;
    gap: 0.5rem;
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.cal-nav-btn:hover {
    background: var(--bg-body);
    border-color: var(--accent-primary);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cal-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    padding: 0.5rem;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.cal-day:hover {
    background: var(--bg-body);
}

.cal-day.empty {
    cursor: default;
}

.cal-day.today {
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.1), rgba(255, 133, 51, 0.1));
    font-weight: 700;
}

.cal-day.selected {
    background: var(--accent-primary);
    color: white;
}

.cal-day.in-range {
    background: rgba(255, 77, 0, 0.1);
}

.cal-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cal-footer-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
}

.cal-footer-actions {
    display: flex;
    gap: 0.75rem;
}

.cal-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.cal-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.cal-btn-secondary:hover {
    color: var(--text-primary);
}

.cal-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.cal-btn-primary:hover {
    background: var(--accent-secondary);
}

/* ===========================
   DASHBOARD - HEADER
   =========================== */

.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.business-select {
    padding: 0.75rem 1.25rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.business-select:hover, 
.business-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--shadow);
    outline: none;
}

/* ===========================
   DASHBOARD - STATS GRID
   =========================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow-hover);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.1), rgba(255, 77, 0, 0.05));
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(255, 133, 51, 0.1), rgba(255, 133, 51, 0.05));
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1), rgba(255, 184, 0, 0.05));
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.1), rgba(255, 184, 0, 0.05));
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.stat-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
}

.stat-change.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.stat-trend {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
}

/* ===========================
   DASHBOARD - CHARTS
   =========================== */

.chart-section {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out 0.25s backwards;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-body);
    padding: 0.35rem;
    border-radius: 12px;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.02);
}

.filter-btn:hover:not(.active) {
    background: var(--bg-card);
    color: var(--text-primary);
}

.chart-container {
    height: 400px;
    position: relative;
    margin-top: 1.5rem;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    animation: fadeInUp 0.5s ease-out 0.3s backwards;
}

.chart-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.chart-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px var(--shadow);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.mini-chart {
    height: 300px;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.metric-row:hover {
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.05), rgba(255, 133, 51, 0.05));
    transform: translateX(4px);
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.highlight {
    color: var(--accent-primary);
}

.metric-bar {
    height: 4px;
    background: var(--bg-body);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 1s ease;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        padding: 1.5rem 0.5rem;
    }
    
    .sidebar-logo-text,
    .sidebar-item span,
    .theme-toggle span {
        display: none;
    }
    
    .sidebar-item,
    .theme-toggle {
        justify-content: center;
        padding: 0.75rem;
    }
    
    .main-wrapper {
        margin-left: 70px;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .container {
        padding: 1rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cal-panel {
        min-width: auto;
        width: 95vw;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cal-panel.show {
        flex-direction: column;
    }
    
    .cal-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
}