/* ═══════════════════════════════════════════════════════════════
   Home App – Apple-inspired minimalist design
   Mobile-first, CSS Grid layout
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #F5F5F7;
  --surface:   #FFFFFF;
  --accent:    #0071E3;
  --accent-h:  #0077ED;
  --danger:    #FF3B30;
  --warning:   #FF9500;
  --success:   #34C759;
  --text:      #1D1D1F;
  --text-sec:  #6E6E73;
  --border:    #D2D2D7;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius:    14px;
  --radius-sm: 8px;
  --font:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
  --sidebar-w: 240px;
  --topbar-h:  56px;
  --nav-h:     64px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ── Utility ───────────────────────────────────────────────── */
.hidden  { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Login screen ──────────────────────────────────────────── */
#login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #f0f4ff 0%, #f5f5f7 100%);
}
.login-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
}
.login-card .logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text);
}
.login-card .tagline {
  text-align: center;
  color: var(--text-sec);
  font-size: .9rem;
  margin-bottom: 32px;
}

/* ── App shell layout ──────────────────────────────────────── */
#app-shell {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-columns: 1fr;
  min-height: 100dvh;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
}
.topbar h2 {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.3px;
}
#topbar-actions { display: flex; gap: 8px; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 90;
  padding: 0 8px;
}
.nav-list {
  display: flex;
  list-style: none;
  width: 100%;
  justify-content: space-around;
}
.nav-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.nav-list li span:not(.nav-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nav-list li .nav-icon { font-size: 1.4rem; line-height: 1; }
.nav-list li.active { color: var(--accent); }
.nav-list li:hover  { background: var(--bg); }

.sidebar-user   { display: none; } /* skryto na mobilu, viditelné pouze na desktopu */
.sidebar-bottom { display: none; } /* desktop only */

/* Main content */
#main-content {
  padding: 20px 16px calc(var(--nav-h) + 20px);
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ── Desktop layout ────────────────────────────────────────── */
@media (min-width: 768px) {
  #app-shell {
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
  }
  .topbar { grid-column: 1 / -1; }

  .sidebar {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100dvh - var(--topbar-h));
    width: var(--sidebar-w);
    left: 0;
    bottom: auto;
    right: auto;
    border-top: none;
    border-right: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 12px;
    justify-content: flex-start;
    gap: 4px;
  }
  .nav-list {
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
  }
  .nav-list li {
    flex-direction: row;
    font-size: .9rem;
    gap: 10px;
    padding: 10px 12px;
    justify-content: flex-start;
  }
  .nav-list li .nav-icon { font-size: 1.1rem; }
  .sidebar-user {
    display: block;
    padding: 8px 12px 16px;
    font-size: .85rem;
    color: var(--text-sec);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .sidebar-bottom {
    display: block;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  #main-content {
    padding: 28px 32px 28px;
  }
  #menu-toggle { display: none; }
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
input[type=text], input[type=password], input[type=date],
input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
textarea { resize: vertical; min-height: 90px; }
select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: #ebebef; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #e0302a; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 8px 12px;
}
.btn-ghost:hover { background: rgba(0,113,227,.08); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-sec);
  transition: background .15s;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.icon-btn { @extend .btn-icon; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.card-header h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.2px;
}
.card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.card-meta { font-size: .8rem; color: var(--text-sec); margin-bottom: 8px; }
.card-body { font-size: .9rem; color: var(--text-sec); }

/* ── Section header ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-header h2 {
  flex: 1;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.5px;
}

/* ── Search bar ────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.search-bar input[type=text] {
  flex: 1 1 0;
  min-width: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  padding-left: 38px;
  transition: flex-grow .3s cubic-bezier(.4,0,.2,1), opacity .3s ease, border-color .15s, box-shadow .15s;
}
.search-bar select {
  flex: 1 1 0;
  min-width: 80px;
  transition: flex-grow .3s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
/* Klik do vyhledávacího pole → input se mírně zvětší, select zmenší */
.search-bar:has(input[type=text]:focus) input[type=text] {
  flex-grow: 1.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230071E3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}
.search-bar:has(input[type=text]:focus) select {
  flex-grow: 0.6;
  opacity: 0.6;
}
/* Klik na výběr kategorie → select se mírně zvětší, input zmenší */
.search-bar:has(select:focus) select {
  flex-grow: 1.6;
}
.search-bar:has(select:focus) input[type=text] {
  flex-grow: 0.6;
  opacity: 0.7;
}

