/* BSM Urlaubsverwaltung - Apple-inspired Design System */

:root {
  /* Apple Color Palette */
  --apple-blue: #0071e3;
  --apple-link-blue: #0066cc;
  --apple-bright-blue: #2997ff;
  --apple-near-black: #1d1d1f;
  --apple-light-gray: #f5f5f7;
  --apple-white: #ffffff;

  /* Semantic Colors */
  --primary-color: #0071e3;
  --primary-dark: #0051a8;
  --primary-light: #2997ff;
  --secondary-color: #34c759;       /* Apple system green */
  --danger-color: #ff3b30;          /* Apple system red */
  --warning-color: #ff9f0a;         /* Apple system orange */
  --info-color: #0071e3;

  /* Surfaces */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e8e8ed;

  /* Dark surfaces */
  --dark-surface-1: #272729;
  --dark-surface-2: #28282a;
  --dark-surface-3: #2a2a2d;

  /* Text */
  --text-primary: #1d1d1f;
  --text-secondary: rgba(0, 0, 0, 0.8);
  --text-light: rgba(0, 0, 0, 0.48);

  /* Border & Shadow */
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: rgba(0, 0, 0, 0.08) 0px 1px 4px 0px;
  --shadow-md: rgba(0, 0, 0, 0.12) 0px 4px 16px 0px;
  --shadow-lg: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;

  /* Radii */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 980px;

  /* Spacing (base 8px) */
  --spacing-xs: 0.5rem;     /* 8px */
  --spacing-sm: 0.75rem;    /* 12px */
  --spacing-md: 1rem;       /* 16px */
  --spacing-lg: 1.5rem;     /* 24px */
  --spacing-xl: 2rem;       /* 32px */
  --spacing-2xl: 3rem;      /* 48px */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Reserviert Platz für Scrollbalken immer – verhindert Layout-Shift
     wenn Scrollbalken beim Laden erscheint/verschwindet. */
  scrollbar-gutter: stable;
  /* Verhindert automatische Schriftgrößenanpassung auf Mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-primary);
}

h1 {
  font-size: 2.50rem;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: normal;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.31rem;
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--apple-link-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

.container-fluid {
  width: 100%;
  padding: var(--spacing-lg);
}

/* Header */
.header {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: none;
  padding: 0;
  height: 48px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.06rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.2px;
}
.logo:hover { text-decoration: none; opacity: 0.8; }

.nav {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: normal;
  transition: color 0.15s;
}

.nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-link.active {
  color: #ffffff;
}

/* Initialen-Avatar im Navigationsmenü */
.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  letter-spacing: .03em;
  flex-shrink: 0;
  transition: background .2s;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
.nav-avatar:hover {
  background: rgba(255, 255, 255, 0.25);
}
.nav-avatar.active {
  background: var(--apple-blue);
  border-color: var(--apple-blue);
}

/* Avatar-Dropdown */
.nav-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-avatar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + .75rem);
  right: 0;
  min-width: 11rem;
  background: rgba(30, 30, 32, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.nav-avatar-wrap.open .nav-avatar-dropdown {
  display: block;
}
.nav-avatar-dropdown a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: .875rem;
  transition: background .15s, color .15s;
}
.nav-avatar-dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}
.nav-avatar-dropdown a.active {
  color: var(--apple-bright-blue);
  font-weight: 600;
}
.nav-avatar-dropdown hr {
  margin: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  border: none;
}

