/* ============================================================
   1BA DARK THEME — Premium Dashboard Design System
   Inspired by Over9k / Modern Dark Dashboard Aesthetic
   ============================================================ */

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

/* ---- CSS CUSTOM PROPERTIES ---- */
:root {
    /* Backgrounds */
    --bg-app: #0d1117;
    --bg-surface: #161b22;
    --bg-elevated: #1c2128;
    --bg-overlay: #21262d;
    --bg-input: #0d1117;
    --bg-hover: #1c2128;

    /* Borders */
    --border-default: #30363d;
    --border-muted: #21262d;
    --border-bright: #484f58;

    /* Text */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --text-link: #58a6ff;

    /* Accent Colors — 1BA Rebranded */
    --accent-green: #43c6db;
    --accent-green-bright: #5fd3e6;
    --accent-green-muted: #37a5b7;
    --accent-green-soft: rgba(67, 198, 219, 0.15);

    --accent-amber: #2ed397;
    --accent-amber-bright: #46e0a8;
    --accent-amber-soft: rgba(46, 211, 151, 0.15);

    --accent-purple: #8224e3;
    --accent-purple-soft: rgba(130, 36, 227, 0.15);

    --accent-red: #f85149;
    --accent-red-bright: #ff7b72;
    --accent-red-soft: rgba(248,81,73,0.15);

    --accent-blue: #58a6ff;
    --accent-blue-soft: rgba(88,166,255,0.15);

    --accent-cyan: #39d2c0;
    --accent-cyan-soft: rgba(57,210,192,0.15);

    --accent-pink: #f778ba;
    --accent-pink-soft: rgba(247,120,186,0.15);

    --accent-orange: #f0883e;
    --accent-orange-soft: rgba(240,136,62,0.15);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-glow-green: 0 0 20px rgba(67, 198, 219, 0.2);
    --shadow-glow-amber: 0 0 20px rgba(46, 211, 151, 0.2);
    --shadow-glow-red: 0 0 20px rgba(248,81,73,0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ============================================================
   BASE STYLES
   ============================================================ */

.dark-theme {
    background: var(--bg-app) !important;
    color: var(--text-primary);
    font-family: 'Inter', 'Outfit', sans-serif;
}

.dark-theme * {
    border-color: var(--border-default);
}

/* Scrollbar */
.dark-theme::-webkit-scrollbar { width: 8px; height: 8px; }
.dark-theme::-webkit-scrollbar-track { background: var(--bg-app); }
.dark-theme::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 4px; }
.dark-theme::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }
.dark-theme *::-webkit-scrollbar { width: 6px; height: 6px; }
.dark-theme *::-webkit-scrollbar-track { background: transparent; }
.dark-theme *::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }

/* ============================================================
   TAILWIND BACKGROUND OVERRIDES
   ============================================================ */

.dark-theme .bg-white { background: var(--bg-surface) !important; }
.dark-theme .bg-slate-50 { background: var(--bg-app) !important; }
.dark-theme .bg-slate-100 { background: var(--bg-overlay) !important; }
.dark-theme .bg-slate-200 { background: var(--border-default) !important; }
.dark-theme .bg-slate-900 { background: var(--bg-elevated) !important; }
.dark-theme .bg-slate-50\/50 { background: rgba(13, 17, 23, 0.5) !important; }
.dark-theme .bg-white\/50 { background: rgba(22, 27, 34, 0.5) !important; }


/* Badge soft backgrounds */
.dark-theme .bg-green-100 { background: var(--accent-green-soft) !important; }
.dark-theme .bg-green-500 { background: var(--accent-green) !important; }
.dark-theme .bg-blue-100 { background: var(--accent-blue-soft) !important; }
.dark-theme .bg-amber-100,
.dark-theme .bg-yellow-100 { background: var(--accent-amber-soft) !important; }
.dark-theme .bg-purple-100 { background: var(--accent-purple-soft) !important; }
.dark-theme .bg-red-100 { background: var(--accent-red-soft) !important; }
.dark-theme .bg-red-50 { background: var(--accent-red-soft) !important; }
.dark-theme .bg-primary-50,
.dark-theme .bg-primary\/10 { background: var(--accent-green-soft) !important; }