/* ── Badge / tag ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-sec);
}
.badge-warning { background: #fff3cd; color: #8a5600; }
.badge-danger  { background: #ffdede; color: var(--danger); }
.badge-success { background: #d4edda; color: #155724; }

/* ── Tags ──────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f0fe;
  color: #1a56db;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .78rem;
  font-weight: 500;
}

/* ── Stars ─────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; }
.star { font-size: 1.2rem; cursor: pointer; color: var(--border); transition: color .1s; }
.star.filled, .star:hover { color: #FF9F0A; }
.star-display { color: #FF9F0A; font-size: .95rem; }
.stars-input .star:hover,
.stars-input .star:hover ~ .star { color: var(--border); }
.stars-input:has(.star:hover) .star { color: #FF9F0A; }
.stars-input .star:hover ~ .star { color: var(--border) !important; }

/* ── Shopping list ─────────────────────────────────────────── */
.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: opacity .2s;
}
.shopping-item.checked { opacity: .5; }
.shopping-item.checked .item-name { text-decoration: line-through; }
.shopping-item input[type=checkbox] {
  width: 20px; height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.item-name { flex: 1; font-size: .95rem; }

/* ── Add item inline ───────────────────────────────────────── */
.add-item-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.add-item-row input { flex: 1; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn .2s ease;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 24px; }
}
.modal {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
@media (min-width: 640px) {
  .modal { border-radius: var(--radius); max-width: 560px; }
}
.modal-header {
  display: flex;
  align-items: center;
  padding: 20px 20px 0;
  margin-bottom: 16px;
}
.modal-header h3 {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.3px;
}
#modal-close {
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-body { padding: 0 20px 24px; }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 768px) {
  #toast-container { bottom: 24px; }
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  pointer-events: auto;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ── Alert banner ──────────────────────────────────────────── */
.alert-banner {
  background: #fff3cd;
  border: 1.5px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  color: #856404;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Images preview ────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.photo-item { position: relative; }
.photo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.photo-item .del-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: .7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Recipe detail ─────────────────────────────────────────── */
.recipe-embed { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius-sm); margin: 12px 0; }
.recipe-section { margin-top: 24px; }
.recipe-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: .75rem;
  margin-bottom: 10px;
}
.ingredients-list { white-space: pre-line; font-size: .95rem; line-height: 1.8; }
.step-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.step-num {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content { font-size: .95rem; line-height: 1.6; }

/* ── History accordion ─────────────────────────────────────── */
details { margin-bottom: 8px; }
details > summary {
  cursor: pointer;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '▶'; font-size: .7rem; transition: transform .2s; }
details[open] > summary::before { transform: rotate(90deg); }
.history-items { padding: 8px 16px 12px; }

/* ── Warranty card ─────────────────────────────────────────── */
.warranty-card { border-left: 4px solid var(--border); }
.warranty-card.expiring-soon { border-left-color: var(--warning); background: #fff8e6; }
.warranty-card.expiring-soon h3 { color: #8a5600; }
.warranty-card.expired { border-left-color: var(--danger); background: #fff3f3; opacity: .9; }
.warranty-card.expired h3 { color: var(--danger); }

/* ── Users table ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-sec); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: var(--bg); }

/* ── Attachment list ───────────────────────────────────────── */
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: .82rem;
}
.attachment-item a { color: var(--accent); font-weight: 500; }

/* ── Contacts compact list ─────────────────────────────────── */
.contact-list-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--bg);
  cursor: pointer;
  transition: background .12s;
  user-select: none;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: var(--bg); }
.contact-row.open { background: #f0f6ff; }
.contact-row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.contact-row-name { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.contact-row-phone { font-size: .85rem; color: var(--text-sec); white-space: nowrap; }
.contact-row-chevron { font-size: .75rem; color: var(--text-sec); transition: transform .2s; flex-shrink: 0; }
.contact-row.open .contact-row-chevron { transform: rotate(90deg); }
.contact-detail {
  padding: 12px 16px 14px 16px;
  background: #f8faff;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  display: none;
}
.contact-detail.open { display: block; }
.contact-detail-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: flex-start; }
.contact-detail-row:last-child { margin-bottom: 0; }
.contact-detail-label { color: var(--text-sec); min-width: 70px; font-size: .8rem; flex-shrink: 0; }
.contact-detail-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ── Shopping autocomplete ─────────────────────────────────── */
.add-item-wrap { flex: 1; position: relative; }
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 50;
  overflow: hidden;
}
.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: .9rem;
  border-bottom: 1px solid var(--bg);
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg); }
.suggestion-item .sug-count { font-size: .75rem; color: var(--text-sec); margin-left: auto; }

