/* ================================================================
   FlowDesk – iOS-style design system
   Light + Dark (auto via system, manual override with html[data-theme])
   ================================================================ */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --accent: #0A84FF;
  --accent2: #5E5CE6;
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --yellow: #FFD60A;
  --teal: #64D2FF;
  --pink: #FF375F;
  --radius: 18px;
  --radius-sm: 12px;
  --tabbar-h: 78px;
}
:root, html[data-theme="light"] {
  --bg: #F2F2F7;
  --bg2: #FFFFFF;
  --card: rgba(255,255,255,0.82);
  --card-solid: #FFFFFF;
  --glass: rgba(248,248,252,0.78);
  --text: #1C1C1E;
  --text2: #6C6C70;
  --text3: #AEAEB2;
  --sep: rgba(60,60,67,0.12);
  --fill: rgba(120,120,128,0.12);
  --fill2: rgba(120,120,128,0.20);
  --shadow: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.06);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #000000;
  --bg2: #1C1C1E;
  --card: rgba(28,28,30,0.80);
  --card-solid: #1C1C1E;
  --glass: rgba(22,22,24,0.78);
  --text: #FFFFFF;
  --text2: #98989F;
  --text3: #636366;
  --sep: rgba(84,84,88,0.42);
  --fill: rgba(120,120,128,0.20);
  --fill2: rgba(120,120,128,0.30);
  --shadow: 0 8px 30px rgba(0,0,0,0.45);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #000000; --bg2: #1C1C1E;
    --card: rgba(28,28,30,0.80); --card-solid: #1C1C1E;
    --glass: rgba(22,22,24,0.78);
    --text: #FFFFFF; --text2: #98989F; --text3: #636366;
    --sep: rgba(84,84,88,0.42);
    --fill: rgba(120,120,128,0.20); --fill2: rgba(120,120,128,0.30);
    --shadow: 0 8px 30px rgba(0,0,0,0.45); --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
::placeholder { color: var(--text3); }

/* ---------------- layout shell ---------------- */
#app { min-height: 100dvh; }
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  display: none;
  flex-direction: column;
  width: 250px;
  padding: 24px 14px;
  gap: 4px;
  position: sticky; top: 0; height: 100dvh;
  border-right: 1px solid var(--sep);
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 700; padding: 6px 12px 20px;
}
.sidebar .brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text2); font-weight: 500; font-size: 15.5px;
  transition: background .15s, color .15s;
  width: 100%; text-align: left;
}
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-item:hover { background: var(--fill); }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(10,132,255,.35); }
.sidebar .spacer { flex: 1; }
.sidebar .side-timer {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--fill); font-variant-numeric: tabular-nums;
  font-size: 14px; color: var(--text2);
  display: none; align-items: center; gap: 8px;
}
.sidebar .side-timer.on { display: flex; color: var(--green); font-weight: 600; }

.main { flex: 1; min-width: 0; padding: 20px 18px calc(var(--tabbar-h) + 24px); max-width: 1120px; margin: 0 auto; width: 100%; }

/* tab bar (mobile) */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: flex-start;
  height: var(--tabbar-h);
  padding: 8px 6px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border-top: 1px solid var(--sep);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text3); font-size: 10.5px; font-weight: 500;
  flex: 1; padding-top: 3px; border-radius: 10px;
}
.tab-item svg { width: 25px; height: 25px; }
.tab-item.active { color: var(--accent); }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .main { padding: 32px 36px 48px; }
}

/* ---------------- typography ---------------- */
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.page-sub { color: var(--text2); font-size: 15px; margin-bottom: 20px; }
.section-title { font-size: 19px; font-weight: 700; margin: 26px 0 12px; letter-spacing: -0.2px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

/* ---------------- cards ---------------- */
.card {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  border: 1px solid var(--sep);
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(2, 1fr); }
.grid.charts { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid.stats { grid-template-columns: repeat(4, 1fr); }
  .grid.charts { grid-template-columns: 1fr 1fr; }
}
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat-lbl { color: var(--text2); font-size: 13px; margin-top: 2px; }
.stat-ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.stat-ico svg { width: 20px; height: 20px; color: #fff; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #fff;
  transition: transform .1s, opacity .15s;
  box-shadow: 0 4px 14px rgba(10,132,255,.30);
}
.btn:active { transform: scale(.96); }
.btn.secondary { background: var(--fill); color: var(--text); box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 4px 14px rgba(255,69,58,.3); }
.btn.green { background: var(--green); box-shadow: 0 4px 14px rgba(48,209,88,.3); }
.btn.small { padding: 7px 13px; font-size: 13.5px; border-radius: 11px; }
.btn.pill { border-radius: 999px; }
.btn svg { width: 17px; height: 17px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text2);
  transition: background .15s;
}
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 19px; height: 19px; }

