/* ============================================================
   «Что сделано» — витрина проделанной работы для клиента.
   Самодостаточный модуль (классы .wd-*). Дизайн рассчитан на
   тёмную тему приложения (body.dark) со светлыми фолбэками.
   ============================================================ */

#page-whatsDone { padding-bottom: 60px; }
.wd-wrap { max-width: 1120px; margin: 0 auto; }

/* ---------- HERO ---------- */
.wd-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 30px 34px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 45%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 18px 50px -18px rgba(79, 70, 229, .65);
}
.wd-hero::after {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(900px 300px at 88% -40%, rgba(255,255,255,.28), transparent 60%),
        radial-gradient(600px 260px at 0% 130%, rgba(255,255,255,.12), transparent 60%);
    pointer-events: none;
}
.wd-hero-title {
    position: relative;
    font-size: 2rem; font-weight: 800; letter-spacing: .2px;
    display: flex; align-items: center; gap: 12px; margin: 0 0 6px;
}
.wd-hero-title .wd-spark { filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
.wd-hero-sub {
    position: relative;
    font-size: .98rem; line-height: 1.5; opacity: .92;
    max-width: 720px; margin-bottom: 20px;
}
.wd-stats { position: relative; display: flex; flex-wrap: wrap; gap: 14px; }
.wd-stat {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 12px 18px; min-width: 130px;
}
.wd-stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.wd-stat-lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; opacity: .85; margin-top: 6px; }

