/* ═══════════════════════════════════════════════════════════════════
   Wino Morawskie CRM — luxury vinotéka design
   Brand: burgundy + champagne gold + cream
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Brand colors — sladěné s logem */
  --wine:         #7A2B3A;
  --wine-dark:    #5C1E29;
  --wine-darker:  #421218;
  --wine-light:   #A04555;
  --wine-soft:    rgba(122, 43, 58, 0.08);

  --gold:         #C9A96E;
  --gold-light:   #DBC298;
  --gold-soft:    rgba(201, 169, 110, 0.15);

  --cream:        #FAF5EC;
  --cream-dark:   #F0E8D8;
  --surface:      #FFFFFF;
  --surface-2:    #F7F1E6;
  --border:       #E8DDC8;
  --border-strong:#D4C5A0;

  --text:         #2A1A14;
  --text-soft:    #4D3A2E;
  --text-muted:   #8B7560;
  --text-faint:   #B8A88E;

  --success:      #4A7C3A;
  --warning:      #B8782A;
  --danger:       #A33838;
  --info:         #5B7C99;

  --shadow-sm:    0 1px 2px rgba(66, 18, 24, 0.06);
  --shadow:       0 2px 8px rgba(66, 18, 24, 0.08), 0 1px 2px rgba(66, 18, 24, 0.04);
  --shadow-lg:    0 12px 32px rgba(66, 18, 24, 0.12), 0 4px 8px rgba(66, 18, 24, 0.06);
  --shadow-wine:  0 6px 20px rgba(122, 43, 58, 0.2);

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    18px;

  --font-serif:   "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans:    "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-base:    var(--font-sans);

  /* Zoom — řízeno [data-zoom] na <html> */
  --font-size-base: 16px;
}
html[data-zoom="sm"] { --font-size-base: 15px; }
html[data-zoom="md"] { --font-size-base: 17px; }
html[data-zoom="lg"] { --font-size-base: 19px; }
html[data-zoom="xl"] { --font-size-base: 22px; }

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Decorative pattern overlay — subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(201, 169, 110, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(122, 43, 58, 0.03) 0%, transparent 40%);
  z-index: -1;
}

a { color: var(--wine); text-decoration: none; transition: color .15s; }
a:hover { color: var(--wine-light); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--wine-dark);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: 2.1rem; line-height: 1.15; margin-bottom: 0.4em; }
h2 { font-size: 1.55rem; line-height: 1.2;  margin: 1.2em 0 0.5em; }
h3 { font-size: 1.2rem;  line-height: 1.25; margin: 1em 0 0.4em; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }

/* Decorative divider under h1 */
h1.has-rule::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold-light) 100%);
  margin-top: 12px;
  border-radius: 2px;
}

p { margin: 0 0 0.8em; color: var(--text-soft); }

/* ───────────────────────────────────────────────────────────────────
   Layout — sidebar + main
   ─────────────────────────────────────────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--wine-dark) 0%, var(--wine-darker) 100%);
  color: var(--cream);
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 50%, transparent);
  opacity: 0.4;
}

.sidebar .brand {
  text-align: center;
  padding: 6px 8px 20px;
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
  margin-bottom: 20px;
}
.sidebar .brand-mark {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.sidebar .brand-mark .glass {
  color: var(--gold);
  font-style: italic;
}
.sidebar .brand-sub {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold-light);
  margin-top: 2px;
  letter-spacing: 0.06em;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(250, 245, 236, 0.85);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all .15s ease;
  border-left: 2px solid transparent;
}
.sidebar nav a:hover {
  background: rgba(201, 169, 110, 0.1);
  color: var(--cream);
  text-decoration: none;
}
.sidebar nav a.active {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold-light);
  border-left-color: var(--gold);
  font-weight: 600;
}
.sidebar nav a .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.6;
}

.sidebar .footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 169, 110, 0.2);
  font-size: 0.85rem;
}
.sidebar .footer .user {
  color: var(--gold-light);
  font-style: italic;
  font-family: var(--font-serif);
  margin-bottom: 8px;
  padding: 0 4px;
}
.sidebar .footer button {
  background: transparent;
  color: rgba(250, 245, 236, 0.75);
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.85rem;
  width: 100%;
  transition: all .15s;
}
.sidebar .footer button:hover { background: rgba(201, 169, 110, 0.1); color: var(--gold-light); border-color: var(--gold); }

.main {
  padding: 40px 48px;
  overflow-y: auto;
  max-height: 100vh;
}
.main > h1 { margin-top: 0; }

/* ───────────────────────────────────────────────────────────────────
   Cards
   ─────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  position: relative;
}
.card.card-accent {
  border-top: 3px solid var(--gold);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Stat cards */
