/* Burgi my — mobile-first, Luxury Neon Dark (paleta jako ostatní Burgi appky) */
:root {
  --bg: #080C14; --bg-card: #111827; --bg-el: #1A2332; --bg-input: #0D1520;
  --line: rgba(255, 255, 255, .06);
  --text: #F1F5F9; --text-2: #94A3B8; --muted: #64748B;
  --teal: #03CEA4; --purple: #9046CF; --pink: #FF2D95; --yellow: #FFD60A; --orange: #FF7A18; --cyan: #00D4FF;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background-color: var(--bg); }
@media (display-mode: standalone) { html, body { overscroll-behavior: none; overflow-x: clip; } }
body {
  min-height: 100dvh; color: var(--text);
  background: linear-gradient(160deg, #080C14 0%, #0A1628 55%, #0D1F2D 100%) fixed;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(84px + var(--safe-bottom));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
code { font: 13px ui-monospace, "JetBrains Mono", monospace; color: var(--cyan); }

/* ── top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(8, 12, 20, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.topbar h1 small { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.page-home .topbar h1 { background: linear-gradient(90deg, var(--teal), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-home .topbar h1 small { -webkit-text-fill-color: var(--text-2); }
.topbar .back { font-size: 34px; line-height: 1; padding: 0 8px 4px 0; color: var(--teal); }
.topbar-link { font-size: 20px; padding: 6px; }
.page { padding: 12px 16px; max-width: 760px; margin: 0 auto; }

/* ── flash / toast ── */
.flashes { padding: 10px 16px 0; max-width: 760px; margin: 0 auto; }
.flash { background: var(--bg-el); border-left: 3px solid var(--teal); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 6px; }
.flash.error { border-left-color: var(--pink); }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); z-index: 70;
  background: var(--bg-el); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.toast button { color: var(--teal); font-weight: 600; margin-left: 10px; }

/* ── tab bar ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; align-items: flex-end;
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: rgba(8, 12, 20, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tabbar a span { font-size: 21px; line-height: 1.1; position: relative; filter: grayscale(.7); }
.tabbar a.on { color: var(--teal); }
.tabbar a.on span { filter: none; }
.tabbar a.add span {
  width: 54px; height: 54px; margin-top: -22px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; font-weight: 300;
  background: linear-gradient(135deg, var(--teal), var(--purple)); color: #fff; filter: none; box-shadow: 0 6px 22px rgba(3, 206, 164, .35);
}
.badge { position: absolute; top: -4px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--pink); color: #fff; font: 700 11px/18px -apple-system, sans-serif; text-align: center; }

/* ── pokračovat ── */
.resume { display: block; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(3, 206, 164, .14), rgba(144, 70, 207, .14)); border: 1px solid rgba(3, 206, 164, .25); }
.resume span { display: block; font-size: 12px; color: var(--teal); font-weight: 600; }
.resume strong { font-size: 15px; font-weight: 600; }

/* ── čipy kategorií ── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 14px; background: var(--bg-el); border: 1px solid var(--line); white-space: nowrap; }
.chip b { font: 600 12px ui-monospace, "JetBrains Mono", monospace; color: var(--teal); margin-left: 2px; }
.chip.on { background: rgba(3, 206, 164, .16); border-color: var(--teal); }
.chip.empty { opacity: .45; }

/* ── seznamy ── */
.list { list-style: none; margin: 0 0 12px; padding: 0; }
.row { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 6px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); touch-action: pan-y; transition: transform .15s, opacity .2s; }
.row.unseen::after { content: ""; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.row.st-done .row-title { text-decoration: line-through; color: var(--muted); }
.row.swiping { transition: none; }
.row.swipe-right { background: linear-gradient(90deg, rgba(3, 206, 164, .35), var(--bg-card) 60%); }
.row.swipe-left { background: linear-gradient(270deg, rgba(255, 45, 149, .3), var(--bg-card) 60%); }
.row.gone { opacity: 0; transform: translateX(110%) !important; }
.row.gone-left { opacity: 0; transform: translateX(-110%) !important; }
.check { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--muted); color: var(--teal); font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.row.st-done .check { border-color: var(--teal); background: rgba(3, 206, 164, .15); }
.kind-ico { flex: none; width: 28px; text-align: center; font-size: 18px; }
.handle { flex: none; color: var(--muted); font-size: 16px; letter-spacing: -3px; padding: 4px 2px; cursor: grab; touch-action: none; user-select: none; }
.row.dragging { opacity: .85; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); border-color: var(--teal); z-index: 5; }
.row-main { flex: 1; min-width: 0; display: block; }
.row-title { display: block; font-size: 15.5px; font-weight: 550; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.m { font-style: normal; font-size: 12px; color: var(--text-2); }
.m.due { color: var(--yellow); }
.m.due.today { color: var(--orange); font-weight: 600; }
.m.due.late { color: var(--pink); font-weight: 600; }
.m.doing { color: var(--cyan); }
.m.warn { color: var(--pink); }
.sec { font-size: 14px; font-weight: 650; color: var(--teal); text-transform: uppercase; letter-spacing: .04em; margin: 18px 2px 8px; }
.sec b { font: 600 12px ui-monospace, monospace; color: var(--muted); }
.card-row { display: flex; align-items: center; gap: 8px; padding: 11px 12px; margin-bottom: 6px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.row-actions { display: flex; gap: 6px; }
details { margin: 10px 0; }
details > summary { cursor: pointer; color: var(--text-2); font-size: 14px; padding: 8px 2px; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.drawer { border-top: 1px solid var(--line); padding-top: 6px; }
.empty-state { text-align: center; padding: 34px 10px; color: var(--text-2); }
.hint { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0; }
.lead { font-size: 14px; color: var(--text-2); margin: 4px 2px 12px; }
.meta { font-size: 12px; color: var(--muted); }
.meta.center { text-align: center; }

/* ── tlačítka a formuláře ── */
.btn-primary, .btn-secondary { display: inline-block; text-align: center; padding: 12px 18px; border-radius: 12px; font-weight: 650; font-size: 16px; }
.btn-primary { background: var(--teal); color: #04241d; }
.btn-secondary { background: var(--bg-el); border: 1px solid rgba(255, 255, 255, .1); }
.btn-big { padding: 15px 22px; font-size: 17px; }
.wide { display: block; width: 100%; margin-top: 10px; }
.btn-small { padding: 7px 11px; border-radius: 10px; font-size: 14px; background: var(--bg-el); border: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.btn-small.ok { color: var(--teal); border-color: rgba(3, 206, 164, .35); }
.btn-small.danger { color: var(--pink); }
.btn-small.ai { color: var(--purple); border-color: rgba(144, 70, 207, .45); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; padding: 10px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(3, 206, 164, .16); }
textarea { resize: vertical; line-height: 1.45; }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 4px; }
label small { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
input[type=date] { min-height: 44px; }

/* ── detail ── */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.quick form { display: contents; }
.edit { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.parent-link { display: block; font-size: 13px; color: var(--purple); margin-bottom: 10px; }
.kids { margin-top: 8px; }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; }
.raw p { white-space: pre-wrap; font-size: 14px; color: var(--text-2); background: var(--bg-card); border-radius: 10px; padding: 12px; margin: 4px 0; }

/* ── zápis ── */
.capture textarea { font-size: 18px; min-height: 180px; margin-bottom: 12px; }
.capture .btn-big { width: 100%; }
.tips { margin-top: 18px; font-size: 14px; color: var(--text-2); }
.tips ul { padding-left: 18px; margin: 6px 0; }
.search-inline { margin: 6px 0 12px; }

/* ── nastavení ── */
.panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px 14px; margin-bottom: 14px; }
.cat-edit { border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0; }
.cat-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.emoji-in { width: 52px; flex: none; text-align: center; }
.pos-in { width: 62px; flex: none; }
.cat-edit textarea { font-size: 13px; color: var(--text-2); }
.del { display: flex; gap: 4px; align-items: center; font-size: 12px; margin: 0; flex: none; }
.del input { width: auto; }

/* ── login ── */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.login-logo { font-size: 64px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, var(--teal), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login p { color: var(--text-2); }
.login-error { color: var(--pink) !important; }
.dev-link { font-size: 13px; color: var(--muted); }
.page-login { padding-bottom: 0; }

@media (min-width: 700px) { .row-title { font-size: 16px; } }
