
/* Hide webkit calendar/clock icon in time inputs */
input[type="time"]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
}
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-clear-button {
  display: none !important;
  -webkit-appearance: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   ZŠ a MŠ Holubice — Intranet Styles
   Color palette: #1B7EC2 (primary blue from school logo)
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Brand Colors */
  --blue-50:  #EEF6FC;
  --blue-100: #D5EAF7;
  --blue-200: #A9D4EE;
  --blue-300: #6EBADF;
  --blue-400: #3A9FD2;
  --blue-500: #1B7EC2;  /* PRIMARY — logo blue */
  --blue-600: #1568A8;
  --blue-700: #10538E;
  --blue-800: #0C3D6B;
  --blue-900: #082848;

  /* Neutrals */
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic */
  --success:  #10B981;
  --success-bg: #ECFDF5;
  --warning:  #F59E0B;
  --warning-bg: #FFFBEB;
  --danger:   #EF4444;
  --danger-bg: #FEF2F2;
  --info:     #3B82F6;
  --info-bg:  #EFF6FF;

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --topbar-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.07), 0 1px 2px -1px rgba(0,0,0,.05);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.06);
  --shadow-blue: 0 4px 20px rgba(27,126,194,.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

a { text-decoration: none; color: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-300); }

/* ════════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #082848 0%, #0c3d6b 40%, #1568a8 75%, #1B7EC2 100%);
  z-index: 1000;
  overflow: hidden;
}

.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob1 { width: 500px; height: 500px; background: var(--blue-200); top: -150px; left: -100px; animation-delay: 0s; }
.blob2 { width: 400px; height: 400px; background: var(--blue-900); bottom: -100px; right: -80px; animation-delay: -3s; }
.blob3 { width: 300px; height: 300px; background: white; top: 50%; left: 60%; animation-delay: -6s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(.95); }
}

.login-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 44px 40px 36px;
  width: min(460px, 92vw);
  box-shadow: 0 32px 64px rgba(8,40,72,.40), 0 0 0 1px rgba(255,255,255,0.15);
  text-align: center;
  position: relative;
  z-index: 1;
  animation: loginCardIn .45s cubic-bezier(.34,1.56,.64,1);
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo img {
  height: 110px;
  width: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(27,126,194,.2));
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue-800);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: .95rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.login-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0 0 20px;
}

.login-hint {
  font-size: .85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.btn-msft {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: 13px 20px;
  background: var(--blue-500);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--shadow-blue);
}
.btn-msft:hover { background: var(--blue-600); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(27,126,194,.35); }
.btn-msft:active { transform: translateY(0); }

.role-picker {
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--gray-200);
}

.role-picker-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.role-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  margin: 6px 0;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.role-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }

.login-footer { font-size: .78rem; color: var(--gray-400); margin-top: 24px; }

/* ════════════════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0a2d4d 0%, #082848 60%, #071f38 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  min-height: 76px;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.sidebar-school-name {
  font-size: .85rem;
  line-height: 1.3;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s;
}

.sidebar.collapsed .sidebar-school-name { opacity: 0; width: 0; }

.sidebar-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: white;
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,.2); }
.sidebar.collapsed .sidebar-toggle-btn svg { transform: rotate(180deg); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 6px;
}

.nav-section-label {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 4px 6px 1px 6px;
  margin-top: 2px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s;
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(255,255,255,.72);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .12s ease;
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  font-size: .88rem;
}
.nav-item:hover {
  background: rgba(255,255,255,.10);
  color: white;
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, #1B7EC2 0%, #1568A8 100%);
  color: white;
  box-shadow: 0 3px 14px rgba(27,126,194,.45), inset 0 1px 0 rgba(255,255,255,.15);
  font-weight: 600;
}

.nav-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background .15s;
}
.nav-item.active .nav-icon { background: rgba(255,255,255,.15); }

.nav-label {
  font-size: .88rem;
  font-weight: 500;
  transition: opacity .2s;
}
.sidebar.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }

.nav-badge {
  margin-left: auto;
  background: var(--blue-400);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  transition: opacity .2s;
}
.nav-badge.danger { background: var(--danger); }
.sidebar.collapsed .nav-badge { opacity: 0; }


/* Role-based element visibility */
.admin-only { display: none !important; }
body.role-admin .admin-only,
body.role-deputy .admin-only { display: flex !important; }
body.role-admin .nav-section-label.admin-only,
body.role-deputy .nav-section-label.admin-only { display: block !important; }

