/* ── Proměnné — světlý režim ─────────────────────────────────────────────── */
:root {
  --bg:           #FAF7F2;
  --bg2:          #F2EDE6;
  --text:         #2C2416;
  --text2:        #7A6A58;
  --primary:      #8B6E4E;
  --accent:       #5C7A5A;
  --border:       #D4C4B0;
  --card:         #FFFFFF;
  --radius:       16px;
  --nav-h:        68px;
  --font-h:       'Playfair Display', serif;
  --font-t:       'Inter', sans-serif;
}

/* ── Tmavý režim ─────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1C1814;
    --bg2:     #252018;
    --text:    #E8DDD0;
    --text2:   #A8998A;
    --primary: #C4986A;   /* světlejší hnědá — čitelná na tmavém pozadí */
    --accent:  #7DAB7A;
    --border:  #3A3028;
    --card:    #26201A;
  }
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-t);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Horní lišta ─────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  font-family: var(--font-h);
  font-size: 1.4rem;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--bg2); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-family: var(--font-t);
}

/* ── Obsah záložek ───────────────────────────────────────────────────────── */
.tab-content {
  display: none;
  padding: 1.2rem;
  padding-bottom: calc(var(--nav-h) + 1rem);
  min-height: calc(100dvh - 57px);
}
.tab-content.active { display: block; }

/* ── Placeholder karta (prozatím místo obsahu) ───────────────────────────── */
.placeholder-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  gap: 0.8rem;
}

.placeholder-tab .ikona { font-size: 2.5rem; }

.placeholder-tab h3 {
  font-family: var(--font-h);
  font-size: 1.3rem;
  color: var(--primary);
}

.placeholder-tab p {
  color: var(--text2);
  font-size: 0.9rem;
  max-width: 260px;
  line-height: 1.5;
}

/* ── FAB tlačítko (+) ────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  right: 1.2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #FAF7F2;
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(139, 110, 78, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 15;
}
.fab:active { transform: scale(0.93); box-shadow: 0 2px 8px rgba(139,110,78,0.3); }

/* ── Dolní navigace ──────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text2);
  font-family: var(--font-t);
  transition: color 0.15s;
}

.nav-btn .nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-btn .nav-label { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.02em; }

.nav-btn.active {
  color: var(--primary);
}

.nav-btn.active .nav-icon {
  transform: translateY(-1px);
}

/* ── Přihlašovací stránka ────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-karta {
  width: 100%;
  max-width: 360px;
  padding: 2.2rem 1.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(44, 36, 22, 0.08);
}

.login-logo { text-align: center; margin-bottom: 2rem; }

.login-logo h1 {
  font-family: var(--font-h);
  font-size: 2rem;
  color: var(--primary);
}

.login-logo p { font-size: 0.82rem; color: var(--text2); margin-top: 0.2rem; }

.form-skupina { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
input:focus { border-color: var(--primary); }

.btn-primarni {
  width: 100%;
  padding: 0.8rem;
  margin-top: 0.4rem;
  background: var(--primary);
  color: #FAF7F2;
  border: none;
  border-radius: 10px;
  font-family: var(--font-t);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primarni:hover { opacity: 0.88; }
.btn-primarni:disabled { opacity: 0.5; cursor: not-allowed; }

.chyba {
  margin-top: 0.8rem;
  padding: 0.65rem 0.9rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}
.chyba.zobraz { display: block; }

/* ── Timeline — karty záznamů ────────────────────────────────────────────── */
#timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: calc(var(--nav-h) + 80px);
}

.entry-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  color: var(--text2);
}

.entry-autor-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--primary);
}

.entry-autor-jmeno { font-weight: 600; font-size: 0.78rem; }
.entry-datum { flex: 1; }
.entry-cas { font-size: 0.75rem; opacity: 0.5; }

.entry-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  background: var(--bg2);
  font-size: 0.7rem;
  font-weight: 600;
}
.entry-badge.soukrome { color: var(--text2); }