.stat {
  background: linear-gradient(135deg, var(--surface) 0%, var(--cream) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle at top right, var(--gold-soft), transparent 70%);
  pointer-events: none;
}
.stat .icon {
  width: 32px;
  height: 32px;
  color: var(--gold);
  margin-bottom: 10px;
  stroke-width: 1.4;
}
.stat .label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat .value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--wine-dark);
  line-height: 1.1;
  margin-top: 4px;
}

/* ───────────────────────────────────────────────────────────────────
   Forms
   ─────────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=url], input[type=number],
textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-base);
  font-size: 1rem;
  transition: all .15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--wine-light);
  box-shadow: 0 0 0 3px var(--wine-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%237A2B3A' d='M6 8.5L2 4.5h8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ───────────────────────────────────────────────────────────────────
   Buttons
   ─────────────────────────────────────────────────────────────────── */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: #fff;
  border: 0;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
button:hover, .btn:hover {
  background: linear-gradient(180deg, var(--wine-light) 0%, var(--wine) 100%);
  box-shadow: var(--shadow-wine);
  transform: translateY(-1px);
}
button:active, .btn:active { transform: translateY(0); }
button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: var(--wine-dark);
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--wine-dark);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--cream-dark);
  color: var(--wine-dark);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--wine);
  border: 0;
  box-shadow: none;
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--wine-soft); color: var(--wine-dark); box-shadow: none; transform: none; }

.btn-danger { background: linear-gradient(180deg, #c34e4e 0%, var(--danger) 100%); }
.btn-danger:hover { background: linear-gradient(180deg, #d05a5a 0%, #b04040 100%); box-shadow: 0 6px 20px rgba(163, 56, 56, 0.25); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--wine-darker);
  font-weight: 600;
}
.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold) 0%, #B89556 100%);
  color: var(--wine-darker);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
}

/* ───────────────────────────────────────────────────────────────────
   Tables
   ─────────────────────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--cream); }

/* ───────────────────────────────────────────────────────────────────
   Pills / badges
   ─────────────────────────────────────────────────────────────────── */

.pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-soft);
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
}
.pill-success { background: rgba(74, 124, 58, 0.1);  color: var(--success); border-color: rgba(74, 124, 58, 0.25); }
.pill-warning { background: rgba(184, 120, 42, 0.1); color: var(--warning); border-color: rgba(184, 120, 42, 0.25); }
.pill-danger  { background: rgba(163, 56, 56, 0.1);  color: var(--danger);  border-color: rgba(163, 56, 56, 0.25); }
.pill-info    { background: var(--wine-soft);        color: var(--wine);    border-color: rgba(122, 43, 58, 0.2); }
.pill-gold    { background: var(--gold-soft);        color: #8C7240;        border-color: rgba(201, 169, 110, 0.4); }

/* ───────────────────────────────────────────────────────────────────
   Login screen — elegant centered card
   ─────────────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at top, var(--wine-dark) 0%, var(--wine-darker) 70%),
    var(--wine-darker);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: "";
  position: absolute;
  inset: -50%;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(201, 169, 110, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(160, 69, 85, 0.2) 0%, transparent 50%);
  animation: drift 20s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

.login-card {
  background: var(--surface);
  padding: 44px 40px 36px;
  border-radius: var(--radius-lg);
  width: 400px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(201, 169, 110, 0.2);
  position: relative;
  z-index: 1;
}
.login-card .logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.login-card .logo-wrap img {
  max-width: 240px;
  height: auto;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  margin: 8px 0 28px;
  letter-spacing: 0.03em;
}
.login-card .ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 28px;
  width: 60%;
}
.login-card .ornament .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.login-card .ornament .dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  transform: rotate(45deg);
}

/* ───────────────────────────────────────────────────────────────────
   Alerts
   ─────────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid;
  font-size: 0.92rem;
}
.alert-error   { background: rgba(163, 56, 56, 0.06);  border-color: rgba(163, 56, 56, 0.25); color: var(--danger); }
.alert-success { background: rgba(74, 124, 58, 0.06);  border-color: rgba(74, 124, 58, 0.25); color: var(--success); }
.alert-info    { background: var(--wine-soft);          border-color: rgba(122, 43, 58, 0.2);  color: var(--wine-dark); }
.alert-gold    { background: var(--gold-soft);          border-color: rgba(201, 169, 110, 0.4); color: #8C7240; }

/* "pro důchodce" — drobné vysvětlení pod cizími slovy */
.hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  margin-top: 3px;
  line-height: 1.3;
}
.btn .hint, button .hint {
  font-size: 0.7rem;
  color: rgba(250, 245, 236, 0.78);
  margin-top: 1px;
}
.btn-secondary .hint { color: var(--text-muted); }
.btn-gold .hint { color: rgba(66, 18, 24, 0.7); }
.tpl-btn {
  flex-direction: column;
  padding: 10px 16px;
  line-height: 1.2;
  min-width: 130px;
}