/* Hide pedagogical items for Operations (Školník) and DPP */
body.role-operations .pedagogical-only,
body.role-dpp .pedagogical-only,
body.role-operations [data-role-restrict="pedagogical"],
body.role-dpp [data-role-restrict="pedagogical"] {
  display: none !important;
}

body.role-admin .admin-only { display: flex; }
body.role-admin .nav-section-label.admin-only { display: block; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: default;
  overflow: hidden;
}

.user-avatar {
  width: 36px; height: 36px;
  background: var(--blue-500);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: white;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2);
}

.user-info { flex: 1; overflow: hidden; transition: opacity .2s; }
.sidebar.collapsed .user-info { opacity: 0; width: 0; }

.user-name {
  font-size: .83rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s;
  flex-shrink: 0;
  display: flex;
}
.logout-btn:hover { color: rgba(255,255,255,.9); }
.sidebar.collapsed .logout-btn { display: none; }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s cubic-bezier(.4,0,.2,1);
}
.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed); }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--gray-200), 0 4px 16px rgba(0,0,0,.04);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.topbar-breadcrumb {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-date {
  font-size: .82rem;
  color: var(--gray-400);
  font-weight: 500;
}

.icon-btn {
  position: relative;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-500); }

.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid white;
}

/* Notifications panel */
.notification-wrapper { position: relative; }

.notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  animation: slideDown .2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-header {
  padding: 14px 16px 12px;
  font-weight: 700;
  font-size: .9rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 8px;
}
.notif-count {
  background: var(--danger);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  transition: background .15s;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--blue-50); }
.notif-item.unread:hover { background: var(--blue-100); }

.notif-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-icon.blue { background: var(--blue-100); color: var(--blue-600); }
.notif-icon.red  { background: var(--danger-bg); color: var(--danger); }
.notif-icon.green{ background: var(--success-bg); color: var(--success); }

.notif-body { font-size: .84rem; color: var(--gray-700); line-height: 1.4; }
.notif-time { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }

.notif-footer { padding: 10px 16px; text-align: center; }
.notif-footer a { font-size: .82rem; color: var(--blue-500); font-weight: 600; }

/* ── PAGE CONTENT ── */
.page-content {
  padding: 28px 28px 48px;
  flex: 1;
}

/* ════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════ */

/* Cards */
.card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 18px 20px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* Stat cards */
.stat-card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-100); color: var(--blue-500); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red    { background: var(--danger-bg); color: var(--danger); }

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label { font-size: .82rem; color: var(--gray-500); margin-top: 4px; }

/* Badges / Pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-blue   { background: var(--blue-100); color: var(--blue-700); }
.badge-green  { background: var(--success-bg); color: #065F46; }
.badge-orange { background: var(--warning-bg); color: #92400E; }
.badge-red    { background: var(--danger-bg); color: #991B1B; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }

/* Priority dots */
.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.priority-urgent { background: var(--danger); }
.priority-high   { background: var(--warning); }
.priority-medium { background: var(--blue-400); }
.priority-low    { background: var(--gray-300); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.btn-primary { background: var(--blue-500); color: white; }
.btn-primary:hover { background: var(--blue-600); box-shadow: var(--shadow-blue); transform: translateY(-1px); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-ghost { background: transparent; color: var(--blue-500); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background: white;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(27,126,194,.12);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.page-header p {
  font-size: .875rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* Divider */
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.empty-state p { font-size: .9rem; }

/* ════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════ */
.dashboard-greeting {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 60%, var(--blue-400) 100%);
  border-radius: var(--border-radius-lg);
  padding: 28px 32px;
  color: white;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.dashboard-greeting::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
}
.dashboard-greeting::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 80px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.greeting-text h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.greeting-text p { font-size: .9rem; opacity: .8; }
.greeting-badges { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.greeting-chip {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
}

/* Quick actions */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.quick-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
  font-family: 'Inter', sans-serif;
}
.quick-action-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); transform: translateY(-1px); }
.quick-action-btn svg { color: var(--blue-500); }

/* Task items */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.task-item:last-child { border-bottom: none; }

.task-checkbox {
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.task-checkbox:hover { border-color: var(--blue-400); }
.task-checkbox.checked { background: var(--success); border-color: var(--success); }
.task-checkbox.checked::after { content: '✓'; color: white; font-size: .65rem; font-weight: 800; }

.task-body { flex: 1; }
.task-title { font-size: .875rem; font-weight: 600; color: var(--gray-800); }
.task-title.done { text-decoration: line-through; color: var(--gray-400); }
.task-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.task-deadline { font-size: .75rem; color: var(--gray-400); }
.task-deadline.overdue { color: var(--danger); font-weight: 600; }
.task-deadline.soon { color: var(--warning); font-weight: 600; }

/* Event items */
.event-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-100);
}
.event-item:last-child { border-bottom: none; }

.event-date-badge {
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}
.event-day {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue-600);
  line-height: 1;
}
.event-month {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
}

.event-color-bar {
  width: 3px;
  height: 36px;
  border-radius: 99px;
  flex-shrink: 0;
}

.event-body { flex: 1; }
.event-title { font-size: .875rem; font-weight: 600; color: var(--gray-800); }
.event-subtitle { font-size: .78rem; color: var(--gray-400); margin-top: 2px; }

/* Minutes */
.minute-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .15s;
}
.minute-item:last-child { border-bottom: none; }
.minute-item:hover .minute-title { color: var(--blue-500); }

.minute-icon {
  width: 36px; height: 36px;
  background: var(--blue-50);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-500);
  flex-shrink: 0;
}
.minute-body { flex: 1; }
.minute-title { font-size: .875rem; font-weight: 600; color: var(--gray-800); }
.minute-meta { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.minute-arrow { color: var(--gray-300); }

/* ════════════════════════════════════════════════════
   CALENDAR PAGE
   ════════════════════════════════════════════════════ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.calendar-day-header {
  background: var(--blue-800);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 10px 4px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.cal-day {
  background: white;
  min-height: 90px;
  padding: 6px;
  cursor: pointer;
  transition: background .1s;
}
.cal-day:hover { background: var(--blue-50); }
.cal-day.other-month { background: var(--gray-50); }
.cal-day.other-month .cal-day-number { color: var(--gray-300); }
.cal-day.today { background: var(--blue-50); }
.cal-day.today .cal-day-number {
  background: var(--blue-500);
  color: white;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}

.cal-day-number {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 3px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}

.cal-event {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event.type-deadline { background: var(--danger-bg); color: #991B1B; }
.cal-event.type-meeting  { background: var(--blue-100); color: var(--blue-800); }
.cal-event.type-holiday  { background: var(--success-bg); color: #065F46; }
.cal-event.type-event    { background: var(--warning-bg); color: #92400E; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.calendar-month-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-800);
  min-width: 200px;
  text-align: center;
}

.calendar-nav-btn {
  background: white;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.calendar-nav-btn:hover { border-color: var(--blue-400); color: var(--blue-500); }

/* Event list (below calendar) */
.event-list-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
}
.event-list-item:last-child { border-bottom: none; }

.event-type-pill {
  flex-shrink: 0;
  width: 4px;
  border-radius: 99px;
  align-self: stretch;
  min-height: 40px;
}

/* ════════════════════════════════════════════════════
   TASKS / KANBAN
   ════════════════════════════════════════════════════ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--gray-100);
  border-radius: var(--border-radius);
  padding: 14px;
  min-height: 300px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-700);
}

.kanban-count {
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  margin-left: auto;
}

.kanban-card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all .15s;
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-200); }

.kanban-card-title { font-size: .875rem; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.kanban-card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kanban-card-assignee {
  width: 22px; height: 22px;
  background: var(--blue-500);
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
  color: white;
  display: flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════════════
   SELF STUDY
   ════════════════════════════════════════════════════ */
.progress-bar-wrap {
  background: var(--gray-100);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.study-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.study-item:last-child { border-bottom: none; }

.study-type-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.study-body { flex: 1; }
.study-title { font-size: .875rem; font-weight: 600; color: var(--gray-800); }
.study-meta { font-size: .78rem; color: var(--gray-500); margin-top: 3px; }

/* ════════════════════════════════════════════════════
   MAINTENANCE
   ════════════════════════════════════════════════════ */
.maint-card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.maint-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); }

