/* ==========================================
   DASHBOARD GRID LAYOUTS
   ========================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* NOTE: greeting-title is an ID on the h2, not a class.
   Real styles are in .greeting-text h2 in style.css.
   This block intentionally left minimal to avoid overriding gradients. */
#greeting-title {
    /* no color override — let style.css gradient apply */
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 3-column trio: Focus Task | Daily Checklist | Priority Breakdown */
.dashboard-trio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Full-width row wrapper */
.dashboard-full-row {
    display: block;
}

/* 2-column extras for legacy features */
.dashboard-extras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ==========================================
   PRIORITY DONUT CHART
   ========================================== */

.priority-breakdown-donut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-height: 120px;
    padding-top: 10px;
}

.donut-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-ring-inner {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: var(--bg-card);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.donut-legend-item .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.donut-legend-item .legend-count {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   STATUS BAR COLORS (blocked + review)
   ========================================== */

.status-bar-fill.blocked {
    background: var(--status-blocked);
}

.status-bar-fill.review {
    background: var(--status-review);
}

/* ==========================================
   SYSTEM LOGS STYLES
   ========================================== */

.logs-filter-bar {
    margin-bottom: 16px;
}

.log-type-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
    flex-shrink: 0;
}

.log-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

/* Override the ::before dot when a log-type-badge is present */
.log-message:has(.log-type-badge)::before {
    display: none;
}

.logs-container {
    padding: 0;
}

.system-logs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.log-entry:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.log-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-message::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.log-time {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ==========================================
   FOCUS TASK CARD REDESIGN
   ========================================== */

.focus-task-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: rgba(30, 30, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md, 12px);
}

.focus-task-header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.focus-task-sparkle {
    color: #fb923c;
    font-size: 16px;
}

.focus-task-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: none;
}

.focus-task-title-text {
    font-size: 20px;
    font-weight: 700;
    color: #fb923c;
    margin: 4px 0 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.focus-task-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.focus-task-progress-wrap {
    width: 100%;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.focus-task-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.focus-task-progress-fill {
    height: 100%;
    background: #fb923c;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.focus-task-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.focus-task-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    width: 100%;
}

.focus-task-actions-row .btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-options {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: white;
}
.btn-options:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-pause {
    flex: 1.5;
    background: #f43f5e;
    color: white;
}
.btn-pause:hover {
    background: #e11d48;
}

/* ==========================================
   DAILY CHECKLIST REDESIGN
   ========================================== */

.daily-plan-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.hobby-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.hobby-add-row input {
    flex: 1;
    background: rgba(30, 30, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hobby-add-row input:focus {
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.22);
}

.daily-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(30,30,46,0.5);
    border-radius: var(--radius-md, 10px);
    transition: background 0.2s;
}

.daily-action-item:hover {
    background: rgba(40,40,56,0.6);
}

.daily-action-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.daily-action-delete {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.daily-action-delete:hover,
.daily-action-delete:focus-visible {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fb7185;
    transform: translateY(-1px);
}

.daily-action-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.daily-action-item.done .daily-action-check {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.daily-action-item.done .daily-action-check::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.daily-action-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 0;
    flex: 1;
}

.daily-action-done-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.78);
    min-width: 44px;
    text-align: right;
    flex: 0 0 auto;
}

.daily-action-item.done .daily-action-title {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.6;
}

.task-importance-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.task-importance-dot.low {
    background: var(--low);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.3);
}
.task-importance-dot.medium {
    background: var(--medium);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}
.task-importance-dot.high {
    background: var(--high);
    box-shadow: 0 0 6px rgba(251, 146, 60, 0.3);
}
.task-importance-dot.urgent {
    background: var(--urgent);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.3);
    animation: urgent-pulse 2s ease-in-out infinite;
}


/* ==========================================
   COMPLETION TREND CHART FIX
   ========================================== */

.completion-trend-chart {
    position: relative;
    height: 150px;
    width: 100%;
}

.completion-trend-chart canvas {
    display: block;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

@media (max-width: 1024px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-trio-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-extras-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   UI/UX POLISH FORMS / UTILS
   ========================================== */

.max-w-4xl {
    max-width: 56rem !important;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.settings-card {
    transition: transform 0.2s ease-in-out;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .dashboard-stats-grid,
    .dashboard-extras-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-trio-grid,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    /* Focus task card mobile */
    .focus-task-title-text {
        font-size: 17px;
    }

    .focus-task-actions-row .btn {
        min-height: 44px;
        font-size: 14px;
    }

    /* Daily checklist mobile */
    .daily-action-item {
        padding: 12px 14px;
    }

    .daily-action-title {
        font-size: 14px;
    }

    .daily-action-check {
        width: 22px;
        height: 22px;
    }

    .daily-action-delete {
        width: 36px;
        height: 36px;
    }

    .hobby-add-row input {
        min-height: 44px;
        font-size: 16px;
    }

    .hobby-add-row .btn {
        min-height: 44px;
    }

    /* Priority donut mobile */
    .priority-breakdown-donut {
        gap: 20px;
    }

    .donut-ring {
        width: 120px;
        height: 120px;
    }

    .donut-legend-item {
        font-size: 13px;
    }

    /* Completion trend chart */
    .completion-trend-chart {
        height: 120px;
    }

    /* Session cards */
    .session-card {
        padding: 12px 0;
    }

    .session-task-name {
        font-size: 14px;
    }
}