/* ====================================================
   RESET & BASE
==================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 220px;
  --sidebar-bg: #ffffff;
  --content-bg: #f4f5f7;
  --primary: #5b5fc7;
  --primary-light: #ededfb;
  --primary-dark: #4549a8;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --red-light: #fee2e2;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-lg: 14px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: var(--content-bg);
  color: var(--gray-800);
  height: 100vh;
  overflow: hidden;
  display: flex;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ====================================================
   APP SHELL
==================================================== */
.app-shell {
  display: none;
  width: 100%;
  height: 100vh;
}

.app-shell.active {
  display: flex;
}

/* ====================================================
   SIDEBAR
==================================================== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.brand-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: -0.3px;
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
  color: var(--gray-600);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: color .15s;
}

.nav-item .nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover .nav-icon {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  color: var(--primary);
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: var(--primary);
  color: white;
}

.sidebar-user {
  padding: 12px 14px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}

.sidebar-user:hover { background: var(--gray-50); }

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: capitalize;
}

.sidebar-user-icon {
  color: var(--gray-400);
  font-size: 14px;
  flex-shrink: 0;
}

/* ====================================================
   MAIN CONTENT
==================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.content-header {
  padding: 15px 30px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 66px;
}

.content-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.4px;
}

.content-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.content-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 28px;
}

/* ====================================================
   BUTTONS - NEW DESIGN
==================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(91,95,199,.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* ====================================================
   VIEW SECTIONS (admin nav switching)
==================================================== */
.admin-view-section {
  display: none;
}

.admin-view-section.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ====================================================
   CALENDAR LAYOUT CARD
==================================================== */
.calendar-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: 0;
}

.calendar-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
}

.shifts-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
}

.shifts-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ====================================================
   CALENDAR
==================================================== */
.calendar-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-month-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.cal-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--gray-200);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gray-600);
  transition: all .15s;
}

.cal-nav-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.calendar-view {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.calendar-header {
  text-align: center;
  font-weight: 600;
  padding: 6px 4px;
  color: var(--gray-500);
  font-size: 12px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: transparent;
  font-weight: 500;
  font-size: 13px;
  color: var(--gray-700);
}

.calendar-day:hover {
  background: var(--gray-100);
}

.calendar-day.has-shifts {
  color: var(--gray-800);
}

/* dot indicator - nepřihlášen = červená */
.calendar-day.has-shifts::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
}

/* Moje směny - na desktopu datum a čas vedle sebe */
.my-shifts-time-inline {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: wrap;
}

/* přihlášen = zelená tečka */
.calendar-day.user-registered-day::after {
  background: var(--green);
}

/* náhradník = oranžová tečka */
.calendar-day.user-standby-day::after {
  background: var(--orange);
}

/* přihlášen + dostupná další směna = červená tečka vlevo od zelené/oranžové */
.calendar-day.has-available-shifts::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-10px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
}

.calendar-day.has-available-shifts::after {
  transform: translateX(4px);
}

.calendar-day.selected {
  background: var(--primary);
  color: white;
  font-weight: 700;
  border-color: transparent;
}

.calendar-day.selected.user-registered-day,
.calendar-day.selected.has-shifts {
  background: var(--primary);
  color: white;
}

.calendar-day.today {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-color: var(--primary);
}

.calendar-day.today.selected {
  background: var(--primary);
  color: white;
}

.calendar-day.user-registered-day {
  color: var(--green);
  font-weight: 700;
}

.calendar-day.user-registered-day::after {
  background: var(--green);
}

.calendar-day.user-standby-day {
  color: var(--orange);
  font-weight: 700;
}

.calendar-day.user-standby-day::after {
  background: var(--orange);
}

.calendar-day.past-day {
  opacity: 0.4;
  cursor: default;
}

.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.calendar-legend {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ====================================================
   SHIFT ITEMS (new design for calendar view)f
==================================================== */

.shift-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: box-shadow .15s;
}

.shift-card:hover {border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);}
.shift-card.past { opacity: 0.55; }

.shift-card-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .12s;
  user-select: none;
}

.shift-card-info { flex: 1; min-width: 0; }
.shift-card-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.shift-card-time { font-size: 12px; color: var(--gray-500); margin-top: 3px; overflow-wrap: normal; word-break: normal; }

.shift-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.capacity-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.capacity-badge.open { background: var(--green-light); color: #065f46; }
.capacity-badge.full { background: var(--red-light); color: #991b1b; }
.capacity-badge.standby { background: var(--orange-light); color: #92400e; }

.shift-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 0px solid var(--gray-100);
}
.shift-card.expanded .shift-card-body {
  max-height: 1200px;
  border-top-width: 1px;
}
.shift-card.expanded .shift-card-body { display: block; }

.shift-card-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  padding: 10px 14px 4px;
}

.registered-users {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 8px;
}

.registered-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  font-size: 13px;
  transition: border-color .12s;
}
.registered-user:hover { border-color: var(--gray-200); }

.registered-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.registered-user-name { flex: 1; color: var(--gray-700); font-weight: 500; }
.registered-user-time { font-size: 11.5px; color: var(--gray-400); }
.registered-user-actions { display: flex; gap: 6px; flex-shrink: 0; }

.shift-group-badge {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 500;
}

/* Collapse */
.shift-collapse-section { margin-top: 0; }

.shift-collapse-header {
  padding: 10px 14px 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  width: 100%;
  text-align: left;
}

.shift-collapse-header:hover { background: var(--gray-50); }
.shift-collapse-header.standby { background: white; border-bottom: 1px solid var(--gray-200); }
.shift-collapse-header.standby:hover { background: var(--gray-50); }

.shift-collapse-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.shift-collapse-left { display: flex; align-items: center; gap: 8px; }
.shift-collapse-right { display: flex; align-items: center; gap: 10px; }

.shift-collapse-title { font-weight: 600; font-size: 13px; color: var(--gray-700); }

.shift-count-badge {
  background: var(--green);
  color: white;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.shift-count-badge.standby { background: var(--orange); }

.shift-percent-text { font-weight: 700; font-size: 13px; color: var(--gray-500); }

.shift-progress-bar { height: 3px; background: var(--gray-200); border-radius: 2px; overflow: hidden; }
.shift-progress-fill { height: 100%; background: var(--green); transition: width 0.3s; }
.shift-progress-fill.standby { background: var(--orange); }

.shift-collapse-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.shift-collapse-content.active { max-height: 800px; }

.shift-user-list { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }

.shift-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: white;
  border-radius: 7px;
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}