/* ---------- TOOLBAR ---------- */
.wd-toolbar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    margin-bottom: 22px;
}
.wd-search {
    flex: 1 1 280px; position: relative; min-width: 220px;
}
.wd-search input {
    width: 100%; box-sizing: border-box;
    padding: 11px 14px 11px 40px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff; color: #1e293b;
    font-size: .92rem; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.wd-search input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.wd-search .wd-search-ico {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 20px; pointer-events: none;
}
.wd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-chip {
    cursor: pointer; user-select: none;
    padding: 9px 15px; border-radius: 999px;
    border: 1px solid #cbd5e1; background: #fff; color: #475569;
    font-size: .84rem; font-weight: 600;
    transition: all .15s;
}
.wd-chip:hover { border-color: #818cf8; color: #4f46e5; }
.wd-chip.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px -6px rgba(79,70,229,.7);
}

/* ---------- DAY CARD ---------- */
.wd-day {
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px -20px rgba(15,23,42,.5);
    margin-bottom: 26px;
    overflow: hidden;
    animation: wdFadeUp .4s ease both;
}
.wd-day-head {
    display: flex; align-items: center; gap: 18px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(37,99,235,.04));
    border-bottom: 1px solid #eef2f7;
}
.wd-date-badge {
    flex: 0 0 auto;
    width: 72px; height: 72px; border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #fff; box-shadow: 0 10px 22px -10px rgba(37,99,235,.8);
}
.wd-date-day { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.wd-date-mon { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; opacity: .92; }
.wd-day-meta { flex: 1 1 auto; min-width: 0; }
.wd-day-weekday { font-size: 1.05rem; font-weight: 700; color: #1e293b; text-transform: capitalize; }
.wd-day-headline { font-size: .88rem; color: #64748b; line-height: 1.5; margin-top: 4px; }
.wd-day-total {
    flex: 0 0 auto; text-align: right;
}
.wd-day-total .wd-tt-val {
    font-size: 1.45rem; font-weight: 800; color: #4f46e5;
    font-variant-numeric: tabular-nums;
}
.wd-day-total .wd-tt-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .8px; color: #94a3b8; margin-top: 2px; }

.wd-day-body { padding: 12px 16px 18px; }

/* ---------- PROJECT GROUP (collapsible) ---------- */
.wd-project {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    margin: 10px 0;
    overflow: hidden;
    background: #fbfcfe;
    transition: box-shadow .18s, border-color .18s;
}
.wd-project:hover { box-shadow: 0 8px 22px -16px rgba(15,23,42,.45); }
.wd-project.open { border-color: #dbe3ef; }
.wd-proj-head {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; cursor: pointer; user-select: none;
}
.wd-proj-ico {
    flex: 0 0 auto;
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    background: var(--wd-accent-soft, rgba(99,102,241,.12));
    box-shadow: inset 0 0 0 1px var(--wd-accent-ring, rgba(99,102,241,.22));
}
.wd-proj-main { flex: 1 1 auto; min-width: 0; }
.wd-proj-name { font-size: 1rem; font-weight: 700; color: #1e293b; }
.wd-proj-sum { font-size: .82rem; color: #64748b; line-height: 1.45; margin-top: 3px; }
.wd-proj-right { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.wd-time-pill {
    font-variant-numeric: tabular-nums;
    font-weight: 700; font-size: .9rem;
    padding: 6px 12px; border-radius: 999px;
    background: var(--wd-accent-soft, rgba(99,102,241,.12));
    color: var(--wd-accent, #4f46e5);
    white-space: nowrap;
}
.wd-proj-cnt { font-size: .72rem; color: #94a3b8; white-space: nowrap; }
.wd-caret {
    color: #94a3b8; font-size: 22px;
    transition: transform .22s ease;
}
.wd-project.open .wd-caret { transform: rotate(180deg); }

.wd-proj-body {
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
}
.wd-project.open .wd-proj-body { max-height: 4000px; }
.wd-proj-inner { padding: 4px 12px 14px; }

/* ---------- SUBTASK ROW ---------- */
.wd-sub {
    display: flex; align-items: stretch; gap: 14px;
    padding: 12px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .14s, transform .14s;
    position: relative;
}
.wd-sub + .wd-sub { margin-top: 4px; }
.wd-sub:hover { background: var(--wd-accent-soft, rgba(99,102,241,.10)); transform: translateX(2px); }
.wd-sub-time {
    flex: 0 0 86px;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    border-right: 1px dashed #e2e8f0; padding-right: 12px;
}
.wd-sub-time .wd-st-val {
    font-variant-numeric: tabular-nums;
    font-weight: 800; font-size: 1.02rem; color: var(--wd-accent, #4f46e5);
}
.wd-sub-time .wd-st-lbl { font-size: .64rem; text-transform: uppercase; letter-spacing: .5px; color: #b6c0cf; margin-top: 2px; }
.wd-sub-main { flex: 1 1 auto; min-width: 0; }
.wd-sub-name { font-size: .94rem; font-weight: 600; color: #1e293b; }
.wd-sub-comment { font-size: .82rem; color: #64748b; line-height: 1.5; margin-top: 3px; }
.wd-sub-go {
    flex: 0 0 auto; align-self: center;
    color: #cbd5e1; font-size: 20px;
    transition: color .14s, transform .14s;
}
.wd-sub:hover .wd-sub-go { color: var(--wd-accent, #4f46e5); transform: translateX(3px); }

.wd-empty {
    text-align: center; color: #94a3b8; padding: 60px 20px; font-size: .95rem;
}
.wd-hl { background: #fde68a; color: #78350f; border-radius: 3px; padding: 0 2px; }

/* ---------- MODAL ---------- */
.wd-modal-ov {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: wdFade .18s ease both;
}
.wd-modal {
    width: min(680px, 96vw); max-height: 88vh; overflow: hidden;
    display: flex; flex-direction: column;
    border-radius: 18px; background: #fff;
    box-shadow: 0 30px 80px -20px rgba(2,6,23,.7);
    animation: wdPop .22s cubic-bezier(.16,.84,.44,1) both;
}
.wd-modal-head {
    padding: 22px 26px 18px;
    background: linear-gradient(135deg, var(--wd-accent, #4f46e5), #2563eb);
    color: #fff;
}
.wd-modal-eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; opacity: .85; display: flex; align-items: center; gap: 8px; padding-right: 44px; }
.wd-modal-title { font-size: 1.25rem; font-weight: 800; margin-top: 6px; line-height: 1.3; padding-right: 44px; }
.wd-modal-meta { display: flex; gap: 16px; margin-top: 12px; font-size: .82rem; }
.wd-modal-meta b { font-variant-numeric: tabular-nums; }
.wd-modal-body {
    padding: 22px 26px; overflow-y: auto; color: #334155; font-size: .95rem; line-height: 1.65;
}
.wd-modal-body p { margin: 0 0 12px; }
.wd-modal-body ul, .wd-modal-body ol { margin: 0 0 12px; padding-left: 22px; }
.wd-modal-body li { margin-bottom: 6px; }
.wd-modal-body strong { color: #1e293b; font-weight: 700; }
.wd-modal-body blockquote {
    margin: 0 0 14px; padding: 10px 16px;
    border-left: 4px solid var(--wd-accent, #4f46e5);
    background: rgba(99,102,241,.07); border-radius: 0 10px 10px 0;
    font-style: italic; color: #475569;
}
.wd-modal-foot { padding: 14px 26px 20px; border-top: 1px solid #eef2f7; text-align: right; }
.wd-modal-close {
    border: none; cursor: pointer;
    padding: 10px 22px; border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff;
    font-weight: 600; font-size: .9rem;
}
.wd-modal-x {
    position: absolute; top: 16px; right: 18px; z-index: 5;
    cursor: pointer; color: rgba(255,255,255,.85); font-size: 22px;
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,255,255,.10);
    display: flex; align-items: center; justify-content: center;
    transition: background .14s;
}
.wd-modal-x:hover { background: rgba(255,255,255,.18); }
.wd-modal-head { position: relative; }

/* ---------- ANIMATIONS ---------- */
@keyframes wdFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wdPop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   DARK THEME
   ============================================================ */
body.dark .wd-search input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark .wd-search input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
body.dark .wd-search .wd-search-ico { color: #64748b; }
body.dark .wd-chip { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.dark .wd-chip:hover { border-color: #6366f1; color: #c7d2fe; }

body.dark .wd-day { background: #111c34; border-color: #1e293b; box-shadow: 0 14px 40px -24px rgba(0,0,0,.8); }
body.dark .wd-day-head { background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(37,99,235,.06)); border-bottom-color: #1e293b; }
body.dark .wd-day-weekday { color: #f1f5f9; }
body.dark .wd-day-headline { color: #94a3b8; }
body.dark .wd-day-total .wd-tt-val { color: #a5b4fc; }

body.dark .wd-project { background: #0f1a30; border-color: #1e293b; }
body.dark .wd-project.open { border-color: #2a3a55; }
body.dark .wd-project:hover { box-shadow: 0 10px 26px -18px rgba(0,0,0,.9); }
body.dark .wd-proj-name { color: #f1f5f9; }
body.dark .wd-proj-sum { color: #94a3b8; }
body.dark .wd-proj-cnt { color: #64748b; }

body.dark .wd-sub-time { border-right-color: #243045; }
body.dark .wd-sub-name { color: #e2e8f0; }
body.dark .wd-sub-comment { color: #94a3b8; }
body.dark .wd-sub-go { color: #475569; }

body.dark .wd-modal { background: #111c34; }
body.dark .wd-modal-body { color: #cbd5e1; }
body.dark .wd-modal-body strong { color: #f1f5f9; }
body.dark .wd-modal-body blockquote { background: rgba(99,102,241,.12); color: #cbd5e1; }
body.dark .wd-modal-foot { border-top-color: #1e293b; }
body.dark .wd-hl { background: #b45309; color: #fff7ed; }

/* responsive */
@media (max-width: 640px) {
    .wd-hero { padding: 22px; }
    .wd-hero-title { font-size: 1.5rem; }
    .wd-day-head { flex-wrap: wrap; }
    .wd-day-total { width: 100%; text-align: left; }
    .wd-sub-time { flex-basis: 72px; }
    .wd-proj-sum { display: none; }
}