.entry-delete {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.entry-delete:hover { opacity: 1; }

.entry-title {
  font-family: var(--font-h);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.entry-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.7rem;
  white-space: pre-wrap;
}

.entry-tagy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.tag-chip.removable {
  cursor: pointer;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
}
.tag-chip.removable:hover { opacity: 0.7; }

/* ── Timeline — stavy ────────────────────────────────────────────────────── */
.timeline-loading,
.timeline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 50vh;
  text-align: center;
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Formulář — bottom sheet ─────────────────────────────────────────────── */
.form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.form-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.form-sheet {
  width: 100%;
  max-height: 92dvh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  padding-bottom: env(safe-area-inset-bottom);
}

.form-overlay.open .form-sheet {
  transform: translateY(0);
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.form-title {
  font-family: var(--font-h);
  font-size: 1.1rem;
  color: var(--primary);
}

.form-close-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text2);
  cursor: pointer;
  padding: 0.3rem;
}

.btn-ulozit {
  background: var(--primary);
  color: #FAF7F2;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-family: var(--font-t);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-ulozit:disabled { opacity: 0.5; }

.form-body {
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.volitelne { font-weight: 400; opacity: 0.6; }

textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.95rem;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}
textarea:focus { border-color: var(--primary); }

/* Hashtagy ve formuláři */
.tag-wrap {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  background: var(--bg);
  transition: border-color 0.2s;
}
.tag-wrap:focus-within { border-color: var(--primary); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.tag-list:empty { margin-bottom: 0; }

#tag-input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.9rem;
  width: 100%;
  padding: 0.1rem 0;
}

/* Checkboxy */
.form-checkboxy {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="date"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.95rem;
  outline: none;
}
input[type="date"]:focus { border-color: var(--primary); }

/* ── Fotky — strip v kartě záznamu ──────────────────────────────────────────── */
.entry-foto-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-top: 0.7rem;
  padding-bottom: 0.25rem;
  scrollbar-width: none;   /* Firefox */
}
.entry-foto-strip::-webkit-scrollbar { display: none; }

.entry-foto-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
  border: 1px solid var(--border);
}
.entry-foto-thumb:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* ── Lightbox — fullscreen náhled ───────────────────────────────────────────── */
.foto-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.foto-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.foto-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}
.foto-lightbox-img {
  position: relative;
  max-width: 96vw;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  z-index: 1;
}
.foto-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.foto-lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ── Formulář — foto picker ──────────────────────────────────────────────────── */
.btn-foto {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg2);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--text2);
  font-family: var(--font-t);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-foto:hover { border-color: var(--primary); color: var(--primary); }

.foto-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.foto-thumb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.foto-thumb-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.foto-thumb-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  font-size: 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Mini týdenní strip (Timeline nahoře) ────────────────────────────────────── */
.mini-strip-wrap {
  margin: -1.2rem -1.2rem 0.8rem;
  padding: 0.55rem 1rem 0.45rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 10;
}

.mini-strip {
  display: flex;
  justify-content: space-between;
  max-width: 480px;
  margin: 0 auto;
}