.maint-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.maint-status-dot.new        { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.maint-status-dot.acknowledged { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
.maint-status-dot.in_progress { background: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100); }
.maint-status-dot.resolved   { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }

.maint-body { flex: 1; }
.maint-title { font-size: .9rem; font-weight: 600; color: var(--gray-800); }
.maint-meta { font-size: .78rem; color: var(--gray-400); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.maint-req-number { font-size: .75rem; color: var(--gray-400); font-family: monospace; }

/* ════════════════════════════════════════════════════
   ADMIN PAGE
   ════════════════════════════════════════════════════ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.admin-action-card {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.admin-action-card:hover { border-color: var(--blue-400); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.admin-action-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-50);
  color: var(--blue-500);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  transition: background .2s;
}
.admin-action-card:hover .admin-action-icon { background: var(--blue-500); color: white; }

.admin-action-title { font-size: .9rem; font-weight: 700; color: var(--gray-800); }
.admin-action-desc { font-size: .78rem; color: var(--gray-400); margin-top: 4px; }

/* ════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: white;
  border-radius: var(--border-radius-lg);
  width: min(560px, 100%);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); }
.modal-close {
  background: var(--gray-100);
  border: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: all .15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 340px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.toast.error   { background: var(--danger-bg); border: 1px solid #FCA5A5; color: #991B1B; }
.toast.info    { background: var(--blue-50); border: 1px solid var(--blue-200); color: var(--blue-800); }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { margin-left: 0 !important; }
  .mobile-menu-btn { display: flex; }
  .page-content { padding: 16px 16px 48px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dashboard-greeting { padding: 20px; }
  .topbar-date { display: none; }
  .calendar-grid { font-size: .75rem; }
  .cal-day { min-height: 60px; }
}

@media (max-width: 480px) {
  .login-card { padding: 32px 24px; }
  .login-title { font-size: 1.4rem; }
}

/* ── Filters bar ── */
.filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: all .15s;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--blue-400);
  background: var(--blue-50);
  color: var(--blue-600);
}

/* ── Search ── */
.search-bar {
  position: relative;
  margin-bottom: 18px;
}
.search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: .9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(27,126,194,.12);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--gray-100);
  background: var(--gray-50);
}
.data-table td {
  padding: 13px 14px;
  font-size: .875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
.data-table tr:hover td { background: var(--blue-50); }
.data-table tr:last-child td { border-bottom: none; }

/* ══ TISK / PRINT — SMS formulář ════════════════════════════════════════
   Při tisku (body.printing-sms) se zobrazí POUZE SMS formulář,
   zbytek stránky je skryt. Výsledek odpovídá papírovému originálu.
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
  body.printing-sms .sidebar,
  body.printing-sms .topbar,
  body.printing-sms #sms-page-header,
  body.printing-sms #sms-progress-card,
  body.printing-sms .quick-actions,
  body.printing-sms .modal-overlay,
  body.printing-sms .toast-container { display: none !important; }

  body.printing-sms #sms-print-header { display: block !important; }

  body.printing-sms .main-content { margin-left: 0 !important; padding: 0 !important; }
  body.printing-sms .page-content  { padding: 0 !important; }
  body.printing-sms body { background: white !important; }

  body.printing-sms #sms-form-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  body.printing-sms #sms-form-card .card-header,
  body.printing-sms .data-table th {
    background: #EEF6FC !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.printing-sms #sms-form-card button { display: none !important; }

  body.printing-sms .card:not(#sms-form-card) { display: none !important; }

  @page { margin: 1.5cm; size: A4 portrait; }
}

/* ══ CALENDAR — nové styly ═══════════════════════════════════════════ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-day-header {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 6px 0 10px;
}
.cal-day {
  min-height: 80px;
  padding: 6px 5px;
  border-radius: 8px;
  cursor: default;
  transition: background .12s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-day:hover { background: var(--blue-50); }
.cal-day.other-month .cal-day-number { color: var(--gray-300); }
.cal-day.weekend .cal-day-number { color: var(--gray-400); }
.cal-day.weekend { background: var(--gray-50); }
.cal-day-number {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-day.today .cal-day-number {
  background: var(--blue-500);
  color: white;
  font-weight: 800;
}
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  overflow: hidden;
}
.cal-event-pill {
  font-size: .67rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.4;
}
.cal-event-pill:hover { opacity: .8; }
.calendar-nav-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all .15s;
}
.calendar-nav-btn:hover { background: var(--blue-100); color: var(--blue-600); }
.calendar-month-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}


/* ══════════════════════════════════════════════════════════════════
   OFFICIAL SMS FORM & PRINT STYLES
   ══════════════════════════════════════════════════════════════════ */
.official-sms-container {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0F172A;
}

.table-input:focus, .table-select:focus {
  outline: 2px solid var(--blue-500);
  background: #FFFBEB !important;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sidebar, .topbar, .page-header, .no-print, .toast-container, body:not(.printing-modal) .modal-overlay {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .app {
    display: block !important;
  }
  .official-sms-container {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .official-meta-table, .official-main-table {
    border: 1.5pt solid #000000 !important;
  }
  .official-meta-table td, .official-main-table th, .official-main-table td {
    border: 1pt solid #000000 !important;
  }
  .official-meta-table td:first-child, .official-main-table th {
    background: #E2E8F0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .table-input, .table-select {
    border: none !important;
    background: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }
  .official-signatures {
    margin-top: 50px !important;
  }
}


.print-only-text { display: none; }

@media print {
  .no-print-input { display: none !important; }
  .print-only-text { display: inline-block !important; min-height: 1.2em; }
}


/* ── SMS Table Input Styling ── */
.table-input, .table-select {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  background: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .88rem;
  color: var(--gray-900);
  transition: all .15s ease;
}
.table-input:hover, .table-select:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.table-input:focus, .table-select:focus {
  outline: none;
  border-color: var(--blue-500);
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(27,126,194,.18);
}


/* ── COMPACT DASHBOARD MINI CALENDAR (MATCHING SCREENSHOT) ── */
.dashboard-mini-calendar .calendar-grid {
  gap: 4px;
}
.dashboard-mini-calendar .calendar-day-header {
  font-size: .82rem;
  font-weight: 700;
  color: #0F172A;
  text-transform: lowercase;
  padding: 4px 0 8px 0;
  letter-spacing: 0;
}
.dashboard-mini-calendar .cal-day {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  cursor: pointer;
  position: relative;
}
.dashboard-mini-calendar .cal-day:hover {
  background: var(--blue-50) !important;
}
.dashboard-mini-calendar .cal-day-number {
  font-size: .9rem !important;
  font-weight: 500 !important;
  color: #1E293B !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}
.dashboard-mini-calendar .cal-day.other-month .cal-day-number {
  color: #94A3B8 !important;
  opacity: .5;
}
.dashboard-mini-calendar .cal-day.today .cal-day-number {
  background: var(--blue-500) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}
.dashboard-mini-calendar .cal-event-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-500);
  position: absolute;
  bottom: 3px;
}


/* ── ACCORDION SUBMENU STYLES FOR SIDEBAR ── */
.nav-item-group {
  display: flex;
  flex-direction: column;
}
.nav-item-toggle {
  cursor: pointer;
  user-select: none;
}
.nav-chevron {
  font-size: 1rem;
  font-weight: 800;
  transition: transform .2s ease;
  margin-left: auto;
  opacity: .7;
  display: inline-block;
}
.nav-item-group.open .nav-chevron {
  transform: rotate(90deg);
}
.nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: 28px;
  gap: 2px;
  margin-bottom: 4px;
}
.nav-item-group.open .nav-submenu {
  display: flex;
}
.nav-subitem {
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.nav-subitem:hover, .nav-subitem.active {
  color: #ffffff;
  background: rgba(255,255,255,.14);
}
.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 3px;
}
.nav-subitem-title {
  font-size: .78rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  padding: 4px 8px 1px;
}
.nav-subitem.nav-nested {
  padding-left: 14px;
  font-size: .78rem;
}



/* ── MODAL PRINTING FIX ── */
@media print {
  /* Hide main app background when printing modal or when body has printing-modal class */
  body.printing-modal #app,
  body:has(#modal-overlay:not(.hidden)) #app {
    display: none !important;
  }

  body.printing-modal .modal-overlay,
  body:has(#modal-overlay:not(.hidden)) #modal-overlay {
    position: static !important;
    inset: auto !important;
    background: white !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.printing-modal .modal,
  body:has(#modal-overlay:not(.hidden)) .modal {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    transform: none !important;
    position: static !important;
  }

  body.printing-modal .modal-header,
  body.printing-modal .modal-footer,
  body.printing-modal .no-print,
  body:has(#modal-overlay:not(.hidden)) .modal-header,
  body:has(#modal-overlay:not(.hidden)) .modal-footer,
  body:has(#modal-overlay:not(.hidden)) .no-print {
    display: none !important;
  }

  body.printing-modal .modal-body,
  body:has(#modal-overlay:not(.hidden)) .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }
}

/* Class-based fallback for older browsers */
body.printing-modal #app { display: none !important; }
body.printing-modal .modal-overlay { position: static !important; background: white !important; display: block !important; padding: 0 !important; }
body.printing-modal .modal { max-width: 100% !important; width: 100% !important; box-shadow: none !important; border: none !important; margin: 0 !important; padding: 0 !important; }
body.printing-modal .modal-header, body.printing-modal .modal-footer, body.printing-modal .no-print { display: none !important; }
body.printing-modal .modal-body { padding: 0 !important; margin: 0 !important; }


/* ════════════════════════════════════════════════════
   STRICT SINGLE-PAGE A4 PORTRAIT PRINT STYLES
   ════════════════════════════════════════════════════ */
@media print {
  @page {
    size: A4 portrait;
    margin: 4mm 6mm 4mm 6mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 7.2pt !important;
    font-family: 'Inter', Arial, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide all UI shell elements */
  .sidebar, .top-bar, .toast-container, .no-print, header, nav, .page-header, button, select.form-select, .no-print-mobile {
    display: none !important;
  }

  /* Container */
  .app-layout, .main-content, .page-content, #page-content, .card {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Table styling - tight for 1 page */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 6.8pt !important;
    margin-bottom: 3px !important;
  }

  th, td {
    padding: 0.8px 2px !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    line-height: 1.1 !important;
  }

  input.form-input {
    border: none !important;
    background: transparent !important;
    font-size: 6.8pt !important;
    font-weight: 700 !important;
    padding: 0 !important;
    height: auto !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  h2 {
    font-size: 1.1rem !important;
    margin-bottom: 4px !important;
  }
}


/* ══ GLOBAL MODAL PRINT OVERRIDE ══════════════════════════════════════ */
@media print {
  body.printing-modal #app,
  body.printing-modal .sidebar,
  body.printing-modal .topbar,
  body.printing-modal .page-header,
  body.printing-modal .toast-container,
  body.printing-modal .quick-actions,
  body.printing-modal .no-print {
    display: none !important;
  }

  body.printing-modal .modal-overlay,
  body.printing-modal #modal-overlay {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
  }

  body.printing-modal .modal,
  body.printing-modal #modal-box {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  body.printing-modal .modal-header,
  body.printing-modal .modal-footer,
  body.printing-modal .modal-close {
    display: none !important;
  }

  body.printing-modal .modal-body,
  body.printing-modal #modal-body {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
}
/* ^ OPRAVA (Humanit): tahle složená závorka v prototypu chyběla.
   Kvůli tomu spadlo všech následujících 440 řádků dovnitř @media print
   a na obrazovce se vůbec neuplatnily - proto neměly karty výběru role
   stylování a "glass" efekty se naopak tiskly na papír. */


/* ══════════════════════════════════════════════════════════════════
   STRICT DARK NAVY SIDEBAR & CLEAN LIGHT MAIN CONTENT
   ══════════════════════════════════════════════════════════════════ */
.sidebar, body .sidebar, html body .sidebar {
  background: #0d2945 !important;
  border-right: 1px solid #163e66 !important;
  color: #ffffff !important;
}

.sidebar .sidebar-logo {
  filter: brightness(0) invert(1) !important;
  opacity: 0.95 !important;
}

.sidebar .sidebar-school-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.sidebar .nav-section-label {
  color: #64748b !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.sidebar .nav-item {
  color: #cbd5e1 !important;
  border-radius: 8px !important;
}

.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.sidebar .nav-item.active {
  background: linear-gradient(135deg, #0284c7, #0877b8) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
  border-radius: 8px !important;
}

.sidebar .user-name {
  color: #ffffff !important;
}

.sidebar .user-role {
  color: #64748b !important;
}

/* Ensure ALL main content cards are 100% LIGHT, WHITE & CRISP */
.main-content .card,
.main-content #sms-form-card,
.main-content .official-sms-container,
.main-content .teacher-attendance-form,
.main-content .attendance-page-card,
.main-content .panel,
.main-content .form-section {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  border-radius: 14px !important;
}

/* Fix Docházka Netištěná oblast (Yellow Setup Box) to soft yellow */
div[style*="background:#451a03"],
div[style*="background: #451a03"],
div[style*="background:#292524"],
div[style*="background: #292524"],
div[style*="background:#78350f"],
div[style*="background: #78350f"],
div[style*="background:#1e1b4b"],
div[style*="background: #1e1b4b"],
div[style*="background:#1e293b"],
div[style*="background: #1e293b"] {
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #78350f !important;
}

div[style*="background:#fffbeb"] *,
div[style*="background: #fffbeb"] * {
  color: #78350f !important;
}

/* Fix tables in Docházka and Samostudium */
.main-content table,
.main-content .data-table,
.main-content .official-main-table,
.main-content .attendance-table table {
  background: #ffffff !important;
  border-collapse: collapse !important;
  border: 1px solid #cbd5e1 !important;
}

.main-content th,
.main-content .data-table th,
.main-content .official-main-table th,
.main-content .attendance-table th {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

.main-content td,
.main-content .data-table td,
.main-content .official-main-table td,
.main-content .attendance-table td {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

.main-content input,
.main-content select,
.main-content textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
}



/* ══════════════════════════════════════════════════════════════════
   LOGIN ROLE SELECTION CARDS (DLAŽDICE)
   ══════════════════════════════════════════════════════════════════ */
.role-option {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #f8fafc !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.role-option:hover {
  border-color: #0284c7 !important;
  background: #e0f2fe !important;
}

.role-option.active {
  border-color: #0284c7 !important;
  background: #e0f2fe !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18) !important;
}

.role-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.role-desc {
  color: #64748b !important;
}

/* ══════════════════════════════════════════════════════════════════
   GLASS DESIGN OVERLAY — Lehký glassmorphism pro celé prostředí
   Přidává se nad stávající styly (přepisuje jen co je potřeba)
   ══════════════════════════════════════════════════════════════════ */

/* ── Pozadí aplikace: světlý gradient s blur-blob efektem ── */
body {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 30%, #e0f2fe 60%, #f0f9ff 100%) !important;
  background-attachment: fixed !important;
  min-height: 100vh;
  position: relative;
}

/* Dekorativní blobs v pozadí */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: glassBlobFloat 12s ease-in-out infinite;
}
body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,.18) 0%, rgba(147,197,253,.08) 70%, transparent 100%);
  top: -150px; left: -100px;
}
body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,.15) 0%, rgba(186,230,253,.07) 70%, transparent 100%);
  bottom: -100px; right: -80px;
  animation-delay: -6s;
}