/* segmented control */
.seg {
  display: inline-flex; background: var(--fill); border-radius: 12px; padding: 3px; gap: 2px;
}
.seg button {
  padding: 7px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--text2);
  transition: all .15s;
}
.seg button.active { background: var(--card-solid); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------- forms ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 13px;
  background: var(--fill); border: 1.5px solid transparent;
  outline: none; transition: border .15s, background .15s;
  appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: var(--accent); background: var(--bg2); }
textarea.input { resize: vertical; min-height: 90px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--sep); }
.switch-row:last-child { border-bottom: none; }
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .knob {
  position: absolute; inset: 0; border-radius: 999px; background: var(--fill2);
  transition: background .2s; cursor: pointer;
}
.switch .knob::after {
  content: ''; position: absolute; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: transform .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.switch input:checked + .knob { background: var(--green); }
.switch input:checked + .knob::after { transform: translateX(20px); }

.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform .1s;
}
.color-dot.sel { border-color: var(--text); transform: scale(1.1); }

/* ---------------- login ---------------- */
.login-wrap {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(10,132,255,.22), transparent 60%),
    radial-gradient(1000px 600px at 110% 110%, rgba(94,92,230,.20), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; padding: 36px 30px;
  background: var(--card); backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--sep);
  text-align: center;
}
.login-card img { width: 74px; height: 74px; border-radius: 18px; margin-bottom: 14px; box-shadow: 0 10px 26px rgba(10,132,255,.35); }
.login-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.login-card .sub { color: var(--text2); font-size: 14px; margin: 4px 0 24px; }
.login-card .input { text-align: left; margin-bottom: 12px; }
.login-card .btn { width: 100%; padding: 13px; margin-top: 6px; }
.login-error { color: var(--red); font-size: 13.5px; margin-top: 12px; min-height: 18px; }

/* ---------------- toasts ---------------- */
#toast-container {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: var(--card-solid); color: var(--text);
  padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); border: 1px solid var(--sep);
  animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2);
  display: flex; align-items: center; gap: 8px;
}
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.95); } }

