:root {
    --bg-dark: #0f172a;
    --bg-light: #f1f5f9;
    --primary: #1e293b;
    --primary-light: #334155;
    --accent: #0d9488;
    --accent-soft: #14b8a6;
    --accent-gold: #eab308;
    --text-dark: #0f172a;
    --text-light: #e2e8f0;
    --card-bg-dark: #1e293b;
    --card-bg-light: #ffffff;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    transition: all 0.3s ease;
    background: #0f172a;
    min-height: 100vh;
}

body.light-mode {
    background: #f1f5f9;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #111827;
    color: #e2e8f0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

body.light-mode .sidebar {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.logo h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
}

body.light-mode .logo h2 {
    color: #0f172a;
}

.logo p {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    background: none;
    border: none;
    color: inherit;
    padding: 12px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

body.light-mode .nav-item:hover {
    background: #f1f5f9;
}

.nav-item.active {
    background: #0d9488;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

body.light-mode .nav-item.active {
    background: #0d9488;
    color: white;
}

.theme-toggle button {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    transition: 0.3s;
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.light-mode .theme-toggle button {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .top-bar {
    border-bottom-color: #e2e8f0;
}

.top-bar h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
}

body.light-mode .top-bar h1 {
    color: #0f172a;
}

.date-badge {
    background: #1e293b;
    padding: 8px 18px;
    border-radius: 20px;
    color: #e2e8f0;
    font-weight: 500;
}

body.light-mode .date-badge {
    background: #e2e8f0;
    color: #1e293b;
}

/* Cards */
.card {
    background: #1e293b;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #334155;
}

body.light-mode .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 20px;
}

body.light-mode .card h3 {
    color: #0f172a;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-modern {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #334155;
    background: #0f172a;
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 14px;
    transition: 0.3s;
}

body.light-mode .input-modern {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.input-modern:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

textarea.input-modern {
    resize: vertical;
    min-height: 60px;
}

.btn-primary {
    background: #0d9488;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0f766e;
    transform: translateY(-2px);
}

.filter-group {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 8px 20px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 30px;
    color: #e2e8f0;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

body.light-mode .filter-pill {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.filter-pill.active {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

/* Task & Appointment Cards */
.tasks-grid, .appointments-grid {
    display: grid;
    gap: 15px;
}

.task-card, .appointment-card {
    background: #1e293b;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    border-left: 4px solid #0d9488;
}

body.light-mode .task-card, body.light-mode .appointment-card {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left-color: #0d9488;
}

.task-card.completed {
    opacity: 0.6;
    text-decoration: line-through;
    border-left-color: #eab308;
}

.task-card strong, .appointment-card strong {
    color: #ffffff;
}

body.light-mode .task-card strong, body.light-mode .appointment-card strong {
    color: #0f172a;
}

.task-card small, .appointment-card small {
    color: #94a3b8;
}

body.light-mode .task-card small, body.light-mode .appointment-card small {
    color: #64748b;
}

.complete-btn, .delete-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 500;
}

.complete-btn {
    background: #0d9488;
    color: white;
}

.complete-btn:hover {
    background: #0f766e;
}

.delete-btn {
    background: #dc2626;
    color: white;
}

.delete-btn:hover {
    background: #b91c1c;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 16px;
    color: #e2e8f0;
    text-align: center;
}

body.light-mode .stat-card {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    display: block;
    margin-top: 8px;
    color: #0d9488;
    font-family: 'Inter', monospace;
}

/* Charts */
.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.chart-card {
    background: #1e293b;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #334155;
}

body.light-mode .chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.chart-card h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

body.light-mode .chart-card h3 {
    color: #0f172a;
}

/* Transactions List */
.transactions-list {
    display: grid;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .nav-item {
        padding: 8px 16px;
        font-size: 14px;
    }
    .main-content {
        padding: 20px;
    }
    .chart-container {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
    }
    .top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px);}
    to { opacity: 1; transform: translateY(0);}
}