:root {
  --font-scale: 1.125;
  --bg: #f4f3ee;
  --surface: #fffefa;
  --surface-2: #efeee8;
  --ink: #1e2823;
  --muted: #7a817c;
  --line: #dfdfd8;
  --green: #174f3f;
  --green-2: #246c55;
  --lime: #d8efb0;
  --orange: #e68053;
  --shadow: 0 18px 50px rgba(36, 48, 42, .08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-text-size="small"] { --font-scale: 1; }
html[data-text-size="medium"] { --font-scale: 1.125; }
html[data-text-size="large"] { --font-scale: 1.25; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: calc(16px * var(--font-scale)) "DM Sans", sans-serif; }
.hidden { display: none !important; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 38px 22px 25px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: rgba(244,243,238,.92); backdrop-filter: blur(20px); z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; color: var(--ink); text-decoration: none; font: 700 calc(21px * var(--font-scale)) "Manrope", sans-serif; letter-spacing: -.8px; }
.brand-mark { width: 27px; height: 27px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.brand-mark span { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 7px 0 0 -2px var(--lime); }
.nav { display: grid; gap: 7px; margin-top: 58px; }
.nav-item { width: 100%; height: 45px; display: flex; align-items: center; gap: 13px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); text-decoration: none; font-weight: 600; cursor: pointer; transition: .2s ease; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.5); }
.nav-item.active { color: var(--green); background: #e5eadf; }
.sidebar-footer { margin-top: auto; }
.text-size-setting { margin-bottom: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-weight: 600; }
.text-size-options { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.text-size-options button { width: 29px; height: 29px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; line-height: 1; }
.text-size-options button:nth-child(1) { font-size: calc(10px * var(--font-scale)); }
.text-size-options button:nth-child(2) { font-size: calc(12px * var(--font-scale)); }
.text-size-options button:nth-child(3) { font-size: calc(14px * var(--font-scale)); }
.text-size-options button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.07); }
.theme-toggle { margin-bottom: 15px; }
.profile { border-top: 1px solid var(--line); padding: 22px 4px 0; display: flex; align-items: center; gap: 10px; }
.profile div:nth-child(2) { min-width: 0; }
.profile strong, .profile span { display: block; white-space: nowrap; }
.profile strong { font-size: calc(13px * var(--font-scale)); }
.profile span { color: var(--muted); font-size: calc(11px * var(--font-scale)); margin-top: 2px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #ddbea8; color: #693b27; font-weight: 700; }
.profile .small svg { width: 16px; height: 16px; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .95fr) minmax(430px, 1.05fr); background: var(--surface); }
.auth-visual { min-height: 100vh; padding: 45px 6vw; color: white; background: var(--green); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.auth-visual::before, .auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-visual::before { width: 620px; height: 620px; right: -270px; bottom: -260px; box-shadow: 0 0 0 65px rgba(255,255,255,.025), 0 0 0 130px rgba(255,255,255,.018); }
.auth-visual::after { width: 180px; height: 180px; left: -90px; top: 35%; }
.auth-brand { color: white; padding: 0; position: relative; z-index: 1; }
.auth-brand .brand-mark { background: var(--lime); }
.auth-brand .brand-mark span { background: var(--green); box-shadow: 7px 0 0 -2px var(--green); }
.auth-message { margin: auto 0; position: relative; z-index: 1; }
.auth-message .section-kicker { color: var(--lime); }
.auth-message h1 { margin-top: 17px; font-size: clamp(calc(42px * var(--font-scale)), 5vw, calc(68px * var(--font-scale))); line-height: 1.07; letter-spacing: -3px; }
.auth-message > p:last-child { max-width: 390px; margin: 23px 0 0; color: rgba(255,255,255,.67); font-size: calc(15px * var(--font-scale)); line-height: 1.7; }
.auth-orbit { position: absolute; right: 9%; bottom: 11%; width: 165px; height: 165px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; display: grid; place-items: center; text-align: center; z-index: 1; }
.auth-orbit::before { content: ""; position: absolute; top: 11px; right: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); }
.auth-orbit strong, .auth-orbit span { display: block; }
.auth-orbit strong { font: 700 calc(28px * var(--font-scale)) "Manrope"; }
.auth-orbit span { color: rgba(255,255,255,.55); font-size: calc(10px * var(--font-scale)); margin-top: 3px; }
.auth-form-wrap { display: grid; place-items: center; padding: 50px 7vw; }
.auth-form { width: min(390px, 100%); }
.auth-form h2 { font-size: calc(31px * var(--font-scale)); margin-top: 7px; }
.auth-subtitle { margin: 8px 0 30px; color: var(--muted); font-size: calc(13px * var(--font-scale)); }
.auth-form label { display: block; margin: 18px 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); font-weight: 700; }
.auth-form input { width: 100%; height: 49px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); outline: 0; }
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,79,63,.08); }
.auth-submit { width: 100%; height: 49px; margin-top: 8px; }
.auth-submit span { float: right; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: calc(12px * var(--font-scale)); }
.auth-switch button { border: 0; padding: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; }
.form-error { min-height: 18px; margin: -2px 0 5px; color: #b84d43; font-size: calc(11px * var(--font-scale)); }

main { min-width: 0; padding: 0 5vw 56px; }
.topbar { height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow, .section-kicker { margin: 0 0 5px; color: var(--muted); font-size: calc(11px * var(--font-scale)); font-weight: 700; letter-spacing: 1.35px; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: -.7px; }
h1 { font-size: clamp(calc(26px * var(--font-scale)), 3vw, calc(33px * var(--font-scale))); }
h2 { font-size: calc(19px * var(--font-scale)); }
.top-actions, .clock-actions, .modal-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: .2s; }
.icon-btn:hover { border-color: #aeb4af; transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.small { width: 28px; height: 28px; border: 0; margin-left: auto; background: transparent; color: var(--muted); }
.primary-btn, .ghost-btn { height: 43px; border: 0; border-radius: 12px; padding: 0 18px; font-weight: 700; cursor: pointer; }
.primary-btn { background: var(--green); color: white; box-shadow: 0 8px 20px rgba(23,79,63,.16); }
.primary-btn:hover { background: var(--green-2); }
.primary-btn span { margin-right: 5px; font-size: calc(18px * var(--font-scale)); }
.ghost-btn { border: 1px solid var(--line); background: transparent; }
.mobile-menu { display: none; }

.view { display: none; animation: appear .25s ease; }
.view.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
.clock-card { min-height: 285px; padding: 30px 34px; border-radius: 26px; background: var(--green); color: white; box-shadow: 0 24px 60px rgba(23, 79, 63, .16); display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: center; position: relative; overflow: hidden; }
.clock-card::before { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 105px rgba(255,255,255,.018); pointer-events: none; }
.clock-project, .timer-wrap, .clock-actions { position: relative; z-index: 1; }
.clock-project label { display: block; margin-bottom: 12px; font-size: calc(11px * var(--font-scale)); font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: rgba(255,255,255,.58); }
.project-picker { height: 45px; max-width: 210px; padding: 0 15px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.17); border-radius: 12px; color: white; background: rgba(255,255,255,.08); cursor: pointer; }
.project-picker svg { width: 16px; margin-left: auto; }
.project-dot { width: 9px; height: 9px; border-radius: 50%; background: #de8b63; }
#projectSelect { position: absolute; width: 210px; height: 45px; left: 0; top: 27px; opacity: 0; cursor: pointer; }
.timer-wrap { text-align: center; }
.timer-label { margin: 0 0 11px; color: #b8c9c1; font-size: calc(10px * var(--font-scale)); font-weight: 700; letter-spacing: 1.4px; }
.timer { font: 600 clamp(calc(42px * var(--font-scale)), 5vw, calc(64px * var(--font-scale))) "Manrope", sans-serif; letter-spacing: -3.5px; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-since { min-height: 17px; margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: calc(12px * var(--font-scale)); }
.clock-actions { justify-content: flex-end; }
.clock-btn { height: 49px; border-radius: 14px; padding: 0 19px; border: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; gap: 9px; font-weight: 700; cursor: pointer; transition: .2s; }
.clock-btn svg { width: 17px; }
.clock-btn.primary { background: var(--lime); color: #183c30; border-color: var(--lime); min-width: 130px; justify-content: center; }
.clock-btn.primary:hover { background: #e7f7c9; transform: translateY(-1px); }
.clock-btn.secondary { background: transparent; color: white; }
.clock-btn.secondary:disabled { opacity: .35; cursor: not-allowed; }
.play-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }
.clock-card.running .play-icon { width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 2px; }
.clock-card.breaking { background: #535b52; }

.summary-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.metric-card, .panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.metric-card { padding: 20px 22px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: calc(12px * var(--font-scale)); font-weight: 600; }
.metric-card strong { display: block; margin-top: 11px; font: 700 calc(25px * var(--font-scale)) "Manrope", sans-serif; letter-spacing: -1px; }
.metric-caption { color: #a0a49f; font-size: calc(10px * var(--font-scale)); }
.trend { font-size: calc(10px * var(--font-scale)); padding: 4px 7px; border-radius: 10px; }
.trend.positive { color: #3c6e45; background: #edf5e7; }
.goal-text, .mini-icon { color: #9b9f9b; font-size: calc(10px * var(--font-scale)); }
.progress { height: 4px; margin-top: 9px; border-radius: 4px; background: #e7e7e1; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .4s; }

.content-grid, .stats-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { padding: 25px 27px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.text-btn { border: 0; background: transparent; color: var(--green); font-size: calc(12px * var(--font-scale)); font-weight: 700; cursor: pointer; }
.text-btn span { margin-left: 5px; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 15px; align-items: center; padding: 15px 0; border-top: 1px solid #ecece7; }
.activity-row:first-child { border-top: 0; padding-top: 0; }
.activity-color { width: 9px; height: 9px; border-radius: 50%; }
.activity-info strong { font-size: calc(13px * var(--font-scale)); font-weight: 700; }
.activity-info span { display: block; margin-top: 3px; color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.activity-duration { text-align: right; }
.activity-duration strong { display: block; font-size: calc(13px * var(--font-scale)); }
.activity-duration span { color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.entry-manage { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.entry-manage:hover { background: var(--surface-2); color: var(--ink); }
.empty-state { padding: 30px 0; text-align: center; color: var(--muted); font-size: calc(13px * var(--font-scale)); }
.range-pill { padding: 5px 9px; background: var(--surface-2); border-radius: 9px; color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.chart-wrap { height: 165px; display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; color: #a0a49f; font-size: calc(9px * var(--font-scale)); text-align: right; padding-bottom: 22px; }
.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 9px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 34px, #eeeee9 35px); }
.bar-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.bar { width: min(23px, 70%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: #cad6cf; transition: height .45s ease; }
.bar.today { background: var(--green); }
.bar-col label { height: 14px; color: var(--muted); font-size: calc(9px * var(--font-scale)); }
.chart-footer { display: flex; justify-content: space-between; margin-top: 20px; font-size: calc(10px * var(--font-scale)); color: var(--muted); }
.chart-footer i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.chart-footer strong { color: var(--ink); font-size: calc(10px * var(--font-scale)); }

.page-heading { margin: 22px 0 27px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-heading h2 { font-size: calc(29px * var(--font-scale)); }
.page-heading p:last-child { color: var(--muted); margin: 7px 0 0; font-size: calc(13px * var(--font-scale)); }
.segmented { padding: 4px; display: flex; border-radius: 12px; background: #e9e8e2; }
.segmented button { min-width: 69px; padding: 8px 13px; border: 0; background: transparent; border-radius: 9px; color: var(--muted); cursor: pointer; font-size: calc(12px * var(--font-scale)); font-weight: 600; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.06); }
.stats-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-tile { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.stat-tile span { color: var(--muted); font-size: calc(11px * var(--font-scale)); }
.stat-tile strong { display: block; margin-top: 8px; font: 700 calc(23px * var(--font-scale)) "Manrope"; }
.stats-grid { grid-template-columns: 1.4fr .6fr; }
.wide-chart-panel { min-height: 355px; }
.stats-chart { height: 240px; display: flex; align-items: end; gap: 12px; padding: 20px 4px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, #efefe9 60px); }
.stats-chart .stat-bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 9px; }
.stats-chart .stat-bar { width: min(36px, 70%); min-height: 2px; border-radius: 7px 7px 2px 2px; background: var(--green); }
.stats-chart label { height: 14px; color: var(--muted); font-size: calc(9px * var(--font-scale)); }
.breakdown-row { margin: 20px 0; }
.breakdown-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: calc(12px * var(--font-scale)); }
.breakdown-meta i { width: 8px; height: 8px; border-radius: 50%; }
.breakdown-meta span:nth-child(2) { flex: 1; }
.breakdown-meta strong { font-size: calc(11px * var(--font-scale)); }
.breakdown-bar { height: 5px; background: #ecece6; border-radius: 5px; overflow: hidden; }
.breakdown-bar span { display: block; height: 100%; border-radius: inherit; }

.entries-panel { margin-top: 18px; }
.entries-panel .panel-heading { margin-bottom: 8px; }
.entries-list { display: grid; }
.entry-row { min-width: 0; display: grid; grid-template-columns: 110px minmax(150px, .7fr) minmax(180px, 1.3fr) 90px 34px; gap: 16px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.entry-row:first-child { border-top: 0; }
.entry-date, .entry-note span { color: var(--muted); font-size: calc(11px * var(--font-scale)); }
.entry-project, .entry-duration-value { font-weight: 700; }
.entry-note { min-width: 0; }
.entry-note strong, .entry-note span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-note strong { font-size: calc(12px * var(--font-scale)); }
.entry-note span { margin-top: 3px; }
.entry-duration-value { text-align: right; font-size: calc(12px * var(--font-scale)); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-filter { width: max-content; margin: -10px 0 18px; padding: 4px; border-radius: 11px; background: #e8e7e1; }
.project-filter button { padding: 7px 15px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: calc(11px * var(--font-scale)); font-weight: 700; cursor: pointer; }
.project-filter button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.06); }
.project-card { min-height: 195px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; position: relative; transition: .2s ease; }
.project-card:hover { border-color: #c3c6c0; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(36,48,42,.06); }
.project-card .project-color { width: 11px; height: 11px; border-radius: 50%; margin-bottom: 28px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--dot) 16%, transparent); }
.project-card h3 { margin: 0; font: 700 calc(16px * var(--font-scale)) "Manrope"; }
.project-card p { margin: 5px 0 22px; color: var(--muted); font-size: calc(11px * var(--font-scale)); }
.project-card footer { display: flex; justify-content: space-between; align-items: flex-end; }
.project-card footer strong { font: 700 calc(21px * var(--font-scale)) "Manrope"; }
.project-card footer span { color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.project-manage { position: absolute; top: 17px; right: 17px; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: calc(17px * var(--font-scale)); }
.project-manage:hover { background: var(--surface-2); color: var(--ink); }
.archived-badge { display: inline-block; margin-top: 7px; padding: 3px 7px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: calc(9px * var(--font-scale)); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }

dialog { width: min(480px, calc(100% - 32px)); border: 0; border-radius: 24px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(18,29,24,.42); backdrop-filter: blur(4px); }
dialog form { padding: 28px; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.modal-heading .icon-btn { border: 0; background: var(--surface-2); font-size: calc(22px * var(--font-scale)); }
dialog label { display: block; margin: 16px 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); font-weight: 600; }
dialog input, dialog select { width: 100%; height: 45px; margin-top: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); outline: none; }
dialog input:focus, dialog select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,79,63,.08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { justify-content: flex-end; margin-top: 25px; }
.color-options { display: flex; gap: 12px; margin-top: 10px; }
.color-option { width: 27px; height: 27px; border: 3px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-option.selected { box-shadow: 0 0 0 2px var(--ink); }
.project-danger { display: flex; gap: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.entry-danger { display: flex; padding-top: 15px; border-top: 1px solid var(--line); }
.danger-text { padding: 0; border: 0; background: transparent; color: #a84b43; font-size: calc(11px * var(--font-scale)); font-weight: 700; cursor: pointer; }
.danger-text:first-child { color: var(--muted); }
.entry-danger .danger-text { color: #a84b43; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 30; padding: 11px 17px; border-radius: 11px; background: #1e2823; color: white; opacity: 0; pointer-events: none; transition: .25s; font-size: calc(12px * var(--font-scale)); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.dark { --bg: #171b19; --surface: #202623; --surface-2: #2a302d; --ink: #eff2ec; --muted: #9da6a0; --line: #343b37; --green: #286d56; --green-2: #347e65; --lime: #d5edae; }
body.dark .sidebar { background: rgba(23,27,25,.92); }
body.dark .nav-item.active { background: #263c33; }
body.dark .bar-chart, body.dark .stats-chart { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 34px, #303632 35px); }
body.dark .trend.positive { background: #26382c; }
body.dark .project-filter { background: #282e2b; }
body.dark .text-size-options { background: #282e2b; }

@media (max-width: 1050px) {
  .clock-card { grid-template-columns: 1fr 1fr; row-gap: 30px; }
  .timer-wrap { grid-column: 1 / -1; grid-row: 1; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid, .stats-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; padding: 30px; }
  .auth-message { margin: auto 0 0; }
  .auth-message h1 { font-size: calc(38px * var(--font-scale)); }
  .auth-message > p:last-child, .auth-orbit { display: none; }
  .auth-form-wrap { padding: 42px 25px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -250px; width: 236px; transition: left .25s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  main { padding: 0 18px 40px; }
  .topbar { height: 105px; }
  .mobile-menu { display: grid; }
  .topbar > div:nth-child(2) { flex: 1; }
  .eyebrow { display: none; }
  .top-actions .icon-btn { display: none; }
  .clock-card { padding: 28px 22px; display: flex; flex-direction: column; }
  .clock-project { align-self: flex-start; }
  .timer-wrap { order: -1; }
  .clock-actions { width: 100%; }
  .clock-btn { flex: 1; justify-content: center; }
  .summary-grid, .stats-summary { grid-template-columns: 1fr 1fr; }
  .summary-grid .metric-card:last-child { grid-column: 1 / -1; }
  .project-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .entry-row { grid-template-columns: 85px 1fr auto 34px; gap: 10px; }
  .entry-note { grid-column: 2 / 4; grid-row: 2; }
  .entry-duration-value { text-align: left; }
}

@media (max-width: 480px) {
  .top-actions .compact { padding: 0 12px; }
  .summary-grid, .stats-summary { grid-template-columns: 1fr; }
  .summary-grid .metric-card:last-child { grid-column: auto; }
  .panel { padding: 22px 19px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .activity-row { grid-template-columns: 10px 1fr auto; gap: 10px; }
  .activity-row .entry-manage { grid-column: 2 / -1; justify-self: end; }
  .entry-row { grid-template-columns: 1fr auto; }
  .entry-date, .entry-project, .entry-note { grid-column: 1; }
  .entry-note { grid-row: auto; }
  .entry-duration-value { grid-column: 2; grid-row: 1; }
  .entry-row .entry-manage { grid-column: 2; grid-row: 2 / span 2; }
}
