:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --success: #16a34a;
    --success-hover: #15803d;
    --success-soft: #dcfce7;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fee2e2;
    --warning-soft: #fef3c7;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #6366f1;
        --primary-hover: #818cf8;
        --primary-soft: rgba(99, 102, 241, .16);
        --success: #22c55e;
        --success-hover: #16a34a;
        --success-soft: rgba(34, 197, 94, .15);
        --danger: #ef4444;
        --danger-hover: #dc2626;
        --danger-soft: rgba(239, 68, 68, .15);
        --warning-soft: rgba(245, 158, 11, .15);
        --bg: #0b1020;
        --surface: #121a2e;
        --surface-2: #182139;
        --text: #e5e7eb;
        --muted: #94a3b8;
        --border: #25304b;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; font-weight: 400; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* Шапка */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-weight: 800; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-icon {
    display: inline-grid; place-items: center; width: 32px; height: 32px;
    border-radius: 9px; background: var(--primary-soft); font-size: 18px;
}
.nav { display: flex; align-items: center; gap: 14px; }
.nav-link { color: var(--muted); font-weight: 550; font-size: 14px; }
.nav-link:hover, .nav-link.is-current { color: var(--text); text-decoration: none; }
.nav-user { font-size: 14px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-form { display: inline; }

.footer { border-top: 1px solid var(--border); padding: 18px 0; color: var(--muted); font-size: 13px; text-align: center; }

/* Кнопки */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
    white-space: nowrap;
    color: var(--text);
    background: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 1px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-danger-ghost { color: var(--danger); background: transparent; border-color: var(--border); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-start { background: var(--success); color: #fff; box-shadow: 0 6px 18px rgba(22, 163, 74, .28); }
.btn-start:hover { background: var(--success-hover); }
.btn-stop { background: var(--danger); color: #fff; box-shadow: 0 6px 18px rgba(220, 38, 38, .28); }
.btn-stop:hover { background: var(--danger-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-xl { padding: 16px 24px; font-size: 18px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 6px 9px; font-size: 14px; line-height: 1; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, .4); border-left-color: #fff;
    border-radius: 50%; animation: spin .8s linear infinite;
}
.btn-ghost.is-loading::after { border-color: var(--border); border-left-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Формы */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit; font-size: 15px;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
textarea.form-input { resize: vertical; min-height: 80px; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-input[readonly] { background: var(--surface-2); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-rate { grid-template-columns: 1fr 110px; }
.input-error { border-color: var(--danger) !important; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-img { width: 150px; height: 50px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; flex: none; background: #f1f5f9; }
.captcha-refresh { height: 44px; width: 44px; font-size: 20px; flex: none; }
.captcha-input { flex: 1; min-width: 0; font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

.form-message { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.form-error { background: var(--danger-soft); color: var(--danger); }
.form-success { background: var(--success-soft); color: var(--success); }

/* Авторизация */
.auth-card {
    max-width: 440px; margin: 32px auto 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { margin-bottom: 6px; }
.auth-alt { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-alt a { font-weight: 600; }

/* Заголовок страницы */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; word-break: break-word; }
.page-title { min-width: 0; flex: 1; }
.back-link { font-size: 14px; color: var(--muted); display: inline-block; margin-bottom: 6px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }

/* Карточки */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
    margin-bottom: 20px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.two-col > .card { margin-bottom: 20px; }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.empty-state { text-align: center; padding: 56px 20px; }
.empty-state h1, .empty-state h2 { margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; max-width: 460px; margin-left: auto; margin-right: auto; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-inline { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
    vertical-align: middle;
}
.badge-live { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* Индикатор статуса */
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-pill.is-live { background: var(--success-soft); color: var(--success); border-color: transparent; }
.status-pill.is-live .dot { background: var(--success); animation: pulse 1.6s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Сводка над проектами */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.summary-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px; box-shadow: var(--shadow);
}
.summary-item span { display: block; font-size: 13px; color: var(--muted); }
.summary-item b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* Список проектов */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.projects-grid > .loading, .projects-grid > .empty-state { grid-column: 1 / -1; }
.project-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
    transition: border-color .2s, box-shadow .2s;
}
.project-card:hover { border-color: var(--primary); }
.project-card.is-active { border-color: var(--success); box-shadow: 0 0 0 3px var(--success-soft), var(--shadow); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pc-name { font-size: 17px; font-weight: 700; color: var(--text); word-break: break-word; }
.pc-rate { font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.pc-desc { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-timer { display: flex; align-items: baseline; gap: 10px; }
.pc-time { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.project-card:not(.is-active) .pc-time { color: var(--muted); }
.pc-session { font-size: 13px; color: var(--muted); }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.pc-stats span { display: block; font-size: 12px; color: var(--muted); }
.pc-stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.pc-foot .btn-start, .pc-foot .btn-stop { flex: 1; }

/* Таймер проекта */
.timer-card {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow); margin-bottom: 20px;
    transition: border-color .3s, box-shadow .3s;
}
.timer-card.is-active { border-color: var(--success); box-shadow: 0 0 0 4px var(--success-soft), var(--shadow); }
.timer-display {
    font-size: clamp(48px, 9vw, 80px); font-weight: 800; letter-spacing: -.03em;
    font-variant-numeric: tabular-nums; line-height: 1.05; margin: 12px 0 8px;
}
.timer-card:not(.is-active) .timer-display { color: var(--muted); }
.timer-sub { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.timer-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.timer-controls .form-input { margin-bottom: 12px; }
.current-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.watch-total { text-align: right; }
.watch-total-money { font-size: clamp(30px, 5vw, 44px); font-weight: 800; color: var(--success); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.watch-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Статистика */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 550; }
.stat-value { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat-money { font-size: 14px; color: var(--success); font-weight: 650; font-variant-numeric: tabular-nums; }
.stat-accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.stat-accent .stat-label, .stat-accent .stat-money { color: rgba(255, 255, 255, .85); }

/* График */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 22px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
    width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: var(--primary);
    min-height: 3px; transition: height .4s ease; position: relative; opacity: .85;
}
.chart-col:hover .chart-bar { opacity: 1; }
.chart-bar.is-empty { background: var(--border); opacity: 1; }
.chart-col.is-today .chart-bar:not(.is-empty) { background: var(--success); }
.chart-val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 650; white-space: nowrap; color: var(--muted); }
.chart-label { font-size: 11px; color: var(--muted); margin-top: 6px; text-align: center; line-height: 1.2; }
.chart-col.is-today .chart-label { color: var(--text); font-weight: 700; }
.chart-tip {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    background: var(--text); color: var(--surface); font-size: 12px; padding: 6px 9px; border-radius: 7px;
    white-space: nowrap; pointer-events: none; display: none; z-index: 2;
}
.chart-col:hover .chart-tip { display: block; }
.chart-col:nth-child(-n+3) .chart-tip { left: 0; transform: none; }
.chart-col:nth-last-child(-n+3) .chart-tip { left: auto; right: 0; transform: none; }

/* Ссылка для наблюдателей */
.share-row { display: flex; gap: 8px; margin: 14px 0 10px; }
.share-row .form-input { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-off { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-soft); font-size: 14px; }
#shareCard.is-disabled .share-row, #shareCard.is-disabled .share-actions { opacity: .45; pointer-events: none; }
.watchers-title { margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.watchers { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.watchers li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.watchers .w-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex: none; }
.watchers .is-online .w-dot { background: var(--success); animation: pulse 1.6s infinite; }
.watchers .w-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watchers .w-seen { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* Переключатель */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + .switch-track { background: var(--success); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--primary-soft); }

/* История */
.entries { width: 100%; border-collapse: collapse; font-size: 14px; }
.entries th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.entries td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.entries tr:last-child td { border-bottom: 0; }
.entries .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.entries .day-row td { background: var(--surface-2); font-weight: 650; font-size: 13px; padding: 7px 10px; }
.entries .day-row .day-total { float: right; color: var(--muted); font-weight: 600; }
.entries tr.is-active td { background: var(--success-soft); }
.entries .e-note { color: var(--muted); max-width: 320px; word-break: break-word; }
.entries .e-actions { text-align: right; white-space: nowrap; }
.entries .e-actions .btn { margin-left: 4px; }
.e-live { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 650; }
.e-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; }
.more-wrap { text-align: center; margin-top: 12px; }

/* Баннер наблюдателя */
.watch-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--primary-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
.name-form { display: flex; gap: 8px; flex-wrap: wrap; }
.name-form .form-input { width: 200px; padding: 7px 10px; font-size: 14px; }

/* Модальные окна */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; transition: opacity .15s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
    background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 480px;
    box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); overflow: auto;
    transform: translateY(8px) scale(.98); transition: transform .15s;
}
.modal-backdrop.show .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
.modal-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 16px 20px 4px; }
.modal-body p { margin-bottom: 12px; }
.modal-error { margin: 0 20px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 20px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* Уведомления */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast {
    background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 550;
    box-shadow: var(--shadow-lg); transform: translateY(10px); opacity: 0; transition: all .2s; max-width: 380px;
    border-left: 4px solid var(--primary);
}
.toast.show { transform: none; opacity: 1; }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

/* Главная */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 32px 0 48px; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 16px; }
.hero .accent { color: var(--primary); }
.lead { font-size: 18px; color: var(--muted); margin-bottom: 28px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.demo-card { background: var(--surface); border: 1px solid var(--success); border-radius: 18px; padding: 24px; box-shadow: 0 0 0 5px var(--success-soft), var(--shadow-lg); }
.demo-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.demo-name { font-weight: 700; margin-top: 16px; }
.demo-card .timer-display { font-size: 56px; }
.demo-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; gap: 12px; }
.demo-row span { color: var(--muted); }
.demo-row b { font-variant-numeric: tabular-nums; text-align: right; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step h3 { font-size: 17px; margin: 12px 0 6px; }
.step-num { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: flex; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.feature > span { font-size: 26px; }
.feature p { font-size: 14px; margin-top: 2px; }

/* Адаптив */
@media (max-width: 900px) {
    .hero, .timer-card, .two-col { grid-template-columns: 1fr; }
    .hero-demo { order: -1; }
    .stats-grid, .summary { grid-template-columns: repeat(2, 1fr); }
    .watch-total { text-align: left; }
}
@media (max-width: 640px) {
    h1 { font-size: 24px; }
    .main { padding-top: 20px; }
    .steps, .features { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 18px; margin-top: 8px; }
    .timer-card { padding: 20px; }
    .card { padding: 16px; }
    .nav-user { display: none; }
    .brand { font-size: 16px; }
    .stat-value { font-size: 19px; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-rate { grid-template-columns: 1fr 100px; }
    .watch-meta { align-items: flex-start; }
    .chart { gap: 3px; }
    .chart-val { display: none; }

    /* Таблица истории — карточками */
    .entries thead { display: none; }
    .entries, .entries tbody, .entries tr, .entries td { display: block; width: 100%; }
    .entries tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
    .entries tr.day-row { padding: 0; border: 0; }
    .entries td { border: 0; padding: 3px 4px; }
    .entries td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
    .entries .e-actions { text-align: left; padding-top: 6px; }
    .entries .e-actions .btn { margin: 0 6px 0 0; }
    .entries tr.is-active { border-radius: var(--radius-sm); background: var(--success-soft); }
    .entries tr.is-active td { background: transparent; }
}
