:root {
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --bg-card-light: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --accent-yellow: #F59E0B;
    --accent-purple: #8B5CF6;
    --border-color: #475569;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Metrics */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.positive { color: var(--accent-green); }
.negative { color: var(--accent-red); }
.warning { color: var(--accent-yellow); }

/* Progress bars */
.progress-bar {
    height: 8px;
    background-color: var(--bg-card-light);
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
}

/* Charts */
.chart-container {
    height: 300px;
    margin-top: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-card-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-success {
    background-color: var(--accent-green);
    color: white;
}

.btn-danger {
    background-color: var(--accent-red);
    color: white;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th {
    text-align: left;
    padding: 12px;
    background-color: var(--bg-card-light);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tr:hover {
    background-color: var(--bg-card-light);
}

/* Habit Grid */
.habit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.habit-card {
    background-color: var(--bg-card-light);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid;
}

.habit-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.habit-today {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.habit-input {
    flex: 1;
    padding: 6px 10px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

/* Status Indicators */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--accent-yellow);
}

.status-overdue {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-yellow);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }