/* ============================================================
   kdent · app.css – sdílené styly celé aplikace
   ============================================================
   Obsahuje:
     - Import písma
     - CSS proměnné (dark + light téma)
     - Layout konstanty
     - Reset
     - Sdílené komponenty (pozadí, theme toggle, formuláře,
       tlačítka, chybové hlášky, honeypot, animace)

   Každá stránka má vlastní doplňkový CSS soubor
   (login.css, calendar.css, …) který rozšiřuje tyto základy.
   ============================================================ */


/* ============================================================
   IMPORT PÍSMA
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');


/* ============================================================
   TÉMA – TMAVÉ (výchozí)
   ============================================================ */
:root,
[data-theme="dark"] {
  --bg:             #0d1019;
  --surface:        #161b28;
  --surface2:       #1c2236;
  --border:         rgba(255,255,255,0.08);
  --border-half:    rgba(255,255,255,0.04);
  --border-focus:   rgba(79,142,247,0.6);
  --accent:         #4f8ef7;
  --accent-glow:    rgba(79,142,247,0.22);
  --accent-dim:     rgba(79,142,247,0.12);
  --accent2:        #f76e4f;
  --text-primary:   #eceef4;
  --text-secondary: #7e8aa8;
  --text-muted:     #3c4460;
  --error:          #f76e4f;
  --error-bg:       rgba(247,110,79,0.1);
  --warning:        #f7b84f;
  --today-bg:       rgba(79,142,247,0.07);
  --scrollbar:      rgba(255,255,255,0.09);
  --shadow:         0 2px 16px rgba(0,0,0,0.45);
  --shadow-lg:      0 24px 64px rgba(0,0,0,0.55);
  --row-hover:      rgba(255,255,255,0.03);
  --tr:             0.18s ease;
  --mesh-1: radial-gradient(ellipse 80% 60% at 10% 20%,  rgba(79,142,247,0.08) 0%, transparent 60%);
  --mesh-2: radial-gradient(ellipse 60% 80% at 90% 80%,  rgba(79,142,247,0.05) 0%, transparent 60%);
  --mesh-3: radial-gradient(ellipse 50% 50% at 50% 50%,  rgba(167,139,250,0.04) 0%, transparent 70%);
}


/* ============================================================
   TÉMA – SVĚTLÉ
   ============================================================ */
[data-theme="light"] {
  --bg:             #f0f3fa;
  --surface:        #ffffff;
  --surface2:       #e8ecf6;
  --border:         rgba(0,0,0,0.08);
  --border-half:    rgba(0,0,0,0.04);
  --border-focus:   rgba(37,99,235,0.5);
  --accent:         #2563eb;
  --accent-glow:    rgba(37,99,235,0.15);
  --accent-dim:     rgba(37,99,235,0.08);
  --accent2:        #e11d48;
  --text-primary:   #111827;
  --text-secondary: #536080;
  --text-muted:     #a8b0c8;
  --error:          #e11d48;
  --error-bg:       rgba(225,29,72,0.08);
  --warning:        #d97706;
  --today-bg:       rgba(37,99,235,0.05);
  --scrollbar:      rgba(0,0,0,0.10);
  --shadow:         0 2px 14px rgba(0,0,0,0.09);
  --shadow-lg:      0 24px 64px rgba(0,0,0,0.12);
  --row-hover:      rgba(0,0,0,0.04);
  --tr:             0.18s ease;
  --mesh-1: radial-gradient(ellipse 80% 60% at 10% 20%,  rgba(37,99,235,0.06) 0%, transparent 60%);
  --mesh-2: radial-gradient(ellipse 60% 80% at 90% 80%,  rgba(37,99,235,0.04) 0%, transparent 60%);
  --mesh-3: radial-gradient(ellipse 50% 50% at 50% 50%,  rgba(167,139,250,0.03) 0%, transparent 70%);
}


/* ============================================================
   LAYOUT KONSTANTY
   ============================================================ */
:root {
  --font:        'Nunito', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --sidebar-w:   256px;
  --time-col-w:  54px;
  --header-h:    62px;
  --ev-radius:   4px;
  --collapse-w:  18px;
  --collapse-h:  18px;
  --collapse-tr: 0.22s ease;
}


/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
/* body má min-height, ne pevnou výšku – jinak sticky nefunguje na
   stránkách s přirozeným scrollem (registrace, login). Stránky
   s fixním layoutem (app) používají html:has(.app-body) overflow:hidden. */
body { min-height: 100%; }

/* ============================================================
   LAYOUT – sdílený základ pro stránky s fixed výškou
   Overflow:hidden se aplikuje POUZE na stránky s třídou .app-layout
   (hlavní app s topnavem). Veřejné stránky (registrace, login)
   tuto třídu nemají a mohou volně scrollovat.
   ============================================================ */
body { display: flex; flex-direction: column; }
.app-layout { overflow: hidden; }
.app-layout body { overflow: hidden; }
/* overflow:hidden pouze pro stránky s fixním layoutem (kalendář).
   Ostatní stránky (.app-body bez .cal-page) potřebují přirozený scroll. */
html:has(.cal-page) { overflow: hidden; }
html:has(.cal-page) body { overflow: hidden; }
.app-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  transition: background var(--tr), color var(--tr);
  min-height: 100dvh;
}


/* ============================================================
   POZADÍ – MESH GRADIENT + MŘÍŽKA
   ============================================================ */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  overflow: hidden;
}
.page-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--mesh-1), var(--mesh-2), var(--mesh-3);
}
.page-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text-muted) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
}
.bg-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--accent) 30%, var(--accent) 70%, transparent 100%);
  opacity: 0.07;
}
.bg-line--left  { left: 15%; }
.bg-line--right { right: 15%; }
.bg-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}


/* ============================================================
   PŘEPÍNAČ TÉMATU
   ============================================================ */
/* .theme-toggle – odstraněno, nahrazeno .nav-btn.nav-btn--icon v topnavu */


/* ============================================================
   FORMULÁŘOVÉ PRVKY
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--tr);
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--tr);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.input-icon svg { width: 16px; height: 16px; display: block; }
.input-wrap:focus-within .input-icon { color: var(--accent); }

.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 12px 10px 38px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background var(--tr);
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text-muted); font-weight: 400; font-size: 0.88rem; }
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--surface);
}
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.input-wrap--eye .form-input { padding-right: 38px; }


/* ============================================================
   TLAČÍTKO OKO (zobrazit/skrýt heslo)
   ============================================================ */
.btn-eye {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  padding: 4px 5px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 5px;
  transition: color var(--tr), background var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.btn-eye:hover { color: var(--text-secondary); background: var(--surface2); }
.btn-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.eye-closed { display: none; }
.btn-eye.is-visible .eye-open   { display: none; }
.btn-eye.is-visible .eye-closed { display: block; }


/* ============================================================
   CHYBOVÉ HLÁŠENÍ
   ============================================================ */
.form-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--error-bg);
  border: 1px solid rgba(247,110,79,0.2);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--error);
}
.form-error.is-visible { display: flex; }
.form-error-icon { width: 16px; height: 16px; flex-shrink: 0; }
.form-error-icon svg { width: 16px; height: 16px; display: block; }


/* ============================================================
   HONEYPOT – skryté anti-bot pole
   ============================================================ */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}


/* ============================================================
   DĚLICÍ ČÁRA
   ============================================================ */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ============================================================
   ANIMACE
   ============================================================ */
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   SCROLLBAR – vlastní styl (Webkit)
   ============================================================ */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ============================================================
   TOPNAV – sdílená horní lišta (všechny stránky)
   ============================================================ */
.topnav {
  height:      var(--header-h);
  background:  var(--surface);
  border-bottom: 1px solid var(--border);
  display:     flex;
  align-items: center;
  flex-wrap:   nowrap;
  padding:     0 20px;
  gap:         11px;
  flex-shrink: 0;
  z-index:     200;           /* vyšší z-index – user-menu musí překrýt obsah pod ním */
  box-shadow:  var(--shadow);
  overflow:    visible;       /* nutné aby user-menu dropdown nebyl ořezán */
  transition:  background var(--tr), border-color var(--tr), box-shadow var(--tr);
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--tr);
}

.topnav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

/* Svislý oddělovač mezi logem a názvem sekce */
.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
  opacity: 0.7;
  margin: 0 6px;
}

/* Název aktuální sekce v topnavu (vedle loga) */
.nav-page-title {
  font-size:   0.82rem;
  font-weight: 600;
  color:       var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.01em;
  margin-left: 2px;
}

/* .nav-right – nahrazeno .nav-btns + .nav-actions v calendar.css */
.nav-right {
  display:     flex;
  align-items: center;
  gap:         8px;
  flex-shrink: 0;
}

.nav-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

.nav-spacer { flex: 1; }

.nav-actions {
  display:     flex;
  align-items: center;
  gap:         6px;
  flex-shrink: 0;
}

/* ── Nav tlačítka – sdílená pro všechny stránky ─────────────── */
.nav-btn {
  height:       30px;
  min-width:    30px;
  padding:      0 11px;
  border:       1px solid var(--border);
  border-radius: 7px;
  background:   var(--surface2);
  color:        var(--text-primary);
  font:         inherit;
  font-size:    0.82rem;
  font-weight:  600;
  cursor:       pointer;
  display:      flex;
  align-items:  center;
  justify-content: center;
  white-space:  nowrap;
  transition:   background var(--tr), color var(--tr), border-color var(--tr);
  flex-shrink:  0;
}
.nav-btn:hover { background: var(--accent); color: #fff; border-color: transparent; }

.nav-btn--icon {
  padding:    0;
  width:      30px;
  background: none;
  border:     1px solid var(--border);
  color:      var(--text-secondary);
}
.nav-btn--icon:hover { background: var(--surface2); color: var(--text-primary); }
.nav-btn--icon svg   { display: block; }

/* ============================================================
   USER INFO + USER MENU – sdílená komponenta
   ============================================================ */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--tr);
  position: relative;
}
.user-info:hover { background: var(--surface2); }

.user-text   { text-align: right; }
.user-name   { font-size: 0.84rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; transition: color var(--tr); }
.user-role   { font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; transition: color var(--tr); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  user-select: none;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  min-width: 230px;
  z-index: 50;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.17s ease, transform 0.17s ease;
}
.user-menu.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.user-menu-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-menu-name { font-size: 0.84rem; font-weight: 700; color: var(--text-primary); transition: color var(--tr); }
.user-menu-role { font-size: 0.72rem; color: var(--text-secondary); margin-top: 1px; transition: color var(--tr); }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--tr), color var(--tr);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  text-decoration: none;
}
.menu-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}
.user-menu-item:hover { background: var(--surface2); color: var(--text-primary); }
.user-menu-item--danger { color: var(--accent2); }
.user-menu-item--danger:hover { background: rgba(247,110,79,0.1); color: var(--accent2); }
.user-menu-sep { height: 1px; background: var(--border); margin: 3px 0; }
.user-menu-footer {
  padding: 7px 14px 9px;
  border-top: 1px solid var(--border);
  margin-top: 3px;
}
.user-menu-version {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color var(--tr);
}
.user-menu-version:hover { color: var(--accent); }


/* ============================================================
   BOTTOMBAR – sdílená dolní lišta
   ============================================================ */
/* .bottombar odstraněn – footer není součástí UI */


/* ============================================================
   SDÍLENÉ PROMĚNNÉ – success
   ============================================================ */
:root, [data-theme="dark"] {
  --success:      #3ecf8e;
  --success-glow: rgba(62,207,142,0.18);
}
[data-theme="light"] {
  --success:      #16a34a;
  --success-glow: rgba(22,163,74,0.12);
}


/* ============================================================
   TOPNAV – page-title (breadcrumb/nadpis stránky)
   ============================================================ */
.page-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color var(--tr);
}
.page-title-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--tr);
}
.page-title-link:hover { color: var(--text-primary); }
.page-title-sep {
  color: var(--text-muted);
  font-weight: 400;
}


/* ============================================================
   SDÍLENÁ TLAČÍTKA – .btn základ + varianty
   ============================================================ */
.btn {
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: background var(--tr), border-color var(--tr),
              color var(--tr), box-shadow var(--tr), filter var(--tr);
}
.btn:active { transform: scale(0.97); }
.btn:disabled,
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }

/* Primární – accent fill */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Sekundární – jemný fill */
.btn-secondary {
  background: var(--surface2);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); color: var(--text-primary); }

/* Ghost – průhledný, jen rámeček */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text-primary); }

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--accent2);
  border-color: var(--border);
}
.btn-danger:hover { background: rgba(247,110,79,0.1); border-color: transparent; }

/* Velikost – velká varianta */
.btn-lg { padding: 10px 24px; font-size: 0.88rem; border-radius: 9px; }


/* ============================================================
   FORM-FOOTER – patička formuláře s tlačítky
   ============================================================ */
.form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  transition: border-color var(--tr);
  position: relative;
  min-height: 68px;   /* stabilní výška při přepínání mezi stavy */
}
.form-footer-spacer { flex: 1; }

/* Řada tlačítek (normální i confirm) – zobrazení řídí JS přes display */
.form-footer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  animation: footer-confirm-in 0.14s ease;
}

.form-footer-confirm-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  transition: color var(--tr);
}

@keyframes footer-confirm-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Malá varianta tlačítka */
.btn-sm { padding: 5px 13px; font-size: 0.78rem; border-radius: 7px; }

/* ============================================================
   RESPONZIVITA – mobilní zařízení (max 640px)
   ============================================================ */
@media (max-width: 640px) {

  /* Topnav – skrýt jméno a roli, zůstane jen avatar */
  .user-text   { display: none; }
  .nav-sep     { display: none; }

  /* Menší padding topnav */
  .topnav { padding: 0 12px; gap: 8px; }

  /* Název stránky zkrátit pokud je moc dlouhý */
  .topnav-page-title {
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    max-width:     120px;
  }
}


/* ============================================================
   NOTIFY BAR – sdílený toast pro všechny stránky
   Identický vzhled jako v kalendáři (cal-notify-bar).
   Používá stejné CSS třídy – stačí includovat app.css.
   ============================================================ */
/* Kontejner – stack toastů zarovnaný na střed dole */
.cal-notify-stack {
  position:       fixed;
  bottom:         28px;
  left:           50%;
  transform:      translateX(-50%);
  width:          calc(100% - 32px);
  max-width:      480px;
  display:        flex;
  flex-direction: column;
  gap:            8px;
  z-index:        9999;
  pointer-events: none;
  align-items:    center;
}

/* Jednotlivý toast */
.cal-notify-bar {
  width:          100%;
  padding:        12px 18px;
  border-radius:  12px;
  font-size:      0.84rem;
  font-weight:    600;
  pointer-events: none;
  opacity:        0;
  transform:      translateY(12px);
  transition:     opacity 0.22s ease, transform 0.22s cubic-bezier(.34,1.56,.64,1);
  display:        flex;
  align-items:    center;
  gap:            10px;
  line-height:    1.4;
  letter-spacing: 0.01em;
}
.cal-notify-bar.is-visible {
  opacity:   1;
  transform: translateY(0);
}
.cal-notify-icon {
  flex-shrink: 0;
  width:  18px;
  height: 18px;
  display: flex;
  align-items: center;
}
.cal-notify-icon svg { width: 18px; height: 18px; display: block; }
.cal-notify-msg { flex: 1; }

.cal-notify-bar--ok {
  background: linear-gradient(135deg, #14532d 0%, #166534 100%);
  color:      #dcfce7;
  border:     1px solid #22c55e;
  box-shadow: 0 4px 20px rgba(34,197,94,.25), 0 1px 4px rgba(0,0,0,.4);
}
.cal-notify-bar--ok .cal-notify-icon { color: #86efac; }

.cal-notify-bar--info {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  color:      #dbeafe;
  border:     1px solid #3b82f6;
  box-shadow: 0 4px 20px rgba(59,130,246,.22), 0 1px 4px rgba(0,0,0,.4);
}
.cal-notify-bar--info .cal-notify-icon { color: #93c5fd; }

.cal-notify-bar--warn {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  color:      #fef3c7;
  border:     1px solid #f59e0b;
  box-shadow: 0 4px 20px rgba(245,158,11,.22), 0 1px 4px rgba(0,0,0,.4);
}
.cal-notify-bar--warn .cal-notify-icon { color: #fcd34d; }

.cal-notify-bar--error {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  color:      #fee2e2;
  border:     1px solid #ef4444;
  box-shadow: 0 4px 20px rgba(239,68,68,.22), 0 1px 4px rgba(0,0,0,.4);
}
.cal-notify-bar--error .cal-notify-icon { color: #fca5a5; }

/* ============================================================
   NOTIFY PANEL – notifikační panel v modálu kalendáře
   ============================================================ */
.notify-textarea {
  width:         100%;
  box-sizing:    border-box;
  padding:       8px 10px;
  border-radius: 8px;
  border:        1px solid var(--border);
  background:    var(--surface);
  color:         var(--text);
  font-size:     0.84rem;
  line-height:   1.5;
  resize:        vertical;
  transition:    border-color var(--tr), background var(--tr);
}
.notify-textarea:focus {
  outline:       none;
  border-color:  var(--accent);
}
/* Readonly = připomínka – vizuálně odlišená, kurzor text */
.notify-textarea.is-readonly {
  background:    var(--bg-alt);
  color:         var(--text-muted);
  cursor:        default;
  border-style:  dashed;
}

/* ============================================================
   SIDEBAR SPRÁVA – sdílená sekce (kalendář, SMS, aj.)
   ============================================================ */
.sidebar-manage {
  display:        flex;
  flex-direction: column;
  gap:            7px;
  border-top:     1px solid var(--border);
  padding-top:    14px;
  flex-shrink:    0;
  transition:     border-color var(--tr);
}

.sms-history-link {
  display:        flex;
  align-items:    center;
  gap:            9px;
  padding:        9px 12px;
  background:     var(--surface2);
  border:         1px solid var(--border);
  border-radius:  9px;
  font-size:      0.82rem;
  font-weight:    700;
  color:          var(--text-primary);
  text-decoration: none;
  transition:     background var(--tr), border-color var(--tr), color var(--tr), box-shadow var(--tr);
}
.sms-history-link:hover {
  background:   var(--accent-glow);
  border-color: var(--accent);
  color:        var(--accent);
  box-shadow:   0 0 0 3px var(--accent-glow);
}
.sms-history-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ============================================================
   PAGE HEADER – sdílená komponenta (klienti, SMS, aj.)
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.page-header-title    { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.page-header-sub      { font-size: 0.82rem; color: var(--text-secondary); margin-top: 3px; font-weight: 500; }
.page-header-subtitle { font-size: 0.8rem;  color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.page-header-actions  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Titulek sekce sidebaru – sdílený */
.sec-title {
  font-size: 0.67rem; font-weight: 700;
  letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
  transition: color var(--tr);
}