@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

@theme {
    --grid-template-columns-15: repeat(15, minmax(0, 1fr));
    --grid-template-columns-20: repeat(20, minmax(0, 1fr));
}

/* Light Mode Theme */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-indigo: #6366f1;
    --accent-indigo-light: #eef2ff;
    --accent-emerald: #10b981;
    --accent-emerald-light: #ecfdf5;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* Dark Mode Theme */
.dark {
    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-sidebar: #0f1729;
    --bg-header: #111827;
    --border-light: #1e293b;
    --border-medium: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-indigo: #818cf8;
    --accent-indigo-light: rgba(99, 102, 241, 0.1);
    --accent-emerald: #34d399;
    --accent-emerald-light: rgba(16, 185, 129, 0.1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.15);
    --gradient-card: linear-gradient(135deg, #111827 0%, #0f1729 100%);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar Styles */
.sidebar {
    background-color: var(--bg-sidebar);
    border-color: var(--border-light);
}

.sidebar-nav-item {
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.sidebar-nav-item:hover {
    color: var(--text-primary);
    background-color: color-mix(in srgb, var(--accent-indigo) 8%, transparent);
}

.sidebar-nav-item.active {
    color: var(--accent-indigo);
    background-color: var(--accent-indigo-light);
    font-weight: 600;
}

/* Header Styles */
.app-header {
    background-color: var(--bg-header);
    border-color: var(--border-light);
    backdrop-filter: blur(12px);
}

/* Card Styles */
.app-card {
    background: var(--gradient-card);
    border-color: var(--border-light);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
}

/* Stat Card Icon Container */
.stat-icon {
    box-shadow: 0 4px 14px 0 rgb(0 0 0 / 0.15);
}

.dark .stat-icon {
    box-shadow: 0 4px 14px 0 rgb(0 0 0 / 0.35);
}

/* Chart Container */
.chart-card {
    background: var(--gradient-card);
    border-color: var(--border-light);
}

/* Input Styles */
.app-input {
    background-color: var(--bg-secondary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.app-input:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-indigo) 20%, transparent);
}

/* Button Primary */
.btn-primary {
    background-color: var(--accent-indigo);
    color: white;
    box-shadow: 0 2px 8px 0 color-mix(in srgb, var(--accent-indigo) 35%, transparent);
    transition: all 0.15s ease;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px 0 color-mix(in srgb, var(--accent-indigo) 45%, transparent);
    transform: translateY(-1px);
}

/* Subtle scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-medium);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* Smooth page transitions */
* {
    scroll-behavior: smooth;
}
