:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: #e1e5ee;
  --text: #1c2233;
  --muted: #6b7489;
  --accent: #4f7cff;
  --accent-soft: #e6ecff;
  --danger: #e5484d;
  --success: #20b486;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
  --radius: 14px;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --surface: #181d2c;
    --surface-2: #222838;
    --border: #2c3345;
    --text: #e8ebf3;
    --muted: #9099ad;
    --accent: #6f93ff;
    --accent-soft: #232d4d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-mode="family"] {
  --bg: #fbf7f3;
  --surface-2: #f6eee8;
  --border: #eadfd6;
  --accent: #e0607a;
  --accent-soft: #fde8ec;
}
@media (prefers-color-scheme: dark) {
  :root[data-mode="family"] {
    --bg: #17120f;
    --surface: #221b17;
    --surface-2: #2d2420;
    --border: #3a2f29;
    --accent: #f08aa0;
    --accent-soft: #3d2229;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; margin: 6px 0; font-size: 14px; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font: inherit; font-weight: 500; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.block { width: 100%; margin-top: 8px; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.icon-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px;
  border-radius: 8px; font-size: 16px; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { padding: 2px; height: 40px; width: 60px; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > .auto { flex: 0 0 auto; }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); padding: 28px;
  border-radius: 20px; box-shadow: var(--shadow); text-align: center;
}
.auth-card label, .auth-card input { text-align: left; }
.logo-big img { width: 64px; height: 64px; }
.auth-card h1 { margin-top: 8px; }

/* Layout */
.app { display: flex; height: 100%; }
.sidebar {
  width: 230px; flex: 0 0 230px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 4px 10px 18px; }
.brand img { width: 30px; height: 30px; }
.sidebar a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; position: relative;
}
@media (hover: hover) { .sidebar a:hover { background: var(--surface-2); color: var(--text); } }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.sidebar-foot { margin-top: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.view { flex: 1; overflow-y: auto; min-width: 0; }
.page { max-width: 1100px; margin: 0 auto; padding: 24px; }
.page.wide { max-width: 1400px; }
.mobile-only { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { flex: 1; }
.page-sub { flex-basis: 100%; order: 3; margin-top: -8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2 a { margin-left: auto; font-size: 13px; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: 0 0 auto; position: relative;
}
.avatar.online::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px;
  background: var(--success); border: 2px solid var(--surface); border-radius: 50%;
}
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.date-box {
  width: 44px; text-align: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  padding: 4px 0; flex: 0 0 auto; line-height: 1.1;
}
.date-box b { display: block; font-size: 17px; }
.date-box span { font-size: 11px; text-transform: uppercase; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--accent); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 20px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }

/* Chat */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 12px; }
.chat-head .grow { flex: 1; }
.messages { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; max-width: min(75%, 560px); flex-direction: column; align-items: flex-start; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble {
  background: var(--surface); border: 1px solid var(--border); padding: 8px 12px; border-radius: 16px 16px 16px 4px;
  white-space: pre-wrap; word-break: break-word; position: relative;
}
.msg.mine .bubble { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 16px 16px 4px 16px; }
.msg.mine .bubble a { color: #fff; text-decoration: underline; }
.msg-meta { font-size: 11px; color: var(--muted); margin: 2px 6px 6px; display: flex; gap: 6px; align-items: center; }
.msg-meta button { font-size: 11px; padding: 0 4px; }
.msg img.preview, .msg video.preview { max-width: 260px; max-height: 260px; border-radius: 10px; display: block; margin-top: 4px; cursor: pointer; }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 10px; margin: 10px 0; }
.file-att { display: flex; align-items: center; gap: 8px; }
.typing { font-size: 12px; color: var(--muted); padding: 0 20px; height: 18px; }
.composer { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 140px; resize: none; border-radius: 21px; padding: 10px 16px; }
.composer .btn { border-radius: 21px; height: 42px; }
.pending-file { padding: 6px 16px; font-size: 13px; background: var(--accent-soft); display: flex; align-items: center; gap: 8px; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { flex: 1; font-size: 20px; min-width: 160px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--border); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: var(--surface-2); padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.cal-day { background: var(--surface); min-height: 104px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.other { opacity: .45; }
.cal-day .num { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .num { background: var(--accent); color: #fff; }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-ev { font-size: 11px; padding: 1px 5px; border-radius: 4px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; padding: 0 4px; }
.cal-dots .dot { width: 6px; height: 6px; }
.day-list { margin-top: 16px; }
.ev-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.ev-item:last-child { border-bottom: 0; }
.ev-bar { width: 4px; align-self: stretch; border-radius: 2px; }

/* Projects / Kanban */
.project-card { cursor: pointer; border-top: 4px solid var(--accent); transition: transform .1s; }
.project-card:hover { transform: translateY(-2px); }
.project-card p { color: var(--muted); font-size: 14px; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card .meta { display: flex; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col h3 { padding: 4px 6px 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.col.drag-over { outline: 2px dashed var(--accent); }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: grab; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task .t-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.task .t-foot .avatar { width: 22px; height: 22px; font-size: 10px; }
.task .t-actions { margin-left: auto; display: flex; gap: 2px; }
.add-task { display: flex; gap: 6px; margin-top: 4px; }
.add-task input { padding: 8px 10px; }

/* Aufgaben */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; padding: 6px 14px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.task { cursor: pointer; transition: box-shadow .1s, transform .1s; }
.task:hover { box-shadow: var(--shadow); }
.task.dragging { opacity: .5; }
.task.prio-high { border-left: 3px solid var(--danger); }
.t-project { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.t-project .dot { width: 8px; height: 8px; }
.t-prio { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.t-prio.high { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.t-prio.low { background: var(--surface-2); color: var(--muted); }
.t-due.overdue { color: var(--danger); font-weight: 600; }
.t-due.due-today { color: #e8890c; font-weight: 600; }

/* Files */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin-bottom: 16px; cursor: pointer; }
.dropzone.drag-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.file-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: 0 0 auto; text-transform: uppercase; overflow: hidden; }
.file-icon img { width: 100%; height: 100%; object-fit: cover; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input, .toolbar select { max-width: 260px; }

/* Modal & toasts */
.modal { position: fixed; inset: 0; background: rgba(10, 15, 30, .5); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-card { background: var(--surface); border-radius: 18px; padding: 22px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-card.wide { max-width: 900px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-actions .spacer { flex: 1; }
.viewer img, .viewer video { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 8px; }
.viewer iframe { width: 100%; height: 75vh; border: 0; border-radius: 8px; background: #fff; }
.toasts { position: fixed; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: 320px; animation: slidein .2s; cursor: pointer; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes slidein { from { transform: translateY(-10px); opacity: 0; } }

/* Navigation */
.nav-links { display: flex; flex-direction: column; gap: 2px; }
.nav-more { display: none; }
.sheet { position: fixed; inset: 0; background: rgba(10, 15, 30, .45); z-index: 55; display: flex; align-items: flex-end; }
.sheet-card { background: var(--surface); width: 100%; border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheetup .18s ease-out; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 500; }
.sheet-item .ico { width: 26px; height: 26px; color: var(--accent); }
@keyframes sheetup { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet-card, .toast { animation: none; } }

/* Privat */
.private-toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 14px; cursor: pointer; }
.private-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.lock { font-size: .9em; }
.forced-2fa { text-align: left; }
.forced-2fa p { margin: 8px 0; }

/* Mobile */
@media (max-width: 760px) {
  .app { flex-direction: column-reverse; }
  .sidebar {
    width: 100%; flex: 0 0 auto; flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--border); justify-content: space-around;
  }
  .brand, .sidebar-foot, .nav-settings, .desktop-only { display: none !important; }
  .nav-links { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav-more { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font: inherit; font-size: 11px; font-weight: 500;
    flex: 1; border: 0; background: none; color: var(--muted); cursor: pointer; }
  .nav-more.active { color: var(--accent); }
  .mobile-only { display: inline-flex; }
  .sidebar a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; flex: 1; }
  .sidebar a.active { background: none; }
  .badge { position: absolute; top: 2px; left: 55%; margin: 0; }
  .page { padding: 16px; }
  h1 { font-size: 21px; }
  .cal-day { min-height: 54px; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; }
  .kanban { grid-template-columns: repeat(3, 82%); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .msg { max-width: 85%; }
  .messages { padding: 12px; }
  .chat-head { padding: 10px 14px; }
  .toasts { left: 16px; right: 16px; }
  .toolbar input, .toolbar select { max-width: none; }
}

/* ===== Familien-Ansichten ===== */
.banner { margin-bottom: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-color: var(--accent); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; position: relative; box-shadow: var(--shadow);
}
.quick-btn .ico { width: 26px; height: 26px; color: var(--accent); }
.quick-btn b { position: absolute; top: 8px; right: 10px; background: var(--accent); color: #fff; font-size: 11px; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.quick-btn:hover { border-color: var(--accent); }

.pill.ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.pill.warn { background: color-mix(in srgb, #e8890c 16%, transparent); color: #c56f00; }
.pill.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 600; }
.pos { color: var(--success); }
.neg { color: var(--danger); }

.check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex: 0 0 auto;
  cursor: pointer; display: grid; place-items: center; padding: 0; transition: background .12s, border-color .12s;
}
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on::after { content: ''; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; padding: 5px 11px;
  border-radius: 20px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on .muted { color: rgba(255, 255, 255, .8); }
.chip.static { cursor: default; }

.shop-add { display: flex; gap: 8px; padding: 10px; margin-bottom: 12px; }
.shop-add input { font-size: 16px; }
.shop-group { margin-bottom: 12px; padding: 12px 16px; }
.shop-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.shop-item .shop-name { font-size: 16px; }
.shop-item.done .shop-name { text-decoration: line-through; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.contract { cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .12s; }
@media (hover: hover) { .contract:hover { border-color: var(--accent); } }
.contract-head { display: flex; gap: 10px; align-items: flex-start; }
.contract-head .grow { min-width: 0; flex: 1; }
.c-ico { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: 0 0 auto; }
.c-cost { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.c-deadline { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; font-size: 14px; flex-wrap: wrap; }

.balances { display: flex; flex-wrap: wrap; gap: 18px; }
.bal { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.month-nav { display: flex; align-items: center; gap: 8px; margin: 18px 0 12px; flex-wrap: wrap; }
.month-nav h2 { font-size: 18px; }

.meal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.meal-day { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.meal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.meal-day-head { display: flex; align-items: center; gap: 6px; }
.meal { padding: 8px; border-radius: 10px; background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.meal:hover { outline: 1px solid var(--accent); }
.meal-empty { padding: 4px; }

.file-pick { display: flex; align-items: center; justify-content: center; padding: 18px; border: 2px dashed var(--border); border-radius: 12px;
  color: var(--text); font-size: 15px; cursor: pointer; margin: 0; }
.file-pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.split { display: flex; flex-wrap: wrap; gap: 8px; }
.split-item { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 14px; cursor: pointer; }
.split-item input { width: 18px; height: 18px; accent-color: var(--accent); }
.expiry { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

@media (max-width: 1000px) {
  .meal-week { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
  .quick { gap: 8px; }
  .quick-btn { padding: 12px 4px; font-size: 12px; }
  .meal-week { grid-template-columns: 1fr; }
  .meal-day { min-height: 0; }
  .shop-add { position: sticky; top: 0; z-index: 5; }
  .expiry span.muted { display: none; }
}