.shift-user-item:hover { border-color: var(--green); box-shadow: 0 2px 6px rgba(16,185,129,.1); }
.shift-user-name { color: var(--gray-800); font-weight: 500; font-size: 13px; }

/* Footer buttons */
.shift-footer-minimal {
  padding: 12px 18px;
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-radius: 0 0 12px 12px;
}

.btn-ghost {
  padding: 7px 14px;
  background: var(--gray-100);
  border: none;
  color: var(--gray-600);
  border-radius: 7px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-ghost.edit:hover { background: var(--green-light); color: #065f46; }
.btn-ghost.danger:hover { background: var(--red-light); color: #991b1b; }
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost-small {
  padding: 3px 10px;
  background: var(--gray-100);
  border: none;
  color: var(--gray-500);
  border-radius: 6px;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-ghost-small:hover { background: var(--red-light); color: #991b1b; }

.btn-ghost-small.btn-promote:hover { background: rgba(16,185,129,.1); color: #065f46; }

.btn-outline-edit {
  padding: 7px 16px;
  border: none;
  background: var(--green);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-outline-edit:hover { background: #059669; }
.btn-outline-edit:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline-danger {
  padding: 7px 16px;
  border: none;
  background: var(--red);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-outline-danger:hover { background: #dc2626; }
.btn-outline-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline-add-shift {
  padding: 10px 24px;
  border: none;
  background: var(--green);
  color: white;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-outline-add-shift:hover { background: #059669; }

/* ====================================================
   USERS LIST (new design matching mockup)
==================================================== */
.users-search-bar {
  position: relative;
  margin-bottom: 16px;
}

.users-search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  background: white;
}

.users-search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,95,199,.1); }

.users-search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.btn-filters-toggle {
  display: none;
}

.users-filters-collapse {
  display: block;
}

@media (max-width: 768px) {
  .btn-filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    margin-bottom: 8px;
    font-family: inherit;
    transition: all 0.2s;
  }

  .btn-filters-toggle:hover {
    border-color: var(--gray-300);
  }

  .btn-filters-toggle .toggle-arrow {
    margin-left: auto;
    transition: transform 0.2s;
  }

  .btn-filters-toggle.active .toggle-arrow {
    transform: rotate(180deg);
  }

  .btn-filters-toggle.active {
    border-color: var(--gray-300);
  }

  .users-filters-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .users-filters-collapse.open {
    max-height: 400px;
  }
}

.users-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.users-filters select,
.users-filters input[type="date"] {
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: white;
  font-family: inherit;
  color: var(--gray-700);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color .15s;
}

.users-filters select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.users-filters select:focus,
.users-filters input[type="date"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,95,199,.1);
}

/* User row (new horizontal design) */
.user-row {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow .15s, border-color .15s;
  cursor: pointer;
}

.user-row:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }

.user-row-inactive .user-avatar-list,
.user-row-inactive .user-info-block,
.user-row-inactive .user-meta,
.user-row-inactive .user-tags {
    opacity: 0.4;
    filter: grayscale(60%);
}

.user-avatar-list {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info-block { flex: 0 0 200px; min-width: 0; }
.user-name-list { font-size: 14px; font-weight: 600; color: var(--gray-800); display: flex; }
.user-email-list { font-size: 12px; color: var(--gray-400); margin-top: 2px; display: flex; }

.user-meta {
  display: flex;
  gap: 18px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.user-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
}

.user-meta-icon { font-size: 13px; opacity: .65; }
.user-meta-label { font-size: 11px; color: var(--gray-400); margin-right: 2px; }

.user-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.tag.green { background: var(--green-light); color: #065f46; border-color: #a7f3d0; }
.tag.orange { background: var(--orange-light); color: #92400e; border-color: #fde68a; }
.tag.blue { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.tag.purple { background: var(--primary-light); color: var(--primary-dark); border-color: #c7d2fe; }
.tag.red { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.user-shift-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-500);
  min-width: 70px;
  text-align: right;
  white-space: nowrap;
}
.user-shift-count.has-shifts { color: var(--green); }

.row-menu-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 18px;
  transition: all .15s;
  line-height: 1;
  flex-shrink: 0;
}
.row-menu-btn:hover { background: var(--gray-100); color: var(--gray-600); }

/* User card wrapper + shifts panel */
.user-card-wrap {
  margin-bottom: 8px;
}

.user-card-wrap .user-row {
  margin-bottom: 0;
  border-radius: var(--radius);
  transition: box-shadow .15s, border-color .15s, border-radius .15s;
}
.user-card-wrap.expanded .user-row {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom-color: var(--primary-light);
}

.user-shifts-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
  border: 0px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.user-shifts-panel.open {
  max-height: 1200px;
  border-width: 1px;
}

.user-shifts-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 2px solid var(--primary-light);
  background: var(--gray-50);
}
.user-shifts-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.user-shift-entry {
  display: flex;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--gray-100);
  gap: 14px;
  transition: background .12s;
}
.user-shift-entry:last-child { border-bottom: none; }
.user-shift-entry:hover { background: var(--gray-50); }

.user-shift-entry-bar {
  width: 3px;
  height: 36px;
  border-radius: 3px;
  flex-shrink: 0;
}
.user-shift-entry-bar.confirmed { background: var(--green); }
.user-shift-entry-bar.standby { background: var(--orange); }

.user-shift-entry-info { flex: 1; min-width: 0; }
.user-shift-entry-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 3px;
  display: flex;
}
.user-shift-entry-meta {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.user-shift-entry-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.user-shift-entry-status.confirmed {
  background: var(--green-light);
  color: #065f46;
}
.user-shift-entry-status.standby {
  background: var(--orange-light);
  color: #92400e;
}

.btn-unregister-user {
  background: white;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  font-family: inherit;
  width: 35px;
}
.btn-unregister-user:hover {
  border-color: #fecaca;
  color: var(--red);
}

.btn-register-user {
  background: white;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  font-family: inherit;
  width: 35px;
}
.btn-register-user:hover {
  border-color: #ccfeca;
  color: var(--green);
}

.btn-register-user.standby:hover {
  border-color: #fde68a;
  color: var(--orange);
}

/* Role badges */
.role-badge-admin {
  background: rgba(91,95,199,.1);
  color: var(--primary);
  border: 1px solid rgba(91,95,199,.2);
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.role-badge-manager {
  background: var(--green-light);
  color: #065f46;
  border: 1px solid rgba(16,185,129,.3);
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ====================================================
   GROUPS LIST
==================================================== */

/* Nový row design skupin */
.group-card-wrap {
  margin-bottom: 8px;
}
.group-card-wrap .group-row {
  border-radius: var(--radius);
  transition: box-shadow .15s, border-color .15s, border-radius .15s;
}
.group-card-wrap.expanded .group-row {
  border-radius: var(--radius) var(--radius) 0 0;
}

.group-row {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  user-select: none;
}
.group-row:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }

.group-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.group-row-info { flex: 0 0 200px; min-width: 0; }
.group-row-name { font-size: 14px; font-weight: 700; color: var(--gray-800); display: flex;}
.group-row-manager { font-size: 12px; color: var(--gray-400); margin-top: 2px; display: flex;}

.group-row-meta {
  display: flex;
  gap: 20px;
  flex: 1;
  flex-wrap: wrap;
}

.group-meta-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-600);
}
.group-meta-pill .meta-val { font-weight: 700; color: var(--gray-800); }
.group-meta-pill .meta-lbl { color: var(--gray-400); font-size: 12px; }

/* Users panel pod skupinou */
.group-users-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
  border: 0px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.group-users-panel.open {
  max-height: 1200px;
  border-width: 1px;
}
.group-users-panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gray-400);
}

.group-user-entry {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
  transition: background .12s;
}
.group-user-entry:last-child { border-bottom: none; }
.group-user-entry:hover { background: var(--gray-50); }

.group-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.group-user-info { flex: 1; min-width: 0; }
.group-user-name { font-size: 13.5px; font-weight: 600; color: var(--gray-800); display: flex;}
.group-user-email { font-size: 12px; color: var(--gray-400); margin-top: 1px; display: flex;}

/* Starý design - zachovat pro kompatibilitu */
.group-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: all .15s;
}
.group-item:hover { box-shadow: var(--shadow-sm); }
.group-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.group-left { flex: 1; }
.group-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.group-name { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.group-badge {
  border: 1px solid rgba(245,158,11,.3);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.group-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  font-size: 12px;
  margin-top: 6px;
}
.group-info-label { font-weight: 600; color: var(--gray-500); }
.group-info-value { color: var(--gray-800); }
.group-collapse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 7px;
  transition: all 0.2s;
}
.group-collapse-header:hover { background: var(--gray-50); color: var(--gray-900); }
.group-progress-bar { width: 100%; height: 3px; background: var(--gray-200); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.group-progress-fill { height: 100%; background: var(--green); transition: width 0.3s; }
.group-collapse-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.group-collapse-content.open { max-height: 2000px; }
.group-list-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all .15s;
}
.group-list-item:hover { border-color: var(--primary); box-shadow: 0 2px 6px rgba(91,95,199,.1); }
.group-list-item-name { font-weight: 600; color: var(--gray-800); }

/* ====================================================
   SHIFT ITEM (old design - keep for compatibility)
==================================================== */
.shift-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--primary);
  transition: box-shadow 0.2s;
}

.shift-item:hover { box-shadow: var(--shadow); }

.shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ====================================================
   AVAILABLE SHIFTS (user panel)
==================================================== */
.available-shift-item {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  border: 1px solid var(--gray-200);
  margin-bottom: 10px;
}

.available-shift-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.available-shift-icon.regular { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.available-shift-icon.standby { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.available-shift-main-info { flex: 1; min-width: 0; }
.available-shift-title { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 3px; }
.available-shift-meta { display: flex; gap: 12px; font-size: 13px; color: var(--gray-500); flex-wrap: wrap; }
.available-shift-meta-item { display: flex; align-items: center; gap: 5px; }
.available-shift-capacity { display: flex; flex-direction: column; align-items: center; padding: 0 10px; border-left: 1px solid var(--gray-200); }
.available-capacity-number { font-size: 22px; font-weight: 700; color: var(--primary); }
.available-capacity-label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }

.btn-register { background: var(--green); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-register:hover { background: #059669; }
.btn-standby { background: var(--orange); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-standby:hover { background: #d97706; }

.available-shift { background: var(--green-light); border: 1px solid rgba(16,185,129,.3); border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.3s; margin-bottom: 10px; color: #065f46; }
.available-shift:hover { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.available-shift.full { background: var(--red-light); border-color: rgba(239,68,68,.3); cursor: not-allowed; color: #991b1b; }
.available-shift.registered { background: var(--primary-light); border-color: rgba(91,95,199,.3); cursor: not-allowed; color: var(--primary); }
.available-shift.standby { background: var(--orange-light); border: 1px solid rgba(245,158,11,.3); color: #92400e; cursor: pointer; }
.available-shift.standby:hover { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }

/* My shifts */
.my-shift-item {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  border: 1px solid var(--gray-200);
  margin-bottom: 10px;
}

.my-shift-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.my-shift-icon.confirmed { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.my-shift-icon.backup { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.my-shift-main-info { flex: 1; min-width: 0; }
.my-shift-title { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 3px; }
.my-shift-meta { display: flex; gap: 12px; font-size: 13px; color: var(--gray-500); flex-wrap: wrap; }
.my-shift-meta-item { display: flex; align-items: center; gap: 5px; }
.my-shift-status { display: flex; align-items: center; padding: 0 10px; }
.my-shift-badge { padding: 5px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.my-shift-badge.confirmed { color: var(--green); }
.my-shift-badge.backup { color: var(--orange); }
.my-shift-status-text.confirmed { color: var(--green); font-weight: 600; font-size: 13px; }
.my-shift-status-text.backup { color: var(--orange); font-weight: 600; font-size: 13px; }

/* ====================================================
   MANAGER ITEMS
==================================================== */
.manager-item { background: white; border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px 20px; margin-bottom: 10px; transition: all .15s; }
.manager-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.manager-left { flex: 1; }
.manager-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.manager-name { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.manager-info-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 12px; margin-top: 6px; }
.manager-info-label { font-weight: 600; color: var(--gray-500); }
.manager-info-value { color: var(--gray-800); }
.manager-collapse-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; padding: 8px 10px; border-radius: 7px; transition: all 0.2s; }
.manager-collapse-header:hover { background: var(--gray-50); }
.manager-collapse-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.manager-collapse-content.open { max-height: 2000px; }
.manager-list-item { background: white; border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; transition: all .15s; }
.manager-list-item:hover { border-color: var(--primary); }
.manager-list-item-name { font-weight: 600; color: var(--gray-800); font-size: 13px; }

/* ====================================================
   HISTORY / REPORTING
==================================================== */
.history-filters {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.history-filters-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  outline: none;
  transition: border-color .15s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,95,199,.1);
}

/* History result items */
.history-user-block {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  margin-bottom: 14px;
  overflow: hidden;
}

.history-user-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.history-user-block-name { font-size: 14.5px; font-weight: 700; color: var(--gray-800); }
.history-user-id { font-size: 12px; color: var(--gray-400); margin-left: 4px; }
.history-user-total { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--green); }

.history-shift-row {
  display: flex;
  align-items: center;
  padding: 11px 20px 11px 24px;
  border-bottom: 1px solid var(--gray-100);
  gap: 14px;
  transition: background .12s;
}
.history-shift-row:last-child { border-bottom: none; }
.history-shift-row:hover { background: var(--gray-50); }

.history-shift-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
  flex: 0 0 140px;
  display: flex;
}

.history-shift-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.history-shift-break {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--orange);
  font-weight: 600;
  background: var(--orange-light);
  padding: 2px 8px;
  border-radius: 10px;
}

.history-shift-duration {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  min-width: 60px;
  text-align: right;
}

.history-summary-bar {
  background: var(--primary-light);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.history-summary-bar strong { font-weight: 700; }

.history-filters{
display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.history-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
}

.history-filter-select {
    padding: 9px 13px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    font-family: inherit;
    color: var(--gray-700);
    appearance: none;
    -webkit-appearance: none;
  }

.history-filter-date {
    padding: 9px 13px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: var(--gray-700);
    outline: none;
    transition: border-color .15s;
    cursor: pointer;
}

/* starý kompatibilní */
.history-user-info { display: flex; align-items: center; gap: 12px; }

.history-user-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.history-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.history-user-name { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.history-user-id { font-size: 12px; color: var(--gray-400); }
.history-total-hours { font-size: 14px; font-weight: 700; color: var(--green); }

.history-shift-row {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--gray-100);
  gap: 16px;
}

.history-shift-row:last-child { border-bottom: none; }

.history-user-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
}
.history-footer-label { color: var(--gray-500); font-weight: 500; }
.history-footer-value { color: var(--green); font-weight: 700; }
.history-footer-sep { color: var(--gray-300); }

.history-shift-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  width: 90px;
  flex-shrink: 0;
}

.history-shift-date { font-size: 13px; color: var(--gray-600); flex: 1; }
.history-shift-group { background: var(--gray-100); padding: 2px 8px; border-radius: 5px; font-size: 12px; color: var(--gray-600); font-weight: 500; }
.history-break-badge { background: var(--orange-light); color: #92400e; padding: 2px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.history-shift-hours { font-size: 14px; font-weight: 700; color: var(--green); margin-left: auto; }

.history-summary {
  background: var(--primary-light);
  border: 1px solid rgba(91,95,199,.2);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ====================================================
   TOAST NOTIFICATIONS
==================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90%;
  width: 480px;
}

.toast {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: all;
  min-width: 280px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.hide { transform: translateY(-100px); opacity: 0; }

.toast-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-right: 14px; flex-shrink: 0; }
.toast.success .toast-icon { background: var(--green-light); color: var(--green); }
.toast.error .toast-icon { background: var(--red-light); color: var(--red); }
.toast.info .toast-icon { background: #dbeafe; color: #3b82f6; }

.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 2px; }
.toast-message { font-size: 13px; color: var(--gray-500); line-height: 1.4; }

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all .15s;
  margin-left: 8px;
  flex-shrink: 0;
}
.toast-close:hover { background: var(--gray-100); color: var(--gray-600); }

/* ====================================================
   LOGIN SCREEN — SPLITSCREEN
==================================================== */
.login-screen {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Levá strana — tmavý branding */
.login-split-left {
  width: 20%;
  background: linear-gradient(150deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.login-split-left::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -100px;
  right: -100px;
}

.login-split-left::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -60px;
  left: -60px;
}

.login-split-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.login-logo-name {
  font-size: 25px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.3px;
}

.login-split-tagline {
  font-size: 28px;
  font-weight: 700;
  color: white;
  line-height: 1.35;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.login-split-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-split-feature {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pravá strana — formulář */
.login-split-right {
  flex: 1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  text-align: center;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 32px;
  text-align: center;
}

.login-form-group { margin-bottom: 18px; }
.login-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.login-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: var(--gray-50);
}
.login-form-group input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(91,95,199,.1);
}

.btn-login {
  width: 100%;
  padding: 9px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, box-shadow .15s;
  font-family: inherit;
  margin-top: 8px;
  letter-spacing: 0.2px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-login:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(91,95,199,.3);
}

.login-error, .login-success {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 13px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.3s;
  display: none;
}
.login-error { background: var(--red-light); color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.login-success { background: var(--green-light); color: #059669; border: 1px solid rgba(16,185,129,.2); }
.login-error.show, .login-success.show { opacity: 1; transform: translateY(0); display: block; }

.app-version-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  z-index: 1;
}

/* Legacy compat */
.success-message, .error-message { display: none !important; }

/* ====================================================
   DIALOGS (modals)
==================================================== */
.edit-group-dialog, .edit-group-form {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.edit-group-form { z-index: 1001; }

.edit-group-content, .edit-group-form-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}

.edit-group-form-content { max-width: 520px; }

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.modal-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  transition: all .15s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* Cancel button circle */
.btn-cancel-circle {
  background: white;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all .2s;
  font-size: 13px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
}
.btn-cancel-circle:hover { background: var(--red-light); border-color: var(--red); color: var(--red); }

/* ====================================================
   PAGINATION
==================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px 16px;
  margin-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.pagination-btn {
  padding: 8px 18px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  min-width: 110px;
}
.pagination-btn:hover:not(:disabled) { background: var(--gray-50); border-color: var(--primary); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-info { font-size: 13px; color: var(--gray-600); text-align: center; min-width: 180px; }
.pagination-info strong { color: var(--primary); font-weight: 600; }

/* ====================================================
   DROPDOWN MENU (item options)
==================================================== */
.item-options-wrapper { position: relative; display: inline-block; }

.item-options-trigger {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.item-options-trigger:hover { background: var(--gray-200); border-color: var(--gray-300); }
.item-options-trigger .chevron { font-size: 10px; transition: transform .15s; }
.item-options-trigger.open .chevron { transform: rotate(180deg); }

.item-options-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .15s ease;
  box-shadow: var(--shadow-lg);
}
.item-options-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

.item-options-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
  font-size: 13px;
  color: var(--gray-700);
  font-family: inherit;
}
.item-options-dropdown .dropdown-item:hover { background: var(--gray-50); }
.item-options-dropdown .dropdown-item .icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-400);
  font-size: 0;
}
.item-options-dropdown .dropdown-item .icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.item-options-dropdown .dropdown-item:hover .icon { color: var(--primary); }
.item-options-dropdown .dropdown-item.danger .icon { color: var(--red); }
.item-options-dropdown .dropdown-item.danger { color: var(--red); }
.item-options-dropdown .dropdown-item.danger:hover { background: var(--gray-50); }

/* ====================================================
   USER DROPDOWN GLOBAL (sdílený sidebar + mobile)
==================================================== */

/* Základní styl dropdownu */
.user-dropdown-global {
  position: fixed;
  background: white;
  border: 1px solid rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .18s ease;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  border-radius: 14px;
  margin-left: 9px;
  margin-bottom: 9px;

  /* Desktop: vlevo dole nad sidebar-user */
  bottom: 56px;
  width: calc(var(--sidebar-w) - 20px);
}

.user-dropdown-global.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-global .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
  font-size: 13px;
  color: var(--gray-700);
  font-family: inherit;
}
.user-dropdown-global .dropdown-item:hover { background: var(--gray-50); }
.user-dropdown-global .dropdown-item.danger { color: var(--red); }
.user-dropdown-global .dropdown-item.danger:hover { background: var(--gray-50); }

.user-dropdown-global .dropdown-item .icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-400);
  font-size: 0;
  transition: color .15s;
}

.user-dropdown-global .dropdown-item .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-dropdown-global .dropdown-item:hover .icon {
  color: var(--primary);
}

.user-dropdown-global .dropdown-item.danger .icon {
  color: var(--red);
}

/* Zachovat starý .sidebar-user-dropdown jako alias (nepoužívá se ale pro compat) */
.sidebar-user-dropdown { display: none; }

@media (max-width: 768px) {
  /* Na mobilu: nad bottom nav, roztažený — tmavý pásek */
  .user-dropdown-global {
    bottom: 70px;
    left: 8px;
    right: 8px;
    width: auto;
    min-width: 0;
    background: #1e1e2e;
    border: none;
    border-radius: 10px;
    padding: 12px 4px 8px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    /* Přepsat transition — animovat jen opacity, ne layout */
    transition: opacity .15s ease, visibility .15s ease;
    transform: none !important;
    margin-left: 0;
    margin-bottom: 0;
  }

  .user-dropdown-global .dropdown-header {
    display: none;
  }

  .user-dropdown-global .dropdown-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    background: none;
    border: none;
    border-radius: 12px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .15s, background .15s;
    min-width: 0;
  }

  .user-dropdown-global .dropdown-item:hover {
    color: white;
    background: rgba(255,255,255,.08);
  }

  .user-dropdown-global .dropdown-item.danger {
    color: var(--red);
  }

  .user-dropdown-global .dropdown-item.danger:hover {
    color: #e444;
    background: rgba(239,68,68,.1);
  }

  .user-dropdown-global .dropdown-item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    width: 22px;
    height: 22px;
    color: inherit;
  }

  .user-dropdown-global .dropdown-item .icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .user-dropdown-global .dropdown-item span:not(.icon) {
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
  }
}

/* ====================================================
   SHIFT DIALOG MODERN
==================================================== */
.shift-dialog-modern { max-width: 620px; }
.shift-dialog-title { margin-bottom: 28px; text-align: center; font-size: 22px; }

.shift-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.shift-icon-box { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.shift-icon-box.gray { background: var(--gray-100); }
.shift-icon-box.blue { background: #dbeafe; }
.shift-icon-box.green { background: var(--green-light); }
.shift-icon-box.purple { background: var(--primary-light); }

.shift-input { flex: 1; padding: 11px 14px; border: 1px solid var(--gray-200); border-radius: 9px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s; }
.shift-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,95,199,.1); }

.shift-duration-input { width: 110px; padding: 11px 14px; border: 1px solid var(--gray-200); border-radius: 9px; text-align: center; font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s; }
.shift-duration-input:focus { border-color: var(--primary); }

.shift-capacity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }

.shift-capacity-box { border-radius: 9px; padding: 14px; border: 1px solid; }
.shift-capacity-box.green { background: rgba(16,185,129,.07); border-color: #a7f3d0; }
.shift-capacity-box.orange { background: #fff7ed; border-color: #fed7aa; }

.shift-capacity-header { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.shift-capacity-label { font-size: 13px; font-weight: 600; }

.shift-capacity-input { width: 100%; padding: 9px 10px; border: 1px solid; border-radius: 7px; text-align: center; font-size: 17px; font-weight: 700; background: white; font-family: inherit; outline: none; }
.shift-capacity-input.green { border-color: #a7f3d0; }
.shift-capacity-input.orange { border-color: #fed7aa; }

.shift-notification-box { border-radius: 9px; padding: 10px; margin-bottom: 18px; border: 1px solid var(--gray-200); }
.shift-notification-label { display: flex; align-items: center; cursor: pointer; margin: 0; }
.checkbox-global { margin-right: 10px; width: 18px; height: 18px; cursor: pointer; }
.shift-notification-text { font-size: 13px; font-weight: 600; }

.shift-reason-box { background: var(--orange-light); border: 1px solid #fde68a; border-radius: 9px; padding: 14px; margin-bottom: 18px; }
.shift-reason-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.shift-reason-textarea { width: 100%; padding: 10px; border: 1px solid #fde68a; border-radius: 7px; font-family: inherit; resize: vertical; font-size: 13px; }

.shift-buttons { display: flex; gap: 10px; padding-top: 6px; }

/* ====================================================
   USER SETTINGS DIALOG (usd-*)
==================================================== */
.usd-modal { padding: 0; max-width: 420px; overflow: hidden; max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column; }

.usd-header {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  padding: 22px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.usd-header-left { display: flex; align-items: center; gap: 12px; }
.usd-header-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  color: var(--primary-dark);
}
.usd-header-icon svg {
  width: 24px;
  height: 24px;
}
.usd-header-title { font-size: 16px; font-weight: 700; color: white; margin: 0; }
.usd-header-sub { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }
.usd-close {
  background: rgba(255,255,255,.15); border: none; color: white;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background .15s; flex-shrink: 0;
}
.usd-close:hover { background: rgba(255,255,255,.28); }

.usd-body { padding: 20px 20px 0px 20px; overflow-y: auto; flex: 1; }

.usd-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--gray-400);
  margin-bottom: 10px; margin-top: 4px; padding-left: 2px;
}

.usd-field {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border: 1.5px solid var(--gray-200);
  border-radius: 10px; background: white; margin-bottom: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.usd-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,95,199,.09);
}
.usd-field-icon {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

.usd-field-icon.blue   { background: #dbeafe; }
.usd-field-icon.green  { background: var(--green-light); }
.usd-field-icon.purple { background: var(--primary-light); }
.usd-field-icon.yellow { background: var(--orange-light); }

/* Moderní SVG ikona v poli — šedá, na hover fialová, bez pozadí */
.usd-field-icon-svg {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gray-300);
  transition: color .15s;
}
.usd-field-icon-svg svg {
  width: 24px;
  height: 24px;
}
.usd-field:hover .usd-field-icon-svg,
.usd-field:focus-within .usd-field-icon-svg,
.usd-toggle-row:hover .usd-field-icon-svg {
  color: var(--primary);
}

.usd-field-content { flex: 1; min-width: 0; }
.usd-field-content label {
  display: block; font-size: 10px; font-weight: 600;
  color: var(--gray-400); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 1px;
}
.usd-field-content input {
  width: 100%; border: none; outline: none;
  font-size: 13.5px; font-family: inherit;
  color: var(--gray-800); background: none;
}
.usd-field-content input::placeholder { color: var(--gray-400); }

.usd-eye-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 16px; padding: 0;
  display: flex; align-items: center; transition: color .15s;
}
.usd-eye-btn:hover { color: var(--gray-600); }

.usd-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; border: 1.5px solid var(--gray-200);
  border-radius: 10px; cursor: pointer; transition: border-color .15s;
  margin-bottom: 8px;
}
.usd-toggle-row:hover { border-color: var(--primary); }
.usd-toggle-left { display: flex; align-items: center; gap: 10px; }
.usd-toggle-text { font-size: 13.5px; font-weight: 500; color: var(--gray-700); }

.usd-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.usd-switch input { opacity: 0; width: 0; height: 0; }
.usd-switch-slider {
  position: absolute; inset: 0;
  background: var(--gray-200); border-radius: 22px;
  cursor: pointer; transition: background .2s;
}
.usd-switch-slider:before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: white; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.usd-switch input:checked + .usd-switch-slider { background: var(--primary); }
.usd-switch input:checked + .usd-switch-slider:before { transform: translateX(16px); }

.usd-info-box {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 8px; padding: 10px 13px;
  font-size: 12.5px; color: #1d4ed8; margin-bottom: 10px;
}

.usd-footer { display: flex; gap: 10px; padding: 10px; background: white; flex-shrink: 0;}
.usd-modal > form { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* Shift note */
.shift-note { font-size: 12px; color: var(--gray-500); padding: 8px 10px; background: rgba(59,130,246,.05); border-radius: 6px; margin: 0 10px 6px; line-height: 1.5; }
.shift-note strong { color: #3b82f6; font-weight: 600; }

/* ====================================================
   TYPOGRAPHY
==================================================== */
h2, h3, h4 { color: var(--gray-900); }

.loading { text-align: center; color: var(--gray-400); font-size: 14px; }

/* ====================================================
   ADMIN TAB COMPAT (hidden, kept for JS compat)
==================================================== */
.admin-tab-btn { display: none; }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: none; }

/* Report filters */
.report-filters-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }

/* Manager contact card */
.manager-contact-card {
  background: rgba(91,95,199,.05);
  border: 1px solid rgba(91,95,199,.15);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
}
.manager-contact-name { font-size: 17px; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.manager-contact-detail { margin: 6px 0; color: var(--gray-600); font-size: 13px; display: flex; align-items: center; gap: 7px; }

/* User panel info */
.user-info { display: none; } /* handled by sidebar now */

/* Force hide legacy userInfo regardless of inline style set by auth.js */
#userInfo { display: none !important; }


.user-group {
  padding: 10px 24px;
  border: none;
  background: var(--green);
  color: white;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.user-group:hover { background: #059669; }

/* Progress bars in user items */
.shift-count-badge { background: var(--green); color: white; padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.shift-count-badge.standby { background: var(--orange); }

/* ====================================================
   SECTIONS DISPLAY / ACTIVE
==================================================== */
.container { display: none !important; } /* old layout disabled */

#loginForm { display: none; }
#loginForm.active { display: flex; }

#mainApp { display: none; }
#mainApp.active { display: flex; width: 100%; height: 100vh; }

#adminPanel { display: none; }
#adminPanel.active { display: flex; flex-direction: column; width: 100%; height: 100%; }

#userPanel { display: none; }
#userPanel.active { display: flex; flex-direction: column; width: 100%; height: 100%; }

/* ====================================================
   DOUBLE PROGRESS BAR
==================================================== */
.dvoubarevny-progress-bar { width: 100%; height: 4px; background: var(--gray-200); border-radius: 3px; overflow: hidden; display: flex; margin-top: 6px; }
.progress-normal { height: 100%; background: var(--green); transition: width .3s; }
.progress-standby { height: 100%; background: var(--orange); transition: width .3s; }

/* ====================================================
   BOTTOM NAV (mobile only)
==================================================== */
.bottom-nav {
  display: none;
}

/* ====================================================
   MOBILE RESPONSIVE
==================================================== */

@media (max-width: 768px) {
  /* ---- Layout ---- */
  body { overflow: auto; }
  .main-content { overflow-x: hidden; }
  
  /* Skrýt sidebar úplně */
  .sidebar { display: none; }
  
  /* App shell jako column, plná výška */
  .app-shell { flex-direction: column; }
  
/* Main content zabere celou šířku, nechat místo pro bottom nav */
    .main-content {
    overflow: visible;
    height: auto;
    padding-bottom: 64px;
  }
  
  /* ---- Content ---- */
  .content-header { padding: 10px; flex-shrink: 1; }
  .content-body { padding: 10px; flex: none; padding-bottom: 60px; overflow-y: visible; }
  .content-title { font-size: 19px; }
  .shifts-card { padding: 10px; }
  
  /* ---- Calendar layout --- */
  .calendar-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  /* Moje směny - datum a čas na samostatných řádcích */
  .my-shifts-time-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
/* ---- Filters ---- */
  .history-filters { grid-template-columns: 1fr 1fr; }
  .history-filters > *:nth-child(1) { grid-column: 1 / -1; }
  .history-filters > *:nth-child(2) { grid-column: 1 / -1; }
  .history-filters-user { grid-template-columns: 1fr 1fr; }
  .history-filters-user > *:first-child { grid-column: auto; }
  .history-filters-3col { grid-template-columns: 1fr; }
  .report-filters-grid { grid-template-columns: 1fr; }
  
  /* ---- Historie směn - řádky ---- */
  .history-shift-row {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 6px;
    align-items: flex-start;
  }
  
  .history-shift-name {
    flex: 0 0 auto;
    font-size: 13px;
  }
  
  .history-shift-meta {
    flex: 1 1 100%;
    font-size: 12px;
    gap: 4px;
  }
  
  .history-shift-meta {
    align-content: flex-start;
  }
  
.history-shift-break {
    order: 10;
  }
  
  .history-shift-meta span[style*="color:var(--primary)"] {
    order: 10;
  }
  
  .history-shift-meta::after {
    content: '';
    display: block;
    flex-basis: 100%;
    order: 9;
    height: 2px;
  }

  .history-shift-duration {
    flex: 0 0 auto;
  }
  
  .history-shift-edit {
    margin-left: auto;
  }
  
  .history-user-block-header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 14px;
  }
  
  .history-user-total {
    flex-basis: 100%;
    margin-left: 0;
  }
  
  /* ---- Shift dialog ---- */
  .shift-input-row.time-duration { flex-direction: column; }
  .shift-duration-input { width: 100%; }
  
  /* ---- Pagination ---- */
  .pagination-container { flex-direction: column; gap: 10px; }
  .pagination-btn { width: 100%; min-width: unset; }
  .pagination-info { order: -1; }
  
/* ---- Login ---- */
  .login-screen { flex-direction: column; }
  .login-split-left { width: 100%; padding: 24px 20px; min-height: auto; align-items: center; }
  .login-split-brand { justify-content: center; margin-bottom: 0; }
  .login-split-tagline { display: none; }
  .login-split-features { display: none; }
  .login-split-right { padding: 28px 20px; align-items: flex-start; }
  .login-card { max-width: 100%; }
  .login-split-brand { margin-bottom: 0px; }
  .app-version-footer { position: static; margin-top: 16px; color: rgba(255,255,255,0.3); }
  body { padding: 0; }
  
/* ---- Bottom nav viditelný jen po přihlášení ---- */
body.is-logged-in .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #1e1e2e;
    border-top: 1px solid rgba(255,255,255,.08);
    z-index: 500;
    padding: 2px;
    align-items: stretch;
    overflow: hidden;
    border-radius: 10px 10px 0px 0px;
  }

  /* Scrollovatelná oblast — zabere vše kromě Účtu */
  .bottom-nav-scroll {
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }
  .bottom-nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav-item {
    flex: 0 0 calc(100% / 4); /* přesně 4 položky viditelné */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    border: none;
    background: none;
    color: rgba(255,255,255,.5);
    font-size: 10px;
    font-weight: 500;
    font-family: inherit;
    padding: 5px;
    border-radius: 10px;
    transition: color .15s, background .15s;
    text-align: center;
    position: relative;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .bottom-nav-item .bn-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.45);
    transition: color .15s;
  }

  .bottom-nav-item .bn-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  
  .bottom-nav-item .bn-badge {
    position: absolute;
    top: 4px;
    right: 45%;
    transform: translateX(14px);
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 20px;
    min-width: 17px;
    text-align: center;
    line-height: 1.5;
  }
  
  .bottom-nav-item.active {
    color: white;
    background: rgba(255,255,255,.1);
  }
  
  .bottom-nav-item.active .bn-icon,
  .bottom-nav-item:hover .bn-icon {
    color: white;
  }

    /* Fixní tlačítko Účet — vždy viditelné vpravo */
  .bottom-nav-item--account {
    flex: none;
    width: 55px;
  }

  /* Dropdown uživatele v sidebar — na mobilu přes bottom sheet */
  .sidebar-user-dropdown {
    position: fixed;
    bottom: 68px;
    left: 10px;
    right: 10px;
    top: auto;
    border-radius: 14px;
  }
  
  /* Floating user avatar button nahradí sidebar-user */
  .mobile-user-btn {
    display: flex;
  }

  /* ---- Není vidět na mobilním zařízení ---- */
  .registered-user-time { display: none; }
}

/* ====================================================
   USER ROW RESPONSIVE
==================================================== */
@media (max-width: 768px) {
  .user-meta {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
    .user-row {
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-start;
  }
  .user-avatar-list {
    flex-shrink: 0;
  }
  .user-info-block {
    flex: 1 1 0;
    min-width: 120px;
  }
  .user-meta {
    flex: 0 0 100%;
    padding-left: 52px; /* zarovnat pod jméno (avatar 40px + gap 12px) */
    gap: 6px 14px;
  }
  .user-tags {
    flex: 1 1 auto;
    padding-left: 52px;
    justify-content: flex-start;
  }
  .user-shift-count {
    text-align: left;
  }
  .row-menu-btn {
    margin-left: auto;
    align-self: flex-start;
  }
    .user-info-block {
    flex: 1 1 0;
  }
  .user-meta {
    padding-left: 0;
    flex-direction: column;
    gap: 4px;
  }
  .user-tags {
    padding-left: 0;
  }
}

/* ====================================================
   GROUP ROW RESPONSIVE
==================================================== */
@media (max-width: 768px) {
  .group-row {
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-start;
  }
  .group-icon-badge {
    flex-shrink: 0;
  }
  .group-row-info {
    flex: 1 1 0;
    min-width: 120px;
  }
  .group-row-meta {
    flex: 0 0 100%;
    gap: 6px 14px;
    flex-direction: column;
  }
  .group-row .user-tags {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
  .group-row .row-menu-btn {
    margin-left: auto;
    align-self: flex-start;
  }
}

/* ====================================================
   Mail Historie
==================================================== */
#mailHistoryList {
    text-align: left;
}

.mail-history-table {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.mail-history-header {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 9px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 12px 12px 0 0;
}

.mail-history-header > div:nth-child(1) { flex: 0 0 130px; }
.mail-history-header > div:nth-child(2) { flex: 0 0 160px; }
.mail-history-header > div:nth-child(3) { flex: 1; }
.mail-history-header > div:nth-child(4) { flex: 0 0 230px; }
.mail-history-header > div:nth-child(5) { flex: 0 0 110px; }

.mail-history-row {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    border-bottom: 1px solid var(--gray-100);
    gap: 0;
    transition: background .12s;
    background: var(--gray-50);
}

.mail-history-row:last-child { border-bottom: none; }
.mail-history-row:hover { background: var(--gray-50); }

.mail-history-row > div:nth-child(1) { flex: 0 0 130px; }
.mail-history-row > div:nth-child(2) { flex: 0 0 160px; }
.mail-history-row > div:nth-child(3) { flex: 1; min-width: 0; }
.mail-history-row > div:nth-child(4) { flex: 0 0 230px; }
.mail-history-row > div:nth-child(5) { flex: 0 0 110px; }

.mail-history-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.mail-history-type-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mail-history-subject {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-history-recipient {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mail-history-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.mail-history-recipient-info {
    min-width: 0;
}

.mail-history-recipient strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-history-recipient span {
    font-size: 12px;
    color: var(--gray-400);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-history-date {
    font-size: 12px;
    color: var(--gray-600);
}

.mail-history-time {
    color: var(--gray-400);
    font-size: 11px;
}

.mail-history-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mail-history-badge svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.badge-sent    { background: #dcfce7; color: #16a34a; }
.badge-pending { background: #fef9c3; color: #ca8a04; }
.badge-failed  { background: #fee2e2; color: #dc2626; }

.mail-history-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 0 0 12px 12px;
}

.mail-history-pagination .pagination-info {
    font-size: 13px;
    color: var(--gray-500);
    min-width: unset;
    text-align: left;
}

.mail-history-pagination .pagination-btns {
    display: flex;
    gap: 5px;
}

.mail-history-pagination .page-btn {
    padding: 6px 11px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: var(--gray-700);
    line-height: 1;
    transition: background 0.1s;
}

.mail-history-pagination .page-btn:hover:not(.active):not(:disabled) { background: var(--gray-50); }
.mail-history-pagination .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.mail-history-pagination .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mail-history-pagination .page-ellipsis { border-color: transparent; background: transparent; cursor: default; }

@media (max-width: 768px) {
    .mail-history-header { display: none; }
    .mail-history-row {
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px 16px;
    }
    .mail-history-row > div:nth-child(1) { flex: 0 0 auto; order: 1; }
    .mail-history-row > div:nth-child(2) { flex: 0 0 auto; order: 2; }
    .mail-history-row > div:nth-child(3) { flex: 1 1 100%; order: 4; min-width: 0; }
    .mail-history-row > div:nth-child(4) { flex: 1 1 100%; order: 3; }
    .mail-history-row > div:nth-child(5) { flex: 0 0 auto; order: 4; }
    .mail-history-pagination { flex-direction: column; gap: 10px; align-items: flex-start; }
}

@keyframes smenio-spin {
    to { transform: rotate(360deg); }
}

/* ====================================================
   GET STARTED — Jak začít
==================================================== */
.gs-step {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.gs-step.gs-active-step {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.gs-step.gs-done {
    border-color: var(--green-light);
}
.gs-step.gs-locked {
    opacity: .55;
}
.gs-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    user-select: none;
}
.gs-step-header:hover {
    background: var(--gray-50);
}
.gs-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}
.gs-step.gs-done .gs-step-title {
    color: #065f46;
}
.gs-step-sub {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}
.gs-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gs-num-locked {
    background: var(--gray-200);
    color: var(--gray-500);
}
.gs-num-done {
    background: var(--green);
    color: white;
}
.gs-done-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    background: var(--green-light);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.gs-chevron {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    flex-shrink: 0;
    transition: transform .2s;
    display: flex;
    align-items: center;
}
.gs-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.gs-chevron.open {
    transform: rotate(180deg);
}
.gs-step-body {
    padding: 0 18px 18px 62px;
}
.gs-desc {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.7;
}
.gs-desc strong {
    font-weight: 600;
    color: var(--gray-900);
}
/* Mini UI preview */
.gs-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin: 14px 0;
    overflow: hidden;
}
.gs-preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}
/* Buttons */
.gs-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.gs-btn-primary svg {
    width: 13px;
    height: 13px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    flex-shrink: 0;
}
.gs-btn-primary:hover { background: var(--primary-dark); }
.gs-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.gs-btn-secondary:hover { background: var(--gray-200); }
.gs-btn-done {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.gs-btn-done svg {
    width: 15px;
    height: 15px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    flex-shrink: 0;
}
.gs-btn-done:hover { background: #059669; }

/* Pulzující nav položka Jak začít */
@keyframes gsNavPulse {
    0%, 100% { background: transparent; color: var(--gray-600); }
    50%       { background: var(--primary-light); color: var(--primary); }
}

#navGetStarted.gs-pulse {
    animation: gsNavPulse 2s ease-in-out infinite;
}

#navGetStarted.gs-pulse .nav-icon {
    animation: gsNavPulse 2s ease-in-out infinite;
}

/* ====================================================
   Autor
==================================================== */
/* © 2025 Ondřej Hlaváč (ondrej@smenio.cz) – Všechna práva vyhrazena */
