:root{--font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--background:#ffffff;--surface:#f9fafb;--border:#e5e7eb;--foreground:#111827;--muted:#6b7280;--accent:#4f46e5;--accent-contrast:#ffffff;--accent-soft:rgba(79,70,229,0.08);--accent-ring:rgba(79,70,229,0.18);--danger:#dc2626;--danger-contrast:#ffffff;--btn-primary-bg:#111827;--btn-primary-fg:#ffffff;--btn-primary-hover-bg:#262f3d;--control-height:36px;--radius:6px;--radius-lg:8px}@media (prefers-color-scheme:dark){:root{--background:#101010;--surface:#171717;--border:#2e2e2e;--foreground:#f3f4f6;--muted:#9ca3af;--accent-soft:rgba(129,140,248,0.16);--accent-ring:rgba(129,140,248,0.35);--btn-primary-bg:#f3f4f6;--btn-primary-fg:#111827;--btn-primary-hover-bg:#d1d5db}}*{box-sizing:border-box}body,html{height:100%}body{margin:0;color:var(--foreground);background:var(--background);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:hidden}a{color:inherit}h1{font-size:1.375rem;letter-spacing:-.01em;margin:0 0 1rem}h1,h2{font-weight:600}h2{font-size:1rem;margin:0 0 .75rem}.app-shell{display:flex;min-height:100vh}.app-content{display:flex;flex-direction:column;flex:1 1;min-width:0}.nav{width:220px;flex-shrink:0;display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem 1rem;border-right:1px solid var(--border);background:var(--surface)}.nav-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.nav-brand{font-weight:600;font-size:.95rem;letter-spacing:-.01em;color:var(--foreground);padding:0 .5rem}.nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:none;border-radius:var(--radius);color:var(--muted);font-size:1rem;line-height:1;cursor:pointer;flex-shrink:0}.nav-toggle:hover{background:var(--border);color:var(--foreground)}.nav-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.nav-expand-btn{position:fixed;top:1rem;left:1rem;z-index:40;width:32px;height:32px;border:1px solid var(--border);box-shadow:0 1px 4px rgba(0,0,0,.08)}.nav-expand-btn,.topbar{display:none;background:var(--surface)}.topbar{align-items:center;gap:.75rem;height:48px;flex-shrink:0;padding:0 1rem;border-bottom:1px solid var(--border);position:-webkit-sticky;position:sticky;top:0;z-index:45}.topbar-wordmark{font-weight:600;font-size:.95rem;letter-spacing:-.01em}.nav-scrim{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:55}@media (min-width:900px){.app-shell.nav-collapsed .nav{display:none}.app-shell.nav-collapsed .nav-expand-btn{display:inline-flex}}@media (max-width:899px){.nav{position:fixed;top:0;left:0;height:100vh;z-index:60;transform:translateX(-100%);transition:transform .2s ease;box-shadow:2px 0 16px rgba(0,0,0,.15)}.nav.nav-open{transform:translateX(0)}.nav-collapse-btn,.nav-expand-btn{display:none}.topbar{display:flex}}.nav-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.15rem}.nav-link{display:block;padding:.45rem .65rem;border-radius:var(--radius);text-decoration:none;color:var(--muted);font-size:.9rem;font-weight:500;transition:background-color .12s ease,color .12s ease}.nav-link:hover{background:var(--border);color:var(--foreground)}.nav-link.active{background:var(--accent-soft);color:var(--foreground)}.nav-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.nav-user{margin-top:auto;display:flex;flex-direction:column;gap:.5rem;font-size:.85rem;padding:0 .5rem}.nav-user-label{color:var(--muted);font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;font-weight:600}.nav-user .btn-link{align-self:flex-start}.app-main{flex:1 1;min-width:0;width:100%;padding:2rem;max-width:1100px}@media (max-width:639px){.app-main{padding:1rem}}.page{gap:1.5rem}.page,.section{display:flex;flex-direction:column;min-width:0}.section{gap:.85rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.25rem}button,input,select,textarea{font-family:inherit;font-size:.9rem}label{display:flex;flex-direction:column;gap:.3rem;font-size:13px;font-weight:500;color:var(--muted)}.checkbox-label,.inline-label{flex-direction:row;align-items:center;gap:.5rem;color:var(--foreground)}.checkbox-label{font-size:.85rem;font-weight:400}input[type=date],input[type=datetime-local],input[type=email],input[type=number],input[type=password],input[type=text],select{height:var(--control-height);padding:0 .65rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--background);color:var(--foreground);outline:none;transition:border-color .12s ease,box-shadow .12s ease}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=text]:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}input[type=color]{width:2.5rem;height:var(--control-height);padding:.2rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--background)}input[type=checkbox]{width:1rem;height:1rem;accent-color:var(--accent)}input[type=checkbox]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.form{display:flex;flex-direction:column;gap:.85rem;max-width:360px}.form-row{flex-direction:row;align-items:flex-end;flex-wrap:wrap;max-width:none}.form-row label{min-width:140px}.btn,.btn-danger,.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;height:var(--control-height);padding:0 1rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--background);color:var(--foreground);font-size:.875rem;font-weight:500;line-height:1;cursor:pointer;text-decoration:none;transition:background-color .12s ease,filter .12s ease,opacity .12s ease}.btn:hover{background:var(--surface)}.btn-danger:disabled,.btn-primary:disabled,.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--btn-primary-bg);border-color:var(--btn-primary-bg);color:var(--btn-primary-fg)}.btn-primary:hover{background:var(--btn-primary-hover-bg);border-color:var(--btn-primary-hover-bg)}.btn-danger{background:var(--danger);border-color:var(--danger);color:var(--danger-contrast)}.btn-danger:hover{filter:brightness(.92)}.btn-danger:focus-visible,.btn-primary:focus-visible,.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:none;border-radius:var(--radius);color:var(--muted);font-size:1.15rem;line-height:1;cursor:pointer}.btn-icon:hover{background:var(--border);color:var(--foreground)}.btn-icon:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn-link{border:none;background:none;color:var(--accent);cursor:pointer;padding:0;font-size:.85rem;font-weight:500;text-decoration:none}.btn-link:hover{text-decoration:underline}.btn-link:disabled{opacity:.5;cursor:not-allowed}.btn-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn-link-danger{color:var(--danger)}.toolbar{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.week-label{font-weight:600;margin-left:.25rem}.timer-bar{border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.5rem;background:var(--surface)}.timer-idle{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.timer-note-input{flex:1 1;min-width:200px}.timer-running{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap}.timer-elapsed{font-feature-settings:"tnum";font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:2.25rem;font-weight:600;letter-spacing:-.02em;min-width:8ch;border-left:3px solid var(--accent);padding-left:.85rem}.timer-info{display:flex;flex-direction:column;gap:.2rem;flex:1 1}.timer-project{display:flex;align-items:center;gap:.5rem;font-weight:600}.timer-note{color:var(--muted);font-size:.875rem}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.875rem}.entry-table,.timesheet-table{min-width:100%}td,th{text-align:left;padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em}tfoot td,th{font-weight:600}tfoot td{border-top:2px solid var(--border);border-bottom:none}.strong{font-weight:600}.num{text-align:right}.row-actions{display:flex;gap:.75rem;white-space:nowrap}.project-cell{display:inline-flex;align-items:center;gap:.5rem}.color-dot{width:.65rem;height:.65rem;border-radius:50%;flex-shrink:0}.badge,.color-dot{display:inline-block}.badge{padding:.15rem .55rem;border-radius:999px;background:var(--border);color:var(--muted);font-size:.75rem;font-weight:500}.dialog-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:50;padding:1rem}.dialog{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.5rem;width:100%;max-width:420px;max-height:90vh;overflow-y:auto}@media (max-width:639px){.dialog{width:calc(100vw - 2rem);max-width:calc(100vw - 2rem)}}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.dialog-header h3{margin:0;font-size:1rem;font-weight:600}.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}.muted{color:var(--muted)}.small{font-size:.75rem}.table-count{margin-left:.5rem;font-size:13px;font-weight:400;color:var(--muted)}.error-text{color:var(--danger);font-size:.875rem}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}th.sortable{padding:0}th.sortable button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;width:100%;padding:10px 12px;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer}th.sortable button:focus-visible,th.sortable button:hover{color:var(--accent)}th.sortable button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}th.num.sortable button{justify-content:flex-end}.sort-indicator{display:inline-block;flex:none;width:.75em;text-align:center;font-size:.7rem}.auth-shell{min-height:100vh;align-items:center;justify-content:center}.auth-card,.auth-shell{display:flex;padding:2rem}.auth-card{width:100%;max-width:360px;flex-direction:column;gap:1rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface)}.auth-card h1{margin:0}.auth-card .form{max-width:none}.combobox{position:relative;flex:1 1;min-width:200px}.combobox-input{width:100%}.combobox-menu{position:absolute;z-index:20;top:calc(100% + 4px);left:0;right:0;margin:0;padding:.25rem;list-style:none;max-height:220px;overflow-y:auto;background:var(--background);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 8px 24px rgba(0,0,0,.12)}.combobox-option{padding:.5rem .6rem;border-radius:var(--radius);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.85rem;cursor:pointer}.combobox-option.active{background:var(--accent-soft)}.month-calendar{display:flex;flex-direction:column;gap:.85rem}.month-grid-scroll{overflow-x:auto}.month-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-gap:6px;gap:6px}@media (max-width:479px){.month-grid{min-width:480px}}.month-weekday{padding:0 .15rem .25rem;color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.month-cell{min-height:64px;padding:.4rem .5rem;display:flex;flex-direction:column;gap:.35rem;border:1px solid var(--border);border-radius:var(--radius);background:color-mix(in srgb,var(--accent) calc(var(--tint-alpha, 0) * 100%),var(--background))}.month-cell.out-of-month{opacity:.4}.month-cell.today{outline:2px solid var(--accent);outline-offset:-2px}.month-cell-date{font-size:.8rem;color:var(--muted)}.month-cell.today .month-cell-date{color:var(--foreground);font-weight:600}.month-cell-hours{margin-top:auto;font-size:.85rem;font-weight:600;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.heatmap{display:flex;flex-direction:column;gap:.75rem}.heatmap-scroll{overflow-x:auto;padding-bottom:.25rem}.heatmap-months{display:flex;gap:3px;margin-left:28px}.heatmap-month-label{width:14px;flex-shrink:0;font-size:11px;color:var(--muted);white-space:nowrap;overflow:visible}.heatmap-row-label-spacer{display:none}.heatmap-body{display:flex;gap:6px}.heatmap-row-labels{display:flex;flex-direction:column;gap:3px;width:28px;flex-shrink:0}.heatmap-row-label{height:11px;line-height:11px;font-size:10px;color:var(--muted)}.heatmap-col,.heatmap-grid{display:flex;gap:3px}.heatmap-col{flex-direction:column}.heatmap-cell{width:11px;height:11px;border-radius:2px;border:1px solid var(--border)}.heatmap-cell,.heatmap-cell[data-bucket="0"]{background:var(--surface)}.heatmap-cell[data-bucket="1"]{background:color-mix(in srgb,var(--accent) 25%,var(--surface));border-color:transparent}.heatmap-cell[data-bucket="2"]{background:color-mix(in srgb,var(--accent) 45%,var(--surface));border-color:transparent}.heatmap-cell[data-bucket="3"]{background:color-mix(in srgb,var(--accent) 68%,var(--surface));border-color:transparent}.heatmap-cell[data-bucket="4"]{background:color-mix(in srgb,var(--accent) 92%,var(--surface));border-color:transparent}.heatmap-legend{display:flex;align-items:center;gap:4px}.heatmap-legend-cell{cursor:default}.preset-group{display:flex;gap:.4rem;flex-wrap:wrap}.btn-preset.active{background:var(--accent-soft);border-color:var(--accent);color:var(--foreground)}.user-select{min-width:160px}.timesheet-toolbar{align-items:center}.week-total{margin-left:auto;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);white-space:nowrap}.week-total .strong{color:var(--foreground);font-size:.95rem;margin-left:.4rem;letter-spacing:normal;text-transform:none}.timesheet-chip{display:inline-flex;align-items:center;justify-content:center;min-width:68px;height:28px;padding:0 .5rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--background);color:var(--foreground);font-size:.8rem;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;cursor:pointer;transition:border-color .12s ease,background-color .12s ease}.timesheet-chip:hover{background:var(--surface);border-color:var(--accent)}.timesheet-chip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.timesheet-chip.empty{color:var(--muted);border-style:dashed}.timesheet-cell-input{width:76px;height:28px;padding:0 .4rem;text-align:right;border:1px solid var(--accent);border-radius:var(--radius);background:var(--background);color:var(--foreground);outline:none;box-shadow:0 0 0 3px var(--accent-ring)}.timesheet-cell-input.cell-input-error{border-color:var(--danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 25%,transparent)}.timesheet-add-row{align-items:center;gap:1rem}.stat-row{display:flex;gap:1rem;flex-wrap:wrap}.stat-card{flex:1 1;min-width:160px;padding:1rem 1.1rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--background)}@media (max-width:639px){.stat-row{flex-direction:column}.stat-card{min-width:0}}.stat-value{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.stat-label{margin-top:.2rem;font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600}