:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --canvas: #f4f6f9;
  --surface: #ffffff;
  --navy: #0b1220;
  --navy-2: #111c31;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #ecfdf3;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fff1f2;
  --amber: #d97706;
  --amber-soft: #fff7ed;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 4px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 14px 30px rgba(15, 23, 42, 0.08);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--navy); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), select { cursor: pointer; }
button:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; background: var(--canvas); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 30px 18px 24px;
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.22), transparent 30%), linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  padding: 0 10px 28px;
  background: transparent;
  color: #fff;
  text-align: left;
}
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.08); }
.brand-mark svg { width: 23px; height: 23px; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: #a9b4c8; font-size: 13px; }

.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { border: 0; background: transparent; color: #aeb8c9; }
.side-nav .nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 13px; border-radius: 13px; font-size: 15px; font-weight: 600; text-align: left; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.side-nav .nav-item svg { width: 21px; height: 21px; flex: 0 0 auto; }
.side-nav .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav .nav-item:active { transform: scale(.98); }
.side-nav .nav-item.is-active { background: #fff; color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.08); color: #8f9cb1; font-size: 12px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.1); }

.app-main { min-height: 100vh; margin-left: 248px; }
.screen { display: none; width: min(1180px, 100%); min-height: 100vh; margin: 0 auto; padding: 54px clamp(30px, 5vw, 72px) 72px; }
.screen.is-active { display: block; animation: screen-in 220ms ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-header h1 { margin: 2px 0 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -.045em; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.title-accent { color: var(--blue); }
.header-link, .text-button { border: 0; padding: 8px 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 700; }
.header-link:hover, .text-button:hover { color: var(--blue-dark); }

.home-header { align-items: center; }
.live-clock { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font-variant-numeric: tabular-nums; }
.live-clock span { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.live-clock small { color: var(--muted); font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.8fr); gap: 20px; }
.clock-card { position: relative; min-height: 350px; overflow: hidden; padding: clamp(24px,3.5vw,38px); border-radius: var(--radius-lg); background: radial-gradient(circle at 90% 5%, rgba(59,130,246,.28), transparent 38%), linear-gradient(145deg,#101c33 0%,#0b1220 70%); color: #fff; box-shadow: var(--shadow-md); }
.clock-card::after { position: absolute; right: -82px; bottom: -112px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.015); content: ""; pointer-events: none; }
.clock-card-top, .clock-card-body, .primary-action { position: relative; z-index: 1; }
.clock-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 13px; }
.status-pill > span { width: 9px; height: 9px; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 4px rgba(100,116,139,.16); }
.status-pill b { font-weight: 600; }
.status-pill.is-active { color: #bbf7d0; }
.status-pill.is-active > span { background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.16); }
.clock-card-date { color: #94a3b8; font-size: 13px; }
.clock-card-body { padding: 55px 0 32px; }
.clock-kicker { margin: 0 0 4px; color: #94a3b8; font-size: 14px; }
.clock-total { margin: 0; font-size: clamp(44px,6vw,64px); font-weight: 800; letter-spacing: -.065em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.clock-total span { margin-left: 2px; color: #7f8ca2; font-size: .42em; font-weight: 700; letter-spacing: 0; }
.clock-since { margin: 10px 0 0; color: #94a3b8; font-size: 13px; }
.primary-action { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; padding: 0 22px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 800; box-shadow: 0 8px 18px rgba(37,99,235,.3); transition: background 160ms ease, transform 160ms ease; }
.primary-action:hover { background: #3472f4; }
.primary-action:active { transform: scale(.98); }
.primary-action.is-stop { background: var(--red); box-shadow: 0 8px 18px rgba(220,38,38,.24); }
.primary-action.is-stop:hover { background: #ef4444; }
.primary-action svg { width: 18px; height: 18px; }

.dashboard-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.quick-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; width: 100%; min-height: 150px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.quick-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.quick-card:active { transform: translateY(0); }
.quick-icon, .stat-icon { display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; border-radius: 14px; }
.quick-icon svg, .stat-icon svg { width: 23px; height: 23px; }
.quick-icon--blue, .stat-icon--blue { background: var(--blue-soft); color: var(--blue); }
.quick-icon--green, .stat-icon--green { background: var(--green-soft); color: var(--green); }
.stat-icon--amber { background: var(--amber-soft); color: var(--amber); }
.quick-copy { min-width: 0; }
.quick-copy small, .quick-copy strong { display: block; }
.quick-copy small { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.quick-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 18px; height: 18px; color: var(--muted-2); }

.section-block { margin-top: 44px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.025em; }
.recent-list { min-height: 92px; }
.recent-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
.recent-row + .recent-row { margin-top: 8px; }
.recent-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px var(--blue-soft); }
.recent-dot.cat-fahrt { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.recent-dot.type-marker { background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.recent-copy { min-width: 0; }
.recent-copy strong, .recent-copy small { display: block; }
.recent-copy strong { font-size: 14px; }
.recent-copy small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.work-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(290px,.8fr); gap: 24px; align-items: start; }
.work-primary { min-width: 0; }
.status-card { display: flex; min-height: 116px; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.status-copy { display: flex; align-items: center; gap: 14px; }
.status-indicator { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 6px #f2f4f7; }
.status-card.is-active .status-indicator { background: var(--blue); box-shadow: 0 0 0 6px var(--blue-soft); }
.status-card--green.is-active .status-indicator { background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); }
.status-label { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.status-value { margin: 0; font-size: 17px; font-weight: 750; }
.status-card.is-active:not(.status-card--green) .status-value { color: var(--blue-dark); }
.status-card--green.is-active .status-value { color: var(--green-dark); }
.status-time { text-align: right; }
.status-time span, .status-time small { display: block; }
.status-time span { font-size: 24px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.status-time small { color: var(--muted); font-size: 11px; }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-btn { display: flex; min-height: 124px; align-items: center; gap: 16px; border: 0; border-radius: var(--radius-md); padding: 22px; color: #fff; text-align: left; box-shadow: var(--shadow-sm); transition: filter 160ms ease, transform 160ms ease; }
.big-btn:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.big-btn:active:not(:disabled) { transform: scale(.985); }
.big-btn--blue { background: linear-gradient(135deg,var(--blue-dark),var(--blue)); }
.big-btn--green { background: linear-gradient(135deg,var(--green-dark),var(--green)); }
.big-btn--red { background: linear-gradient(135deg,var(--red-dark),var(--red)); }
.big-btn:disabled { border: 1px solid var(--line); background: #eaecf0; color: var(--muted-2); box-shadow: none; cursor: not-allowed; }
.button-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: rgba(255,255,255,.14); }
.big-btn:disabled .button-icon { background: rgba(255,255,255,.56); }
.button-icon svg { width: 22px; height: 22px; }
.big-btn strong, .big-btn small { display: block; }
.big-btn strong { font-size: 17px; }
.big-btn small { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 12px; }
.big-btn:disabled small { color: var(--muted-2); }
.marker-btn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 76px; margin-top: 16px; border: 1px solid #fed7aa; border-radius: var(--radius-md); padding: 14px 18px; background: var(--amber-soft); color: var(--ink); text-align: left; }
.marker-btn > svg:first-child { width: 22px; height: 22px; color: var(--amber); }
.marker-btn strong, .marker-btn small { display: block; }
.marker-btn strong { font-size: 14px; }
.marker-btn small { margin-top: 1px; color: #92400e; font-size: 12px; }

.today-summary, .history-panel, .editor-card, .note-readonly { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.today-summary { min-height: 214px; padding: 22px; }
.summary-label { margin: 0 0 16px; color: var(--ink); font-size: 15px; font-weight: 800; }
.summary-entry { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 2px 0 18px; }
.summary-entry { width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; }
.summary-entry:last-child { padding-bottom: 0; }
.summary-entry:not(:last-child)::after { position: absolute; top: 20px; bottom: 4px; left: 5px; width: 1px; background: var(--line); content: ""; }
.summary-entry .dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.summary-entry.out .dot { background: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.summary-entry.marker .dot { background: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.summary-entry .entry-time { margin: 0; font-size: 13px; font-weight: 700; }
.summary-entry .reason { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.summary-entry .entry-time, .summary-entry .reason { display: block; }

.notes-layout { display: grid; grid-template-columns: minmax(300px,.78fr) minmax(0,1.35fr); gap: 24px; align-items: start; }
.note-feature { display: flex; min-height: 270px; flex-direction: column; align-items: flex-start; border: 0; border-radius: var(--radius-lg); padding: 28px; background: radial-gradient(circle at 95% 0%, rgba(96,165,250,.25), transparent 34%), linear-gradient(145deg,#1d4ed8,#1e40af); color: #fff; text-align: left; box-shadow: var(--shadow-md); transition: transform 160ms ease; }
.note-feature:hover { transform: translateY(-2px); }
.note-feature-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 16px; background: rgba(255,255,255,.12); }
.note-feature-icon svg { width: 27px; height: 27px; }
.note-feature-copy { display: block; width: 100%; margin-top: 34px; }
.note-feature-copy small, .note-feature-copy strong, .note-feature-copy span { display: block; }
.note-feature-copy small { color: #bfdbfe; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.note-feature-copy strong { margin-top: 3px; font-size: 25px; letter-spacing: -.03em; }
.note-feature-copy span { overflow: hidden; margin-top: 5px; color: #dbeafe; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.note-feature-action { margin-top: auto; border-bottom: 1px solid rgba(255,255,255,.5); font-size: 13px; font-weight: 700; }
.history-panel { min-height: 270px; padding: 24px; }
.section-heading--tight { align-items: center; margin-bottom: 18px; }
.icon-button, .back-btn, .sheet-close { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); }
.icon-button svg, .back-btn svg, .sheet-close svg { width: 20px; height: 20px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: #fcfcfd; transition: background 140ms ease, border-color 140ms ease; cursor: pointer; }
.list-row:hover { border-color: var(--line-strong); background: #f9fafb; }
.row-date { font-size: 14px; font-weight: 700; }
.row-preview { display: block; overflow: hidden; max-width: 330px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.list-row .chev { width: 17px; height: 17px; color: var(--muted-2); }

.editor-header { justify-content: flex-start; align-items: center; }
.editor-header h1 { font-size: clamp(27px,3vw,38px); }
.editor-card { padding: 20px; }
.note-textarea { display: block; width: 100%; min-height: min(52vh,520px); resize: vertical; border: 0; padding: 8px; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.7; }
.note-textarea:focus-visible { outline: none; }
.note-textarea::placeholder { color: var(--muted-2); }
.editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 8px 4px; border-top: 1px solid var(--line); }
.editor-actions > span { color: var(--muted); font-size: 12px; }
.primary-button { min-height: 46px; border: 0; border-radius: 12px; padding: 0 20px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; transition: background 150ms ease, transform 150ms ease; }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:active { transform: scale(.98); }
.primary-button--full { width: 100%; }
.note-readonly { min-height: 280px; padding: 28px; white-space: pre-wrap; line-height: 1.75; }

.times-header { align-items: center; }
.filter-control { display: flex; align-items: center; gap: 10px; }
.filter-control > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-select { min-width: 178px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 36px 0 13px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; min-height: 94px; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { margin-top: 2px; font-size: 20px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0 18px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-blue { background: var(--blue); }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.timeline-list { gap: 10px; }
.day-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.day-card-head { display: flex; width: 100%; min-height: 70px; align-items: center; justify-content: space-between; gap: 20px; border: 0; padding: 14px 18px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.day-card-head::after { width: 18px; height: 18px; margin-left: 4px; background: no-repeat center/18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); content: ""; transition: transform 180ms ease; }
.day-card.is-open .day-card-head::after { transform: rotate(180deg); }
.day-title { flex: 1; min-width: 0; }
.day-title .row-date, .day-title small { display: block; }
.day-title small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.row-meta { color: var(--ink); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.day-card-detail { display: none; padding: 0 18px 16px; border-top: 1px solid var(--line); }
.day-card.is-open .day-card-detail { display: block; }
.entry-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 14px 0; }
.entry-row + .entry-row { border-top: 1px solid #f0f1f3; }
.entry-row > svg { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }
.entry-row.cat-fahrt > svg { color: var(--green); }
.entry-row.type-marker > svg { color: var(--amber); }
.entry-row .entry-time { margin: 0; font-size: 13px; font-weight: 750; }
.entry-row .entry-reason { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.entry-row .entry-time, .entry-row .entry-reason { display: block; }
.entry-category { align-self: center; border-radius: 999px; padding: 4px 8px; background: var(--blue-soft); color: var(--blue-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.entry-category.cat-fahrt { background: var(--green-soft); color: var(--green-dark); }
.entry-category.type-marker { background: var(--amber-soft); color: #92400e; }
.entry-side { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.entry-side > small { color: var(--muted-2); font-size: 9px; font-weight: 700; }

.empty-state { display: flex; min-height: 120px; align-items: center; justify-content: center; gap: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 20px; color: var(--muted); text-align: left; }
.empty-state.compact { min-height: 88px; }
.empty-state strong { display: block; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 2px 0 0; font-size: 12px; }
.empty-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #f2f4f7; color: var(--muted); }
.empty-icon svg { width: 20px; height: 20px; }

.mobile-nav { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(11,18,32,.62); opacity: 0; pointer-events: none; transition: opacity 200ms ease; backdrop-filter: blur(3px); }
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; right: 28px; bottom: 28px; z-index: 60; width: min(430px,calc(100vw - 56px)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; background: var(--surface); box-shadow: 0 24px 60px rgba(11,18,32,.3); opacity: 0; pointer-events: none; transform: translateY(18px) scale(.98); transition: opacity 190ms ease, transform 220ms ease; }
.sheet.is-open { opacity: 1; pointer-events: auto; transform: none; }
.sheet-handle { display: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sheet-title { margin: 3px 0 0; font-size: 23px; letter-spacing: -.03em; }
.field-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 750; }
.field-label span { color: var(--muted); font-size: 11px; font-weight: 600; }
.sheet-textarea { display: block; width: 100%; height: 110px; resize: none; border: 1px solid var(--line-strong); border-radius: 13px; padding: 12px 13px; background: #fcfcfd; color: var(--ink); font-size: 14px; line-height: 1.5; }
.sheet-textarea::placeholder { color: var(--muted-2); }
.sheet-error { display: none; margin: 7px 0 0; color: var(--red); font-size: 12px; }
.sheet-error.is-visible { display: block; }
.sheet .primary-button { margin-top: 16px; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 70; max-width: min(360px,calc(100vw - 40px)); border-radius: 12px; padding: 12px 16px; background: var(--navy); color: #fff; box-shadow: var(--shadow-md); font-size: 13px; font-weight: 650; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { background: var(--red-dark); }

[hidden] { display: none !important; }
#app[aria-hidden="true"] { display: none; }
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: radial-gradient(circle at 50% 20%, rgba(37,99,235,.25), transparent 32%), var(--navy);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
}
.loading-mark { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: rgba(255,255,255,.08); color: #fff; }
.loading-mark svg { width: 28px; height: 28px; }
.loading-screen .loading-mark { animation: loading-pulse 1.6s ease-in-out infinite; }
@keyframes loading-pulse { 50% { transform: scale(1.05); box-shadow: 0 0 0 9px rgba(37,99,235,.08); } }

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px 20px;
  background: radial-gradient(circle at 50% 0%, rgba(37,99,235,.25), transparent 35%), linear-gradient(145deg,#101c33,#0b1220 65%);
  color: #fff;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand strong, .auth-brand small { display: block; line-height: 1.15; }
.auth-brand strong { font-size: 20px; }
.auth-brand small { margin-top: 3px; color: #94a3b8; font-size: 13px; }
.auth-card { width: min(440px,100%); border: 1px solid rgba(255,255,255,.12); border-radius: 24px; padding: clamp(24px,4vw,38px); background: #fff; color: var(--ink); box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.auth-card h1 { margin: 5px 0 8px; font-size: 34px; letter-spacing: -.04em; }
.auth-intro { margin: 0 0 25px; color: var(--muted); font-size: 14px; }
.auth-footnote { max-width: 430px; margin: 18px 0 0; color: #7f8ca2; font-size: 12px; text-align: center; }
.setup-notice { margin-bottom: 18px; border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 14px; background: var(--amber-soft); color: #92400e; font-size: 13px; }
.auth-submit { margin-top: 5px; }

.form-field { display: block; margin-bottom: 15px; }
.form-field > span { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 750; }
.form-field > span small { color: var(--muted); font-size: 11px; font-weight: 600; }
.form-field > small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.form-field input:not([type="color"]), .form-field select, .form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
  background: #fcfcfd;
  color: var(--ink);
  font-size: 14px;
}
.form-field textarea { min-height: 92px; padding-top: 11px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--muted-2); }
.form-error { min-height: 18px; margin: -2px 0 8px; color: var(--red); font-size: 12px; }
.compact-field { margin-top: 14px; }

.account-button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 64px; margin-top: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; padding: 10px; background: rgba(255,255,255,.05); color: #fff; text-align: left; }
.account-button:hover { background: rgba(255,255,255,.09); }
.account-avatar, .mobile-account-button { display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#3b82f6,#1d4ed8); color: #fff; font-weight: 800; text-transform: uppercase; }
.account-avatar { width: 38px; height: 38px; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 13px; }
.account-copy small { margin-top: 2px; color: #8f9cb1; font-size: 10px; }
.account-button > svg { width: 16px; height: 16px; color: #718096; }
.home-tools { display: flex; align-items: center; gap: 14px; }
.mobile-account-button { display: none; width: 42px; height: 42px; border: 0; }

.reminder-banner, .migration-banner { display: flex; align-items: center; gap: 14px; margin: -10px 0 20px; border-radius: 15px; padding: 14px 16px; }
.reminder-banner { border: 1px solid #fed7aa; background: var(--amber-soft); color: #7c2d12; }
.migration-banner { justify-content: space-between; border: 1px solid #bfdbfe; background: var(--blue-soft); color: #1e3a8a; }
.reminder-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #ffedd5; color: var(--amber); }
.reminder-icon svg { width: 20px; height: 20px; }
.reminder-banner > div, .migration-banner > div { flex: 1; }
.reminder-banner strong, .migration-banner strong { display: block; font-size: 14px; }
.reminder-banner p, .migration-banner p { margin: 2px 0 0; font-size: 12px; }
.reminder-banner > button { border: 0; border-bottom: 1px solid currentColor; padding: 4px 0; background: transparent; color: inherit; font-size: 12px; font-weight: 800; }
.secondary-button, .notification-button, .danger-button { min-height: 42px; border-radius: 11px; padding: 0 14px; background: #fff; font-size: 13px; font-weight: 750; }
.secondary-button { border: 1px solid var(--line-strong); color: var(--ink); }
.secondary-button:hover { background: #f9fafb; }
.notification-button { width: 100%; margin-top: 10px; border: 1px solid #bfdbfe; color: var(--blue-dark); }
.danger-button { border: 1px solid #fecdd3; color: var(--red-dark); }
.danger-button:hover { background: var(--red-soft); }

.week-card { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 21px 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.week-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.week-card h2 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.025em; }
.week-card-head > strong { font-size: 16px; }
.week-card-head > strong.is-positive { color: var(--green-dark); }
.week-card-head > strong.is-negative { color: var(--muted); }
.week-progress { overflow: hidden; height: 8px; margin: 17px 0 10px; border-radius: 999px; background: #eaecf0; }
.week-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--blue-dark),#60a5fa); transition: width 300ms ease; }
.week-progress span.is-complete { background: linear-gradient(90deg,var(--green-dark),#4ade80); }
.week-meta { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.week-meta b { color: var(--ink); }

.times-actions { display: flex; align-items: center; gap: 12px; }
.view-switch { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #eaecf0; }
.view-switch button { min-height: 36px; border: 0; border-radius: 9px; padding: 0 18px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.view-switch button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.time-view { display: none; }
.time-view.is-active { display: flex; }
.calendar-view.is-active { display: block; }
.calendar-view { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.calendar-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
.calendar-weekdays { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day, .calendar-blank { min-height: 92px; border-radius: 12px; }
.calendar-day { display: flex; min-width: 0; align-items: flex-start; flex-direction: column; border: 1px solid var(--line); padding: 9px; background: #fcfcfd; color: var(--ink); text-align: left; }
.calendar-day:hover { border-color: var(--line-strong); background: #f9fafb; }
.calendar-day.is-today { border-color: #93c5fd; box-shadow: inset 0 0 0 1px #bfdbfe; }
.calendar-day.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.calendar-date { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 800; }
.calendar-day.is-today .calendar-date { background: var(--blue); color: #fff; }
.calendar-total { margin-top: auto; font-size: 11px; font-weight: 800; }
.calendar-dots { display: flex; gap: 4px; margin-top: 4px; }
.calendar-dots span { width: 6px; height: 6px; border-radius: 50%; }
.calendar-dots .work { background: var(--blue); }
.calendar-dots .fahrt { background: var(--green); }
.calendar-dots .marker { background: var(--amber); }
.calendar-detail { margin-top: 14px; }
.calendar-detail:empty { display: none; }
.calendar-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 10px 2px; }
.calendar-detail-head strong { font-size: 14px; }
.calendar-detail-head span { color: var(--muted); font-size: 11px; }

.entry-row { width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; }
.entry-row:hover { background: #fcfcfd; }
.project-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; border-radius: 999px; padding: 3px 7px; background: #f2f4f7; color: var(--muted); font-size: 10px; font-weight: 700; }
.project-tag::before { width: 6px; height: 6px; border-radius: 50%; background: var(--project-color,#98a2b3); content: ""; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.75fr); gap: 24px; align-items: start; }
.settings-stack { display: flex; flex-direction: column; gap: 18px; }
.settings-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-card h2 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.025em; }
.project-list { display: flex; flex-direction: column; gap: 9px; }
.project-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 66px; border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px; background: #fcfcfd; }
.project-color { width: 12px; height: 40px; border-radius: 999px; background: var(--project-color); }
.project-copy { min-width: 0; }
.project-copy strong, .project-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-copy strong { font-size: 14px; }
.project-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.project-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.project-actions button { min-height: 34px; border: 0; border-radius: 9px; padding: 0 9px; background: #f2f4f7; color: var(--muted); font-size: 11px; font-weight: 750; }
.project-actions button:hover { color: var(--ink); }
.archived-label { border-radius: 999px; padding: 3px 7px; background: #f2f4f7; color: var(--muted); font-size: 10px; font-weight: 700; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 14px; }
.toggle-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.toggle-row input { width: 42px; height: 24px; accent-color: var(--blue); }
.account-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.account-card h2 { margin-bottom: 4px; }
.account-card p:last-child { margin: 0; color: var(--muted); font-size: 12px; }

.sheet-project-field { margin-bottom: 0; }
.entry-sheet { width: min(540px,calc(100vw - 56px)); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.modal-actions .danger-button { margin-right: auto; }
.color-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.color-field > span { margin: 0; }
.color-field input[type="color"] { width: 54px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #fff; }

@media (max-width: 900px) {
  .sidebar { width: 210px; }
  .app-main { margin-left: 210px; }
  .dashboard-grid, .work-layout, .notes-layout { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .quick-card { min-height: 128px; padding: 18px; }
  .work-layout { gap: 18px; }
  .today-summary { min-height: 0; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { background: var(--canvas); }
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .screen { min-height: 100svh; padding: calc(28px + var(--safe-top)) 18px calc(100px + var(--safe-bottom)); }
  .page-header { align-items: center; margin-bottom: 24px; }
  .page-header h1 { font-size: 32px; }
  .page-header .header-link { display: none; }
  .home-header { align-items: flex-start; }
  .live-clock span { font-size: 22px; }
  .live-clock small { display: none; }
  .mobile-account-button { display: grid; }
  .reminder-banner, .migration-banner { margin-top: -4px; }
  .migration-banner { align-items: stretch; flex-direction: column; }
  .dashboard-grid { gap: 14px; }
  .clock-card { min-height: 320px; padding: 24px; border-radius: 22px; }
  .clock-card-body { padding: 45px 0 28px; }
  .clock-total { font-size: 48px; }
  .primary-action { width: 100%; }
  .dashboard-side { grid-template-columns: 1fr; gap: 10px; }
  .quick-card { min-height: 86px; padding: 16px; }
  .section-block { margin-top: 34px; }
  .week-card { padding: 18px; }
  .section-heading h2 { font-size: 20px; }
  .action-grid { grid-template-columns: 1fr; gap: 10px; }
  .big-btn { min-height: 92px; padding: 16px 18px; }
  .status-card { min-height: 102px; padding: 18px; }
  .status-time span { font-size: 20px; }
  .status-time small { max-width: 82px; }
  .today-summary { padding: 18px; }
  .note-feature { min-height: 240px; padding: 24px; }
  .history-panel { padding: 18px; }
  .editor-card { padding: 13px; }
  .note-textarea { min-height: 54vh; padding: 10px; }
  .editor-actions { align-items: stretch; flex-direction: column; padding: 14px 6px 3px; }
  .editor-actions > span { order: 2; text-align: center; }
  .editor-actions .primary-button { width: 100%; }
  .times-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .times-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .times-actions > .primary-button { width: 100%; }
  .filter-control { width: 100%; justify-content: space-between; }
  .filter-select { min-width: 0; width: 62%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 86px; padding: 14px; }
  .stat-card:last-child { grid-column: 1 / -1; }
  .stat-icon { width: 40px; height: 40px; }
  .stat-card strong { font-size: 18px; }
  .day-card-head { min-height: 64px; padding: 12px 14px; }
  .day-card-detail { padding: 0 14px 12px; }
  .entry-row { grid-template-columns: auto minmax(0,1fr); }
  .entry-side { grid-column: 2; align-items: flex-start; }
  .calendar-view { padding: 13px; }
  .calendar-day, .calendar-blank { min-height: 68px; }
  .calendar-day { padding: 5px; }
  .calendar-total { overflow: hidden; width: 100%; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .calendar-weekdays, .calendar-grid { gap: 3px; }
  .settings-card { padding: 18px; }
  .settings-card .section-heading--tight { align-items: flex-start; flex-direction: column; }
  .account-card { align-items: stretch; flex-direction: column; }
  .form-columns { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; right: 10px; bottom: calc(10px + var(--safe-bottom)); left: 10px; z-index: 30; display: grid; grid-template-columns: repeat(5,1fr); min-height: 68px; padding: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(11,18,32,.96); box-shadow: 0 12px 32px rgba(11,18,32,.28); backdrop-filter: blur(18px); }
  .mobile-nav .nav-item { display: flex; min-width: 0; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border-radius: 14px; color: #8f9cb1; }
  .mobile-nav .nav-item svg { width: 21px; height: 21px; }
  .mobile-nav .nav-item span { overflow: hidden; width: 100%; font-size: 10px; font-weight: 700; text-overflow: ellipsis; }
  .mobile-nav .nav-item.is-active { background: rgba(255,255,255,.1); color: #fff; }
  .sheet { right: 0; bottom: 0; overflow-y: auto; width: 100%; max-width: none; max-height: min(92svh,820px); border-radius: 22px 22px 0 0; padding: 14px 18px calc(22px + var(--safe-bottom)); transform: translateY(100%); }
  .sheet.is-open { transform: none; }
  .sheet-handle { display: block; width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: var(--line-strong); }
  .toast { right: 18px; bottom: calc(94px + var(--safe-bottom)); left: 18px; max-width: none; text-align: center; }
}

@media (max-width: 390px) {
  .screen { padding-right: 14px; padding-left: 14px; }
  .clock-card { padding: 21px; }
  .clock-card-date { display: none; }
  .clock-total { font-size: 43px; }
  .quick-card { grid-template-columns: auto minmax(0,1fr) auto; padding: 14px; }
  .status-card { align-items: flex-start; }
  .status-time small { font-size: 10px; }
  .big-btn { min-height: 88px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card:last-child { grid-column: auto; }
  .mobile-nav { right: 6px; bottom: calc(6px + var(--safe-bottom)); left: 6px; }
  .mobile-nav .nav-item span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Design refresh v8 — präzise, ruhig und auf Touch-Bedienung ausgelegt */
:root {
  --ink: #0d1b2e;
  --muted: #5d6b7e;
  --muted-2: #8a97a9;
  --line: #dbe3ee;
  --line-strong: #c9d4e2;
  --canvas: #eef3f8;
  --surface: rgba(255,255,255,.92);
  --navy: #07111f;
  --navy-2: #0b1c31;
  --blue: #246bfd;
  --blue-dark: #1554dd;
  --blue-soft: #eaf1ff;
  --green: #10a36f;
  --green-dark: #087a53;
  --green-soft: #e7f8f1;
  --red: #e5484d;
  --red-dark: #c9343a;
  --red-soft: #fff0f1;
  --amber: #d9890b;
  --amber-soft: #fff6df;
  --shadow-sm: 0 1px 2px rgba(18,36,59,.04), 0 8px 24px rgba(18,36,59,.045);
  --shadow-md: 0 20px 55px rgba(13,27,46,.12);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

body {
  background:
    radial-gradient(circle at 78% -10%, rgba(36,107,253,.11), transparent 30rem),
    linear-gradient(180deg,#f7faff 0,#eef3f8 38rem);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(36,107,253,.25);
  outline-offset: 3px;
}

.app-shell { background: transparent; }

.sidebar {
  inset: 16px auto 16px 16px;
  width: 240px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
  padding: 24px 14px 16px;
  background:
    radial-gradient(circle at 15% 2%, rgba(67,136,255,.30), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(16,163,111,.12), transparent 30%),
    linear-gradient(165deg,#102640 0%,#07111f 70%);
  box-shadow: 0 24px 60px rgba(7,17,31,.24);
}

.sidebar::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg,rgba(255,255,255,.055),transparent 22% 78%,rgba(255,255,255,.025));
  content: "";
  pointer-events: none;
}

.sidebar > * { position: relative; z-index: 1; }
.brand { gap: 13px; padding: 2px 10px 28px; }
.brand-mark, .loading-mark {
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(145deg,rgba(70,139,255,.95),rgba(24,84,222,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 10px 24px rgba(19,77,196,.26);
}
.brand strong { font-size: 19px; letter-spacing: -.035em; }
.brand small { color: #91a5be; font-size: 13px; }
.side-nav { gap: 7px; }
.side-nav .nav-item {
  position: relative;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  color: #9eb0c6;
  font-size: 14px;
}
.side-nav .nav-item:hover { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.055); }
.side-nav .nav-item.is-active {
  border-color: rgba(112,164,255,.34);
  background: linear-gradient(135deg,rgba(49,117,250,.96),rgba(28,87,213,.92));
  color: #fff;
  box-shadow: 0 10px 24px rgba(17,73,181,.32), inset 0 1px 0 rgba(255,255,255,.18);
}
.side-nav .nav-item.is-active::after {
  position: absolute;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a9c8ff;
  box-shadow: 0 0 0 4px rgba(169,200,255,.12);
  content: "";
}
.sidebar-footer { border-color: rgba(255,255,255,.09); color: #8297b0; font-size: 12px; }
.account-button {
  border-color: rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}
.account-button:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.09); }
.account-avatar, .mobile-account-button {
  background: linear-gradient(145deg,#4b8cff,#1d59dd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 14px rgba(24,84,222,.22);
}
.account-copy strong { font-size: 14px; }
.account-copy small { color: #8297b0; font-size: 12px; }

.app-main { margin-left: 272px; }
.screen { width: min(1260px,100%); padding: 56px clamp(28px,4.5vw,68px) 78px; }
.page-header { margin-bottom: 30px; }
.page-header h1 {
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, sans-serif;
  font-weight: 760;
  letter-spacing: -.052em;
}
.eyebrow { color: #6f7f93; font-size: 12px; letter-spacing: .13em; }
.title-accent { color: #2f73ff; }
.header-link, .text-button { color: var(--blue-dark); }
.live-clock {
  border: 1px solid rgba(201,212,226,.9);
  border-radius: 16px;
  padding: 8px 13px;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
}
.live-clock span { font-size: 25px; }

.dashboard-grid { grid-template-columns: minmax(0,1.55fr) minmax(285px,.78fr); gap: 22px; }
.clock-card {
  min-height: 365px;
  border: 1px solid rgba(118,163,232,.18);
  background:
    radial-gradient(circle at 88% 10%,rgba(68,134,255,.40),transparent 31%),
    radial-gradient(circle at 22% 110%,rgba(16,163,111,.15),transparent 34%),
    linear-gradient(145deg,#132b49 0%,#081523 72%);
  box-shadow: 0 26px 65px rgba(7,17,31,.22), inset 0 1px 0 rgba(255,255,255,.07);
}
.clock-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg,#5591ff,#246bfd 48%,#10a36f);
  content: "";
}
.clock-card::after { border-color: rgba(255,255,255,.10); box-shadow: 0 0 0 34px rgba(255,255,255,.03),0 0 0 68px rgba(255,255,255,.018); }
.clock-card-body { padding: 58px 0 34px; }
.clock-kicker, .clock-since, .clock-card-date { color: #91a5be; }
.clock-total { font-weight: 760; text-shadow: 0 8px 26px rgba(0,0,0,.2); }
.clock-total span { color: #8297b0; }
.status-pill { border: 1px solid rgba(255,255,255,.09); border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.055); }
.status-pill.is-active > span, .online-dot { animation: status-pulse 2.2s ease-in-out infinite; }
@keyframes status-pulse { 50% { box-shadow: 0 0 0 7px rgba(74,222,128,.06); } }
.primary-action {
  min-height: 54px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: linear-gradient(135deg,#3980ff,#1f5de4);
  box-shadow: 0 12px 28px rgba(23,82,211,.36),inset 0 1px 0 rgba(255,255,255,.2);
}
.primary-action:hover { background: linear-gradient(135deg,#4c8dff,#2868ee); transform: translateY(-1px); }

.quick-card, .week-card, .recent-row, .status-card, .today-summary, .history-panel,
.editor-card, .note-readonly, .calendar-view, .stat-card, .day-card, .settings-card {
  border-color: rgba(201,212,226,.88);
  background: var(--surface);
  box-shadow: var(--shadow-sm),inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
}
.quick-card { overflow: hidden; min-height: 156px; border-radius: 20px; }
.quick-card::before { width: 3px; height: 48px; border-radius: 999px; background: #cbd8e7; content: ""; }
.quick-card:has(.quick-icon--blue)::before { background: var(--blue); }
.quick-card:has(.quick-icon--green)::before { background: var(--green); }
.quick-card:hover { border-color: #aec2db; box-shadow: 0 18px 38px rgba(23,45,74,.10); }
.quick-icon, .stat-icon { border: 1px solid rgba(255,255,255,.7); border-radius: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.quick-copy small, .stat-card small, .status-label, .summary-entry .reason, .big-btn small { font-size: 13px; }
.quick-copy strong { font-size: 17px; letter-spacing: -.02em; }

.week-card { margin-top: 22px; border-radius: 20px; padding: 23px 25px; }
.week-progress { height: 10px; background: #e3eaf3; box-shadow: inset 0 1px 2px rgba(22,45,73,.08); }
.week-progress span { background: linear-gradient(90deg,#246bfd,#63a0ff); box-shadow: 0 0 18px rgba(36,107,253,.24); }
.week-meta { font-size: 13px; }
.recent-row { min-height: 76px; transition: transform 160ms ease,border-color 160ms ease,box-shadow 160ms ease; }
.recent-row:hover { border-color: #b6c7dc; box-shadow: 0 12px 28px rgba(22,45,73,.08); transform: translateY(-1px); }

.status-card { border-radius: 20px; }
.status-card.is-active { border-color: rgba(36,107,253,.38); background: linear-gradient(135deg,rgba(234,241,255,.94),rgba(255,255,255,.94)); }
.status-card--green.is-active { border-color: rgba(16,163,111,.34); background: linear-gradient(135deg,rgba(231,248,241,.94),rgba(255,255,255,.94)); }
.status-value { font-size: 18px; letter-spacing: -.02em; }
.status-time span { font-size: 26px; }
.status-time small { font-size: 12px; }
.big-btn {
  min-height: 130px;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 16px 34px rgba(19,54,98,.15),inset 0 1px 0 rgba(255,255,255,.18);
}
.big-btn--blue { background: linear-gradient(135deg,#2f76ff,#1856d8); }
.big-btn--green { background: linear-gradient(135deg,#14ad78,#087a53); }
.big-btn--red { background: linear-gradient(135deg,#ee555a,#c9343a); }
.big-btn:disabled { border-color: var(--line); background: #e6ecf3; }
.button-icon { border: 1px solid rgba(255,255,255,.13); }
.marker-btn { border-color: #f0d39a; background: linear-gradient(135deg,#fff9e9,#fff3d1); }
.note-feature {
  border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(circle at 92% 5%,rgba(108,164,255,.38),transparent 33%),linear-gradient(145deg,#245fda,#133b93);
  box-shadow: 0 22px 48px rgba(16,61,150,.2),inset 0 1px 0 rgba(255,255,255,.12);
}
.note-feature-copy strong { font-size: 27px; }

.list-row, .project-row, .entry-row, .calendar-day {
  border-color: #dbe3ee;
  background: rgba(248,251,255,.86);
}
.list-row:hover, .calendar-day:hover { border-color: #b9c9dc; background: #fff; }
.day-card { overflow: hidden; border-radius: 18px; }
.day-card-head { background: rgba(248,251,255,.7); }
.stat-card strong { font-size: 22px; }
.view-switch { border-color: #d3ddea; background: #e4ebf3; }
.view-switch button { font-size: 13px; }
.view-switch button.is-active { box-shadow: 0 5px 14px rgba(22,45,73,.09); }
.calendar-day.is-selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(36,107,253,.18); }
.calendar-total, .calendar-weekdays, .calendar-detail-head span, .project-tag, .archived-label { font-size: 12px; }

.primary-button {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: linear-gradient(135deg,#3279ff,#1d5cde);
  box-shadow: 0 9px 20px rgba(27,87,214,.2),inset 0 1px 0 rgba(255,255,255,.2);
}
.primary-button:hover { background: linear-gradient(135deg,#4487ff,#2667eb); transform: translateY(-1px); }
.secondary-button, .notification-button, .danger-button, .icon-button, .back-btn, .sheet-close {
  border-color: #cad6e4;
  background: rgba(255,255,255,.88);
  box-shadow: 0 5px 14px rgba(22,45,73,.055);
}
.filter-select, .form-field input:not([type="color"]), .form-field select, .form-field textarea, .sheet-textarea {
  min-height: 48px;
  border-color: #c9d5e4;
  border-radius: 13px;
  background: rgba(248,251,255,.9);
  font-size: 16px;
  transition: border-color 150ms ease,box-shadow 150ms ease,background 150ms ease;
}
.filter-select:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus, .sheet-textarea:focus {
  border-color: #6094f7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36,107,253,.09);
}
.form-field > span, .field-label { font-size: 14px; }
.form-field > small, .field-label span, .toggle-row small, .project-copy small, .account-card p:last-child { font-size: 12px; }

.sheet {
  border-color: rgba(201,212,226,.9);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 75px rgba(7,17,31,.25);
  backdrop-filter: blur(22px);
}
.sheet-backdrop { background: rgba(4,12,22,.62); backdrop-filter: blur(6px); }
.toast { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: #0c1c30; box-shadow: 0 18px 42px rgba(7,17,31,.24); font-size: 14px; }

.loading-screen, .auth-shell {
  background:
    radial-gradient(circle at 72% 15%,rgba(59,130,246,.28),transparent 28rem),
    radial-gradient(circle at 20% 90%,rgba(16,163,111,.12),transparent 30rem),
    linear-gradient(145deg,#102640,#07111f 68%);
}
.auth-shell::before {
  position: fixed;
  inset: 22px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 32px;
  content: "";
  pointer-events: none;
}
.auth-brand { margin-bottom: 28px; }
.auth-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,.28);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 34px 80px rgba(0,0,0,.36),inset 0 1px 0 #fff;
}
.auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg,#246bfd,#69a0ff 60%,#10a36f);
  content: "";
}
.auth-card h1 { font-family: "Segoe UI Variable Display","Segoe UI",sans-serif; font-size: 37px; font-weight: 760; }
.auth-intro { font-size: 15px; line-height: 1.6; }
.auth-footnote { color: #91a5be; font-size: 12px; line-height: 1.55; }

@media (max-width: 900px) {
  .sidebar { inset: 12px auto 12px 12px; width: 208px; border-radius: 24px; }
  .app-main { margin-left: 232px; }
  .screen { padding-right: 28px; padding-left: 20px; }
  .dashboard-grid, .work-layout, .notes-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { background: linear-gradient(180deg,#f8fbff 0,#eef3f8 35rem); }
  .app-main { margin-left: 0; }
  .screen { padding: calc(24px + var(--safe-top)) 16px calc(106px + var(--safe-bottom)); }
  .page-header { margin-bottom: 22px; }
  .page-header h1 { font-size: 34px; }
  .live-clock { border: 0; padding: 3px 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  .clock-card { min-height: 330px; border-radius: 25px; padding: 24px; }
  .clock-card-body { padding: 44px 0 29px; }
  .clock-total { font-size: 50px; }
  .dashboard-grid { gap: 12px; }
  .quick-card { min-height: 92px; border-radius: 17px; padding: 15px; }
  .quick-card::before { width: 3px; height: 36px; }
  .week-card { margin-top: 14px; padding: 19px; }
  .week-meta { font-size: 12px; }
  .big-btn { min-height: 96px; border-radius: 17px; }
  .status-card { min-height: 108px; border-radius: 18px; }
  .note-feature { border-radius: 22px; }
  .stats-grid { gap: 10px; }
  .stat-card { border-radius: 17px; }
  .calendar-day, .calendar-blank { min-height: 72px; }
  .calendar-total { font-size: 12px; }
  .mobile-nav {
    right: 8px;
    bottom: calc(8px + var(--safe-bottom));
    left: 8px;
    min-height: 72px;
    border-color: rgba(255,255,255,.12);
    border-radius: 22px;
    background: rgba(7,17,31,.94);
    box-shadow: 0 18px 40px rgba(7,17,31,.30),inset 0 1px 0 rgba(255,255,255,.06);
  }
  .mobile-nav .nav-item { border: 1px solid transparent; }
  .mobile-nav .nav-item span { font-size: 12px; }
  .mobile-nav .nav-item.is-active { border-color: rgba(103,153,255,.24); background: linear-gradient(145deg,rgba(47,115,255,.34),rgba(28,87,213,.20)); color: #fff; }
  .sheet { border-radius: 26px 26px 0 0; }
  .auth-shell { padding: 24px 16px; }
  .auth-shell::before { inset: 10px; border-radius: 24px; }
  .auth-brand { margin-bottom: 22px; }
  .auth-card { border-radius: 24px; padding: 28px 22px; }
  .auth-card h1 { font-size: 33px; }
}

@media (max-width: 390px) {
  .screen { padding-right: 13px; padding-left: 13px; }
  .page-header h1 { font-size: 31px; }
  .clock-card { padding: 21px; }
  .clock-total { font-size: 45px; }
  .mobile-nav .nav-item span { font-size: 11px; }
}
