/* ============================================================
   NXTShift – App Stylesheet
   Design-System: Orange #F97316 | Dark #1C1917 | Cream #FFFBF7
   Fonts: Sora (headings) | DM Sans (body)
   ============================================================ */

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1C1917;
  background: #F5F0EB;
  min-height: 100vh;
}

a { color: #F97316; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F5F0EB; }
::-webkit-scrollbar-thumb { background: #D1C4B8; border-radius: 3px; }

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
:root {
  --sidebar-w: 240px;
  --topbar-h:  60px;
}

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #1C1917;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;           /* weiß in der Sidebar */
  letter-spacing: -0.03em;
}
.logo-text span { color: #F97316; }

/* Im Auth-Layout (Login, Register, Invite): dunkle Schrift */
.auth-layout .logo-text { color: #1C1917; }
.auth-layout .logo-text span { color: #F97316; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #A8A29E;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(249,115,22,0.18); color: #F97316; }
.nav-item.active svg { stroke: #F97316; }

.nav-badge {
  margin-left: auto;
  background: #EF4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  line-height: 1.6;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.user-info { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #78716C; }

.logout-btn {
  color: #78716C;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.logout-btn:hover { color: #EF4444; text-decoration: none; }

/* MAIN WRAP */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #E7E0D8;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #78716C;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.hamburger:hover { background: #F5F0EB; color: #1C1917; }

.topbar-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #1C1917;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-name {
  font-size: 13px;
  color: #78716C;
  font-weight: 500;
}

/* PAGE CONTENT */
.page-content {
  flex: 1;
  padding: 28px 28px 40px;
  max-width: 1400px;
  width: 100%;
}

/* SIDEBAR OVERLAY (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.5);
  z-index: 190;
}

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-layout {
  background: linear-gradient(135deg, #FFF7ED 0%, #F5F0EB 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-wrap {
  width: 100%;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 24px rgba(28,25,23,0.08);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
  text-decoration: none;
}

.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #1C1917;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-sub {
  text-align: center;
  color: #78716C;
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #78716C;
}

/* INVITE PAGE */
.invite-info {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.invite-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.invite-name { font-weight: 600; color: #1C1917; font-size: 16px; }
.invite-type { font-size: 13px; color: #78716C; margin-top: 2px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-section-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A8A29E;
  margin-bottom: 4px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: #44403C;
}

.label-hint {
  font-weight: 400;
  color: #A8A29E;
  font-size: 12px;
}

.req { color: #F97316; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="time"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E7E0D8;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #1C1917;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

input::placeholder, textarea::placeholder { color: #D1C4B8; }

textarea { resize: vertical; min-height: 80px; }

select { cursor: pointer; }

input[type="color"] {
  width: 40px;
  height: 40px;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid #E7E0D8;
}

.input-wrap { position: relative; }
.input-wrap input { padding-right: 40px; }
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #A8A29E;
  padding: 0;
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: #78716C; }

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }

.swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  outline: none;
  padding: 0;
}
.swatch:hover { transform: scale(1.2); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 100px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: #F97316; color: #fff; }
.btn-primary:hover { background: #EA6C0A; box-shadow: 0 4px 12px rgba(249,115,22,0.3); }

.btn-secondary { background: #F5F0EB; color: #44403C; }
.btn-secondary:hover { background: #E7E0D8; }

.btn-danger { background: #FEE2E2; color: #DC2626; }
.btn-danger:hover { background: #FECACA; }

.btn-full { width: 100%; }

.btn-sm { padding: 7px 16px; font-size: 13px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F5F0EB;
  color: #78716C;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.icon-btn:hover { background: #E7E0D8; color: #1C1917; text-decoration: none; }
.icon-btn-orange:hover { background: #FFF7ED; color: #F97316; }
.icon-btn-red:hover    { background: #FEE2E2; color: #DC2626; }
.icon-btn-green:hover  { background: #DCFCE7; color: #16A34A; }

/* ============================================================
   CARDS & LAYOUT
   ============================================================ */
.card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  margin-bottom: 16px;
}

.card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #1C1917;
}

.card-link {
  font-size: 13px;
  font-weight: 500;
  color: #F97316;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-sub {
  color: #78716C;
  font-size: 14px;
  margin-top: 2px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard { display: flex; flex-direction: column; gap: 24px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.15s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(28,25,23,0.06); }
.stat-card-danger { border-color: #FCA5A5; background: #FFF5F5; }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-blue   { background: #EFF6FF; color: #3B82F6; }
.stat-icon-orange { background: #FFF7ED; color: #F97316; }
.stat-icon-green  { background: #F0FDF4; color: #16A34A; }
.stat-icon-red    { background: #FEF2F2; color: #DC2626; }

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #1C1917;
  line-height: 1;
}
.stat-label { font-size: 13px; color: #78716C; margin-top: 4px; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Shift list in dashboard */
.shift-list { padding: 0 24px 20px; }
.shift-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F5F0EB;
}
.shift-item:last-child { border-bottom: none; }

.shift-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  flex-shrink: 0;
}

.shift-name { font-weight: 600; font-size: 14px; color: #1C1917; }
.shift-time { font-size: 13px; color: #78716C; }

/* Quick actions */
.quick-actions { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 8px; }

.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #F5F0EB;
  color: #44403C;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s;
}
.qa-btn:hover { background: #E7E0D8; color: #1C1917; text-decoration: none; }
.qa-btn-warn { background: #FFF7ED; color: #C2410C; }
.qa-btn-warn:hover { background: #FFEDD5; }
.qa-btn-danger { background: #FEF2F2; color: #DC2626; }
.qa-btn-danger:hover { background: #FEE2E2; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: #A8A29E;
  text-align: center;
}
.empty-state p { font-size: 15px; }

/* ============================================================
   EMPLOYEES TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A8A29E;
  background: #FAFAF9;
  border-bottom: 1px solid #E7E0D8;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #F5F0EB;
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAF9; }
.row-inactive td { opacity: 0.5; }

.emp-cell { display: flex; align-items: center; gap: 12px; }
.emp-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.emp-name { font-weight: 600; color: #1C1917; font-size: 14px; }
.emp-email { font-size: 12px; color: #A8A29E; }

.action-btns { display: flex; gap: 6px; align-items: center; }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-vollzeit { background: #EFF6FF; color: #1D4ED8; }
.badge-teilzeit { background: #F0FDF4; color: #15803D; }
.badge-minijob  { background: #FFF7ED; color: #C2410C; }

.prio-badge {
  display: inline-flex;
  width: 28px; height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.prio-1 { background: #DCFCE7; color: #15803D; }
.prio-2 { background: #F5F0EB; color: #78716C; }
.prio-3 { background: #FFF7ED; color: #C2410C; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.status-active   { background: #DCFCE7; color: #15803D; }
.status-inactive { background: #F5F0EB; color: #78716C; }
.status-pending  { background: #FEF9C3; color: #92400E; }

/* ============================================================
   SCHEDULE GRID
   ============================================================ */
.schedule-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.week-label {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #1C1917;
  min-width: 220px;
  text-align: center;
}

.week-nav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #E7E0D8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #78716C;
  transition: all 0.15s;
}
.week-nav-btn:hover { background: #F5F0EB; border-color: #D1C4B8; color: #1C1917; }

.schedule-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.schedule-grid {
  min-width: 900px;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  background: #fff;
  overflow: hidden;
}

.schedule-head {
  display: grid;
  grid-template-columns: 200px repeat(7, 1fr);
  background: #FAFAF9;
  border-bottom: 2px solid #E7E0D8;
}

.schedule-head-cell {
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid #E7E0D8;
  position: relative;
}
.schedule-head-cell:first-child { text-align: left; padding-left: 16px; border-right: 2px solid #E7E0D8; }
.schedule-head-cell:last-child  { border-right: none; }

.day-label {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #1C1917;
}
.day-date { font-size: 11px; color: #A8A29E; margin-top: 1px; }

.day-holiday {
  font-size: 10px;
  color: #F97316;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;   /* Ellipsis im Th, kein PHP-Truncation nötig */
}

.day-weather {
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #44403C;
}
.day-weather .temp { font-size: 11px; }
.day-weather .rain { font-size: 10px; color: #3B82F6; }

.today-col { background: rgba(249,115,22,0.04); }
.today-col .day-label { color: #F97316; }

.schedule-body .schedule-row {
  display: grid;
  grid-template-columns: 200px repeat(7, 1fr);
  border-bottom: 1px solid #F5F0EB;
}
.schedule-row:last-child { border-bottom: none; }

.emp-info-cell {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 2px solid #E7E0D8;
  background: #FAFAF9;
}

.emp-cell-name { font-size: 13px; font-weight: 600; color: #1C1917; line-height: 1.3; }
.emp-cell-meta { font-size: 11px; color: #A8A29E; display: flex; align-items: center; gap: 4px; }

.day-cell {
  padding: 8px 6px;
  border-right: 1px solid #F5F0EB;
  min-height: 72px;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.day-cell:last-child { border-right: none; }
.day-cell:hover { background: #FFF7ED; }
.day-cell.blocked-cell { background: #FEF2F2; cursor: default; }
.day-cell.blocked-cell:hover { background: #FEE2E2; }

.shift-block {
  background: #F97316;
  color: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  position: relative;
}
.shift-block:hover { opacity: 0.85; }
.shift-block .shift-time { display: block; font-size: 12px; font-weight: 700; }
.shift-block .shift-note { display: block; font-size: 10px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shift-block.shift-confirmed { background: #16A34A; }
.shift-block.shift-cancelled { background: #9CA3AF; text-decoration: line-through; }

.shift-error   { background: #DC2626 !important; }
.shift-warning { background: #D97706 !important; }

.compliance-icon {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 12px;
  line-height: 1;
}

.blocked-label {
  font-size: 11px;
  color: #DC2626;
  font-weight: 600;
  text-align: center;
  padding: 4px;
  background: #FEE2E2;
  border-radius: 6px;
}
.blocked-pending { color: #D97706; background: #FEF9C3; }

.add-shift-hint {
  font-size: 10px;
  color: #D1C4B8;
  text-align: center;
  margin-top: auto;
}

.cost-row {
  display: grid;
  grid-template-columns: 200px repeat(7, 1fr);
  background: #F5F0EB;
  border-top: 2px solid #E7E0D8;
}
.cost-cell {
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #78716C;
  border-right: 1px solid #E7E0D8;
}
.cost-cell:first-child { text-align: left; padding-left: 16px; border-right: 2px solid #E7E0D8; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.cost-cell:last-child { border-right: none; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,0.55);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* Prevent background scroll */
  overscroll-behavior: none;
}

.modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  /* Key: constrain height so body can scroll */
  max-height: calc(100vh - 48px);
  height: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(28,25,23,0.25);
  /* Prevent modal itself from overflowing */
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  /* Fixed – never scrolls */
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #1C1917;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #F5F0EB;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #78716C;
  transition: all 0.15s;
  flex-shrink: 0;
}
.modal-close:hover { background: #E7E0D8; color: #1C1917; }

.modal-body {
  /* This section scrolls */
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  overscroll-behavior: contain;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Subtle scroll shadow hint */
  background:
    linear-gradient(white 30%, rgba(255,255,255,0)) center top,
    linear-gradient(rgba(255,255,255,0), white 70%) center bottom,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,0.06), transparent) center top,
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,0.06), transparent) center bottom;
  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 100% 8px, 100% 8px;
  background-attachment: local, local, scroll, scroll;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #E7E0D8;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  /* Fixed – never scrolls */
  flex-shrink: 0;
  background: #fff;
}

/* ============================================================
   COMPLIANCE & INFO BOXES
   ============================================================ */
.compliance-box {
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compliance-box-error   { background: #FEF2F2; border: 1px solid #FCA5A5; }
.compliance-box-warning { background: #FFFBEB; border: 1px solid #FDE68A; }
.compliance-box-ok      { background: #F0FDF4; border: 1px solid #BBF7D0; }

.compliance-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.compliance-item-error   { color: #DC2626; }
.compliance-item-warning { color: #D97706; }
.compliance-item-ok      { color: #16A34A; }

.minijob-meter {
  margin-top: 6px;
  background: #E7E0D8;
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}
.minijob-bar {
  height: 100%;
  border-radius: 100px;
  background: #16A34A;
  transition: width 0.3s;
}
.minijob-bar.warn { background: #F59E0B; }
.minijob-bar.over { background: #DC2626; }

.info-box {
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.info-box-orange { background: #FFF7ED; border: 1px solid #FED7AA; color: #92400E; }
.info-box-blue   { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ============================================================
   ALERTS & FLASH MESSAGES
   ============================================================ */
.flash, .alert {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.flash-success, .alert-success { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.flash-error,   .alert-error   { background: #FEF2F2; color: #DC2626; border: 1px solid #FCA5A5; }
.flash-warning, .alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  padding: 24px;
}

.settings-section-full {
  grid-column: 1 / -1;
}

.settings-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1C1917;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F5F0EB;
}

.calendar-token-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.token-display {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: #F5F0EB;
  border: 1px solid #E7E0D8;
  border-radius: 8px;
  padding: 10px 14px;
  color: #44403C;
  word-break: break-all;
  line-height: 1.5;
}

/* ============================================================
   BLOCKED REQUESTS
   ============================================================ */
.blocked-card {
  background: #fff;
  border: 1px solid #E7E0D8;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.15s;
}
.blocked-card:hover { box-shadow: 0 2px 12px rgba(28,25,23,0.06); }

.blocked-info { flex: 1; min-width: 0; }
.blocked-name { font-weight: 600; color: #1C1917; font-size: 15px; }
.blocked-date { font-size: 13px; color: #78716C; margin-top: 2px; }
.blocked-reason { font-size: 12px; color: #A8A29E; margin-top: 4px; font-style: italic; }

.blocked-actions { display: flex; gap: 8px; flex-shrink: 0; }

.blocked-list { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   MY SCHEDULE (Employee)
   ============================================================ */
.my-schedule-month {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  overflow: hidden;
}

.month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #1C1917;
}
.month-dow {
  text-align: center;
  padding: 12px 4px;
  font-size: 12px;
  font-weight: 700;
  color: #A8A29E;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.month-cell {
  border-right: 1px solid #F5F0EB;
  border-bottom: 1px solid #F5F0EB;
  padding: 8px;
  min-height: 90px;
}
.month-cell:nth-child(7n) { border-right: none; }

.month-cell-num {
  font-size: 13px;
  font-weight: 600;
  color: #A8A29E;
  margin-bottom: 6px;
}
.month-cell.today .month-cell-num {
  background: #F97316;
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.month-cell.other-month { background: #FAFAF9; }
.month-cell.other-month .month-cell-num { color: #D1C4B8; }

.my-shift-pill {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 7px;
  border-radius: 6px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-blocked-pill {
  display: block;
  font-size: 11px;
  background: #FEE2E2;
  color: #DC2626;
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 500;
}

/* ============================================================
   AVAILABILITY PAGE
   ============================================================ */
.avail-month { display: flex; flex-direction: column; gap: 20px; }

.avail-grid {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  overflow: hidden;
}

.avail-cell {
  cursor: pointer;
  user-select: none;
  min-height: 80px;
}
.avail-cell.selected { background: #FFF7ED; }
.avail-cell.approved { background: #FEF2F2; cursor: default; }

/* ============================================================
   PUBLIC CALENDAR
   ============================================================ */
.pub-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

.pub-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.pub-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #1C1917;
}
.pub-logo span { color: #F97316; }

.pub-company {
  font-size: 15px;
  color: #78716C;
  margin-left: auto;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(28,25,23,0.15);
  animation: slideIn 0.3s ease;
  max-width: 360px;
}
.toast-success { background: #1C1917; color: #fff; }
.toast-error   { background: #DC2626; color: #fff; }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
  .dash-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .main-wrap { margin-left: 0; }

  .hamburger { display: flex; }

  .page-content { padding: 20px 16px 32px; }
  .topbar       { padding: 0 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .form-row { flex-direction: column; gap: 12px; }

  /* Mobile: bottom sheet */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-width: 100%;
    width: 100%;
  }
  .modal-header { padding: 16px 20px 0; }
  .modal-body   { padding: 14px 20px; }
  .modal-footer { padding: 12px 20px; }

  .week-label { font-size: 14px; min-width: 160px; }

  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(6),
  .data-table td:nth-child(6) { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card  { padding: 28px 20px; }
  .schedule-controls { flex-direction: column; align-items: flex-start; }
}
/* ============================================================
   NXTShift v2 – Zusätzliche Styles
   Ergänzt app.css um: Areas, Slot-Grid, Skills, Suggest-Modal
   ============================================================ */

/* ── SKILL CHIPS ─────────────────────────────────────────── */
.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: #EFF6FF;
  color: #1D4ED8;
  white-space: nowrap;
}
.skill-chip-sm {
  padding: 2px 8px;
  font-size: 11px;
}

.skill-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1.5px solid #E7E0D8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  user-select: none;
}
.skill-checkbox-label:hover { border-color: #F97316; background: #FFF7ED; }
.skill-checkbox-label input[type="checkbox"] { display: none; }
.skill-checkbox-label:has(input:checked) {
  background: #FFF7ED;
  border-color: #F97316;
  color: #C2410C;
}

/* ── AREA CARDS ──────────────────────────────────────────── */
.area-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E7E0D8;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.area-card:hover { box-shadow: 0 4px 16px rgba(28,25,23,0.08); }
.area-card-inactive { opacity: 0.6; }

.area-card-top {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
}

.area-inactive-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}

.area-card-body { padding: 16px; }
.area-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; color: #1C1917; margin-bottom: 8px; }
.area-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.area-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }

.badge-outdoor { background: #DCFCE7; color: #15803D; }
.badge-mixed   { background: #F0FDF4; color: #15803D; }

/* ── AREA TABS (Schedule) ────────────────────────────────── */
.area-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.area-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid #E7E0D8;
  color: #78716C;
  text-decoration: none;
  transition: all 0.15s;
}
.area-tab:hover { border-color: var(--tab-color, #F97316); color: var(--tab-color, #F97316); text-decoration: none; background: #FFF7ED; }
.area-tab.active { background: var(--tab-color, #F97316); border-color: var(--tab-color, #F97316); color: #fff; }

/* ── AREA SECTION (in Schedule) ─────────────────────────── */
.area-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px 12px;
  margin-bottom: 4px;
}
.area-section-header h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #1C1917;
}

.venue-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* ── SLOT TABLE ──────────────────────────────────────────── */
.slot-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.slot-th-label {
  background: #FAFAF9;
  border-bottom: 2px solid #E7E0D8;
  border-right: 2px solid #E7E0D8;
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A8A29E;
  width: 180px;
}

.slot-th-day {
  background: #FAFAF9;
  border-bottom: 2px solid #E7E0D8;
  border-right: 1px solid #E7E0D8;
  padding: 10px 8px;
  text-align: center;
  min-width: 100px;
}
.slot-th-day:last-child { border-right: none; }

.slot-info-cell {
  padding: 10px 12px;
  border-right: 2px solid #E7E0D8;
  border-bottom: 1px solid #F5F0EB;
  vertical-align: top;
  background: #FAFAF9;
}

.slot-name {
  font-weight: 700;
  font-size: 13px;
  color: #1C1917;
  padding-left: 8px;
  margin-bottom: 3px;
}

.slot-meta {
  font-size: 12px;
  color: #78716C;
  padding-left: 8px;
}

.slot-staff-badge {
  display: inline-flex;
  align-items: center;
  background: #FFF7ED;
  color: #C2410C;
  border-radius: 100px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.slot-day-cell {
  padding: 8px 6px;
  border-right: 1px solid #F5F0EB;
  border-bottom: 1px solid #F5F0EB;
  vertical-align: top;
  min-height: 80px;
}
.slot-day-cell:last-child { border-right: none; }

.slot-day-off {
  background: #FAFAF9;
}

.day-off-indicator {
  height: 3px;
  background: #E7E0D8;
  border-radius: 100px;
  margin: 8px 4px;
}

.slot-fill-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  margin-top: 4px;
}
.fill-ok      { background: #DCFCE7; color: #15803D; }
.fill-partial { background: #FEF9C3; color: #92400E; }
.fill-empty   { background: #FEE2E2; color: #DC2626; }

/* ── EMP CHIPS (in slot cells) ──────────────────────────── */
.emp-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #1C1917;
  color: #fff;
  border-radius: 100px;
  padding: 3px 6px 3px 3px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  max-width: 100%;
  position: relative;
}

.emp-chip .chip-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

.chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip-remove {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
  padding: 0;
}
.chip-remove:hover { background: rgba(239,68,68,0.8); }

.chip-flag { font-size: 11px; }

.chip-error { background: #DC2626; }
.chip-warn  { background: #D97706; }

/* ADD TO SLOT BUTTON */
.add-to-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px dashed #D1C4B8;
  background: transparent;
  color: #A8A29E;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 3px;
}
.add-to-slot:hover { border-color: #F97316; color: #F97316; background: #FFF7ED; }

/* ── COST SUMMARY BAR ────────────────────────────────────── */
.cost-summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #E7E0D8;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  font-size: 13px;
  font-weight: 600;
  color: #78716C;
  flex-wrap: nowrap;
}

.cost-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #F5F0EB;
}
.cost-day-name { font-size: 10px; text-transform: uppercase; color: #A8A29E; font-weight: 700; }
.cost-day-val  { font-size: 13px; font-weight: 700; color: #1C1917; }

/* ── SUGGEST MODAL ───────────────────────────────────────── */
.suggest-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 0;
  margin-top: 4px;
}
.suggest-group-good { color: #15803D; }
.suggest-group-warn { color: #D97706; }
.suggest-group-bad  { color: #DC2626; }

.suggest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: filter 0.15s;
}
.suggest-card:hover { filter: brightness(0.96); }

.suggest-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.suggest-info { flex: 1; min-width: 0; }
.suggest-name { font-weight: 700; font-size: 14px; color: #1C1917; }
.suggest-type { font-size: 12px; color: #78716C; font-weight: 500; }
.suggest-week { font-size: 12px; color: #78716C; margin-top: 2px; }
.suggest-issues { font-size: 11px; color: #D97706; margin-top: 3px; }

.suggest-action { font-size: 18px; font-weight: 700; flex-shrink: 0; }

/* LOADING STATE */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
}

/* ── PILLS (Area filter) ─────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid #E7E0D8;
  color: #78716C;
  text-decoration: none;
  transition: all 0.15s;
}
.pill:hover { border-color: #F97316; color: #F97316; text-decoration: none; }
.pill-active { background: #1C1917; border-color: #1C1917; color: #fff; }

/* ── SHIFT PLAN TABLE SKILL CHIP ─────────────────────────── */
.data-table .skill-chip { font-size: 11px; }

/* ── RESPONSIVE EXTRAS ───────────────────────────────────── */
@media (max-width: 768px) {
  .area-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .cost-summary-bar { gap: 6px; padding: 8px 12px; }
  .slot-info-cell { width: 140px; }
}

/* ── MODAL TABS ──────────────────────────────────────────── */
.modal-tab {
  padding: 12px 18px;
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #78716C;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.modal-tab:hover { color: #1C1917; }
.modal-tab.modal-tab-active {
  color: #F97316;
  border-bottom-color: #F97316;
}

/* ── ADD EXTRA BUTTON (Überbesetzung) ────────────────────── */
.add-extra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px dashed #A8A29E;
  background: transparent;
  color: #A8A29E;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 3px;
  padding: 0;
}
.add-extra-btn:hover { border-color: #F97316; color: #F97316; background: #FFF7ED; }

/* ── COPY DAY BUTTON (im Spalten-Header) ─────────────────── */
.copy-day-btn {
  display: block;
  margin: 4px auto 0;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  background: #F5F0EB;
  border: 1px solid #E7E0D8;
  border-radius: 100px;
  color: #78716C;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.copy-day-btn:hover { background: #FFF7ED; border-color: #F97316; color: #F97316; }