/* ---------------- modal (iOS sheet) ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s;
}
.modal {
  background: var(--bg2); width: 100%; max-width: 560px;
  border-radius: 22px 22px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
  max-height: 92dvh; overflow-y: auto;
  animation: sheetUp .32s cubic-bezier(.2,.9,.3,1);
}
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 22px; padding-bottom: 22px; animation: popIn .22s cubic-bezier(.2,.9,.3,1.1); }
}
.modal .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 4px auto 12px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h2 { font-size: 19px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(60%); } }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } }

/* ---------------- tasks ---------------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 14px; border-radius: 999px; background: var(--fill);
  font-size: 13.5px; font-weight: 600; color: var(--text2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1.5px solid transparent; transition: all .15s;
}
.chip.active { background: var(--accent); color: #fff; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

.board { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.col { background: var(--fill); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; background: rgba(10,132,255,.08); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.col-head h3 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.col-head .count { background: var(--fill2); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--text2); font-weight: 600; }
.col-dot { width: 9px; height: 9px; border-radius: 50%; }

.task-card {
  background: var(--card-solid); border-radius: 14px; padding: 12px 14px;
  margin-bottom: 9px; box-shadow: var(--shadow-sm); cursor: pointer;
  border: 1px solid var(--sep);
  transition: transform .12s, box-shadow .15s, opacity .3s;
  animation: cardIn .25s cubic-bezier(.2,.9,.3,1.1);
}
.task-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.task-card.dragging { opacity: .4; }
.task-card.completing { animation: complete .5s forwards; }
@keyframes cardIn { from { opacity: 0; transform: scale(.95) translateY(6px); } }
@keyframes complete { 40% { transform: scale(1.03); } 100% { opacity: 0; transform: scale(.9); } }
.task-top { display: flex; gap: 10px; align-items: flex-start; }
.tcheck {
  width: 23px; height: 23px; border-radius: 50%; border: 2px solid var(--fill2);
  flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  transition: all .15s; background: none;
}
.tcheck:hover { border-color: var(--accent); }
.tcheck.done { background: var(--green); border-color: var(--green); }
.tcheck svg { width: 13px; height: 13px; color: #fff; opacity: 0; transition: opacity .15s; }
.tcheck.done svg { opacity: 1; }
.task-title { font-weight: 600; font-size: 15px; word-break: break-word; }
.task-title.done { text-decoration: line-through; color: var(--text3); }
.task-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; margin-left: 33px; }
.meta-tag {
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px;
  background: var(--fill); color: var(--text2); display: inline-flex; align-items: center; gap: 4px;
}
.meta-tag.prio1 { background: rgba(255,69,58,.14); color: var(--red); }
.meta-tag.overdue { background: rgba(255,69,58,.14); color: var(--red); }
.meta-tag svg { width: 11px; height: 11px; }
.subprog { font-size: 11.5px; color: var(--text3); margin-left: 33px; margin-top: 6px; }

.empty {
  text-align: center; color: var(--text3); padding: 30px 10px; font-size: 14px;
}
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 8px; }

/* subtask editor rows */
.sub-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.sub-row .input { flex: 1; padding: 9px 12px; }
.sub-row .icon-btn { flex-shrink: 0; }

/* ---------------- calendar ---------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-title { font-size: 21px; font-weight: 700; min-width: 170px; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--text3); padding: 6px 0; }
.cal-cell {
  min-height: 74px; border-radius: 12px; padding: 5px; background: var(--card);
  border: 1px solid var(--sep); cursor: pointer; overflow: hidden;
  transition: background .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-cell:hover { background: var(--fill); }
.cal-cell.other { opacity: .38; }
.cal-cell.today { border: 2px solid var(--accent); }
.cal-day-num {
  font-size: 12.5px; font-weight: 600; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cal-cell.today .cal-day-num { background: var(--accent); color: #fff; }
.cal-evt {
  font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-evt.is-task { opacity: .85; }
.cal-more { font-size: 10px; color: var(--text3); padding-left: 4px; }
@media (min-width: 900px) { .cal-cell { min-height: 104px; } }

.day-list { margin-top: 18px; }
.day-evt {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  background: var(--card); border-radius: 14px; margin-bottom: 8px;
  border: 1px solid var(--sep); cursor: pointer;
}
.day-evt .bar { width: 4px; align-self: stretch; border-radius: 3px; }
.day-evt .when { font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 76px; }
.day-evt .name { font-weight: 600; font-size: 14.5px; }
.day-evt .loc { font-size: 12px; color: var(--text3); }

/* ---------------- notes ---------------- */
.notes-layout { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .notes-layout { grid-template-columns: 320px 1fr; align-items: start; } }
.note-item {
  padding: 13px 15px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--sep); cursor: pointer; margin-bottom: 8px;
  transition: border .15s, transform .1s;
}
.note-item:hover { transform: translateY(-1px); }
.note-item.sel { border-color: var(--accent); }
.note-item h4 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.note-item h4 svg { width: 13px; height: 13px; color: var(--orange); flex-shrink: 0; }
.note-item p { font-size: 12.5px; color: var(--text2); margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-item .nfolder { font-size: 11px; color: var(--text3); margin-top: 5px; }
.note-editor { display: flex; flex-direction: column; gap: 10px; }
.note-editor .title-input {
  font-size: 21px; font-weight: 700; background: none; border: none; outline: none;
  padding: 4px 2px; width: 100%;
}
.note-editor textarea {
  min-height: 46dvh; border: none; outline: none; background: none;
  font-size: 15.5px; line-height: 1.65; resize: none; width: 100%; padding: 2px;
}
.note-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-status { font-size: 12px; color: var(--text3); margin-left: auto; }

/* ---------------- time ---------------- */
.timer-hero {
  text-align: center; padding: 30px 18px;
  background: linear-gradient(135deg, rgba(10,132,255,.10), rgba(94,92,230,.10)), var(--card);
}
.timer-display {
  font-size: 56px; font-weight: 800; letter-spacing: -1px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.timer-display.running { color: var(--green); }
.timer-sub { color: var(--text2); font-size: 14px; margin: 6px 0 18px; }
.timer-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pomo-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 14px; }
.pomo-ring svg { transform: rotate(-90deg); }
.pomo-ring .ring-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.pomo-ring .ring-time { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pomo-ring .ring-mode { font-size: 12.5px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.time-entry {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border-radius: 14px; margin-bottom: 8px; border: 1px solid var(--sep);
}
.time-entry.clickable { cursor: pointer; transition: transform .15s, border .15s; }
.time-entry.clickable:hover { border-color: var(--accent); transform: translateY(-1px); }
.time-entry .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.time-entry .desc { flex: 1; min-width: 0; }
.time-entry .desc .d1 { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-entry .desc .d2 { font-size: 12px; color: var(--text3); }
.time-entry .dur { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14.5px; }
.day-group-title { font-size: 13px; font-weight: 700; color: var(--text2); margin: 18px 0 8px; display: flex; justify-content: space-between; }

/* ---------------- charts ---------------- */
.chart { width: 100%; height: auto; }
.chart-val { font-size: 11px; font-weight: 700; fill: var(--text2); }
.chart-lbl { font-size: 10.5px; fill: var(--text3); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-wrap svg { width: 170px; flex-shrink: 0; }
.donut-center { font-size: 15px; font-weight: 800; fill: var(--text); }
.chart-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 140px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.legend-dot { width: 10px; height: 10px; border-radius: 4px; flex-shrink: 0; }
.prog-row { margin-bottom: 12px; }
.prog-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.prog-val { color: var(--text2); font-variant-numeric: tabular-nums; }
.prog-track { height: 8px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 5px; transition: width .5s cubic-bezier(.2,.9,.3,1); }

/* agenda on dashboard */
.agenda-item { display: flex; gap: 11px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--sep); }
.agenda-item:last-child { border-bottom: none; }
.agenda-item .bar { width: 4px; height: 30px; border-radius: 3px; flex-shrink: 0; }
.agenda-item .t { font-size: 12px; color: var(--text2); min-width: 70px; font-variant-numeric: tabular-nums; }
.agenda-item .n { font-weight: 600; font-size: 14px; }

/* settings */
.settings-group { margin-bottom: 22px; }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + 16px); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(10,132,255,.45);
  transition: transform .12s;
}
.fab:active { transform: scale(.92); }
.fab svg { width: 26px; height: 26px; }
@media (min-width: 900px) { .fab { display: none; } }

.desktop-only { display: none; }
@media (min-width: 900px) { .desktop-only { display: inline-flex; } }

/* ================================================================
   V2 – Smoothness, Motion & Delight
   ================================================================ */

/* springy view transition on every navigation */
.view-enter { animation: viewIn .38s cubic-bezier(.22,1.1,.35,1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
}

/* pressable feel everywhere (iOS-like squish) */
.task-card, .note-item, .day-evt, .time-entry, .chip, .cal-cell, .stat-ico,
.card.timer-hero, .agenda-item { transition: transform .18s cubic-bezier(.22,1.4,.4,1), box-shadow .2s, opacity .3s, background .15s, border .15s; }
.task-card:active, .note-item:active, .day-evt:active, .chip:active, .cal-cell:active { transform: scale(.965); }
.btn { transition: transform .18s cubic-bezier(.22,1.6,.4,1), opacity .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.94); }
.icon-btn:active { transform: scale(.86); }
.tcheck { transition: all .2s cubic-bezier(.22,1.6,.4,1); }
.tcheck:active { transform: scale(.8); }

/* animated checkmark draw */
.tcheck svg polyline { stroke-dasharray: 24; stroke-dashoffset: 24; }
.tcheck.done svg polyline { animation: drawCheck .3s .05s cubic-bezier(.3,1.2,.5,1) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.tcheck.done { animation: checkPop .35s cubic-bezier(.22,1.8,.4,1); }
@keyframes checkPop { 45% { transform: scale(1.25); } }

/* tab bar icon bounce on activation */
.tab-item.active svg { animation: tabBounce .4s cubic-bezier(.22,1.8,.4,1); }
@keyframes tabBounce { 40% { transform: translateY(-4px) scale(1.12); } }

/* confetti particles */
.confetti {
  position: fixed; width: 8px; height: 8px; border-radius: 2px;
  pointer-events: none; z-index: 200;
}

/* rolling digits (timer) */
.rd { display: inline-block; }
.rd span { display: inline-block; }
.rd span.roll { animation: digitRoll .28s cubic-bezier(.22,1.2,.4,1); }
@keyframes digitRoll {
  0% { transform: translateY(-0.55em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* login: floating gradient blobs */
.login-wrap { position: relative; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  pointer-events: none; z-index: 0;
}
.blob.b1 { width: 380px; height: 380px; background: #0A84FF; top: -120px; left: -100px; animation: blobFloat 11s ease-in-out infinite alternate; }
.blob.b2 { width: 320px; height: 320px; background: #5E5CE6; bottom: -100px; right: -80px; animation: blobFloat 13s ease-in-out infinite alternate-reverse; }
.blob.b3 { width: 220px; height: 220px; background: #FF375F; bottom: 30%; left: 55%; opacity: .25; animation: blobFloat 16s ease-in-out infinite alternate; }
@keyframes blobFloat {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(50px,36px) scale(1.15); }
}
.login-card { position: relative; z-index: 1; animation: loginIn .5s cubic-bezier(.22,1.2,.4,1); }
@keyframes loginIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* quick add bar */
.quick-add {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--sep); border-radius: 16px;
  padding: 6px 8px 6px 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
  transition: border .2s, box-shadow .2s;
}
.quick-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,132,255,.12); }
.quick-add input { flex: 1; border: none; outline: none; background: none; padding: 9px 0; font-size: 15px; }
.quick-add .hint { font-size: 11px; color: var(--text3); white-space: nowrap; }
.quick-add .btn { padding: 9px 14px; border-radius: 12px; }

/* search field */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text3); pointer-events: none; }
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 13px;
  background: var(--fill); border: 1.5px solid transparent; outline: none;
  transition: border .15s, background .15s; font-size: 14.5px;
}
.search-wrap input:focus { border-color: var(--accent); background: var(--bg2); }

/* iOS wheel picker */
.wheel-group { display: flex; justify-content: center; gap: 6px; align-items: center; margin: 10px 0 16px; }
.wheel-label { font-size: 13px; color: var(--text2); font-weight: 600; }
.wheel {
  height: 180px; width: 78px; overflow-y: scroll;
  scroll-snap-type: y mandatory; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent);
  position: relative;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel .pad { height: 72px; }
.wheel .witem {
  height: 36px; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; font-size: 21px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--text2);
  transition: color .15s;
}
.wheel-highlight {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: min(280px, 86%); height: 36px; border-radius: 11px;
  background: var(--fill); pointer-events: none; margin-top: -108px;
}
.wheel-stage { position: relative; display: flex; justify-content: center; gap: 6px; align-items: center; }
.wheel-stage .wheel-bg {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; max-width: 300px; height: 36px; border-radius: 11px; background: var(--fill);
  pointer-events: none;
}

/* stat number entrance */
.stat-num { transition: color .2s; }

/* smooth theme change */
body, .card, .sidebar, .tabbar, .modal { transition: background .25s, border-color .25s; }

/* nicer focus rings for keyboard users */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

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

/* ================================================================
   V3 – FlowDesk Identity: eigene Marke statt iOS-Klon
   Signatur: Violett→Teal-Verlauf, schwebendes Dock, Squircle-Checks
   ================================================================ */
:root {
  --accent: #7A5CFA;
  --accent2: #2FD6C3;
  --grad: linear-gradient(120deg, #7A5CFA 0%, #46B5FF 58%, #2FD6C3 100%);
  --glow: rgba(122, 92, 250, 0.35);
}
:root, html[data-theme="light"] {
  --bg: #F3F4FB;
  --bg2: #FFFFFF;
  --card: rgba(255,255,255,0.86);
  --glass: rgba(248,248,254,0.80);
  --sep: rgba(84,80,120,0.12);
  --fill: rgba(116,112,150,0.10);
  --fill2: rgba(116,112,150,0.20);
}
html[data-theme="dark"] {
  --bg: #0B0D18;
  --bg2: #151829;
  --card: rgba(21,24,41,0.82);
  --card-solid: #171A2E;
  --glass: rgba(15,17,30,0.80);
  --sep: rgba(122,116,180,0.16);
  --fill: rgba(122,116,180,0.14);
  --fill2: rgba(122,116,180,0.24);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #0B0D18; --bg2: #151829;
    --card: rgba(21,24,41,0.82); --card-solid: #171A2E;
    --glass: rgba(15,17,30,0.80);
    --sep: rgba(122,116,180,0.16);
    --fill: rgba(122,116,180,0.14); --fill2: rgba(122,116,180,0.24);
  }
}

/* signature gradient on primary actions */
.btn { background: var(--grad); box-shadow: 0 5px 16px var(--glow); }
.btn.secondary { background: var(--fill); box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 4px 14px rgba(255,69,58,.3); }
.btn.green { background: var(--green); box-shadow: 0 4px 14px rgba(48,209,88,.3); }
.fab { background: var(--grad); box-shadow: 0 10px 26px var(--glow); }
.nav-item.active { background: var(--grad); box-shadow: 0 5px 16px var(--glow); }
.chip.active { background: var(--accent); }
.quick-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(122,92,250,.14); }
.login-card img { box-shadow: 0 10px 28px var(--glow); }