.card-header {
  font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.31rem;
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1100px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.form-label.required::after {
  content: " *";
  color: var(--danger-color);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-help {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: var(--spacing-xs);
}

.form-error {
  font-size: 0.875rem;
  color: var(--danger-color);
  margin-top: var(--spacing-xs);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 15px;
  font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: transparent;
}
.btn-primary:hover:not(:disabled) {
  background: #0077ed;
  text-decoration: none;
  color: #ffffff;
}
.btn-primary:active:not(:disabled) { background: #006edb; }
.btn-primary:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: transparent;
}
.btn-secondary:hover:not(:disabled) {
  background: #dcdce1;
  text-decoration: none;
}

/* Pill-Link (Apple "Learn more" / "Mehr erfahren") */
.btn-outline {
  background: transparent;
  color: var(--apple-link-blue);
  border: 1px solid var(--apple-link-blue);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.875rem;
}
.btn-outline:hover:not(:disabled) {
  text-decoration: underline;
  color: var(--apple-link-blue);
}

.btn-dark {
  background: var(--apple-near-black);
  color: #ffffff;
  border-color: transparent;
}
.btn-dark:hover:not(:disabled) {
  background: #3a3a3c;
  text-decoration: none;
  color: #ffffff;
}

.btn-success {
  background: var(--secondary-color);
  color: white;
  border-color: transparent;
}
.btn-success:hover:not(:disabled) { background: #30b84e; text-decoration: none; color: white; }

.btn-danger {
  background: var(--danger-color);
  color: white;
  border-color: transparent;
}
.btn-danger:hover:not(:disabled) { background: #e0352b; text-decoration: none; color: white; }

.btn-sm {
  padding: 5px 11px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 1.13rem;
  font-weight: 300;
  letter-spacing: normal;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.badge-primary {
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
}

.badge-success {
  background: rgba(52, 199, 89, 0.1);
  color: #1a7f37;
}

.badge-warning {
  background: rgba(255, 159, 10, 0.1);
  color: #b36b00;
}

.badge-danger {
  background: rgba(255, 59, 48, 0.1);
  color: #c0392b;
}

.badge-info {
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
}

.badge-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.9375rem;
}

.table thead {
  background: var(--bg-secondary);
}

.table th {
  padding: var(--spacing-md);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.table tbody tr:hover {
  background: var(--bg-secondary);
}

.table tbody tr[onclick]:hover {
  background: var(--bg-secondary);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Feiertags-/Schulferien-Kalender ── */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.cal-month-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: .875rem;
  font-size: .8rem;
}

.cal-month-title {
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: .6rem;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
}

.cal-table th {
  text-align: center;
  padding: 2px;
  color: var(--text-light);
  font-weight: 500;
  font-size: .7rem;
}

.cal-table td {
  text-align: center;
  padding: 3px 2px;
  border-radius: 3px;
}

.cal-day        { color: var(--text-primary); }
.cal-weekend    { background: var(--bg-tertiary); color: var(--text-light); }
.cal-holiday    { background: #e03131; color: #fff; cursor: help; }
.cal-school     { background: #1971c2; color: #fff; cursor: help; }
.cal-both       { background: #862e9c; color: #fff; cursor: help; }
.cal-today      { background: #2f9e44; color: #fff; font-weight: 700; }

[data-theme="dark"] .cal-holiday { background: #ff6b6b; color: #1a1a1a; }
[data-theme="dark"] .cal-school  { background: #4dabf7; color: #1a1a1a; }
[data-theme="dark"] .cal-both    { background: #cc5de8; color: #1a1a1a; }

/* Alerts */
.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.alert-success {
  background: rgba(52, 199, 89, 0.08);
  color: #1a7f37;
  border-left: 4px solid var(--secondary-color);
}

.alert-error {
  background: rgba(255, 59, 48, 0.08);
  color: #c0392b;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: rgba(255, 159, 10, 0.08);
  color: #b36b00;
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: rgba(0, 113, 227, 0.08);
  color: var(--primary-dark);
  border-left: 4px solid var(--apple-blue);
}

/* Stats */
.stat-card {
  background: var(--dark-surface-1);
  color: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2.50rem;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: -0.5px;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 0.875rem;
  letter-spacing: -0.224px;
  color: rgba(255, 255, 255, 0.65);
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { justify-content: center; }
.flex-align-center { align-items: center; }
.flex-gap { gap: var(--spacing-md); }

.hidden { display: none; }

/* ── Hamburger Button ─────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Responsive Navigation ────────────────────────────────── */
@media (max-width: 768px) {
  .header {
    position: relative;
  }

  .hamburger {
    display: flex;
  }

  .hamburger span {
    background: rgba(255, 255, 255, 0.85);
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md) 0;
    gap: 0;
    z-index: 200;
  }

  .nav.nav-open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
  }

  .nav-link:last-child {
    border-bottom: none;
  }
}

/* ===== ADMIN SIDEBAR ===== */
body.admin-page {
  padding-left: 56px;
}
.admin-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1100;
  width: 56px;
  background: #1c1c1e;
  display: flex;
  flex-direction: column;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.admin-sidebar:hover {
  width: 220px;
}
.sb-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sb-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #0071e3;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.sb-title {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s .05s;
  line-height: 1.25;
}
.admin-sidebar:hover .sb-title { opacity: 1; }
.sb-nav { flex: 1; padding: 8px 0; overflow: hidden; }
.sb-footer { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  transition: color .15s, background .15s;
  white-space: nowrap;
  font-size: .875rem;
}
.sb-item:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  text-decoration: none;
}
.sb-item.active { color: #fff; }
.sb-item.active .sb-icon-wrap {
  background: #0071e3;
  border-radius: 8px;
}
.sb-icon-wrap {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  transition: background .15s;
}
.sb-label {
  opacity: 0;
  transition: opacity .12s .04s;
}
.admin-sidebar:hover .sb-label { opacity: 1; }
.sb-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 4px 12px;
}
/* Nutzer-Kürzel (Initialen) im Sidebar-Profil-Eintrag */
.sb-user-kuerzel {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-primary:    #1c1c1e;
  --bg-secondary:  #000000;
  --bg-tertiary:   #2c2c2e;
  --text-primary:  #f5f5f7;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-light:    rgba(255, 255, 255, 0.48);
  --border-color:  rgba(255, 255, 255, 0.1);
  --shadow-sm: rgba(0,0,0,.5) 0px 1px 4px 0px;
  --shadow-md: rgba(0,0,0,.6) 0px 4px 16px 0px;
  --shadow-lg: rgba(0,0,0,.7) 3px 5px 30px 0px;
  --dark-surface-1: #3a3a3c;
  --dark-surface-2: #3a3a3c;
  --dark-surface-3: #48484a;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

[data-theme="dark"] .table th {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .table tr:nth-child(even) {
  background: rgba(255,255,255,.04);
}

[data-theme="dark"] .progress-bar {
  background: var(--bg-tertiary);
}

/* ── Theme Toggle Button ───────────────────────────────────── */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: .25rem .5rem;
  font-size: .875rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ── Antragstyp-Auswahl Tabs ─────────────────────────────── */
.request-type-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.request-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.request-type-btn:hover {
  border-color: var(--apple-blue);
  color: var(--apple-blue);
  background: var(--bg-primary);
}

.request-type-btn.active {
  border-color: var(--apple-blue);
  background: var(--apple-blue);
  color: #fff;
}

@media (max-width: 600px) {
  .request-type-selector {
    flex-direction: column;
  }
}

/* ── Responsive Tabellen-Spalten ──────────────────────────── */
/* Spalten mit diesen Klassen werden je nach Viewport ausgeblendet */
@media (max-width: 1024px) {
  .col-hide-xl { display: none; }
}
@media (max-width: 768px) {
  .col-hide-lg { display: none; }
}
@media (max-width: 540px) {
  .col-hide-md { display: none; }
}
/* Aktionen-Spalte immer auf Mindestbreite halten, nie dehnen */
.col-nowrap {
  white-space: nowrap;
  width: 1%;
}

/* ── Antrags-Tabelle: Icon-Buttons auf kleinen Viewports ─── */
/* Standard: Label sichtbar, Icon versteckt */
.req-btn-icon { display: none; }
.req-btn-label { display: inline; }

@media (max-width: 640px) {
  .req-btn-label { display: none; }
  .req-btn-icon  { display: inline; font-size: 1.1rem; font-weight: 700; }
  /* Buttons kompakter machen */
  .req-approve-btn,
  .req-reject-btn {
    padding: 4px 8px;
    min-width: 34px;
  }
}

/* ===== MOBILE NAVIGATION (≤ 768px) ===== */

/* Burger-Button: nur mobil sichtbar */
.sb-burger {
  display: none;
}

@media (max-width: 768px) {
  /* Kein Platz-Offset mehr durch Sidebar */
  body.admin-page {
    padding-left: 0;
    padding-top: 56px; /* Platz für die Topbar */
  }

  /* Sidebar komplett ausblenden im Normalzustand */
  .admin-sidebar {
    display: none;
  }

  /* Topbar: feste Leiste oben */
  .sb-topbar {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #1c1c1e;
    z-index: 1200;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .sb-topbar-logo {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #0071e3;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -.5px;
  }
  .sb-topbar-title {
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
  }

  /* Burger-Button */
  .sb-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }
  .sb-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  .sb-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sb-burger.open span:nth-child(2) { opacity: 0; }
  .sb-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Overlay (Hintergrund abdunkeln) */
  .sb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1299;
  }
  .sb-overlay.open { display: block; }

  /* Mobile Drawer (Slide-in von links) */
  .admin-sidebar.sb-mobile-open {
    display: flex;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 270px;
    z-index: 1300;
    overflow-y: auto;
    animation: sbSlideIn .22s cubic-bezier(.4,0,.2,1);
  }
  /* Labels immer sichtbar im mobilen Drawer */
  .admin-sidebar.sb-mobile-open .sb-label { opacity: 1; }
  .admin-sidebar.sb-mobile-open .sb-title  { opacity: 1; }
  /* Hover-Effekte deaktivieren (kein Hover auf Touch) */
  .admin-sidebar.sb-mobile-open:hover { width: 270px; }

  @keyframes sbSlideIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
  }

  /* Container volle Breite */
  .container {
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Grid auf 1 Spalte reduzieren */
  .grid-4, .grid-3, .grid-2, .grid-5 {
    grid-template-columns: 1fr !important;
  }
}

/* Topbar auf Desktop komplett ausblenden */
@media (min-width: 769px) {
  .sb-topbar {
    display: none;
  }
  .sb-overlay {
    display: none !important;
  }
}