@keyframes glassBlobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  40%       { transform: translate(30px,-40px) scale(1.06); }
  70%       { transform: translate(-20px,25px) scale(.95); }
}

/* Veškerý obsah nad blob-y */
.app, .login-screen { position: relative; z-index: 1; }

/* ── SIDEBAR: frosted glass, světlý ── */
.sidebar {
  background: linear-gradient(180deg,
    rgba(8,40,72,.92) 0%,
    rgba(10,45,77,.90) 60%,
    rgba(7,31,56,.92) 100%) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid rgba(255,255,255,.10);
  box-shadow: 4px 0 32px rgba(8,40,72,.20) !important;
}

/* ── TOPBAR: glass ── */
.topbar {
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(27,126,194,.12) !important;
  box-shadow: 0 1px 20px rgba(27,126,194,.08) !important;
}

/* ── Hlavní obsah: zajistit z-index ── */
.main-content {
  background: transparent !important;
}

/* ── PAGE CONTENT wrapper ── */
.page-content {
  background: transparent !important;
}

/* ── CARDS: glass efekt ── */
.card {
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 4px 24px rgba(27,126,194,.07), inset 0 1px 0 rgba(255,255,255,.9) !important;
  border-radius: 14px !important;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(27,126,194,.12), inset 0 1px 0 rgba(255,255,255,.95) !important;
  transform: translateY(-1px);
}

/* ── MODAL overlay & dialog: glass ── */
#modal-overlay {
  background: rgba(15,23,42,.45) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-dialog,
