/* ============================================================================
   time-tracker.css — free standalone Time Tracker (no-account, local-first)
   Reuses Forest tokens + Hanken/Newsreader/Spline Sans Mono fonts from app.css.
   ============================================================================ */

.tt-page { max-width: 780px; margin: 0 auto; padding: 24px 20px 60px; }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.tt-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.tt-topbar__brand { display: flex; align-items: center; gap: 11px; }
.tt-topbar__tag {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid var(--hair);
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 4px;
}
.tt-topbar__actions { display: flex; align-items: center; gap: 10px; }
.tt-topbar__link { font-size: 14px; font-weight: 600; color: var(--muted); }
.tt-theme-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--hair);
    background: var(--surface); color: var(--ink2); font-size: 15px; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.tt-hero { text-align: center; margin-bottom: 22px; }
.tt-hero__title { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 5vw, 38px); letter-spacing: -0.4px; margin: 0 0 6px; }
.tt-hero__sub { font-size: 15px; color: var(--ink2); margin: 0; }

/* ── View / mode switches ─────────────────────────────────────────────────── */
.tt-switch { display: flex; justify-content: center; margin-bottom: 18px; }
.tt-switch__group { display: inline-flex; background: var(--soft); border: 1px solid var(--hair); border-radius: 12px; padding: 4px; gap: 2px; }
.tt-switch__btn { padding: 8px 18px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); background: transparent; border: none; cursor: pointer; }
.tt-switch__btn--active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); font-weight: 700; }

/* ── Category chips ───────────────────────────────────────────────────────── */
.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.tt-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--hair); background: var(--soft); color: var(--ink2);
    border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.tt-chip--active { border-color: transparent; color: var(--on-accent); }
.tt-chip__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.tt-chip-add { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--hair); border-radius: 999px; padding: 2px 4px 2px 12px; }
.tt-chip-add input { border: none; background: none; outline: none; width: 64px; font-size: 13px; color: var(--ink); }
.tt-chip-add button { width: 24px; height: 24px; border-radius: 999px; border: none; background: var(--accent-fill); color: var(--on-accent); font-size: 15px; line-height: 1; cursor: pointer; }

/* ── Timer card ───────────────────────────────────────────────────────────── */
.tt-timer-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 24px; padding: clamp(22px, 4vw, 38px); box-shadow: 0 18px 44px -26px rgba(0,0,0,.4); text-align: center; }
.tt-presets-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; margin-bottom: 16px; }
.tt-presets-row__group { display: flex; align-items: center; gap: 7px; }
.tt-presets-row__label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tt-preset-btn { border: 1.5px solid var(--hair); background: var(--soft); color: var(--ink2); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tt-preset-btn--active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

.tt-desc-input {
    width: 100%; max-width: 420px; border: 1.5px solid var(--hair); background: var(--soft);
    border-radius: 13px; padding: 11px 16px; font-size: 15px; outline: none; color: var(--ink);
    text-align: center; margin: 0 auto 18px; display: block;
}
.tt-clock-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 4px; }
.tt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted2); flex: 0 0 auto; }
.tt-dot--running { background: var(--accent); animation: ttPulse 1.4s ease-in-out infinite; }
@keyframes ttPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.82); } }
.tt-clock { font-family: var(--serif); font-variant-numeric: tabular-nums; font-size: clamp(54px, 13vw, 86px); letter-spacing: -1px; line-height: 1; }
.tt-status { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 18px; min-height: 18px; }
.tt-progress { max-width: 360px; margin: 0 auto 22px; height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.tt-progress__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s linear; }