/* ─── Floating chat widget ────────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(122, 43, 58, 0.4);
  border: 2px solid var(--gold);
  font-size: 1.5rem;
  transition: all .2s;
}
.chat-fab:hover { transform: scale(1.06) rotate(-4deg); box-shadow: 0 12px 32px rgba(122, 43, 58, 0.5); }
.chat-fab svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.chat-fab .badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--gold);
  color: var(--wine-darker);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 540px;
  max-height: calc(100vh - 140px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px var(--border);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; animation: slideUp .25s ease; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--wine-dark) 0%, var(--wine-darker) 100%);
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.chat-header .title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
}
.chat-header .subtitle {
  font-size: 0.78rem;
  color: var(--gold-light);
  font-style: italic;
}
.chat-header .close-x {
  margin-left: auto;
  background: transparent;
  color: var(--cream);
  padding: 6px 10px;
  font-size: 1.2rem;
  border: 0;
  cursor: pointer;
  box-shadow: none;
}
.chat-header .close-x:hover { background: rgba(255,255,255,0.1); transform: none; box-shadow: none; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg.assistant.typing {
  color: var(--text-muted);
  font-style: italic;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.chat-input textarea {
  flex: 1;
  min-height: 38px;
  max-height: 100px;
  resize: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.chat-input button {
  align-self: flex-end;
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
}

/* Wine glass marker on map — pure CSS via .home-marker */
.home-marker {
  background: var(--wine);
  border: 3px solid var(--gold);
  border-radius: 50%;
  width: 36px !important;
  height: 36px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  color: var(--gold);
  font-size: 18px;
}
.home-marker::after {
  content: "🍷";
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.4));
}

/* ───────────────────────────────────────────────────────────────────
   Map (Leaflet)
   ─────────────────────────────────────────────────────────────────── */

#map {
  height: 540px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.leaflet-container { font-family: var(--font-base) !important; }

/* ───────────────────────────────────────────────────────────────────
   Loader
   ─────────────────────────────────────────────────────────────────── */

.loader {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(250, 245, 236, 0.3);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.loader-dark {
  border-color: var(--wine-soft);
  border-top-color: var(--wine);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────────────────────────────────────────────────────────────
   A−/A+ zoom toggle — fixed bottom left
   ─────────────────────────────────────────────────────────────────── */

.zoom-toggle {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 200;
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.zoom-toggle button {
  background: transparent;
  color: var(--wine-dark);
  font-family: var(--font-serif);
  font-weight: 600;
  padding: 6px 14px;
  font-size: 1rem;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  transition: background .12s;
  min-width: 38px;
}
.zoom-toggle button:hover { background: var(--cream); transform: none; box-shadow: none; }
.zoom-toggle button:disabled { color: var(--text-faint); cursor: default; }
.zoom-toggle .divider { width: 1px; background: var(--border); }
.zoom-toggle .label-small  { font-size: 0.8rem; }
.zoom-toggle .label-big    { font-size: 1.25rem; }

/* ───────────────────────────────────────────────────────────────────
   Modal
   ─────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 26, 20, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ───────────────────────────────────────────────────────────────────
   Utility classes
   ─────────────────────────────────────────────────────────────────── */

.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.mt-0  { margin-top: 0 !important; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0 !important; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-small { font-size: 0.85rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-serif { font-family: var(--font-serif); }
.text-italic { font-style: italic; }

/* ───────────────────────────────────────────────────────────────────
   Mobile
   ─────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    padding: 12px 16px;
    align-items: center;
    gap: 12px;
  }
  .sidebar .brand, .sidebar .footer { display: none; }
  .sidebar nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
  }
  .sidebar nav a { padding: 8px 12px; font-size: 0.85rem; white-space: nowrap; }
  .sidebar nav a .nav-icon { display: none; }
  .main { padding: 24px 20px; max-height: none; }
  h1 { font-size: 1.7rem; }
  .zoom-toggle { bottom: 12px; left: 12px; }
}