/* ── Recipe lightbox ───────────────────────────────────────── */
.photo-item img { cursor: pointer; transition: opacity .15s; }
.photo-item img:hover { opacity: .85; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Loader ────────────────────────────────────────────────── */
.loader {
  display: flex;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-sec);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .95rem; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ── Mobile action menu ────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  animation: fadeIn .2s ease;
}
.mobile-menu-sheet {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 0 16px calc(var(--nav-h) + 16px);
  animation: slideUp .25s ease;
  box-shadow: var(--shadow-lg);
}
.mobile-menu-top {
  display: flex;
  align-items: center;
  padding: 16px 0 0;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-header {
  flex: 1;
  padding-bottom: 14px;
  font-size: .88rem;
  color: var(--text-sec);
}
.mobile-menu-close {
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-start;
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.mobile-menu-item:active { background: var(--bg); }
.mobile-menu-item-danger { color: var(--danger); }
.mobile-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 0 8px;
}
/* Skrýt mobile menu na desktopu */
@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

/* ── Birthdays – banner ────────────────────────────────────── */
.bd-banner {
  background: linear-gradient(135deg, #EBF4FF 0%, #F0EAFF 100%);
  border: 1.5px solid #B8CFFF;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.bd-banner-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #4A6FA5;
  margin-bottom: 12px;
}
.bd-banner-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(180,200,255,.35);
  flex-wrap: wrap;
}
.bd-banner-item:last-child { border-bottom: none; padding-bottom: 0; }
.bd-banner-item:first-of-type { padding-top: 0; }
.bd-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.bd-banner-name { font-weight: 600; font-size: .95rem; color: var(--text); }
.bd-banner-desc { font-size: .85rem; color: #4A6FA5; }
.bd-banner-date { font-size: .85rem; color: var(--text-sec); margin-left: auto; padding-left: 8px; }
.bd-banner-days {
  font-size: .75rem;
  font-weight: 600;
  background: rgba(100,140,255,.15);
  color: #3A5CC5;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Birthdays – seznam událostí ───────────────────────────── */
.bd-event-list { margin-bottom: 14px; }
.bd-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.bd-event-row:last-child { border-bottom: none; }
.bd-event-row:hover { background: var(--bg); }
.bd-event-row.bd-event-highlighted {
  background: #EBF4FF;
}
.bd-event-row.bd-event-highlighted:hover { background: #DFF0FF; }
.bd-event-icon { font-size: 1.2rem; flex-shrink: 0; }
.bd-event-name { font-weight: 600; font-size: .92rem; min-width: 0; }
.bd-event-desc { font-size: .82rem; color: var(--text-sec); flex: 1; min-width: 0; }
.bd-event-date { font-size: .82rem; color: var(--text-sec); white-space: nowrap; }

.bd-badge-today {
  background: #d4edda;
  color: #155724;
  font-weight: 700;
}
.bd-badge-soon {
  background: #fff3cd;
  color: #8a5600;
}

/* ── Birthdays – seznam členů ──────────────────────────────── */
.bd-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.bd-member-row:last-child { border-bottom: none; }
.bd-member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.bd-member-meta { font-size: .8rem; color: var(--text-sec); }
.bd-member-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Birthdays – notifikační checkboxy ─────────────────────── */
.bd-notif-prefs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
}
.bd-notif-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-sec);
  cursor: pointer;
  user-select: none;
}
.bd-notif-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary, #007AFF);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Modal tabs ────────────────────────────────────────────── */
.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  margin-top: -4px;
}
.modal-tab-btn {
  padding: 8px 18px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.modal-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Figaro login ───────────────────────────────────────────── */
.figaro-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}
.figaro-name {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-top: 12px;
}
.figaro-tagline {
  text-align: center;
  color: var(--text-sec);
  font-size: .9rem;
  margin-top: 4px;
}