/* gradient page titles – the FlowDesk signature */
.page-title {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  width: fit-content;
}

/* squircle checkboxes instead of iOS circles */
.tcheck { border-radius: 9px; }
.tcheck.done { background: var(--grad); border-color: transparent; }

/* floating dock instead of full-width tab bar */
.tabbar {
  left: 12px; right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  height: 66px; padding: 8px 10px;
  border-radius: 30px;
  border: 1px solid var(--sep);
  box-shadow: 0 12px 34px rgba(10,10,30,0.18);
}
:root { --tabbar-h: 88px; }
.tab-item { border-radius: 20px; padding-top: 5px; }
.tab-item.active {
  background: linear-gradient(120deg, rgba(122,92,250,.16), rgba(47,214,195,.14));
}

/* cards: subtle top light edge as brand detail */
.card { border-radius: 22px; position: relative; }
.card::before {
  content: ''; position: absolute; inset: 0 14% auto 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,92,250,.45), rgba(47,214,195,.45), transparent);
  border-radius: 1px; pointer-events: none;
}

/* timer hero + login in brand tones */
.card.timer-hero {
  background: linear-gradient(135deg, rgba(122,92,250,.10), rgba(47,214,195,.09)), var(--card);
}
.login-wrap {
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(122,92,250,.20), transparent 60%),
    radial-gradient(1000px 600px at 110% 110%, rgba(47,214,195,.16), transparent 60%),
    var(--bg);
}
.blob.b1 { background: #7A5CFA; }
.blob.b2 { background: #2FD6C3; }
.blob.b3 { background: #46B5FF; }

/* brand ring for running trackers */
.timer-display.running { color: var(--accent); }
.side-timer.on { color: var(--accent2); }

/* ---------------- multi-day event bars (connected across cells) ---------------- */
.cal-cell { overflow: visible; }
.cal-evt { position: relative; z-index: 1; }
.cal-evt.sp-start, .cal-evt.sp-mid, .cal-evt.sp-end { z-index: 2; }
.cal-evt.sp-start { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -10px; }
.cal-evt.sp-mid { border-radius: 0; margin-left: -6px; margin-right: -10px; }
.cal-evt.sp-end { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -6px; }

.week-evt.sp-start { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -15px; }
.week-evt.sp-mid { border-radius: 0; margin-left: -15px; margin-right: -15px; border-left-width: 0; }
.week-evt.sp-end { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -15px; border-left-width: 0; }
@media (max-width: 700px) {
  /* week view stacks vertically on phones – no horizontal bridging */
  .week-evt.sp-start, .week-evt.sp-mid, .week-evt.sp-end {
    margin-left: 0; margin-right: 0; border-radius: 9px; border-left-width: 4px;
  }
}

/* ---------------- command palette ---------------- */
.palette-backdrop {
  position: fixed; inset: 0; background: rgba(8,8,20,.45); z-index: 80;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 16px 0; animation: fadeIn .15s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.palette {
  width: 100%; max-width: 560px; background: var(--bg2);
  border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--sep);
  overflow: hidden; animation: popIn .18s cubic-bezier(.2,.9,.3,1.1);
}
.palette-input {
  width: 100%; padding: 16px 18px; font-size: 16.5px; border: none; outline: none;
  background: none; border-bottom: 1px solid var(--sep);
}
.palette-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.palette-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 11px; cursor: pointer; font-size: 14.5px; font-weight: 500;
}
.palette-item:hover { background: var(--fill); }
.palette-item.sel { background: var(--accent); color: #fff; }
.palette-kind { font-size: 11px; opacity: .65; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ---------------- week view ---------------- */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
@media (max-width: 700px) { .week-grid { grid-template-columns: 1fr; } }
.week-col {
  background: var(--card); border: 1px solid var(--sep); border-radius: 14px;
  padding: 8px; min-height: 130px;
}
.week-col.today { border-color: var(--accent); }
.week-col.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.week-col-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 4px 6px 8px; font-weight: 700;
}
.week-col-head .wd { font-size: 11.5px; color: var(--text3); text-transform: uppercase; }
.week-col-head .dn { font-size: 15px; }
.week-col-head.sel .dn { color: var(--accent); }
.week-evt {
  background: var(--card-solid); border: 1px solid var(--sep);
  border-left: 4px solid var(--accent); border-radius: 9px;
  padding: 6px 9px; margin-bottom: 6px; cursor: grab; font-size: 12px;
}
.week-evt.dragging { opacity: .4; }
.week-evt .we-time { color: var(--text3); font-size: 10.5px; display: block; }
.week-evt .we-name { font-weight: 600; word-break: break-word; }

/* ---------------- habits ---------------- */
.habit-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sep); }
.habit-row:last-child { border-bottom: none; }
.habit-name { flex: 1; font-weight: 600; font-size: 14.5px; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.habit-dots { display: flex; gap: 4px; }
.habit-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fill2); }
.habit-streak { font-size: 13px; font-weight: 700; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- week review ---------------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .review-grid { grid-template-columns: 1fr; } }
.review-cell { background: var(--fill); border-radius: 13px; padding: 12px 14px; }
.review-num { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.review-lbl { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ---------------- trash ---------------- */
.trash-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--sep); }
.trash-row:last-child { border-bottom: none; }
.trash-info { flex: 1; min-width: 0; }
.trash-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-meta { font-size: 11.5px; color: var(--text3); }