/* Gradient overrides */
.dark-theme .gradient-bg {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 30%, #1c2128 60%, #21262d 100%) !important;
}

.dark-theme .from-primary\/20 { --tw-gradient-from: rgba(46,160,67,0.12) !important; }
.dark-theme .to-secondary\/20 { --tw-gradient-to: rgba(210,153,34,0.12) !important; }

/* ============================================================
   TAILWIND TEXT OVERRIDES
   ============================================================ */

.dark-theme .text-slate-800 { color: var(--text-primary) !important; }
.dark-theme .text-slate-700 { color: #c9d1d9 !important; }
.dark-theme .text-slate-600 { color: var(--text-secondary) !important; }
.dark-theme .text-slate-500 { color: var(--text-secondary) !important; }
.dark-theme .text-slate-400 { color: var(--text-muted) !important; }
.dark-theme .text-slate-300 { color: #c9d1d9 !important; }
.dark-theme .text-white\/80 { color: rgba(230,237,243,0.8) !important; }
.dark-theme .text-white\/60 { color: rgba(230,237,243,0.5) !important; }
.dark-theme .text-white\/90 { color: rgba(230,237,243,0.9) !important; }

.dark-theme .text-green-700 { color: var(--accent-green-bright) !important; }
.dark-theme .text-green-600 { color: var(--accent-green-bright) !important; }
.dark-theme .text-green-500 { color: var(--accent-green-bright) !important; }
.dark-theme .text-green-300 { color: var(--accent-green-bright) !important; }
.dark-theme .text-blue-700 { color: var(--accent-blue) !important; }
.dark-theme .text-blue-600 { color: var(--accent-blue) !important; }
.dark-theme .text-blue-500 { color: var(--accent-blue) !important; }
.dark-theme .text-amber-600 { color: var(--accent-amber-bright) !important; }
.dark-theme .text-amber-500 { color: var(--accent-amber-bright) !important; }
.dark-theme .text-amber-300 { color: var(--accent-amber-bright) !important; }
.dark-theme .text-red-700 { color: var(--accent-red) !important; }
.dark-theme .text-red-600 { color: var(--accent-red) !important; }
.dark-theme .text-red-500 { color: var(--accent-red) !important; }
.dark-theme .text-red-400 { color: var(--accent-red) !important; }
.dark-theme .text-purple-600 { color: var(--accent-purple) !important; }
.dark-theme .text-purple-500 { color: var(--accent-purple) !important; }
.dark-theme .text-yellow-700 { color: var(--accent-amber-bright) !important; }
.dark-theme .text-cyan-500 { color: var(--accent-cyan) !important; }
.dark-theme .text-orange-700 { color: var(--accent-orange) !important; }

/* Primary brand overrides */
.dark-theme .text-primary { color: var(--accent-green-bright) !important; }
.dark-theme .text-primary-dark { color: var(--accent-green) !important; }
.dark-theme .text-secondary { color: var(--accent-amber-bright) !important; }

/* ============================================================
   TAILWIND BORDER OVERRIDES
   ============================================================ */

.dark-theme .border-b,
.dark-theme .border-t,
.dark-theme .border { border-color: var(--border-default) !important; }
.dark-theme .border-slate-200,
.dark-theme .border-slate-100 { border-color: var(--border-default) !important; }
.dark-theme .border-slate-700 { border-color: var(--border-default) !important; }
.dark-theme .border-white\/20 { border-color: rgba(48,54,61,0.6) !important; }
.dark-theme .border-white\/30 { border-color: rgba(48,54,61,0.8) !important; }

/* ============================================================
   TAILWIND SHADOW OVERRIDES
   ============================================================ */

.dark-theme .shadow-sm { box-shadow: var(--shadow-sm) !important; }
.dark-theme .shadow-lg { box-shadow: var(--shadow-md) !important; }
.dark-theme .shadow-xl { box-shadow: var(--shadow-lg) !important; }
.dark-theme .shadow-2xl { box-shadow: var(--shadow-lg) !important; }

/* ============================================================
   TAILWIND HOVER OVERRIDES
   ============================================================ */

.dark-theme .hover\:bg-slate-50:hover { background: var(--bg-overlay) !important; }
.dark-theme .hover\:bg-slate-200:hover { background: var(--border-default) !important; }
.dark-theme .hover\:bg-red-50:hover { background: var(--accent-red-soft) !important; }
.dark-theme .hover\:bg-white\/90:hover { background: rgba(22,27,34,0.9) !important; }
.dark-theme .hover\:bg-white\/30:hover { background: rgba(33,38,45,0.6) !important; }

/* ============================================================
   FORM INPUTS
   ============================================================ */

.dark-theme input[type="text"],
.dark-theme input[type="email"],
.dark-theme input[type="password"],
.dark-theme input[type="number"],
.dark-theme input[type="date"],
.dark-theme input[type="url"],
.dark-theme input[type="tel"],
.dark-theme input[type="search"],
.dark-theme textarea,
.dark-theme select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-default) !important;
    color: var(--text-primary) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dark-theme input:focus,
.dark-theme textarea:focus,
.dark-theme select:focus {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 0 3px var(--accent-green-soft) !important;
    outline: none !important;
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
    color: var(--text-muted) !important;
}

.dark-theme option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.dark-theme input[readonly] {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
}

/* ============================================================
   TABLES
   ============================================================ */

.dark-theme table th {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
    font-weight: 600;
}

.dark-theme table td {
    color: var(--text-secondary) !important;
    border-color: var(--border-muted) !important;
}

.dark-theme tbody tr {
    border-color: var(--border-muted) !important;
    transition: background 0.15s;
}

.dark-theme tbody tr:hover {
    background: var(--bg-overlay) !important;
}

.dark-theme table .font-medium {
    color: var(--text-primary) !important;
}

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

.dark-theme aside,
.dark-theme .dark-sidebar {
    background: var(--bg-elevated) !important;
    border-right: 1px solid var(--border-default) !important;
}

.dark-theme aside .border-b,
.dark-theme aside .border-t {
    border-color: var(--border-default) !important;
}

.dark-theme .sidebar-link {
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.dark-theme .sidebar-link:hover {
    background: var(--bg-overlay) !important;
}

.dark-theme .sidebar-link.active {
    background: var(--accent-green-soft) !important;
    border-right: 3px solid var(--accent-green) !important;
    color: var(--accent-green-bright) !important;
}

/* Dark sidebar nav for admin */
.dark-theme aside a.bg-primary {
    background: var(--accent-green-soft) !important;
    color: var(--accent-green-bright) !important;
}

.dark-theme aside a:hover {
    background: var(--bg-overlay) !important;
}

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

.dark-theme header {
    background: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-default) !important;
    box-shadow: none !important;
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */

.dark-theme .rounded-2xl,
.dark-theme .rounded-xl {
    border: 1px solid var(--border-muted);
}

.dark-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.dark-card-glow {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dark-card-glow:hover {
    border-color: var(--accent-green-muted);
    box-shadow: var(--shadow-glow-green);
}

.glass-card {
    background: rgba(22,27,34,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

/* ============================================================
   COLORED TAG BADGES (matching reference)
   ============================================================ */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tag-red { background: #f8514933; color: #f85149; }
.tag-green { background: #2ea04333; color: #3fb950; }
.tag-blue { background: #58a6ff33; color: #58a6ff; }
.tag-purple { background: #bc8cff33; color: #bc8cff; }
.tag-amber { background: #d2992233; color: #e3b341; }
.tag-cyan { background: #39d2c033; color: #56d4c8; }
.tag-pink { background: #f778ba33; color: #f778ba; }
.tag-orange { background: #f0883e33; color: #f0883e; }
.tag-white { background: rgba(139,148,158,0.2); color: #8b949e; }

/* ============================================================
   ACTIVITY RING (Circular Progress)
   ============================================================ */

.activity-ring-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.activity-ring {
    transform: rotate(-90deg);
}

.activity-ring-bg {
    fill: none;
    stroke: var(--border-default);
    stroke-width: 8;
}

.activity-ring-progress {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.activity-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.activity-ring-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.activity-ring-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================================
   DONUT CHART
   ============================================================ */

.donut-chart-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.donut-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.donut-center-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Legend dots */
.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

/* ============================================================
   MINI BAR CHART (Weekly Activity)
   ============================================================ */

.mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 60px;
}

.mini-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-width: 20px;
    transition: background 0.3s;
    position: relative;
}

.mini-bar.active {
    background: var(--accent-green) !important;
}

.mini-bar.inactive {
    background: var(--border-default);
}

.mini-bar-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
}

/* ============================================================
   REMINDERS
   ============================================================ */

.reminder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-muted);
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
}

.reminder-period {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.reminder-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.reminder-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-low { background: var(--accent-green); }
.priority-medium { background: var(--accent-amber); }
.priority-high { background: var(--accent-red); }

/* ============================================================
   KANBAN BOARD — DARK
   ============================================================ */

.dark-theme .kanban-col {
    background: var(--bg-overlay) !important;
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-md);
}

.dark-theme .task-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dark-theme .task-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   MODALS
   ============================================================ */

.dark-theme .fixed.bg-black\/50 {
    background: rgba(1,4,9,0.75) !important;
    backdrop-filter: blur(4px);
}

.dark-theme .fixed .bg-white,
.dark-theme .fixed .rounded-2xl {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-default) !important;
}

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

.dark-theme .bg-primary {
    background: var(--accent-green) !important;
}

.dark-theme .bg-primary:hover,
.dark-theme .hover\:bg-primary-dark:hover {
    background: var(--accent-green-muted) !important;
}

.dark-theme .bg-secondary {
    background: var(--accent-amber) !important;
}

.dark-theme .border-primary {
    border-color: var(--accent-green) !important;
}

.dark-theme .hover\:bg-primary:hover {
    background: var(--accent-green) !important;
    color: white !important;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */

.dark-theme .bg-primary.h-2,
.dark-theme .bg-primary.rounded-full {
    background: var(--accent-green) !important;
}

.dark-theme .bg-red-500.h-2 {
    background: var(--accent-red) !important;
}

.dark-theme .progress-bar::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ============================================================
   CHART CONTAINERS
   ============================================================ */

.chart-container-dark {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

/* ============================================================
   MAP DARK TILES
   ============================================================ */

.dark-theme .leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.2) saturate(0.5);
}

.dark-theme .leaflet-container {
    background: var(--bg-app);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

/* ============================================================
   HERO SECTION — DARK
   ============================================================ */

.dark-hero {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 40%, #1c2128 70%, #21262d 100%) !important;
    position: relative;
}

.dark-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(46,160,67,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(210,153,34,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(88,166,255,0.04) 0%, transparent 40%);
    pointer-events: none;
}

.dark-hero .hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================================
   DARK WAVE DIVIDER
   ============================================================ */

.dark-theme .wave-divider path {
    fill: var(--bg-app);
}

/* ============================================================
   CARD HOVER — DARK
   ============================================================ */

.dark-theme .card-hover {
    transition: all 0.3s ease;
}

.dark-theme .card-hover:hover {
    transform: translateY(-6px);
    border-color: var(--border-bright) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

/* ============================================================
   PARTNER LOGOS — DARK
   ============================================================ */

.dark-theme .partners-track .bg-slate-100 {
    background: var(--bg-overlay) !important;
}

.dark-theme .partners-track .text-red-500 { color: var(--accent-red) !important; }
.dark-theme .partners-track .text-blue-500 { color: var(--accent-blue) !important; }
.dark-theme .partners-track .text-green-500 { color: var(--accent-green-bright) !important; }
.dark-theme .partners-track .text-purple-500 { color: var(--accent-purple) !important; }
.dark-theme .partners-track .text-green-600 { color: var(--accent-green) !important; }
.dark-theme .partners-track .text-cyan-500 { color: var(--accent-cyan) !important; }

/* ============================================================
   FOOTER — DARK
   ============================================================ */

.dark-theme footer {
    background: var(--bg-elevated) !important;
    border-top: 1px solid var(--border-default);
}

/* ============================================================
   STAT CARDS WITH GLOW
   ============================================================ */

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    border-color: var(--border-bright);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-card .stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-trend.up { color: var(--accent-green-bright); }
.stat-trend.down { color: var(--accent-red); }

/* ============================================================
   BREADCRUMBS — DARK
   ============================================================ */

.dark-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dark-breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.dark-breadcrumb a:hover {
    color: var(--text-primary);
}

.dark-breadcrumb .active {
    color: var(--text-primary);
    font-weight: 600;
}

.dark-breadcrumb .separator {
    color: var(--text-muted);
}

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

@media (max-width: 768px) {
    .dark-theme aside {
        z-index: 50 !important;
    }

    .activity-ring-value {
        font-size: 1.5rem;
    }

    .donut-center-value {
        font-size: 1.75rem;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(46,160,67,0.2); }
    50% { box-shadow: 0 0 20px rgba(46,160,67,0.4); }
}

@keyframes ring-fill {
    from { stroke-dashoffset: var(--ring-circumference); }
    to { stroke-dashoffset: var(--ring-offset); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* ============================================================
   NOTIFICATION DOT
   ============================================================ */

.notification-dot {
    position: relative;
}

.notification-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
}

/* ============================================================
   EMPTY STATES — DARK
   ============================================================ */

.dark-theme .text-6xl.text-slate-300 { color: var(--text-muted) !important; }
.dark-theme .text-4xl.text-slate-300 { color: var(--text-muted) !important; }
.dark-theme .text-5xl { color: var(--text-muted) !important; }

/* ============================================================
   MILESTONE TIMELINE — DARK
   ============================================================ */

.dark-theme .milestone-line::before {
    background: var(--border-default) !important;
}

/* ============================================================
   TAB BUTTONS — DARK
   ============================================================ */

.dark-theme .tab-btn {
    transition: all 0.2s;
}

.dark-theme .tab-btn.bg-slate-100 {
    background: var(--bg-overlay) !important;
    color: var(--text-secondary) !important;
}

.dark-theme .tab-btn.bg-slate-100:hover {
    background: var(--border-default) !important;
    color: var(--text-primary) !important;
}

/* ============================================================
   GRADIENT ACTION CARDS — DARK
   ============================================================ */

.dark-theme .from-primary {
    --tw-gradient-from: var(--accent-green-muted) !important;
}

.dark-theme .to-primary-dark {
    --tw-gradient-to: #0d1117 !important;
}

.dark-theme .from-secondary {
    --tw-gradient-from: var(--accent-amber) !important;
}

.dark-theme .to-secondary-dark {
    --tw-gradient-to: #3d2600 !important;
}

/* Gradient card buttons */
.dark-theme .bg-gradient-to-br .bg-white {
    background: rgba(13,17,23,0.9) !important;
}

/* ============================================================
   PROJECT IMAGE PLACEHOLDERS — DARK
   ============================================================ */

.dark-theme .from-primary\/20.to-secondary\/20 {
    background: linear-gradient(135deg, rgba(46,160,67,0.08), rgba(210,153,34,0.08)) !important;
}

/* ============================================================
   DARK CHART.JS GLOBAL DEFAULTS (apply via JS)
   ============================================================ */
/* These need to be applied in JS - see js/main.js */

/* ============================================================
   CHART RESIZING & LAYOUT
   ============================================================ */
canvas {
    max-height: 320px !important;
    width: 100% !important;
    margin: 0 auto;
}

.chart-wrapper-normal {
    position: relative;
    height: 320px;
    width: 100%;
}

.max-w-md canvas {
    max-height: 400px !important;
}