#modal-dialog {
  background: rgba(255,255,255,.88) !important;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.9) !important;
  box-shadow: 0 24px 64px rgba(8,40,72,.18), inset 0 1px 0 rgba(255,255,255,.95) !important;
  border-radius: 18px !important;
}

.modal-header {
  background: rgba(248,250,252,.6) !important;
  border-bottom: 1px solid rgba(27,126,194,.10) !important;
  border-radius: 18px 18px 0 0 !important;
}

.modal-footer {
  background: rgba(248,250,252,.6) !important;
  border-top: 1px solid rgba(27,126,194,.10) !important;
  border-radius: 0 0 18px 18px !important;
}

/* ── DATA TABLE: glass rows ── */
.data-table {
  background: transparent !important;
  border-radius: 10px;
  overflow: hidden;
}
.data-table thead tr {
  background: rgba(15,23,42,.88) !important;
  backdrop-filter: blur(8px);
}
.data-table tbody tr {
  background: rgba(255,255,255,.55) !important;
  transition: background .15s;
}
.data-table tbody tr:nth-child(even) {
  background: rgba(239,246,255,.60) !important;
}
.data-table tbody tr:hover {
  background: rgba(219,234,254,.80) !important;
}

/* ── FORM INPUTS: glass ── */
.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: rgba(255,255,255,.75) !important;
  border: 1px solid rgba(27,126,194,.20) !important;
  backdrop-filter: blur(8px);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(27,126,194,.50) !important;
  box-shadow: 0 0 0 3px rgba(27,126,194,.12) !important;
  outline: none;
}

/* ── BUTTONS: frosted glass ── */
.btn {
  backdrop-filter: blur(8px);
  transition: all .2s cubic-bezier(.4,0,.2,1) !important;
}
.btn-primary {
  background: linear-gradient(135deg, #1B7EC2 0%, #1568A8 100%) !important;
  box-shadow: 0 4px 14px rgba(27,126,194,.30) !important;
  border: 1px solid rgba(255,255,255,.2) !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(27,126,194,.40) !important;
  filter: brightness(1.08);
}
.btn-secondary {
  background: rgba(255,255,255,.75) !important;
  border: 1px solid rgba(27,126,194,.20) !important;
  color: var(--blue-700) !important;
}
.btn-secondary:hover {
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(27,126,194,.40) !important;
  transform: translateY(-1px) !important;
}

/* ── BADGES: glass ── */
.badge, [class*="badge-"] {
  backdrop-filter: blur(4px);
}

/* ── ATTENDANCE TABLE: glass rows ── */
.attendance-table tbody tr:hover {
  background: rgba(219,234,254,.70) !important;
}

/* ── DASHBOARD SUMMARY CARDS / STAT BOXES ── */
.stat-card,
[class*="stat-"] {
  background: rgba(255,255,255,.68) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 4px 20px rgba(27,126,194,.08) !important;
  border-radius: 14px !important;
}

/* ── TOAST NOTIFICATIONS: glass ── */
.toast,
[class*="toast-"],
#toast-container > * {
  background: rgba(255,255,255,.90) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 8px 32px rgba(8,40,72,.15) !important;
  border-radius: 12px !important;
}

/* ── HOVER animace na nav-item ── */
.nav-item.active {
  background: linear-gradient(135deg, rgba(27,126,194,.9) 0%, rgba(21,104,168,.95) 100%) !important;
  box-shadow: 0 3px 14px rgba(27,126,194,.45), inset 0 1px 0 rgba(255,255,255,.18) !important;
  backdrop-filter: blur(8px);
}
.nav-item:hover {
  background: rgba(255,255,255,.12) !important;
  backdrop-filter: blur(4px);
}

/* ── PRINT: skryjeme glass efekty pro tisk ── */
@media print {
  body, body::before, body::after {
    background: white !important;
  }
  .card, .modal-dialog, .data-table tbody tr {
    background: white !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
  }
}

/* ── Scrollbar: glass styl ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(241,245,249,.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(27,126,194,.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(27,126,194,.45);
}

/* ── LOGIN CARD: glass ── */
.login-card {
  background: rgba(255,255,255,.88) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow: 0 32px 80px rgba(8,40,72,.35), inset 0 1px 0 rgba(255,255,255,.95) !important;
}