/* ---------------- stable calendar rows + tooltip ---------------- */
/* one-line entries everywhere – no more stretched cells */
.week-evt .we-name {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  word-break: normal;
}
.week-col { min-width: 0; }
.day-evt .day-evt-body { flex: 1; min-width: 0; }
.day-evt .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-evt .loc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.agenda-item { min-width: 0; }
.cal-cell { min-width: 0; }

/* floating tooltip (hover / long-press) */
.tip {
  position: fixed; z-index: 95; pointer-events: none;
  background: var(--card-solid); color: var(--text);
  border: 1px solid var(--sep); border-radius: 11px;
  padding: 8px 12px; font-size: 12.5px; font-weight: 600; line-height: 1.4;
  max-width: 280px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(4px) scale(.96);
  transition: opacity .15s, transform .18s cubic-bezier(.2,.9,.3,1.2);
  word-break: break-word;
}
.tip.show { opacity: 1; transform: translateY(0) scale(1); }

/* ---------------- year heatmap ---------------- */
.heat-scroll { overflow-x: auto; padding-bottom: 4px; }
.heat-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px);
  gap: 3px; width: max-content;
}
.heat-cell { width: 11px; height: 11px; border-radius: 3px; background: var(--fill); }
.heat-cell.hl1 { background: color-mix(in srgb, var(--accent) 30%, var(--fill)); }
.heat-cell.hl2 { background: color-mix(in srgb, var(--accent) 55%, var(--fill)); }
.heat-cell.hl3 { background: color-mix(in srgb, var(--accent) 78%, var(--fill)); }
.heat-cell.hl4 { background: var(--accent); }