.mini-strip-den {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.mini-strip-nazev {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
}

.mini-strip-cislo {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
}

.mini-strip-den.dnes .mini-strip-cislo {
  background: var(--primary);
  color: #FAF7F2;
  font-weight: 700;
}

.mini-strip-tecky {
  display: flex;
  gap: 2px;
  justify-content: center;
  min-height: 6px;
}

.mini-strip-tecka {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mini-strip-tecka.denik  { background: var(--primary); }
.mini-strip-tecka.google { background: #4285F4; }

/* ── Kalendář — měsíční přehled ──────────────────────────────────────────────── */
.kal-stav {
  text-align: center;
  color: var(--text2);
  padding: 3rem 1rem;
  font-size: 0.9rem;
}

.kal-mesic-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.kal-mesic-nazev {
  font-family: var(--font-h);
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 600;
}

.kal-prev, .kal-next {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.8rem;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.15s;
}
.kal-prev:hover, .kal-next:hover { background: var(--bg2); }

.kal-mrizka {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 1rem;
}

.kal-dow {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
  padding: 0.35rem 0;
}

.kal-den {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.3rem 0.15rem;
  border-radius: 10px;
  min-height: 46px;
  gap: 3px;
  transition: background 0.15s;
}

.kal-den.prazdny { visibility: hidden; }

.kal-den.ma-zaznamy { cursor: pointer; }
.kal-den.ma-zaznamy:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.kal-den.vybrano {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.kal-den-cislo {
  font-size: 0.88rem;
  color: var(--text);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.kal-den.dnes .kal-den-cislo {
  background: var(--primary);
  color: #FAF7F2;
  font-weight: 700;
}

.kal-tecka {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.85;
}

/* Panel se záznamy pod mřížkou */
.kal-panel {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  padding-bottom: calc(var(--nav-h) + 80px);
  min-height: 3rem;
}

.kal-panel-datum {
  font-family: var(--font-h);
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.kal-panel-zaznam {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.kal-panel-titulek {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.kal-panel-text {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ── Záložka Více ────────────────────────────────────────────────────────────── */
.vice-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 0.5rem;
  padding-bottom: calc(var(--nav-h) + 2rem);
}

.vice-sekce {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vice-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text2);
}

.vice-hodnota {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}

.vice-google-stav {
  font-size: 0.9rem;
  color: var(--text2);
}
.vice-google-stav.ok { color: var(--accent); font-weight: 600; }

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
  width: fit-content;
}
.btn-google:hover { border-color: var(--primary); }

.btn-google-odpojit {
  background: none;
  border: none;
  color: var(--text2);
  font-family: var(--font-t);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.btn-google-odpojit:hover { opacity: 1; }

/* ── Toast notifikace ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 100;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  white-space: nowrap;
}
.toast-ok   { background: var(--accent); color: #FAF7F2; }
.toast-err  { background: #c0392b;      color: #FAF7F2; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Kalendář — Google tečky a legenda ───────────────────────────────────────── */
.kal-tecky {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.kal-tecka {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.kal-tecka.denik  { background: var(--primary); }
.kal-tecka.google { background: #4285F4; }

.kal-legenda {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text2);
  margin-bottom: 0.8rem;
}

/* Google badge v panelu */
.kal-panel-google-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4285F4;
  margin-bottom: 0.2rem;
}

.kal-panel-zaznam.google {
  border-left: 3px solid #4285F4;
}

.kal-panel-akce {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.kal-btn-zaznam {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  border-radius: 8px;
  font-family: var(--font-t);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.kal-btn-zaznam:hover {
  background: color-mix(in srgb, var(--primary) 25%, transparent);
}

.kal-btn-seznam {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 8px;
  font-family: var(--font-t);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.kal-btn-seznam:hover {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
}
.kal-btn-seznam:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Bucket list ─────────────────────────────────────────────────────────────── */
.bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.bucket-nadpis {
  font-family: var(--font-h);
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 600;
}

.btn-bucket-new {
  background: var(--primary);
  color: #FAF7F2;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-t);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-bucket-new:hover { opacity: 0.85; }

/* Přidávací formulář */
.bucket-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.bucket-form input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.bucket-form input[type="text"]:focus { border-color: var(--primary); }

.bucket-form-row {
  display: flex;
  gap: 0.6rem;
}

.bucket-select {
  flex: 1;
  padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.9rem;
  outline: none;
}

.btn-bucket-pridat {
  background: var(--accent);
  color: #FAF7F2;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-t);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.btn-bucket-pridat:hover { opacity: 0.85; }
.btn-bucket-pridat:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sekce nadpis */
.bucket-sekce-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text2);
  margin: 1.2rem 0 0.5rem;
}
.bucket-sekce-label--hotovo { color: var(--accent); }

/* Seznam karet */
.bucket-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: calc(var(--nav-h) + 80px);
}

/* Karta položky */
.bucket-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  transition: opacity 0.2s;
}
.bucket-item--hotovo {
  opacity: 0.6;
}

.bucket-check {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.bucket-check:hover { transform: scale(1.15); }

.bucket-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bucket-item-title {
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bucket-item--hotovo .bucket-item-title {
  text-decoration: line-through;
}

.bucket-item-typ {
  font-size: 0.72rem;
  color: var(--text2);
}

.bucket-delete {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  opacity: 0.4;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.bucket-delete:hover { opacity: 1; }

/* ── Seznamy — přehled ───────────────────────────────────────────────────────── */
.list-new-form {
  flex-direction: column;
  gap: 0.7rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.list-overview {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: calc(var(--nav-h) + 80px);
}

.list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.15s;
}
.list-card:hover { border-color: var(--primary); }

.list-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.list-card-emoji { font-size: 1.3rem; flex-shrink: 0; }

.list-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.list-card-title {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-meta {
  font-size: 0.75rem;
  color: var(--text2);
}

.list-progress-wrap {
  width: 52px;
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.list-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.list-delete-btn {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  opacity: 0.35;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.list-delete-btn:hover { opacity: 1; }

/* ── Seznamy — detail ─────────────────────────────────────────────────────────── */
.list-detail-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.list-back-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-t);
  padding: 0.3rem 0;
  flex-shrink: 0;
}

.list-detail-title {
  font-family: var(--font-h);
  font-size: 1.2rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-add-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.list-add-row input[type="text"] {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-t);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.list-add-row input:focus { border-color: var(--primary); }

.list-empty-hint {
  text-align: center;
  color: var(--text2);
  font-size: 0.88rem;
  margin-top: 2rem;
  line-height: 1.6;
}

.list-items-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}

.item-check {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.item-check:hover { transform: scale(1.15); }

.list-item-text {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text);
  min-width: 0;
}

.list-item--done .list-item-text {
  text-decoration: line-through;
  color: var(--text2);
}

.item-delete {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  opacity: 0.35;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.item-delete:hover { opacity: 1; }

/* Splněné položky — skryté za <details> */
.list-done-details {
  margin-top: 0.8rem;
}

.list-done-summary {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  padding: 0.3rem 0;
  user-select: none;
}
.list-done-summary::-webkit-details-marker { display: none; }

.list-items-group--done {
  padding-bottom: calc(var(--nav-h) + 80px);
}

/* ── Připomenutí u seznamů ─────────────────────────────────────────────────── */

.list-reminders {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  padding-bottom: calc(var(--nav-h) + 1rem);
}

.list-reminders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.list-reminders-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.btn-add-reminder {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-add-reminder:hover { background: var(--surface-2); }

/* Formulář nového připomenutí */
.reminder-form {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.8rem;
  background: var(--surface-2);
  border-radius: 10px;
}
.reminder-form input[type="datetime-local"],
.reminder-form input[type="text"] {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-1);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}
.reminder-form input:focus { outline: none; border-color: var(--accent); }
.reminder-form-btns {
  display: flex;
  gap: 0.5rem;
}
.reminder-zrusit {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Jednotlivá připomenutí */
.reminder-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}
.reminder-item:last-child { border-bottom: none; }
.reminder-item--sent { opacity: 0.5; }
.reminder-cas { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.reminder-label {
  flex: 1;
  color: var(--ink-1);
  font-weight: 500;
}
.reminder-sent { color: #4caf50; font-size: 0.8rem; }
.reminder-err  { font-size: 0.8rem; color: var(--ink-3); }
.reminder-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  margin-left: auto;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.reminder-delete:hover { opacity: 1; color: #c0392b; }

/* ── Správa uživatelů (admin sekce v Více) ────────────────────────────────── */
.user-mgmt-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.user-mgmt-item:last-child { border-bottom: none; }

.user-mgmt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.user-mgmt-name {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}
.user-toggle-btn {
  border: none;
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.user-toggle--on  { background: #e8f5e9; color: #2e7d32; }
.user-toggle--off { background: #fce4ec; color: #c62828; }
.user-toggle-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Test push tlačítko ───────────────────────────────────────────────────── */
.btn-test-push {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}
.btn-test-push:hover { background: var(--border); }
.btn-test-push:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Edit tlačítko v kartě záznamu ────────────────────────────────────────── */
.entry-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.15rem 0.35rem;
  color: var(--text2);
  opacity: 0.5;
  transition: opacity 0.15s;
  margin-left: auto;
}
.entry-edit:hover { opacity: 1; color: var(--primary); }

/* ── Vymazat hotové tlačítko ──────────────────────────────────────────────── */
.btn-clear-done {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text2);
  opacity: 0.6;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.btn-clear-done:hover { opacity: 1; color: #c0392b; }
