/* home.css — Premium Dashboard (Theme-aware) */

/* Hero Welcome Banner */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.06) 100%);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.dash-greeting {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 6px 0;
    color: var(--text);
}

.dash-date {
    color: var(--text-mute);
    margin: 0;
    font-size: 0.95rem;
}

.dash-clock {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* Quick Stats Row */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-mute);
    font-weight: 500;
    margin-top: 2px;
}

/* Main Dashboard Grid */
.dash-main-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.dash-col-main,
.dash-col-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Dashboard Cards */
.dash-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
}

.dash-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.dash-card-header h3 i {
    font-size: 1.1rem;
}

/* Badge */
.dash-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Link Button */
.dash-link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
}

.dash-link-btn:hover {
    opacity: 0.7;
}

/* Habit Progress Bar */
.dash-habit-bar-wrapper {
    margin-bottom: 16px;
}

.dash-habit-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 99px;
    overflow: hidden;
}

.dash-habit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 99px;
    transition: width 0.5s ease;
}

/* Habit Mini List */
.dash-habit-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.dash-habit-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--bg-secondary);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dash-habit-mini-item.done {
    color: #10b981;
}

.dash-habit-mini-item .habit-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.dash-habit-mini-item.done .habit-check {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Recent Notes */
.dash-recent-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-note-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.dash-note-item:hover {
    background: var(--bg-main);
    transform: translateX(4px);
}

.dash-note-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.dash-note-info {
    flex: 1;
    min-width: 0;
}

.dash-note-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-note-meta {
    font-size: 0.75rem;
    color: var(--text-mute);
    margin-top: 2px;
}

/* Budget Visual */
.dash-budget-visual {
    text-align: center;
}

.dash-budget-status {
    font-size: 0.9rem;
    color: var(--text-mute);
    margin-top: 8px;
    font-weight: 500;
}

/* Quick Actions */
.dash-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dash-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dash-action-btn i {
    font-size: 0.85rem;
}

/* Mini list items (agenda) */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mini-item {
    background: var(--bg-secondary);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.mini-item:hover {
    background: var(--bg-main);
    color: var(--text);
}

.mini-time {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    min-width: 45px;
}

/* Chart wrapper */
.stat-circle-wrapper {
    width: 120px;
    height: 120px;
    margin: 10px auto;
    position: relative;
}

.stat-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: -1px;
}

/* Responsive */
@media (max-width: 900px) {
    .dash-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-main-grid {
        grid-template-columns: 1fr;
    }

    .dash-hero {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px;
    }

    .dash-clock {
        font-size: 1.8rem;
    }

    .dash-greeting {
        font-size: 1.3rem;
    }
}

@media (max-width: 500px) {
    .dash-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dash-stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .dash-quick-actions {
        grid-template-columns: 1fr;
    }
}