/* ---------------- eisenhower matrix ---------------- */
.matrix-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .matrix-grid { grid-template-columns: 1fr 1fr; } }
.matrix-cell { min-height: 140px; }

/* ---------------- toast with undo ---------------- */
.toast.has-action { pointer-events: auto; padding-right: 10px; }
.toast-undo {
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px;
  padding: 5px 12px; border-radius: 999px; margin-left: 4px;
}
.toast-undo:active { transform: scale(.94); }

/* ---------------- markdown preview ---------------- */
.md-preview { min-height: 46dvh; font-size: 15.5px; line-height: 1.65; padding: 2px; }
.md-preview h1 { font-size: 22px; margin: 10px 0 6px; letter-spacing: -.3px; }
.md-preview h2 { font-size: 18px; margin: 9px 0 5px; }
.md-preview h3 { font-size: 15.5px; margin: 8px 0 4px; }
.md-preview code {
  background: var(--fill); padding: 1.5px 6px; border-radius: 6px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88em;
}
.md-preview .md-li { padding-left: 6px; }
.md-preview .md-gap { height: 10px; }
.md-check { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.md-check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.md-check.done span { text-decoration: line-through; color: var(--text3); }

/* ---------------- iPhone notch / safe area ---------------- */
@media (max-width: 899px) {
  .main { padding-top: calc(env(safe-area-inset-top, 0px) + 16px); }
}
.sidebar { padding-top: calc(env(safe-area-inset-top, 0px) + 24px); }

/* ---------------- pull-to-refresh ---------------- */
.ptr {
  position: fixed; left: 50%; z-index: 85;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card-solid); border: 1px solid var(--sep);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  --p: 0;
  opacity: var(--p);
  transform: translateX(-50%) translateY(calc(-64px + var(--p) * 70px));
  transition: opacity .12s linear;
}
.ptr .ptr-icon {
  font-size: 20px; font-weight: 800; color: var(--text2);
  transition: transform .18s cubic-bezier(.2,.9,.3,1.2), color .15s;
}
.ptr.ready .ptr-icon { transform: rotate(180deg); color: var(--accent); }
.ptr.loading .ptr-icon { animation: ptrSpin .7s linear infinite; color: var(--accent); }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ---------------- 2FA ---------------- */
.secret-box {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
  background: var(--fill); border-radius: 12px; padding: 13px 16px;
  text-align: center; user-select: all; word-break: break-all;
}
.recovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recovery-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; font-weight: 700;
  background: var(--fill); border-radius: 9px; padding: 8px 10px; text-align: center;
  user-select: all;
}

