/* Home View Layout v3.4 — Polished */

/* Weekly Plan Section */
.plan-section {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 20px;
    backdrop-filter: var(--backdrop-blur);
}
.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.plan-header h3 { font-size: 1rem; margin: 0; }
.plan-header-right { display: flex; align-items: center; gap: 10px; }
.plan-progress-badge {
    background: rgba(59,130,246,0.15);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.plan-refresh-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}
.plan-refresh-btn:active { background: rgba(255,255,255,0.1); }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.plan-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}
.plan-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.plan-tasks { display: flex; flex-direction: column; gap: 10px; }
.plan-loading { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 12px; }

.plan-task {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(30,41,59,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    transition: all 0.3s;
}
.plan-task.done {
    opacity: 0.5;
    background: rgba(16,185,129,0.06);
    border-color: rgba(16,185,129,0.15);
}
.plan-task.done .plan-task-title { text-decoration: line-through; }

.plan-task-check {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    background: transparent;
    color: transparent;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.plan-task-check.checked {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.plan-task-content { flex: 1; min-width: 0; }
.plan-task-title { font-size: 0.88rem; font-weight: 600; color: var(--text-main); line-height: 1.4; }
.plan-task-tech { font-size: 0.78rem; color: var(--primary-light); margin-top: 3px; }
.plan-task-reason { font-size: 0.75rem; color: #94a3b8; margin-top: 4px; line-height: 1.4; }

/* Plan Complete State */
.plan-complete {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 16px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 14px;
    text-align: left;
}
.plan-complete strong { display: block; font-size: 0.95rem; color: #10b981; margin-bottom: 4px; }
.plan-complete p { font-size: 0.8rem; color: #94a3b8; margin: 0; }

/* Plan Empty State */
.plan-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 10px;
}
.home-header h1 { font-size: 1.5rem; color: var(--text-main); }
.home-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Focus Card */
.focus-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(16,185,129,0.08));
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 16px;
    margin-bottom: 20px;
}
.focus-icon { font-size: 1.8rem; flex-shrink: 0; }
.focus-content { flex: 1; min-width: 0; }
.focus-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-light);
    margin-bottom: 4px;
    font-weight: 600;
}
.focus-text { font-size: 0.95rem; color: var(--text-main); line-height: 1.4; word-wrap: break-word; }

/* Weekly Summary */
.week-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}
.ws-item {
    text-align: center;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 10px 4px;
}
.ws-val { display: block; font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.ws-lbl { display: block; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Weekly Goal */
.week-goal {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.wg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.wg-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}
.wg-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* Direction Section */
.direction-section { margin-bottom: 24px; }
.direction-section h3 { font-size: 1.05rem; margin-bottom: 12px; }
.direction-cards { display: flex; flex-direction: column; gap: 10px; }
.direction-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 14px;
}
.dc-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.dc-body { flex: 1; min-width: 0; }
.dc-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.dc-reason { font-size: 0.75rem; color: #64748b; margin-top: 4px; line-height: 1.4; font-style: italic; }

/* Stats & Actions */
.quick-actions { margin-bottom: 24px; }
.quick-actions h3 { font-size: 1.05rem; color: var(--text-main); margin-bottom: 12px; }
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    font-size: 0.88rem;
}

/* Post-save Feedback Toast */
.save-feedback-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(16,185,129,0.95);
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 90vw;
}
.save-feedback-toast.show { transform: translateX(-50%) translateY(0); }

/* Mobile responsiveness */
@media (max-width: 420px) {
    .plan-task { padding: 10px 12px; gap: 10px; }
    .plan-task-title { font-size: 0.84rem; }
    .plan-task-reason { font-size: 0.72rem; }
    .home-header h1 { font-size: 1.3rem; }
    .ws-val { font-size: 1.1rem; }
    .ws-lbl { font-size: 0.58rem; }
    .direction-card { padding: 12px 14px; }
    .dc-text { font-size: 0.82rem; }
    .focus-card { padding: 14px 16px; gap: 12px; }
    .focus-text { font-size: 0.9rem; }
}