/* ── DayCalc ─────────────────────────────────────────────────────────────── */

.daycalc {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.daycalc__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    margin-bottom: 12px;
    transition: color 0.2s, border-color 0.2s;
}

.daycalc__back:hover {
    color: var(--neon-cyan);
    border-color: var(--line-bright);
}

.daycalc__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-lab);
    margin-bottom: 6px;
}

.daycalc__header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.daycalc__desc {
    font-size: 14px;
    color: var(--text-dim);
    margin: 0;
}

/* ── Input Section ───────────────────────────────────────────────────────── */

.daycalc__input-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.daycalc__date-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.daycalc__date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.daycalc__date-field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.daycalc__date-field input[type="date"] {
    padding: 10px 14px;
    font-size: 15px;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--text-bright);
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    color-scheme: dark;
}

.daycalc__date-field input[type="date"]:focus {
    border-color: var(--neon-cyan-dim);
    box-shadow: 0 0 0 3px var(--neon-cyan-muted);
}

.daycalc__date-fmt {
    font-size: 12px;
    color: var(--text-dim);
    padding-left: 2px;
}

.daycalc__arrow {
    font-size: 22px;
    font-weight: 300;
    color: var(--text-muted);
    text-align: center;
    user-select: none;
    padding-top: 20px;
}

.daycalc__arrow .fwd { color: var(--neon-cyan); }
.daycalc__arrow .bwd { color: var(--neon-purple); }

/* ── Presets ─────────────────────────────────────────────────────────────── */

.daycalc__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.daycalc__presets-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 4px;
}

.daycalc__preset-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.daycalc__preset-btn:hover {
    border-color: var(--neon-cyan-dim);
    color: var(--neon-cyan);
    background: var(--neon-cyan-muted);
}

.daycalc__preset-btn--clear {
    color: var(--text-muted);
    border-color: transparent;
}

.daycalc__preset-btn--clear:hover {
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */

.daycalc__tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
}

.daycalc__tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.18s, border-color 0.18s;
}

.daycalc__tab:hover {
    color: var(--text-bright);
}

.daycalc__tab.is-active {
    color: var(--accent-lab);
    border-bottom-color: var(--accent-lab);
}

/* ── Result Section ──────────────────────────────────────────────────────── */

.daycalc__result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.daycalc__big-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.daycalc__big-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.daycalc__big-card--primary {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.04);
}

.daycalc__big-num {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 4px;
}

.daycalc__big-card--primary .daycalc__big-num {
    color: var(--accent-lab);
    text-shadow: 0 0 24px rgba(251, 191, 36, 0.4);
}

.daycalc__big-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.daycalc__big-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Breakdown ───────────────────────────────────────────────────────────── */

.daycalc__breakdown {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}

.daycalc__breakdown h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.daycalc__breakdown-row {
    display: flex;
    gap: 32px;
    align-items: baseline;
    margin-bottom: 14px;
}

.daycalc__breakdown-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.daycalc__breakdown-num {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-bright);
}

.daycalc__breakdown-unit {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 500;
}

.daycalc__breakdown-summary {
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--line-subtle);
    padding-top: 12px;
    margin: 0;
}

/* ── Milestones ──────────────────────────────────────────────────────────── */

.daycalc__milestones {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.daycalc__milestones-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
}

.daycalc__milestones-desc strong {
    color: var(--text-bright);
}

.daycalc__milestone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.daycalc__milestone-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.18s;
}

.daycalc__milestone-row:hover {
    border-color: rgba(251, 191, 36, 0.3);
}

.daycalc__milestone-row.is-past {
    opacity: 0.45;
}

.daycalc__milestone-row.is-today {
    border-color: var(--accent-lab);
    background: rgba(251, 191, 36, 0.06);
    opacity: 1;
}

.daycalc__milestone-badge {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-lab);
}

.daycalc__milestone-row.is-past .daycalc__milestone-badge {
    color: var(--text-muted);
}

.daycalc__milestone-date {
    font-size: 14px;
    color: var(--text);
}

.daycalc__milestone-dday {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-align: right;
    white-space: nowrap;
}

.daycalc__milestone-row.is-today .daycalc__milestone-dday {
    color: var(--accent-lab);
}

/* ── Empty State ─────────────────────────────────────────────────────────── */

.daycalc__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.daycalc__empty-icon {
    font-size: 48px;
    margin-bottom: 4px;
}

.daycalc__empty p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .daycalc {
        padding: 20px 16px 48px;
        gap: 20px;
    }

    .daycalc__date-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .daycalc__arrow {
        display: none;
    }

    .daycalc__big-cards {
        grid-template-columns: 1fr;
    }

    .daycalc__milestone-row {
        grid-template-columns: 80px 1fr auto;
        gap: 10px;
    }

    .daycalc__breakdown-row {
        gap: 20px;
    }

    .daycalc__breakdown-num {
        font-size: 26px;
    }
}