/* ---------------- copyright / legal ---------------- */
.legal-link {
  font-size: 11.5px; color: var(--text3); padding: 8px 14px; text-align: left;
  border-radius: 10px; transition: color .15s;
}
.legal-link:hover { color: var(--text2); }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text3); }
.legal-body p { color: var(--text); line-height: 1.6; }

/* ---------------- branded print report (PDF) ---------------- */
#print-report { display: none; }
@media print {
  body > *:not(#print-report) { display: none !important; }
  body { background: #fff !important; }
  #print-report {
    display: block !important; color: #111; font-family: var(--font);
    padding: 8mm 4mm;
  }
  #print-report .pr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4mm; }
  #print-report .pr-head img { width: 52px; height: 52px; border-radius: 12px; }
  #print-report .pr-title { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
  #print-report .pr-sub { font-size: 13px; color: #555; }
  #print-report .pr-meta { font-size: 11.5px; color: #666; margin-bottom: 5mm; }
  #print-report table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
  #print-report th {
    text-align: left; padding: 6px 8px; border-bottom: 2px solid #7A5CFA;
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #444;
  }
  #print-report td { padding: 6px 8px; border-bottom: 1px solid #e4e4ee; vertical-align: top; }
  #print-report .total-row td { font-weight: 800; border-top: 2px solid #7A5CFA; border-bottom: none; }
  #print-report .pr-foot {
    margin-top: 8mm; padding-top: 3mm; border-top: 1px solid #ddd;
    font-size: 10px; color: #888;
  }
}
