:root {
    /* Vibrant, Modern Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --secondary-color: #8b5cf6;
    /* Violet 500 */
    --accent-color: #f43f5e;
    /* Rose 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --warning-color: #f59e0b;
    /* Amber 500 */
    --info-color: #3b82f6;
    /* Blue 500 */

    /* Backgrounds & Surfaces */
    --bg-color: #f3f4f6;
    /* Cool Gray 100 */
    --card-bg: #ffffff;
    --sidebar-bg: #1e293b;
    /* Slate 800 */

    /* Text Colors */
    --text-color: #1f2937;
    /* Gray 800 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --text-light: #f9fafb;
    /* Gray 50 */

    /* Borders & Shadows */
    --border-color: #e5e7eb;
    /* Gray 200 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(99, 102, 241, 0.2);
    /* Colored shadow based on primary */
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: radial-gradient(circle at top right, #e0e7ff, transparent 40%),
        radial-gradient(circle at bottom left, #fae8ff, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #111827;
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modern Card Style */
.card,
.stat-card,
.chart-card,
.dashboard-section,
.form-container,
.table-container,
.page-header {
    background: rgba(255, 255, 255, 0.85);
    /* Slightly transparent for glass feel */
    backdrop-filter: blur(12px);
    border-radius: 16px;
    /* Softer, larger radius */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.chart-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Login Page Specific */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

.login-container {
    background: white;
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    /* More rounded */
    font-size: 14px;
    transition: all 0.2s;
    background-color: #f9fafb;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background-color: white;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(to right, var(--primary-color), #818cf8);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navigation - Will Overwrite Nav Style */
.main-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: #e0e7ff;
}

.nav-links a.active {
    color: white;
    background: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 24px;
}

.flash-message {
    padding: 16px;
    border-radius: 12px;
    background: white;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tables */
.table-container {
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: #f9fafb;
    padding: 16px 24px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.data-table tr:hover td {
    background-color: #f8fafc;
}

/* Badges & Icons */
.badge {
    background: #e0e7ff;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
    padding-left: 44px;
}