.tt-controls { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.tt-btn-start { background: var(--accent-fill); color: var(--on-accent); border: none; border-radius: 13px; padding: 14px 34px; font-size: 16px; font-weight: 700; box-shadow: 0 10px 22px -10px rgba(21,98,63,.7); min-width: 130px; cursor: pointer; }
.tt-btn-stop { background: var(--surface); color: var(--ink); border: 1.5px solid var(--hair); border-radius: 13px; padding: 14px 22px; font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tt-btn-reset { background: none; color: var(--muted); border: none; border-radius: 13px; padding: 14px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Today card ───────────────────────────────────────────────────────────── */
.tt-today-card { margin-top: 16px; background: var(--surface); border: 1px solid var(--hair); border-radius: 20px; padding: 20px; }
.tt-today-card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.tt-today-card__title { font-size: 15px; font-weight: 700; }
.tt-today-card__total { font-family: var(--mono); font-size: 14px; color: var(--accent-ink); font-weight: 500; }
.tt-today-row { display: flex; align-items: center; gap: 12px; }
.tt-today-row__name { font-size: 14px; font-weight: 600; width: 92px; flex: 0 0 auto; }
.tt-today-row__track { flex: 1; height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.tt-today-row__fill { height: 100%; border-radius: 999px; }
.tt-today-row__dur { font-family: var(--mono); font-size: 13px; color: var(--muted); width: 64px; text-align: right; flex: 0 0 auto; }
.tt-empty { font-size: 14px; color: var(--muted); }

/* ── Toolbar buttons ──────────────────────────────────────────────────────── */
.tt-toolbar { display: flex; gap: 7px; flex-wrap: wrap; }
.tt-tool-btn { border: 1px solid var(--hair); background: var(--surface); color: var(--ink2); border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tt-tool-btn--add { border-color: var(--accent); color: var(--accent-ink); }
.tt-tool-btn--danger { color: #b04a35; border-color: var(--hair); }
.tt-tool-btn--disabled { border: 1px dashed var(--hair); color: var(--muted); border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; }

/* ── Sessions list ────────────────────────────────────────────────────────── */
.tt-sessions-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; }
.tt-day-group__head { display: flex; justify-content: space-between; align-items: center; padding: 11px 18px; background: var(--soft); border-bottom: 1px solid var(--hair); }
.tt-day-group__label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 500; }
.tt-day-group__total { font-family: var(--mono); font-size: 12px; color: var(--ink2); }
.tt-session-row { display: flex; align-items: center; gap: 13px; padding: 13px 18px; border-bottom: 1px solid var(--hair); }
.tt-session-row__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.tt-session-row__info { flex: 1; min-width: 0; cursor: pointer; }
.tt-session-row__desc { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.tt-session-row__meta { font-size: 12px; color: var(--muted); }
.tt-session-row__dur { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.tt-icon-btn { width: 28px; height: 28px; border-radius: 8px; border: none; background: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; }
.tt-empty-panel { padding: 40px 24px; text-align: center; color: var(--muted); }
.tt-empty-panel__title { font-size: 15px; font-weight: 600; color: var(--ink2); margin-bottom: 4px; }

/* ── Timesheet ────────────────────────────────────────────────────────────── */
.tt-week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tt-week-nav__btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink2); font-size: 17px; line-height: 1; cursor: pointer; }
.tt-week-nav__label { font-size: 16px; font-weight: 700; }
.tt-week-nav__rel { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tt-sheet-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; }
.tt-sheet-scroll { overflow-x: auto; }
.tt-sheet-grid { min-width: 620px; display: grid; grid-template-columns: 1.5fr repeat(7, 1fr) .95fr; }
.tt-sheet-grid--head { background: var(--soft); border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tt-sheet-grid--totals { background: var(--soft); }
.tt-sheet-cell-head { padding: 10px 6px; text-align: center; align-self: center; }
.tt-sheet-cell-head--today { color: var(--accent-ink); font-weight: 700; }
.tt-sheet-cell-cat { padding: 10px 16px; align-self: center; }
.tt-sheet-row { display: grid; grid-template-columns: 1.5fr repeat(7, 1fr) .95fr; border-bottom: 1px solid var(--hair); align-items: center; }
.tt-sheet-row__cat { padding: 13px 16px; display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.tt-sheet-row__cat-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.tt-sheet-cell { padding: 13px 4px; text-align: center; font-family: var(--mono); font-size: 13px; cursor: pointer; }
.tt-sheet-cell--empty { color: var(--muted); }
.tt-sheet-cell--filled { color: var(--ink); font-weight: 500; }
.tt-sheet-row__total { padding: 13px 16px; text-align: right; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.tt-sheet-grand { padding: 13px 16px; text-align: right; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.tt-sheet-footer { display: flex; gap: 7px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 12px; }
.tt-sheet-footer__hint { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.tt-footnote { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 26px; }

/* ── Modals (drawer content, wrapped in .drawer/.drawer-backdrop from app.css) ── */
.tt-dialog__inner { padding: 24px; color: var(--ink); }
.tt-dialog__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tt-dialog__title { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.tt-dialog__close { border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.tt-dialog__hint { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.tt-dialog__input {
    width: 100%; border: 1.5px solid var(--hair); background: var(--soft); border-radius: 12px;
    padding: 11px 14px; font-size: 15px; outline: none; color: var(--ink); margin-bottom: 14px;
}
.tt-dialog__duration { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.tt-dialog__duration-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.tt-dialog__num-field { display: flex; align-items: center; gap: 5px; }
.tt-dialog__num-input { width: 54px; text-align: center; border: 1.5px solid var(--hair); background: var(--soft); border-radius: 10px; padding: 9px; font-size: 15px; outline: none; color: var(--ink); }
.tt-dialog__date-input { border: 1.5px solid var(--hair); background: var(--soft); border-radius: 10px; padding: 9px 11px; font-size: 14px; outline: none; color: var(--ink); flex: 1; min-width: 130px; }
.tt-dialog__actions { display: flex; gap: 10px; }
.tt-dialog__save { flex: 1; background: var(--accent-fill); color: var(--on-accent); border: none; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tt-dialog__delete { background: var(--surface); border: 1.5px solid var(--hair); color: #b04a35; border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tt-dialog__keep { flex: 1; background: var(--surface); border: 1.5px solid var(--hair); color: var(--ink); border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tt-dialog__danger { flex: 1; background: #b04a35; color: #fff; border: none; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tt-cell-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }

/* ── Touch sizing ─────────────────────────────────────────────────────────── */
/* Matches the app shell's 900px breakpoint: these pill controls sit at 31-36px, under
   the ~44px tap-target guideline, on exactly the widths that are used by thumb. */
@media (max-width: 900px) {
    .tt-switch__btn { min-height: 40px; }
    .tt-chip        { min-height: 40px; }
    .tt-tool-btn    { min-height: 40px; }
    .tt-theme-btn   { min-width: 40px; min-height: 40px; }
    .tt-icon-btn    { width: 40px; height: 40px; }
    .tt-chip-add    { min-height: 40px; }
    .tt-chip-add button { width: 32px; height: 32px; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; }
    .tt-page { max-width: 100%; }
}
