/* BOS-Trainer CSS v0.7.2 */

:root {
  --bos-primary: #1a4a6e;
  --bos-primary-dark: #0b1320;
  --bos-bg: #f5f0e6;
  --bos-card-bg: #fff;
  --bos-border: #d0d7de;
  --bos-text: #0b1320;
  --bos-muted: #5a6b7a;
  --bos-success: #059669;
  --bos-error: #dc2626;
  --bos-info: #2563eb;
  --bos-header-height: 60px;
}

/* ============================================================ */
/* DARK MODE THEME - Hohe Spezifität */
/* ============================================================ */

/* CSS Variablen für Dark Mode */
html[data-theme="dark"],
html[data-theme="dark"] body,
body.bos-theme-dark,
body[data-theme="dark"] {
  --bos-bg: #1a1a2e;
  --bos-card-bg: #16213e;
  --bos-border: #3a4a5e;
  --bos-text: #e8e8e8;
  --bos-muted: #a0a8b4;
  --bos-primary: #3d7eaa;
  --bos-primary-dark: #2a5a7e;
}

/* Hintergrund für html und body im Dark Mode */
html[data-theme="dark"],
html[data-theme="dark"] body,
body.bos-theme-dark,
body[data-theme="dark"],
body.bos-page.bos-theme-dark,
body.bos-page[data-theme="dark"] {
  background-color: #1a1a2e !important;
  background: #1a1a2e !important;
  color: #e8e8e8 !important;
}

/* Main Content Area im Dark Mode */
html[data-theme="dark"] .bos-main,
body.bos-theme-dark .bos-main,
body[data-theme="dark"] .bos-main {
  background-color: #1a1a2e !important;
}

/* Cards im Dark Mode */
html[data-theme="dark"] .bos-card,
html[data-theme="dark"] .bos-subcard,
body.bos-theme-dark .bos-card,
body.bos-theme-dark .bos-subcard,
body[data-theme="dark"] .bos-card,
body[data-theme="dark"] .bos-subcard {
  background-color: #16213e !important;
  border-color: #3a4a5e !important;
  color: #e8e8e8 !important;
}

/* Sidebar im Dark Mode */
html[data-theme="dark"] .bos-sidebar-nav,
body.bos-theme-dark .bos-sidebar-nav,
body[data-theme="dark"] .bos-sidebar-nav {
  background-color: #16213e !important;
  border-color: #3a4a5e !important;
}

html[data-theme="dark"] .bos-sidebar-nav__link,
body.bos-theme-dark .bos-sidebar-nav__link,
body[data-theme="dark"] .bos-sidebar-nav__link {
  color: #e8e8e8 !important;
}

html[data-theme="dark"] .bos-sidebar-nav__link:hover,
body.bos-theme-dark .bos-sidebar-nav__link:hover,
body[data-theme="dark"] .bos-sidebar-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .bos-sidebar-nav__link--active,
body.bos-theme-dark .bos-sidebar-nav__link--active,
body[data-theme="dark"] .bos-sidebar-nav__link--active {
  background-color: #3d7eaa !important;
  color: #fff !important;
}

/* Formulare im Dark Mode */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
body.bos-theme-dark input,
body.bos-theme-dark select,
body.bos-theme-dark textarea,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background-color: #1e2a3d !important;
  border-color: #3a4a5e !important;
  color: #e8e8e8 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
body.bos-theme-dark input:focus,
body.bos-theme-dark select:focus,
body.bos-theme-dark textarea:focus,
body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus {
  border-color: #3d7eaa !important;
  outline: none;
}

/* Tabellen im Dark Mode */
html[data-theme="dark"] .bos-table th,
html[data-theme="dark"] .bos-table td,
body.bos-theme-dark .bos-table th,
body.bos-theme-dark .bos-table td,
body[data-theme="dark"] .bos-table th,
body[data-theme="dark"] .bos-table td {
  border-color: #3a4a5e !important;
  color: #e8e8e8 !important;
}

html[data-theme="dark"] .bos-table th,
body.bos-theme-dark .bos-table th,
body[data-theme="dark"] .bos-table th {
  background-color: #1e2a3d !important;
}

html[data-theme="dark"] .bos-table tr:hover,
body.bos-theme-dark .bos-table tr:hover,
body[data-theme="dark"] .bos-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Alerts im Dark Mode */
html[data-theme="dark"] .bos-alert--info,
body.bos-theme-dark .bos-alert--info,
body[data-theme="dark"] .bos-alert--info {
  background-color: #1e3a5f !important;
  border-color: #3d7eaa !important;
  color: #e8e8e8 !important;
}

html[data-theme="dark"] .bos-alert--ok,
body.bos-theme-dark .bos-alert--ok,
body[data-theme="dark"] .bos-alert--ok {
  background-color: #064e3b !important;
  border-color: #059669 !important;
  color: #e8e8e8 !important;
}

html[data-theme="dark"] .bos-alert--error,
body.bos-theme-dark .bos-alert--error,
body[data-theme="dark"] .bos-alert--error {
  background-color: #450a0a !important;
  border-color: #dc2626 !important;
  color: #e8e8e8 !important;
}

/* Text im Dark Mode */
html[data-theme="dark"] .bos-muted,
body.bos-theme-dark .bos-muted,
body[data-theme="dark"] .bos-muted {
  color: #a0a8b4 !important;
}

html[data-theme="dark"] .bos-link,
html[data-theme="dark"] a,
body.bos-theme-dark .bos-link,
body.bos-theme-dark a,
body[data-theme="dark"] .bos-link,
body[data-theme="dark"] a {
  color: #6db3e8 !important;
}

/* Buttons im Dark Mode */
html[data-theme="dark"] .bos-btn,
body.bos-theme-dark .bos-btn,
body[data-theme="dark"] .bos-btn {
  background-color: #3d7eaa !important;
  border-color: #3d7eaa !important;
}

html[data-theme="dark"] .bos-btn:hover,
body.bos-theme-dark .bos-btn:hover,
body[data-theme="dark"] .bos-btn:hover {
  background-color: #2a5a7e !important;
}

html[data-theme="dark"] .bos-btn--secondary,
body.bos-theme-dark .bos-btn--secondary,
body[data-theme="dark"] .bos-btn--secondary {
  background-color: transparent !important;
  color: #e8e8e8 !important;
  border-color: #3a4a5e !important;
}

/* Tabs im Dark Mode */
html[data-theme="dark"] .bos-tabs button,
body.bos-theme-dark .bos-tabs button,
body[data-theme="dark"] .bos-tabs button {
  color: #a0a8b4 !important;
}

html[data-theme="dark"] .bos-tabs button.active,
body.bos-theme-dark .bos-tabs button.active,
body[data-theme="dark"] .bos-tabs button.active {
  color: #e8e8e8 !important;
  border-bottom-color: #3d7eaa !important;
}

/* Trennlinien im Dark Mode */
html[data-theme="dark"] hr,
body.bos-theme-dark hr,
body[data-theme="dark"] hr {
  border-color: #3a4a5e !important;
}

/* Header Dropdown im Dark Mode */
html[data-theme="dark"] .bos-header__dropdown-menu,
body.bos-theme-dark .bos-header__dropdown-menu,
body[data-theme="dark"] .bos-header__dropdown-menu {
  background-color: #16213e !important;
  border-color: #3a4a5e !important;
}

html[data-theme="dark"] .bos-header__dropdown-item,
body.bos-theme-dark .bos-header__dropdown-item,
body[data-theme="dark"] .bos-header__dropdown-item {
  color: #e8e8e8 !important;
}

html[data-theme="dark"] .bos-header__dropdown-item:hover,
body.bos-theme-dark .bos-header__dropdown-item:hover,
body[data-theme="dark"] .bos-header__dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}
}

/* ============================================================ */
/* THEME OVERRIDE - Versteckt Theme Header/Footer auf BOS-Seiten */
/* ============================================================ */

/* Block Themes (Twenty Twenty-Five, etc.) */
body.bos-page .wp-site-blocks > header,
body.bos-page .wp-site-blocks > footer,
body.bos-page .wp-site-blocks > .wp-block-template-part,
body.bos-page header.wp-block-template-part,
body.bos-page footer.wp-block-template-part {
  display: none !important;
}

/* Twenty Twenty-Five spezifisch */
body.bos-page .wp-block-group.has-global-padding,
body.bos-page .wp-block-template-part.site-header,
body.bos-page .wp-block-template-part.site-footer {
  display: none !important;
}

/* Alle Header/Footer Elemente im Block Theme */
body.bos-page [class*="header"]:not(.bos-header):not([class*="bos-"]),
body.bos-page [class*="footer"]:not(.bos-footer):not([class*="bos-"]) {
  display: none !important;
}

/* Classic Themes */
body.bos-page #masthead,
body.bos-page #colophon,
body.bos-page .site-header,
body.bos-page .site-footer,
body.bos-page #site-header,
body.bos-page #site-footer,
body.bos-page > header:not(.bos-header),
body.bos-page > footer:not(.bos-footer) {
  display: none !important;
}

/* Theme Navigation verstecken */
body.bos-page .wp-block-navigation,
body.bos-page #site-navigation,
body.bos-page .main-navigation,
body.bos-page nav.primary-menu,
body.bos-page nav[class*="navigation"] {
  display: none !important;
}

/* WordPress Admin Bar - Position korrigieren wenn eingeloggt */
body.bos-page.admin-bar .bos-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.bos-page.admin-bar .bos-header {
    top: 46px;
  }
}

/* Theme-Container auf volle Breite */
body.bos-page .wp-site-blocks,
body.bos-page .site-content,
body.bos-page #content,
body.bos-page .content-area,
body.bos-page main#main,
body.bos-page .entry-content,
body.bos-page article.page,
body.bos-page .wp-block-post-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  /* Sticky Footer: Flex-Kette durch alle WP-Wrapper durchreichen */
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* ============================================================ */
/* GLOBAL LAYOUT */
/* ============================================================ */

body.bos-page {
  margin: 0;
  padding: 0;
  background: var(--bos-bg);
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--bos-text);
  /* Sticky Footer: Flexbox Layout */
  display: flex;
  flex-direction: column;
}

/* Header/Topbar */
.bos-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bos-primary);
  height: var(--bos-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bos-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.bos-header__logo img {
  height: 36px;
  width: auto;
}
.bos-header__logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.bos-header__search {
  flex: 0 1 400px;
  position: relative;
}
.bos-header__search-form {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}
.bos-header__search input {
  width: 100%;
  padding: 8px 40px 8px 16px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.bos-header__search input::placeholder { color: rgba(255,255,255,0.7); }
.bos-header__search input:focus {
  outline: none;
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}
.bos-header__search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  pointer-events: none;
  z-index: 2;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.bos-header__welcome {
  color: rgba(255,255,255,0.95);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.bos-header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bos-header__link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.bos-header__link:hover { background: rgba(255,255,255,0.15); }
.bos-header__separator { color: rgba(255,255,255,0.5); }

/* Username im Header */
.bos-header__username {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-right: 8px;
}

/* User Info Container (Name + Organisation) */
.bos-header__user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 8px;
  line-height: 1.3;
}
.bos-header__user-info .bos-header__username {
  margin-right: 0;
}
.bos-header__org-name {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 400;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown-Menü im Header */
.bos-header__dropdown {
  position: relative;
}
.bos-header__dropdown-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.bos-header__dropdown-btn:hover {
  background: rgba(255,255,255,0.2);
}
.bos-header__dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1001;
}
.bos-header__dropdown:hover .bos-header__dropdown-menu,
.bos-header__dropdown:focus-within .bos-header__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.bos-header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--bos-text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease;
}
.bos-header__dropdown-item:first-child {
  border-radius: 10px 10px 0 0;
}
.bos-header__dropdown-item:last-child {
  border-radius: 0 0 10px 10px;
}
.bos-header__dropdown-item:hover {
  background: var(--bos-bg);
}
.bos-header__dropdown-item svg {
  flex-shrink: 0;
  color: var(--bos-muted);
}
.bos-header__dropdown-item--danger {
  color: var(--bos-error);
}
.bos-header__dropdown-item--danger svg {
  color: var(--bos-error);
}
.bos-header__dropdown-divider {
  height: 1px;
  background: var(--bos-border);
  margin: 4px 0;
}

/* Status Banner */
.bos-status-banner {
  color: white;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  z-index: 999;
}

body.admin-bar .bos-status-banner {
  /* Kein Top-Offset nötig, da Banner unter Header ist */
}

/* Page Wrapper - füllt den Raum zwischen Header und Footer */
.bos-page-wrapper {
  display: flex;
  flex: 1;
  min-height: 0; /* wichtig für flexbox overflow */
}

/* Footer - bleibt immer unten */
.bos-footer {
  background: #fff;
  border-top: 1px solid var(--bos-border);
  padding: 16px 24px;
  font-size: 13px;
  color: var(--bos-muted);
  margin-top: auto; /* Sticky Footer: drückt Footer nach unten */
}
.bos-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.bos-footer__left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.bos-footer__left a {
  color: var(--bos-muted);
  text-decoration: none;
}
.bos-footer__left a:hover { color: var(--bos-primary); text-decoration: underline; }
.bos-footer__left span { color: var(--bos-border); }
.bos-footer__center {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.bos-footer__center a {
  color: var(--bos-primary);
  text-decoration: none;
  font-weight: 500;
}
.bos-footer__center a:hover { text-decoration: underline; }
.bos-footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.bos-footer__copyright {
  color: var(--bos-muted);
}
.bos-footer__version {
  color: var(--bos-muted);
  font-size: 12px;
}

/* Legacy support for old footer structure */
.bos-footer__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.bos-footer__links a {
  color: var(--bos-muted);
  text-decoration: none;
}
.bos-footer__links a:hover { color: var(--bos-primary); text-decoration: underline; }
.bos-footer__links span { color: var(--bos-border); }
.bos-footer__bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================ */
/* SIDEBAR (eingeloggt) */
/* ============================================================ */

.bos-sidebar-nav {
  width: 220px;
  flex-shrink: 0;
  background: var(--bos-card-bg);
  border-right: 1px solid var(--bos-border);
  padding: 20px 0;
  overflow-y: auto;
}
.bos-sidebar-nav__section { margin-bottom: 24px; padding: 0 16px; }
.bos-sidebar-nav__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bos-primary);
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--bos-primary);
}
.bos-sidebar-nav__link {
  display: block;
  padding: 5px 0 5px 12px;
  color: var(--bos-text);
  text-decoration: none;
  font-size: 13px;
  position: relative;
}
.bos-sidebar-nav__link::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--bos-muted);
}
.bos-sidebar-nav__link:hover { color: var(--bos-primary); }
.bos-sidebar-nav__link--active { 
  font-weight: 700; 
  color: var(--bos-primary);
}

/* Accordion: Title klickbar */
.bos-sidebar-nav__title {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.15s;
}
.bos-sidebar-nav__title:hover {
  color: var(--bos-text);
}
.bos-sidebar-nav__title::after {
  content: '▸';
  font-size: 11px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.bos-sidebar-nav__section--open > .bos-sidebar-nav__title::after {
  transform: rotate(90deg);
}

/* Accordion: Links Container */
.bos-sidebar-nav__links {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.bos-sidebar-nav__section--open > .bos-sidebar-nav__links {
  max-height: 600px; /* groß genug für alle Links */
}

/* Standalone Sections ohne Titel (z.B. Nachrichten, Tutorials) */
/* Diese bekommen kompaktere Darstellung ohne Accordion */
.bos-sidebar-nav__section:not([data-section]) {
  margin-bottom: 4px;
}
.bos-sidebar-nav__section:not([data-section]) > .bos-sidebar-nav__link {
  font-weight: 600;
  padding-left: 16px;
  color: var(--bos-primary);
}
.bos-sidebar-nav__section:not([data-section]) > .bos-sidebar-nav__link::before {
  display: none;
}

/* Main Content Area */
.bos-content {
  flex: 1;
  min-width: 0;
  padding: 24px;
}

/* ============================================================ */
/* CONTAINER & CARDS */
/* ============================================================ */

.bos-container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--bos-text);
}
.bos-container--wide { max-width: 1300px; }
.bos-container--full { max-width: none; margin: 0; padding: 0; }

/* Old Layout (Kompatibilität) */
.bos-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .bos-layout { grid-template-columns: 1fr; }
}

/* Sidebar (innerhalb Card) */
.bos-sidebar {
  background: var(--bos-card-bg);
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  padding: 16px;
  height: fit-content;
}
.bos-sidebar__section { margin-bottom: 20px; }
.bos-sidebar__section:last-child { margin-bottom: 0; }
.bos-sidebar__section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--bos-primary);
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--bos-primary);
}
.bos-sidebar__link {
  display: block;
  padding: 4px 0;
  color: var(--bos-text);
  text-decoration: none;
  font-size: 13px;
}
.bos-sidebar__link:hover { color: var(--bos-primary); }
.bos-sidebar__link--active { font-weight: 700; color: var(--bos-primary); }

/* Main */
.bos-main { min-width: 0; }

/* Card */
.bos-card {
  background: var(--bos-card-bg);
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  padding: 20px;
}
.bos-subcard {
  background: #f7f9fb;
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}

/* Typography */
h2 {
  margin: 0 0 16px 0;
  font-size: 22px;
  color: var(--bos-primary);
  text-decoration: underline;
}
h3 {
  margin: 20px 0 12px 0;
  font-size: 16px;
  color: var(--bos-primary);
}

/* Row */
.bos-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bos-row--space { justify-content: space-between; }

/* Forms */
label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 2px rgba(26, 74, 110, 0.1);
}
input:disabled { background: #f3f4f6; color: var(--bos-muted); }
hr { border: none; border-top: 1px solid var(--bos-border); margin: 20px 0; }

/* Buttons */
.bos-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--bos-primary-dark);
  background: var(--bos-primary-dark);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.bos-btn:hover { background: var(--bos-primary); border-color: var(--bos-primary); }
.bos-btn--secondary { background: #fff; color: var(--bos-primary-dark); }
.bos-btn--secondary:hover { background: #f3f4f6; }
.bos-btn--small { padding: 6px 12px; font-size: 0.85em; }
.bos-btn--danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.bos-btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }
.bos-btn--success { background: #059669; border-color: #059669; color: #fff; }
.bos-btn--success:hover { background: #047857; border-color: #047857; }
.bos-btn--small { padding: 6px 12px; font-size: 13px; }
.bos-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Alerts */
.bos-alert { border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: 14px; }
.bos-alert--error { background: #fff1f2; border: 1px solid #fecdd3; color: var(--bos-error); }
.bos-alert--ok, .bos-alert--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--bos-success); }
.bos-alert--info { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--bos-info); }

/* Muted */
.bos-muted { color: var(--bos-muted); font-size: 13px; }

/* Links */
.bos-link { color: var(--bos-primary-dark); text-decoration: underline; }
.bos-link:hover { color: var(--bos-primary); }

/* Tables */
.bos-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.bos-table th, .bos-table td { border: 1px solid var(--bos-border); padding: 10px 12px; text-align: left; }
.bos-table th { background: #f7f9fb; font-weight: 600; }
.bos-table--compact td, .bos-table--compact th { padding: 6px 10px; }
.bos-text-right { text-align: right; }

/* Checkboxes */
.bos-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin: 8px 0;
  cursor: pointer;
}
.bos-checkbox input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* Radio Buttons (Anwesenheitsliste - Feature #31) */
.bos-radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f7f9fb;
  border: 1px solid var(--bos-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bos-radio-btn:hover {
  border-color: var(--bos-primary);
  background: #e0f2fe;
}
.bos-radio-btn--active,
.bos-radio-btn:has(input:checked) {
  background: var(--bos-primary);
  border-color: var(--bos-primary);
  color: #fff;
}
.bos-radio-btn input[type="radio"] {
  display: none;
}

/* Function Grid (Profile) */
.bos-function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  background: #f7f9fb;
  border-radius: 8px;
}
.bos-function-grid .bos-checkbox {
  margin: 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--bos-border);
  border-radius: 6px;
  font-size: 13px;
}
.bos-function-grid .bos-checkbox:hover { border-color: var(--bos-primary); }
.bos-function-grid .bos-checkbox--selected {
  background: #e0f2fe;
  border-color: var(--bos-primary);
}

/* Badge */
.bos-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: #e5e7eb;
  color: var(--bos-muted);
  margin-left: auto;
}
.bos-badge--default { background: var(--bos-primary); color: #fff; }
.bos-badge--success { background: #d1fae5; color: var(--bos-success); }
.bos-badge--error { background: #fee2e2; color: var(--bos-error); }
.bos-badge--info { background: #dbeafe; color: var(--bos-info); }
.bos-badge--pending { background: #fef9c3; color: #a16207; }

/* Funkspruch-Formular */
.bos-funkspruch-row {
  background: #f8fafc;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}
.bos-funkspruch-row:hover {
  background: #f1f5f9;
}
.bos-label-mini {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--bos-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bos-input-mini {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--bos-border);
  border-radius: 6px;
  font-size: 14px;
}
.bos-input-mini:focus {
  border-color: var(--bos-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 64, 94, 0.1);
}
.bos-btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.bos-btn-icon:hover {
  opacity: 1;
  background: #fee2e2;
}

/* Dashboard Grid */
.bos-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 16px 0;
}
.bos-dashboard-section h3 { margin-top: 0; }

/* Quick Actions */
.bos-quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Catalog Grid */
.bos-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.bos-catalog-card {
  background: #f7f9fb;
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  padding: 16px;
}
.bos-catalog-card h4 { margin: 0 0 8px 0; font-size: 16px; color: var(--bos-primary); }
.bos-catalog-card__desc { font-size: 13px; color: var(--bos-muted); margin: 8px 0; }

/* Training Stats */
.bos-training-stats {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  padding: 16px;
  background: #f7f9fb;
  border-radius: 8px;
}
.bos-stat { text-align: center; }
.bos-stat__value { display: block; font-size: 28px; font-weight: 700; color: var(--bos-primary); }
.bos-stat__label { font-size: 12px; color: var(--bos-muted); }

/* Filter */
.bos-filter { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.bos-filter label { margin: 0; font-size: 14px; }
.bos-filter select { width: auto; min-width: 200px; }

/* Question */
.bos-question { margin: 20px 0; }
.bos-question__category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bos-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 12px;
}
.bos-question__text { font-size: 18px; line-height: 1.5; margin-bottom: 20px; }
.bos-question__actions { margin-top: 20px; }

/* Answers */
.bos-answers { display: flex; flex-direction: column; gap: 10px; }
.bos-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #f7f9fb;
  border: 2px solid var(--bos-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bos-answer:hover { border-color: var(--bos-primary); background: #fff; }
.bos-answer input { margin-top: 2px; width: 18px; height: 18px; cursor: pointer; }
.bos-answer__text { flex: 1; font-size: 15px; }
.bos-answer--correct { background: #d1fae5; border-color: var(--bos-success); }
.bos-answer--wrong { background: #fee2e2; border-color: var(--bos-error); }

/* Feedback */
.bos-feedback { margin: 20px 0; padding: 16px; background: #f7f9fb; border-radius: 8px; }
.bos-feedback--success { color: var(--bos-success); font-weight: 700; font-size: 18px; }
.bos-feedback--error { color: var(--bos-error); font-weight: 700; font-size: 18px; }
.bos-feedback--info { color: var(--bos-info); font-weight: 600; }

/* Hint */
.bos-hint {
  margin: 16px 0;
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 14px;
}

/* Source */
.bos-source { margin: 12px 0; color: var(--bos-muted); }

/* Progress Bar */
.bos-progress { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.bos-progress__bar { height: 100%; background: var(--bos-success); border-radius: 4px; transition: width 0.3s ease; }

/* Tabs */
.bos-tabs { 
  display: flex; 
  gap: 4px; 
  margin-bottom: 16px; 
  border-bottom: 2px solid var(--bos-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--bos-border) transparent;
}
.bos-tabs::-webkit-scrollbar {
  height: 3px;
}
.bos-tabs::-webkit-scrollbar-thumb {
  background: var(--bos-border);
  border-radius: 3px;
}
.bos-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--bos-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.bos-tab:hover { color: var(--bos-primary); }
.bos-tab--active { color: var(--bos-primary); border-bottom-color: var(--bos-primary); }
.bos-tab .bos-badge { font-size: 12px; padding: 2px 6px; }
.bos-tab-content { padding: 16px 0; }

/* Responsive */
@media (max-width: 600px) {
  .bos-container { padding: 0 12px; margin: 16px auto; }
  .bos-card { padding: 16px; }
  .bos-function-grid { grid-template-columns: 1fr; }
  .bos-training-stats { flex-direction: column; gap: 16px; }
  .bos-dashboard-grid { grid-template-columns: 1fr; }
}

/* Form Grid (Question Edit) */
.bos-form-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}
.bos-form-main { min-width: 0; }
.bos-form-side { }
@media (max-width: 900px) {
  .bos-form-grid { grid-template-columns: 1fr; }
}

/* Answers List (Admin) */
.bos-answers-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.bos-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bos-answer-row input[type="checkbox"],
.bos-answer-row input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.bos-answer-input {
  flex: 1;
}

/* Feedback Card */
.bos-feedback-card {
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  border: 2px solid;
}
.bos-feedback-card--correct {
  background: #ecfdf5;
  border-color: var(--bos-success);
}
.bos-feedback-card--wrong {
  background: #fff1f2;
  border-color: var(--bos-error);
}
.bos-feedback-card__header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.bos-feedback-card--correct .bos-feedback-card__header { color: var(--bos-success); }
.bos-feedback-card--wrong .bos-feedback-card__header { color: var(--bos-error); }
.bos-feedback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
}
.bos-feedback-card--correct .bos-feedback-icon { background: var(--bos-success); color: #fff; }
.bos-feedback-card--wrong .bos-feedback-icon { background: var(--bos-error); color: #fff; }
.bos-feedback-card__question {
  font-size: 14px;
  color: var(--bos-muted);
  margin-bottom: 8px;
}
.bos-feedback-card__correct {
  font-size: 14px;
  margin-top: 12px;
}
.bos-feedback-card__correct ul {
  margin: 8px 0 0 20px;
  padding: 0;
}
.bos-feedback-card__correct li { margin: 4px 0; }
.bos-feedback-card__hint {
  font-size: 13px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bos-border);
  color: var(--bos-muted);
}

/* List (simple) */
.bos-list { margin: 0; padding-left: 18px; }
.bos-list li { margin: 4px 0; }

/* ============================================================ */
/* STUNDENPLAN / SCHEDULE */
/* ============================================================ */

.bos-schedule-table { font-size: 13px; }
.bos-schedule-table th { padding: 8px 10px; font-size: 12px; }
.bos-schedule-table td { padding: 8px 10px; vertical-align: top; }

.bos-schedule-month td {
  background: var(--bos-primary) !important;
  color: #fff;
  font-weight: 700;
  padding: 6px 10px !important;
}

.bos-schedule-practice td { background: #fef3c7; }
.bos-schedule-cancelled td { 
  background: #fee2e2; 
  text-decoration: line-through;
  color: var(--bos-muted);
}

.bos-schedule-notes td {
  background: #fffbeb;
  border-top: none !important;
  padding-top: 0 !important;
  font-size: 12px;
  color: var(--bos-muted);
}

/* Module Badge */
.bos-module-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bos-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  margin-right: 6px;
}

/* Instructor Highlight */
.bos-instructor-main { font-weight: 700; color: var(--bos-primary); }

/* Time inputs */
input[type="time"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
input[type="time"]:focus {
  outline: none;
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 2px rgba(26, 74, 110, 0.1);
}

input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
input[type="number"]:focus {
  outline: none;
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 2px rgba(26, 74, 110, 0.1);
}

/* Multi-select styling */
select[multiple] {
  height: auto;
  min-height: 80px;
}

/* Course Status Badges */
.bos-status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
}
.bos-status-badge--draft { background: #e5e7eb; color: var(--bos-muted); }
.bos-status-badge--planned { background: #dbeafe; color: var(--bos-info); }
.bos-status-badge--active { background: #d1fae5; color: var(--bos-success); }
.bos-status-badge--completed { background: #a7f3d0; color: #047857; }
.bos-status-badge--cancelled { background: #fee2e2; color: var(--bos-error); }

/* ============================================================ */
/* RESPONSIVE */
/* ============================================================ */

@media (max-width: 900px) {
  .bos-header { padding: 0 16px; }
  .bos-header__search { display: none; }
  .bos-sidebar-nav { width: 180px; }
}

@media (max-width: 768px) {
  .bos-page-wrapper { flex-direction: column; }
  /* Schritt 4: Sidebar als Overlay (wie Help-Panel) */
  .bos-sidebar-nav { 
    position: fixed;
    top: 0;
    left: -320px;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    z-index: 1001;
    background: var(--bos-card-bg);
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    border-right: 1px solid var(--bos-border);
    padding: 12px 0;
    overflow-y: auto;
    transition: left 0.3s ease;
  }
  .bos-sidebar-nav.bos-sidebar-nav--open {
    left: 0 !important;
  }
  body.bos-mobile-menu-open {
    overflow: hidden;
  }
  .bos-sidebar-nav__section { 
    margin-bottom: 4px;
  }
  .bos-sidebar-nav__title { 
    margin-bottom: 0;
    padding: 10px 16px;
    border-bottom: none;
    font-size: 15px;
  }
  .bos-sidebar-nav__link {
    padding: 8px 16px 8px 28px;
    font-size: 15px;
    background: none;
    border-radius: 0;
  }
  .bos-sidebar-nav__link::before { 
    left: 16px; 
  }
  /* Tabs kompakter auf Mobile */
  .bos-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  .bos-content { padding: 16px; }
  .bos-footer { 
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .bos-header__logo-text { display: none; }
  .bos-container { padding: 0 12px; margin: 16px auto; }
  .bos-card { padding: 16px; }
  .bos-function-grid { grid-template-columns: 1fr; }
  .bos-training-stats { flex-direction: column; gap: 16px; }
  .bos-dashboard-grid { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* APP WRAPPER (für vollständiges Layout) */
/* ============================================================ */

.bos-app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bos-bg);
}

.bos-app-wrapper .bos-page-wrapper {
  flex: 1;
  display: flex;
}

.bos-app-wrapper .bos-content {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

/* Tabs als Links */
.bos-tabs a.bos-tab {
  text-decoration: none;
}

/* ============================================================ */
/* STARTSEITE / LANDING PAGE */
/* ============================================================ */

.bos-home {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 40px 24px;
  min-height: calc(100vh - var(--bos-header-height) - 60px);
  overflow-x: hidden;
}

.bos-home__card {
  background: var(--bos-card-bg);
  border: 1px solid var(--bos-border);
  border-radius: 12px;
  padding: 40px 48px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.bos-home__hero {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.bos-home__logo {
  flex-shrink: 0;
}

.bos-home__logo img {
  width: 180px;
  height: auto;
  max-width: 100%;
}

.bos-home__logo-fallback {
  font-size: 80px;
  display: block;
  line-height: 1;
}

.bos-home__claim {
  flex: 1;
}

.bos-home__tagline {
  color: var(--bos-primary);
  font-size: 1.25rem;
  margin: 0 0 12px 0;
}

.bos-home__claim p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.bos-home__title {
  color: var(--bos-primary);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 24px 0;
  letter-spacing: 0.05em;
}

.bos-home__content {
  margin-bottom: 32px;
}

.bos-home__content p {
  margin: 0 0 16px 0;
  line-height: 1.7;
}

.bos-home__orgs-intro {
  font-weight: 500;
  margin-bottom: 8px !important;
}

.bos-home__orgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0 24px 0;
  padding: 20px;
  background: var(--bos-bg-muted);
  border-radius: 12px;
  max-width: 100%;
  overflow-x: hidden;
}

.bos-home__org-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--bos-border);
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.bos-home__org-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bos-home__org-card--link:hover {
  border-color: var(--bos-primary);
  cursor: pointer;
}

.bos-home__org-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.bos-home__org-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bos-home__org-name {
  font-weight: 600;
  color: var(--bos-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bos-home__org-subtitle {
  font-size: 0.8rem;
  color: var(--bos-muted);
}

.bos-home__org-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  flex-shrink: 0;
}

.bos-home__org-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--bos-muted);
  background: var(--bos-bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.bos-home__org-stat-icon {
  font-size: 0.7rem;
}

@media (max-width: 600px) {
  .bos-home__orgs {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  
  .bos-home__org-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    gap: 8px;
  }
  
  .bos-home__org-icon {
    font-size: 2rem;
    width: auto;
  }
  
  .bos-home__org-info {
    align-items: center;
  }
  
  .bos-home__org-name {
    white-space: normal;
    text-align: center;
  }
  
  .bos-home__org-stats {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .bos-home__org-card {
    padding: 14px 10px;
  }
  
  .bos-home__org-icon {
    font-size: 1.8rem;
  }
}

.bos-home__motto {
  color: var(--bos-primary);
  font-size: 1.1rem;
}

.bos-home__cta {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--bos-border);
}

.bos-home__cta p {
  margin: 0 0 20px 0;
  line-height: 1.6;
}

.bos-home__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bos-home__buttons .bos-btn {
  padding: 12px 28px;
  font-size: 1rem;
}

.bos-btn--primary {
  background: var(--bos-primary);
  color: #fff;
  border-color: var(--bos-primary);
}

.bos-btn--primary:hover {
  background: var(--bos-primary-dark);
  border-color: var(--bos-primary-dark);
}

/* ============================================================
   NEUES STARTSEITEN-LAYOUT (Side-by-Side)
   ============================================================ */
.bos-home__top-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  align-items: start;
}

/* Vertikale Emergency-Card (linke Spalte) */
.bos-emergency-card--vertical {
  margin-bottom: 0;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.bos-emergency-card--vertical .bos-emergency-card__title {
  font-size: 1rem;
  padding-bottom: 10px;
}

.bos-emergency-card--vertical .bos-emergency-card__numbers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bos-emergency-card--vertical .bos-emergency-number {
  text-decoration: none;
  color: inherit;
  padding: 14px 12px;
}

.bos-emergency-card--vertical .bos-emergency-number:hover {
  border-color: var(--bos-primary);
}

.bos-emergency-card--vertical .bos-emergency-number__digits {
  font-size: 1.8rem;
}

.bos-emergency-card--vertical .bos-emergency-number--medical .bos-emergency-number__digits {
  font-size: 1.5rem;
}

/* Instagram-Feed (volle Breite) */
.bos-home__instagram {
  background: var(--bos-card-bg);
  border: 1px solid var(--bos-border);
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 1300px;
  width: 100%;
  margin-top: 24px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.bos-home__instagram-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  color: var(--bos-primary);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bos-border);
}

.bos-home__instagram-icon {
  font-size: 1.5rem;
}

.bos-home__instagram-link {
  color: #E1306C;
  text-decoration: none;
  font-weight: 600;
  margin-left: auto;
  font-size: 1rem;
}

.bos-home__instagram-link:hover {
  text-decoration: underline;
}

.bos-home__instagram-feed {
  min-height: 200px;
}

.bos-home__instagram-placeholder {
  text-align: center;
  padding: 40px 20px;
  background: #f8fafc;
  border-radius: 8px;
  color: var(--bos-muted);
}

.bos-home__instagram-placeholder p {
  margin: 0 0 16px 0;
}

/* Responsive Startseite */
@media (max-width: 900px) {
  .bos-home__top-row {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
    padding: 0;
  }
  
  .bos-emergency-card--vertical {
    position: static;
    order: 2; /* Notrufnummern nach dem Hauptinhalt */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .bos-home__card {
    order: 1; /* Hauptinhalt zuerst */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Notrufnummern bleiben vertikal untereinander - KEIN horizontales Scrollen */
  .bos-emergency-card--vertical .bos-emergency-card__numbers {
    flex-direction: column;
    gap: 12px;
  }
  
  .bos-emergency-card--vertical .bos-emergency-number {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .bos-home {
    padding: 16px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .bos-home__top-row {
    width: 100%;
    max-width: 100%;
  }
  
  .bos-home__card {
    padding: 20px 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .bos-emergency-card--vertical {
    padding: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .bos-home__instagram {
    padding: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .bos-home__instagram-title {
    flex-wrap: wrap;
    font-size: 1rem;
  }
  
  .bos-home__instagram-link {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
  
  .bos-home__hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .bos-home__logo img {
    width: 100px;
  }
  
  .bos-home__title {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .bos-home__tagline {
    font-size: 1.1rem;
  }
  
  .bos-home__buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .bos-home__buttons .bos-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* Zusätzliche Anpassungen für sehr kleine Bildschirme */
}

/* Star Rating für Feedback */
.bos-star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.bos-star-rating label {
  cursor: pointer;
  padding: 0 2px;
}

.bos-star-rating label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bos-star-rating label .star {
  font-size: 24px;
  color: #d1d5db;
  transition: color 0.15s;
}

.bos-star-rating label:hover .star,
.bos-star-rating label:hover ~ label .star {
  color: #fbbf24;
}

.bos-star-rating input:checked ~ .star,
.bos-star-rating label:has(input:checked) .star,
.bos-star-rating label:has(input:checked) ~ label .star {
  color: #f59e0b;
}

/* Fallback für Browser ohne :has() */
.bos-star-rating input:checked + .star {
  color: #f59e0b;
}

.bos-stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

/* ============================================================ */
/* MODAL STYLES */
/* ============================================================ */

.bos-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bos-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.bos-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bos-border);
  background: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.bos-modal-header h3 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
}

.bos-modal-close {
  font-size: 24px;
  line-height: 1;
  color: var(--bos-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
}

.bos-modal-close:hover {
  background: #e5e7eb;
  color: var(--bos-text);
}

.bos-modal-body {
  padding: 20px;
}

.bos-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--bos-border);
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}

/* Modal Form Styling */
.bos-modal form {
  margin: 0;
}

.bos-modal label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 0.9em;
}

.bos-modal input[type="text"],
.bos-modal input[type="date"],
.bos-modal input[type="email"],
.bos-modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  font-size: 14px;
}

/* Functions Grid im Modal */
.bos-functions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 500px) {
  .bos-functions-grid {
    grid-template-columns: 1fr;
  }
}

/* Bild-Upload Komponente */
.bos-image-upload {
  margin-bottom: 16px;
}
.bos-image-preview {
  margin-bottom: 10px;
  padding: 8px;
  background: #f7f9fb;
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  text-align: center;
}
.bos-image-preview img {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.bos-image-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bos-btn--small {
  padding: 6px 12px;
  font-size: 13px;
}

/* Fragen-Bild im Training */
.bos-question__image {
  text-align: center;
  margin: 12px 0;
}
.bos-question__image img {
  border: 1px solid var(--bos-border);
}

/* Feedback-Bild */
.bos-feedback-card__hint-image {
  text-align: center;
  margin-top: 12px;
}
.bos-feedback-card__hint-image img {
  border: 1px solid var(--bos-border);
}

/* Wiki Typ-Selektor */
.bos-wiki-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bos-wiki-header-left h2 {
  margin: 0;
}
.bos-wiki-type-select {
  padding: 6px 12px;
  border: 1px solid var(--bos-border);
  border-radius: 6px;
  background: var(--bos-bg);
  color: var(--bos-text);
  font-size: 14px;
  cursor: pointer;
}
.bos-wiki-type-select:hover {
  border-color: var(--bos-primary);
}
.bos-wiki-type-select:focus {
  outline: none;
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 2px rgba(15, 87, 117, 0.1);
}

/* ===== Organisations-Verzeichnis ===== */
.bos-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.bos-breadcrumb a {
  color: var(--bos-primary);
  text-decoration: none;
}
.bos-breadcrumb a:hover {
  text-decoration: underline;
}
.bos-breadcrumb__sep {
  color: var(--bos-muted);
}

.bos-directory__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.bos-directory__icon {
  font-size: 3rem;
  line-height: 1;
}
.bos-directory__title h1 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
}
.bos-directory__motto {
  color: var(--bos-primary);
  font-style: italic;
  margin: 0;
}
.bos-directory__stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--bos-muted);
  font-size: 14px;
}
.bos-directory__search {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.bos-directory__search .bos-input {
  flex: 1;
  min-width: 200px;
}
.bos-directory__categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}
.bos-directory__category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bos-bg-alt, #f7f9fb);
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--bos-text);
  transition: all 0.15s ease;
}
.bos-directory__category:hover {
  border-color: var(--bos-primary);
  background: var(--bos-bg);
  transform: translateX(4px);
}
.bos-directory__category-icon {
  font-size: 2rem;
  line-height: 1;
}
.bos-directory__category-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bos-directory__category-name {
  font-weight: 600;
  font-size: 1rem;
}
.bos-directory__category-stats {
  font-size: 13px;
  color: var(--bos-muted);
}
.bos-directory__category-arrow {
  font-size: 1.5rem;
  color: var(--bos-muted);
}
.bos-directory__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}
.bos-directory__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bos-bg);
  border: 1px solid var(--bos-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--bos-text);
  transition: all 0.15s ease;
}
.bos-directory__item:hover {
  border-color: var(--bos-primary);
  background: var(--bos-bg-alt, #f7f9fb);
}
.bos-directory__item-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.bos-directory__item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bos-directory__item-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bos-directory__item-city {
  font-size: 13px;
  color: var(--bos-muted);
}
.bos-directory__item-stats {
  font-size: 13px;
  color: var(--bos-muted);
}
.bos-directory__item-arrow {
  font-size: 1.2rem;
  color: var(--bos-muted);
}
.bos-directory__cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bos-border);
  text-align: center;
}
.bos-directory__cta p {
  margin: 0 0 12px 0;
  color: var(--bos-muted);
}

/* Öffentliche Org-Detailseite */
.bos-org-public__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.bos-org-public__icon {
  font-size: 3.5rem;
  line-height: 1;
}
.bos-org-public__title h1 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
}
.bos-org-public__info {
  margin: 20px 0;
  padding: 16px;
  background: var(--bos-bg-alt, #f7f9fb);
  border-radius: 10px;
}
.bos-org-public__info h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
}
.bos-org-public__info p {
  margin: 0;
  line-height: 1.6;
}
.bos-org-public__details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0;
}
.bos-org-public__detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 200px;
}
.bos-org-public__detail-icon {
  font-size: 1.2rem;
}
.bos-org-public__vehicles {
  margin: 24px 0;
}
.bos-org-public__vehicles h3 {
  margin: 0 0 12px 0;
}
.bos-org-public__vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.bos-org-public__vehicle {
  background: var(--bos-bg-alt, #f7f9fb);
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.bos-org-public__vehicle img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.bos-org-public__vehicle-placeholder {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bos-bg);
}
.bos-org-public__vehicle-name {
  padding: 8px;
  font-weight: 600;
  font-size: 14px;
}
.bos-org-public__vehicle-callsign {
  padding: 0 8px 8px;
  font-size: 12px;
  color: var(--bos-muted);
}
.bos-org-public__donation,
.bos-org-public__membership {
  margin: 24px 0;
  padding: 16px;
  background: var(--bos-bg-alt, #f7f9fb);
  border-radius: 10px;
}
.bos-org-public__donation h3,
.bos-org-public__membership h3 {
  margin: 0 0 10px 0;
}
.bos-org-public__donation p,
.bos-org-public__membership p {
  margin: 0 0 12px 0;
}
.bos-org-public__cta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bos-border);
  text-align: center;
}
.bos-org-public__cta p {
  margin: 0 0 12px 0;
  color: var(--bos-muted);
}

/* Responsive Verzeichnis */
@media (max-width: 600px) {
  .bos-directory__header {
    flex-direction: column;
    text-align: center;
  }
  .bos-directory__stats {
    justify-content: center;
  }
  .bos-directory__search {
    flex-direction: column;
  }
  .bos-directory__search .bos-input {
    min-width: 0;
  }
  .bos-org-public__header {
    flex-direction: column;
    text-align: center;
  }
  .bos-org-public__details {
    flex-direction: column;
  }
  .bos-org-public__vehicles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   EMERGENCY NUMBERS CARD (Startseite)
   ============================================================ */
.bos-emergency-card {
  background: #fff;
  border: 1px solid var(--bos-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bos-emergency-card__title {
  text-align: center;
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: var(--bos-primary);
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bos-border);
}

.bos-emergency-card__numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bos-emergency-number {
  background: #f8fafc;
  border: 1px solid var(--bos-border);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bos-emergency-number:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bos-emergency-number--police {
  border-left: 4px solid #3b82f6;
}

.bos-emergency-number--fire {
  border-left: 4px solid #ef4444;
}

.bos-emergency-number--medical {
  border-left: 4px solid #22c55e;
}

.bos-emergency-number__icon {
  font-size: 1.8rem;
  line-height: 1;
}

.bos-emergency-number__digits {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bos-emergency-number--police .bos-emergency-number__digits {
  color: #2563eb;
}

.bos-emergency-number--fire .bos-emergency-number__digits {
  color: #dc2626;
}

.bos-emergency-number--medical .bos-emergency-number__digits {
  color: #16a34a;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.bos-emergency-number__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bos-text);
  margin-top: 2px;
}

.bos-emergency-number__desc {
  font-size: 0.75rem;
  color: var(--bos-muted);
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 768px) {
  .bos-emergency-card__numbers {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .bos-emergency-number {
    flex-direction: row;
    text-align: left;
    padding: 12px 16px;
    gap: 12px;
  }
  
  .bos-emergency-number__icon {
    font-size: 1.5rem;
  }
  
  .bos-emergency-number__digits {
    font-size: 1.8rem;
  }
  
  .bos-emergency-number--medical .bos-emergency-number__digits {
    font-size: 1.5rem;
  }
  
  .bos-emergency-number__label {
    font-size: 0.8rem;
  }
  
  .bos-emergency-number__desc {
    display: none;
  }
}

/* ========================================================
   RESPONSIVE DESIGN - Mobile & Tablet Optimierung
   v1.0.87 - Burger-Menü und Layout-Anpassungen
   ======================================================== */

/* Burger-Button (nur auf mobilen Geräten sichtbar) */
.bos-burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  margin-left: 12px;
}

.bos-burger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Burger-Button Animation (aktiver Zustand = X) */
.bos-burger-btn--active .bos-burger-line:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.bos-burger-btn--active .bos-burger-line:nth-child(2) {
  opacity: 0;
}
.bos-burger-btn--active .bos-burger-line:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Overlay */
.bos-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bos-mobile-overlay--visible {
  display: block;
  opacity: 1;
}

/* Body-Klasse wenn Menü offen */
body.bos-mobile-menu-open {
  overflow: hidden;
}

/* ========== TABLET (max 1024px) ========== */
@media (max-width: 1024px) {
  /* Sidebar schmaler */
  .bos-sidebar-nav {
    width: 200px;
    font-size: 13px;
  }
  
  .bos-sidebar-nav__title {
    font-size: 10px;
  }
  
  .bos-sidebar-nav__link {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Content mehr Platz */
  .bos-content {
    padding: 16px;
  }
  
  /* Tabellen horizontal scrollbar */
  .bos-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Formulare Grid anpassen */
  .bos-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ========== MOBILE (max 768px) ========== */
@media (max-width: 768px) {
  /* Burger-Button anzeigen */
  .bos-burger-btn {
    display: flex;
  }
  
  /* Header anpassen */
  .bos-header {
    padding: 8px 12px;
  }
  
  .bos-header__logo-text {
    font-size: 16px;
  }
  
  .bos-header__search {
    display: none;
  }
  
  .bos-header__username {
    display: none;
  }
  
  .bos-header__nav {
    gap: 8px;
  }
  
  /* Sidebar als Off-Canvas Menü (Bug #94) */
  .bos-sidebar-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bos-card-bg, #fff);
    z-index: 1001;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding-top: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  }
  
  /* Dark Mode für Sidebar */
  html[data-theme="dark"] .bos-sidebar-nav,
  body.bos-theme-dark .bos-sidebar-nav {
    background: #16213e;
  }
  
  /* Sidebar offen */
  .bos-sidebar-nav.bos-sidebar-nav--open {
    left: 0 !important;
  }
  
  /* Haupt-Content volle Breite */
  .bos-app-wrapper,
  .bos-main {
    display: block !important;
  }
  
  .bos-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    margin-left: 0 !important;
  }
  
  /* Cards und Subcards */
  .bos-card,
  .bos-subcard {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }
  
  /* Buttons */
  .bos-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .bos-btn--small {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  /* Tabellen */
  .bos-table {
    font-size: 12px;
  }
  
  .bos-table th,
  .bos-table td {
    padding: 8px 6px;
  }
  
  /* Formulare */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important; /* Verhindert Zoom auf iOS */
    padding: 10px 12px;
  }
  
  /* Grid-Layouts einspaltg */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Flex-Layouts vertikal */
  [style*="display: flex"][style*="gap"] {
    flex-direction: column;
  }
  
  /* Tabs horizontal scrollbar */
  .bos-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  
  .bos-tabs button {
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  /* Alerts */
  .bos-alert {
    padding: 12px;
    font-size: 13px;
  }
  
  /* Footer */
  .bos-footer {
    padding: 16px 12px;
    font-size: 11px;
  }
  
  .bos-footer__links {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ========== SMALL MOBILE (max 480px) ========== */
@media (max-width: 480px) {
  /* Header noch kompakter */
  .bos-header {
    padding: 6px 8px;
  }
  
  .bos-header__logo img {
    height: 28px;
  }
  
  .bos-header__logo-text {
    font-size: 14px;
  }
  
  /* Sidebar schmaler */
  .bos-sidebar-nav {
    width: 260px;
    left: -260px;
  }
  .bos-sidebar-nav.bos-sidebar-nav--open {
    left: 0 !important;
  }
  
  /* Content minimaler Padding */
  .bos-content {
    padding: 8px !important;
  }
  
  /* Cards noch kompakter */
  .bos-card,
  .bos-subcard {
    padding: 10px !important;
    border-radius: 8px;
  }
  
  /* Überschriften */
  h1, .bos-page-title {
    font-size: 20px !important;
  }
  
  h2 {
    font-size: 18px !important;
  }
  
  h3 {
    font-size: 16px !important;
  }
  
  h4 {
    font-size: 14px !important;
  }
  
  /* Buttons stapeln */
  .bos-btn-group,
  [style*="display: flex"][style*="gap: 8px"],
  [style*="display: flex"][style*="gap: 12px"] {
    flex-direction: column !important;
    width: 100%;
  }
  
  .bos-btn-group .bos-btn,
  [style*="display: flex"][style*="gap: 8px"] > button,
  [style*="display: flex"][style*="gap: 12px"] > button {
    width: 100% !important;
  }
  
  /* Tabellen noch kleiner */
  .bos-table {
    font-size: 11px;
  }
  
  .bos-table th,
  .bos-table td {
    padding: 6px 4px;
  }
  
  /* Login/Registrieren Text */
  .bos-header__link {
    font-size: 12px;
  }
  
  .bos-header__separator {
    margin: 0 4px;
  }
}

/* ========== LIVE-FUNKRAUM SPEZIFISCH ========== */
@media (max-width: 768px) {
  /* LiveRoom Header */
  .bos-liveroom > div:first-child {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }
  
  .bos-liveroom > div:first-child > div:last-child {
    width: 100%;
    justify-content: flex-end;
  }
  
  /* Funkgerät zentriert */
  #phase-radio,
  #phase-ready,
  #phase-alarm,
  #phase-radio-placeholder {
    max-width: 100% !important;
    margin: 0 auto;
  }
  
  /* Dispatcher-View einspaltg */
  #dispatcher-view > div:first-of-type {
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* Karte volle Breite */
  #live-map-container,
  [id*="map"] {
    height: 250px !important;
    min-height: 250px;
  }
  
  /* Teilnehmer-Liste kompakt */
  #participant-list {
    max-height: 200px;
    overflow-y: auto;
  }
  
  /* Protokoll kompakt */
  #radio-protocol {
    max-height: 250px;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .bos-sidebar-nav,
  .bos-header,
  .bos-burger-btn,
  .bos-footer,
  #wpadminbar {
    display: none !important;
  }
  
  .bos-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ========== MOBILE TABS IN SIDEBAR ========== */
/* Die Seiten-Tabs werden im mobilen Menü als Submenü angezeigt */
.bos-sidebar-nav__mobile-tabs {
  display: none !important;
  border-top: 1px solid var(--bos-border, #e2e8f0);
  padding-top: 16px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  /* Mobile Tabs anzeigen wenn befüllt */
  .bos-sidebar-nav__mobile-tabs[style*="display: block"] {
    display: block !important;
  }
  
  /* Bug #29 Fix: Tabs auf Mobile NICHT mehr verstecken, sondern horizontal scrollbar machen */
  .bos-tabs {
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -16px 16px -16px;
    padding: 0 16px;
  }
  
  .bos-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .bos-tabs .bos-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* Dark Mode für Mobile-Tabs */
html[data-theme="dark"] .bos-sidebar-nav__mobile-tabs,
body.bos-theme-dark .bos-sidebar-nav__mobile-tabs {
  border-color: #3a4a5e;
}

/* ========== SIDEBAR CLOSE BUTTON ========== */
.bos-sidebar-nav__close {
  display: none;
  width: 100%;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bos-muted, #64748b);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bos-border, #e2e8f0);
  cursor: pointer;
  text-align: right;
}

.bos-sidebar-nav__close:hover {
  background: var(--bos-bg-hover, #f1f5f9);
  color: var(--bos-text, #1e293b);
}

@media (max-width: 768px) {
  .bos-sidebar-nav__close {
    display: block;
  }
  
  /* ::before Pseudo-Element entfernen */
  .bos-sidebar-nav::before {
    display: none !important;
  }
}

/* Dark Mode */
html[data-theme="dark"] .bos-sidebar-nav__close,
body.bos-theme-dark .bos-sidebar-nav__close {
  color: #a0a8b4;
  border-color: #3a4a5e;
}

html[data-theme="dark"] .bos-sidebar-nav__close:hover,
body.bos-theme-dark .bos-sidebar-nav__close:hover {
  background: rgba(255,255,255,0.05);
  color: #e8e8e8;
}

/* ========== SIDEBAR SUBMENÜ STYLES ========== */
.bos-sidebar-nav__link--sub {
  padding-left: 24px !important;
  font-size: 13px;
  color: var(--bos-text, #1e293b);
}

/* Kein > Prefix für Untermenüs */
.bos-sidebar-nav__link--sub::before {
  display: none !important;
}

.bos-sidebar-nav__link--sub:hover {
  color: var(--bos-primary, #0f4c81);
}

.bos-sidebar-nav__link--sub.bos-sidebar-nav__link--active {
  color: var(--bos-primary, #0f4c81);
  font-weight: 600;
}

/* Dark Mode */
html[data-theme="dark"] .bos-sidebar-nav__link--sub,
body.bos-theme-dark .bos-sidebar-nav__link--sub {
  color: #e8e8e8;
}

html[data-theme="dark"] .bos-sidebar-nav__link--sub:hover,
body.bos-theme-dark .bos-sidebar-nav__link--sub:hover {
  color: #6db3e8;
}

html[data-theme="dark"] .bos-sidebar-nav__link--sub.bos-sidebar-nav__link--active,
body.bos-theme-dark .bos-sidebar-nav__link--sub.bos-sidebar-nav__link--active {
  color: #6db3e8;
}

/* ========== HEADER NAVIGATION DROPDOWN ========== */
/* Desktop: Burger-Menü verstecken */
.bos-header__dropdown--menu {
  display: none;
}

/* Mobile/Tablet: Altes Dropdown-Menü ausblenden, neuer Burger-Button übernimmt (Bug #94) */
@media (max-width: 768px) {
  .bos-header__dropdown--menu {
    display: none !important;
  }
  
  /* Einstellungs-Dropdown ausblenden */
  .bos-header__dropdown:not(.bos-header__dropdown--menu) {
    display: none;
  }
}

.bos-header__dropdown--menu .bos-header__dropdown-menu--wide {
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
}

.bos-header__dropdown-section {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bos-muted, #64748b);
  letter-spacing: 0.5px;
}

.bos-header__dropdown--menu .bos-header__dropdown-item {
  padding: 6px 16px;
  font-size: 13px;
}

/* Dark Mode für Dropdown-Sektionen */
html[data-theme="dark"] .bos-header__dropdown-section,
body.bos-theme-dark .bos-header__dropdown-section {
  color: #8899aa;
}

/* ========== FUNKGERÄT TASTATUR ========== */
/* Immer 3 Spalten, auch auf Mobilgeräten */
.radio-keypad {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
}

@media (max-width: 768px) {
    .radio-keypad {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ============================================================
   RESPONSIVE DESIGN IMPROVEMENTS - v1.2.19
   ============================================================ */

/* =========================
   2FA CODE INPUT - Mobile Optimized
   ========================= */
.bos-2fa-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}

.bos-2fa-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.bos-2fa-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  border: 2px solid var(--bos-border);
  border-radius: 10px;
  background: var(--bos-bg);
  color: var(--bos-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bos-2fa-digit:focus {
  border-color: var(--bos-primary);
  box-shadow: 0 0 0 3px rgba(61, 126, 170, 0.2);
  outline: none;
}

/* Desktop: Alle 8 in einer Reihe */
@media (min-width: 600px) {
  .bos-2fa-inputs {
    flex-direction: row;
    gap: 6px;
  }
  .bos-2fa-row {
    gap: 6px;
  }
  .bos-2fa-digit {
    width: 42px;
    height: 50px;
    font-size: 22px;
  }
}

/* =========================
   HEADER - Mobile Optimizations
   ========================= */
@media (max-width: 768px) {
  .bos-header {
    padding: 8px 12px;
  }
  
  .bos-header__logo-text {
    font-size: 16px;
  }
  
  .bos-header__search {
    display: none;
  }
  
  .bos-header__username {
    display: none;
  }
  
  .bos-header__nav {
    gap: 8px;
  }
  
  .bos-header__dropdown-btn {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .bos-header__logo img {
    height: 28px;
  }
  
  .bos-header__logo-text {
    font-size: 14px;
  }
}

/* =========================
   SIDEBAR - Mobile Touch-Friendly (Bug #94)
   ========================= */
@media (max-width: 768px) {
  .bos-sidebar-nav__title {
    font-size: 15px;
    padding: 12px 16px;
  }
  
  .bos-sidebar-nav__link {
    padding: 10px 16px 10px 28px;
    font-size: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  
  .bos-main {
    margin-left: 0;
    width: 100%;
  }
}

/* Mobile Overlay */
.bos-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bos-mobile-overlay--visible {
  display: block;
  opacity: 1;
}

/* =========================
   CARDS - Mobile Layout
   ========================= */
@media (max-width: 768px) {
  .bos-card {
    padding: 16px;
    margin: 8px;
    border-radius: 12px;
  }
  
  .bos-card h1,
  .bos-card h2 {
    font-size: 1.4em;
  }
  
  .bos-card h3 {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .bos-card {
    padding: 12px;
    margin: 4px;
    border-radius: 8px;
  }
}

/* =========================
   FORMS - Touch-Friendly
   ========================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
  font-size: 16px; /* Prevents iOS zoom */
  min-height: 44px; /* Touch target */
  padding: 10px 12px;
}

.bos-btn {
  min-height: 44px;
  padding: 12px 20px;
  font-size: 15px;
  touch-action: manipulation;
}

@media (max-width: 480px) {
  .bos-btn {
    width: 100%;
    padding: 14px 20px;
  }
  
  .bos-btn + .bos-btn {
    margin-top: 8px;
    margin-left: 0;
  }
}

/* Form Grid - Mobile Stack */
@media (max-width: 600px) {
  .bos-form-row,
  .bos-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .bos-form-row > *,
  .bos-form-grid > * {
    width: 100%;
  }
}

/* =========================
   TABLES - Mobile Responsive
   ========================= */
@media (max-width: 768px) {
  .bos-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }
  
  .bos-table {
    min-width: 500px;
  }
  
  .bos-table th,
  .bos-table td {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* Card-Style Tables for Mobile */
@media (max-width: 600px) {
  .bos-table--cards {
    display: block;
    min-width: auto;
  }
  
  .bos-table--cards thead {
    display: none;
  }
  
  .bos-table--cards tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .bos-table--cards tr {
    display: block;
    background: var(--bos-card-bg);
    border: 1px solid var(--bos-border);
    border-radius: 8px;
    padding: 12px;
  }
  
  .bos-table--cards td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
  }
  
  .bos-table--cards td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--bos-muted);
  }
}

/* =========================
   TABS - Mobile Scrollable
   ========================= */
@media (max-width: 600px) {
  .bos-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    padding-bottom: 2px;
  }
  
  .bos-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .bos-tabs button,
  .bos-tabs a {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
}

/* =========================
   DASHBOARD TILES - Mobile Grid
   ========================= */
@media (max-width: 768px) {
  .bos-dashboard-grid,
  .bos-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .bos-dashboard-grid,
  .bos-quick-links {
    grid-template-columns: 1fr;
  }
}

/* =========================
   ALERTS - Mobile
   ========================= */
@media (max-width: 600px) {
  .bos-alert {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }
}

/* =========================
   LOGIN/REGISTER FORMS - Mobile Centered
   ========================= */
@media (max-width: 600px) {
  .bos-login-card,
  .bos-register-card {
    margin: 8px;
    padding: 20px;
  }
  
  .bos-login-card h2,
  .bos-register-card h2 {
    font-size: 1.3em;
    margin-bottom: 16px;
  }
}

/* =========================
   PROFILE PAGE - Mobile Layout
   ========================= */
@media (max-width: 768px) {
  .bos-profile-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .bos-profile-avatar {
    margin: 0 auto;
  }
  
  .bos-invite-card {
    padding: 16px;
  }
  
  .bos-invite-card > div {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .bos-invite-card > div > div:first-child {
    order: -1;
  }
}

/* =========================
   ORGANISATION PAGE - Mobile
   ========================= */
@media (max-width: 768px) {
  .bos-org-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .bos-org-info {
    text-align: center;
  }
}

/* =========================
   DROPDOWN MENUS - Mobile Touch
   ========================= */
@media (max-width: 768px) {
  .bos-header__dropdown-menu {
    min-width: 200px;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .bos-header__dropdown-item {
    padding: 12px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .bos-header__dropdown-menu--wide {
    max-width: 90vw;
  }
}

/* =========================
   QR CODE - Mobile
   ========================= */
@media (max-width: 480px) {
  #qrcode-container canvas,
  [id^="qrcode-"] canvas {
    max-width: 120px !important;
    height: auto !important;
  }
}

/* =========================
   GENERAL MOBILE IMPROVEMENTS
   ========================= */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Better touch targets */
a, button {
  touch-action: manipulation;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .bos-header {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  
  .bos-main {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* Fix iOS input zoom */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input {
    font-size: 16px;
  }
}

/* =========================
   PRINT IMPROVEMENTS
   ========================= */
@media print {
  .bos-header,
  .bos-sidebar-nav,
  .bos-mobile-overlay,
  .bos-btn,
  .bos-header__dropdown {
    display: none !important;
  }
  
  .bos-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  .bos-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
}

/* ============================================================ */
/* RESPONSIVE FIXES v1.3.5 - Mobile-First Design */
/* ============================================================ */

/* 1. STICKY FOOTER - Am unteren Rand haftend */
/* NUR für body, nicht für page-wrapper (der bleibt horizontal für Sidebar!) */
body.bos-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* page-wrapper bleibt HORIZONTAL (flex-direction: row ist default) für Sidebar + Main */
.bos-page-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  /* NICHT flex-direction: column setzen! */
}

body.bos-page .bos-footer {
  flex-shrink: 0;
}

/* 2. BOS-CARD - Mobile responsive */
@media (max-width: 600px) {
  .bos-card {
    padding: 16px 12px;
    margin: 8px;
    border-radius: 8px;
    width: calc(100% - 16px);
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Login/Register Card zentriert */
  .bos-login-card,
  .bos-register-card {
    margin: 16px auto;
    max-width: calc(100% - 24px);
  }
}

/* 3. BOS-TABLE - Responsive mit horizontalem Scroll */
.bos-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .bos-table {
    font-size: 13px;
    min-width: 500px; /* Erzwingt Scroll bei kleinen Bildschirmen */
  }
  
  .bos-table th,
  .bos-table td {
    padding: 8px 10px;
    white-space: nowrap;
  }
  
  /* Alternative: Card-Layout für Tabellen auf Mobile */
  .bos-table--responsive {
    min-width: auto;
  }
  
  .bos-table--responsive thead {
    display: none;
  }
  
  .bos-table--responsive tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--bos-border);
    border-radius: 8px;
    padding: 12px;
    background: var(--bos-card-bg);
  }
  
  .bos-table--responsive td {
    display: flex;
    justify-content: space-between;
    border: none;
    padding: 6px 0;
    white-space: normal;
  }
  
  .bos-table--responsive td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
  }
}

/* 4. FORMULARE - Felder untereinander auf Mobile */
.bos-form-row,
.bos-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .bos-form-row,
  .bos-row {
    flex-direction: column;
    gap: 0;
  }
  
  .bos-form-row > *,
  .bos-row > * {
    width: 100% !important;
    flex: none !important;
  }
  
  /* Zwei-Spalten Formulare auf Mobile untereinander */
  .bos-form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  /* PLZ/Ort Felder */
  .bos-plz-ort {
    flex-direction: column;
  }
  
  .bos-plz-ort input {
    width: 100% !important;
  }
}

/* 5. EMERGENCY CARD - Bessere Mobile-Darstellung */
@media (max-width: 600px) {
  .bos-emergency-card,
  .bos-emergency-card--vertical {
    padding: 12px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .bos-emergency-card__numbers {
    gap: 8px;
  }
  
  .bos-emergency-number {
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  
  .bos-emergency-number__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
  }
  
  .bos-emergency-number__digits {
    font-size: 1.5rem !important;
  }
  
  .bos-emergency-number__label {
    font-size: 0.85rem;
  }
  
  .bos-emergency-number__desc {
    font-size: 0.75rem;
    display: none; /* Beschreibung auf kleinen Screens ausblenden */
  }
}

/* 6. DASHBOARD - Grid responsive */
@media (max-width: 768px) {
  .bos-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .bos-dashboard-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .bos-dashboard-section .bos-table {
    min-width: 300px;
  }
  
  .bos-dashboard-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .bos-stat-card {
    padding: 12px;
  }
  
  .bos-stat-card__value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .bos-dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* 7. FOOTER - Mobile responsive */
@media (max-width: 600px) {
  .bos-footer {
    padding: 12px 16px;
    text-align: center;
  }
  
  .bos-footer__row {
    flex-direction: column;
    gap: 8px;
  }
  
  .bos-footer__left,
  .bos-footer__center,
  .bos-footer__right {
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  
  .bos-footer__right {
    align-items: center;
  }
  
  .bos-footer__links {
    justify-content: center;
  }
}

/* 8. HEADER - Mobile responsive */
@media (max-width: 600px) {
  .bos-header {
    padding: 8px 12px;
  }
  
  .bos-header__logo img {
    height: 32px;
  }
  
  .bos-header__search {
    display: none;
  }
  
  .bos-header__actions {
    gap: 8px;
  }
}

/* 9. LOGIN/REGISTER Container */
@media (max-width: 600px) {
  .bos-auth-container {
    padding: 16px 12px;
    max-width: 100%;
  }
  
  .bos-auth-card {
    padding: 20px 16px;
    margin: 0;
    border-radius: 8px;
  }
  
  .bos-auth-card h2 {
    font-size: 1.25rem;
  }
}

/* 10. Allgemeine Box-Sizing Regel */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Overflow Prevention - NUR auf Mobile */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  
  .bos-main {
    overflow-x: hidden;
  }
}

/* 11. INPUT FELDER - Volle Breite auf Mobile */
@media (max-width: 600px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* Verhindert Zoom auf iOS */
  }
}

/* 12. BUTTONS - Touch-freundlich auf Mobile */
@media (max-width: 600px) {
  .bos-btn {
    padding: 12px 20px;
    font-size: 15px;
    width: 100%;
    text-align: center;
  }
  
  .bos-btn--small {
    padding: 10px 16px;
    width: auto;
  }
  
  .bos-btn-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .bos-btn-row .bos-btn {
    width: 100%;
  }
}

/* ============================================================ */
/* RESPONSIVE FIXES v1.3.6 - Erweiterte Mobile-Anpassungen */
/* ============================================================ */

/* 13. HOME-SEITE - Verbesserte Struktur */
.bos-home {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.bos-home__top-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .bos-home {
    padding: 16px;
    gap: 16px;
  }
  
  .bos-home__top-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .bos-home__card {
    order: 1;
  }
  
  .bos-emergency-card--vertical {
    order: 2;
  }
}

@media (max-width: 600px) {
  .bos-home {
    padding: 12px;
    gap: 12px;
  }
}

/* 14. INLINE-STYLE GRID ÜBERSCHREIBUNGEN - Kritisch für Mobile */
@media (max-width: 768px) {
  /* Alle inline grid-template-columns überschreiben */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  div[style*="display: grid"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Registrierung Formular Grids */
  .bos-register-step [style*="grid-template-columns"],
  .bos-card [style*="display: grid"][style*="grid-template-columns: 1fr 1fr"],
  .bos-card [style*="display: grid"][style*="grid-template-columns: 1fr 100px"] {
    grid-template-columns: 1fr !important;
  }
  
  /* PLZ/Ort spezifisch */
  [style*="grid-template-columns: 80px 1fr"] {
    grid-template-columns: 100px 1fr !important;
  }
  
  /* Gap für bessere Lesbarkeit */
  [style*="display: grid"] {
    gap: 12px !important;
  }
}

@media (max-width: 480px) {
  /* Auch PLZ/Ort untereinander auf sehr kleinen Screens */
  [style*="grid-template-columns: 80px 1fr"],
  [style*="grid-template-columns: 100px 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* 15. DASHBOARD TABELLEN - Wrapper und Scroll */
.bos-dashboard-section {
  overflow: visible;
}

.bos-dashboard-section .bos-table {
  width: 100%;
}

@media (max-width: 768px) {
  .bos-dashboard-grid {
    display: block !important;
  }
  
  .bos-dashboard-section {
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .bos-dashboard-section .bos-table--stats {
    min-width: 280px;
  }
  
  .bos-dashboard-section .bos-table--stats td {
    white-space: normal;
    word-break: break-word;
  }
}

/* 16. CARDS - Konsistentes Padding auf allen Screens */
.bos-card {
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .bos-card {
    padding: 16px;
    margin: 0 8px 16px 8px;
    width: calc(100% - 16px);
  }
  
  /* Login/Register Cards zentriert */
  .bos-card[style*="max-width: 700px"],
  .bos-card[style*="max-width: 600px"],
  .bos-card[style*="max-width: 500px"] {
    max-width: calc(100% - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 480px) {
  .bos-card {
    padding: 12px;
    margin: 0 4px 12px 4px;
    width: calc(100% - 8px);
    border-radius: 8px;
  }
}

/* 17. EMERGENCY NUMBERS - Kompakte Darstellung Mobile */
@media (max-width: 600px) {
  .bos-emergency-card--vertical .bos-emergency-number {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 12px;
  }
  
  .bos-emergency-number__icon {
    grid-row: 1 / 3;
    align-self: center;
    font-size: 2rem;
  }
  
  .bos-emergency-number__digits {
    font-size: 1.25rem !important;
    font-weight: 700;
  }
  
  .bos-emergency-number__label {
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  .bos-emergency-number__desc {
    grid-column: 2;
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
  }
}

/* 18. FOOTER - Immer am unteren Rand */
html.bos-page-html,
html.bos-page-html body {
  min-height: 100vh;
}

/* ACHTUNG: flex-direction: row ist ESSENTIELL für Sidebar + Content nebeneinander!
   flex-direction: column nur in @media (max-width: 768px) verwenden! */
.bos-page-wrapper {
  min-height: calc(100vh - var(--bos-header-height, 60px));
  display: flex;
  flex-direction: row; /* KRITISCH: row für Desktop-Layout! */
}

.bos-page-wrapper > .bos-footer {
  margin-top: auto;
}

/* Seiten ohne Wrapper */
body.bos-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.bos-page > .bos-main {
  flex: 1;
}

body.bos-page > .bos-footer,
body.bos-page .bos-footer:last-child {
  margin-top: auto;
}

/* 19. QUIZ MOBILE */
@media (max-width: 768px) {
  .bos-home__quiz {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .bos-quiz-card {
    border-radius: 8px;
    padding: 16px;
  }
}

/* 20. FOTO-UPLOAD Registrierung */
.bos-photo-upload {
  transition: border-color 0.2s, background 0.2s;
}

.bos-photo-upload:hover {
  border-color: var(--bos-primary);
  background: rgba(26, 74, 110, 0.05);
}

@media (max-width: 768px) {
  .bos-photo-upload {
    margin: 0 auto 16px auto;
  }
}

/* 21. ALLGEMEINE OVERFLOW-PREVENTION */
* {
  max-width: 100%;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Ausnahmen für spezifische Elemente */
.bos-table,
.bos-table * {
  max-width: none;
}

/* 22. QUICK-TILES Dashboard Mobile */
@media (max-width: 600px) {
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr 1fr !important;
  }
  
  .bos-quick-tile {
    padding: 16px !important;
  }
  
  .bos-quick-tile [style*="font-size: 32px"] {
    font-size: 24px !important;
  }
  
  .bos-quick-tile [style*="font-size: 18px"] {
    font-size: 14px !important;
  }
}

@media (max-width: 400px) {
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

/* =========================
   NARROW MOBILE (360-412px) - Samsung S20 / 20:9 Screens
   Bug #38: Optimierung für schmale Viewports
   ========================= */
@media (max-width: 420px) {
  /* Dashboard Begrüßung: Vertikal stapeln */
  .bos-card > div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px;
  }

  /* Quick Tiles: Einzelspalte erzwingen */
  .bos-quick-tile {
    padding: 14px !important;
  }
  
  .bos-quick-tile [style*="font-size: 32px"] {
    font-size: 22px !important;
    margin-bottom: 4px !important;
  }
  
  .bos-quick-tile [style*="font-size: 18px"] {
    font-size: 13px !important;
  }
  
  .bos-quick-tile [style*="font-size: 13px"] {
    font-size: 11px !important;
  }

  /* Dashboard Grid: Einzelspalte */
  .bos-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Tabellen: Kompakter */
  .bos-table td,
  .bos-table th {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  .bos-table--stats td:first-child {
    word-break: break-word;
    max-width: 220px;
  }

  /* Cards: Weniger Padding */
  .bos-card {
    padding: 12px !important;
    margin: 4px !important;
    border-radius: 10px !important;
  }

  /* Content: Weniger Außenabstand */
  .bos-content {
    padding: 12px 8px;
  }

  /* Header: Kompakt */
  .bos-header {
    padding: 4px 8px;
    height: 48px;
  }
  
  .bos-header__logo img {
    height: 26px;
  }
  
  .bos-header__logo-text {
    font-size: 13px;
  }
  
  .bos-header__search {
    flex: 0 1 120px;
  }
  
  .bos-header__search input {
    padding: 6px 10px 6px 32px;
    font-size: 13px;
  }
  
  .bos-header__user-name {
    display: none;
  }

  /* Tabs: Scrollbar bei Overflow */
  .bos-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .bos-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .bos-tab {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Stat Cards: Kompakter */
  .bos-stats-row {
    gap: 8px;
  }
  
  .bos-stat-card {
    padding: 10px 12px;
  }
  
  .bos-stat-value {
    font-size: 1.2em;
  }
  
  .bos-stat-label {
    font-size: 0.75em;
  }

  /* Filter Bar: Scrollbar */
  .bos-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  
  .bos-filter-btn {
    white-space: nowrap;
    font-size: 0.8em;
    padding: 5px 10px;
  }

  /* Mitglieder Grid: Einzelspalte */
  .bos-members-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Leadership Box: Kompakter */
  .bos-leadership-box {
    padding: 14px;
  }
  
  .bos-leadership-grid {
    flex-direction: column;
    gap: 12px;
  }

  /* Buttons: Volle Breite */
  .bos-btn--primary,
  .bos-btn--secondary {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  /* Überschriften kleiner */
  h2 {
    font-size: 1.3em !important;
  }
  
  h3 {
    font-size: 1.1em !important;
  }

  /* Container: Weniger Padding */
  .bos-container {
    padding: 0 8px;
    margin: 12px auto;
  }
}

/* ============================================================
   HILFE-PANEL (rechte Seite) — Pflichtenheft Beschreibung
   ============================================================ */

.bos-header__help-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    opacity: 1;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bos-header__help-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.8);
}

.bos-help-panel {
    width: 280px;
    min-width: 280px;
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    font-size: 13px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.05);
}

.bos-help-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f0f7ff;
    border-bottom: 1px solid #c5ddf5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bos-help-panel__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
}

.bos-help-panel__close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
}
.bos-help-panel__close:hover {
    color: #333;
}

.bos-help-panel__body {
    padding: 12px 15px;
}

.bos-help-panel__section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.bos-help-panel__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bos-help-panel__section h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a5f;
}

.bos-help-panel__section p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* Layout-Anpassung wenn Help-Panel offen */
.bos-page-wrapper.bos-has-help {
    display: flex;
}

/* Responsive: Panel auf Mobil ausblenden */
@media (max-width: 900px) {
    .bos-help-panel {
        position: fixed;
        right: 0;
        top: 55px;
        height: calc(100vh - 55px);
        z-index: 1000;
        box-shadow: -4px 0 16px rgba(0,0,0,0.15);
    }
}
@media (max-width: 600px) {
    .bos-help-panel {
        width: 100%;
        min-width: 0;
    }
}

/* ============================================================ */
/* KARTEIKARTENMODUS / FLASHCARD MODE (Bug #90) @since 2.2.96   */
/* ============================================================ */

/* Modus-Umschalter (Tabs) */
.bos-mode-switch {
  display: flex;
  gap: 0;
  margin: 12px 0 16px;
  border-bottom: 2px solid var(--bos-border);
}
.bos-mode-switch__tab {
  padding: 8px 18px;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--bos-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.bos-mode-switch__tab:hover {
  color: var(--bos-primary);
}
.bos-mode-switch__tab--active {
  color: var(--bos-primary);
  border-bottom-color: var(--bos-primary);
  font-weight: 600;
  cursor: default;
}

/* Flashcard App */
.fc-app { min-height: 400px; }

/* Loading */
.fc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--bos-muted);
}
.fc-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bos-border);
  border-top-color: var(--bos-primary);
  border-radius: 50%;
  animation: fc-spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* Progress Bar */
.fc-progress { margin-bottom: 16px; }
.fc-progress__bar {
  height: 6px;
  background: var(--bos-border);
  border-radius: 3px;
  overflow: hidden;
}
.fc-progress__fill {
  height: 100%;
  background: var(--bos-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0;
}
.fc-progress__text {
  text-align: center;
  font-size: 0.85em;
  color: var(--bos-muted);
  margin-top: 4px;
}

/* Card Wrapper (Karte + Buttons) */
.fc-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  position: relative;
  min-height: 350px;
}

/* Desktop Swipe Buttons */
.fc-swipe-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 120px;
  border: 2px solid var(--bos-border);
  border-radius: 12px;
  background: var(--bos-card-bg);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.fc-swipe-btn:hover {
  transform: scale(1.05);
}
.fc-swipe-btn--left:hover {
  border-color: var(--bos-error);
  color: var(--bos-error);
  background: #fef2f2;
}
.fc-swipe-btn--right:hover {
  border-color: var(--bos-success);
  color: var(--bos-success);
  background: #f0fdf4;
}
.fc-swipe-btn__icon {
  font-size: 1.8em;
  font-weight: bold;
  line-height: 1;
}
.fc-swipe-btn__label {
  font-size: 0.75em;
  margin-top: 4px;
}

/* Die Karteikarte */
.fc-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 320px;
  background: var(--bos-card-bg);
  border: 1px solid var(--bos-border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform;
}
.fc-card:active { cursor: grabbing; }

/* Hintergrundbild – SZENARIO A: Nur Fragenbild, dezent im Hintergrund */
.fc-card__bg-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
  display: none;
}
/* Overlay-Gradient für Lesbarkeit über Hintergrundbild */
.fc-card--bg-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0.7) 40%,
    rgba(255,255,255,0.85) 100%
  );
  z-index: 0;
  pointer-events: none;
  border-radius: 16px;
}
.fc-card--bg-image .fc-card__content {
  position: relative;
  z-index: 1;
}

/* Card Content */
.fc-card__content {
  position: relative;
  z-index: 1;
  padding: 24px;
}

/* SZENARIO B: Split-Layout – Fragenbild obere 2/3 + Antwortbilder darunter */
.fc-card--split-image .fc-card__qimage {
  position: relative;
  margin: -24px -24px 16px -24px; /* Randlos oben */
  height: 0;
  padding-bottom: 45%; /* ~2/3 Verhältnis */
  overflow: hidden;
  background: #000;
  border-radius: 16px 16px 0 0;
}
.fc-card--split-image .fc-card__qimage-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0,0,0,0.03);
}
/* Dezenter Verlauf über dem Fragenbild für Übergang zum Text */
.fc-card--split-image .fc-card__qimage::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bos-card-bg));
  pointer-events: none;
}

/* Kategorie Badge */
.fc-card__category {
  display: inline-block;
  padding: 3px 10px;
  background: var(--bos-primary);
  color: #fff;
  border-radius: 12px;
  font-size: 0.78em;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Fragenbild – Standard (ohne Split) */
.fc-card__qimage {
  text-align: center;
  margin-bottom: 12px;
}
.fc-card__qimage-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  object-fit: contain;
}

/* Fragetext */
.fc-card__question {
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.45;
  color: var(--bos-text);
  margin-bottom: 16px;
}
/* Bei Hintergrundbild: Textschatten für bessere Lesbarkeit */
.fc-card--bg-image .fc-card__question {
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
}

/* Trenner */
.fc-card__divider {
  border-top: 1px dashed var(--bos-border);
  text-align: center;
  margin: 8px 0 16px;
  position: relative;
}
.fc-card__divider span {
  display: inline-block;
  background: var(--bos-card-bg);
  padding: 0 12px;
  position: relative;
  top: -10px;
  font-size: 0.78em;
  color: var(--bos-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Richtige Antworten */
.fc-card__answers {}
.fc-card__answer-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(5, 150, 105, 0.08);
  border-left: 3px solid var(--bos-success);
  border-radius: 0 8px 8px 0;
  font-size: 0.95em;
  color: var(--bos-text);
}
.fc-card__answer-check {
  color: var(--bos-success);
  font-weight: bold;
}

/* Antwortbilder (nebeneinander, Grid-Layout) */
.fc-card__answer-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  background: rgba(0,0,0,0.02);
  border-radius: 10px;
  border: 1px dashed var(--bos-border);
}
.fc-card__answer-images-label {
  grid-column: 1 / -1; /* Volle Breite */
  font-size: 0.82em;
  font-weight: 600;
  color: var(--bos-success);
  padding-bottom: 4px;
}
.fc-card__answer-img {
  width: 100%;
  max-height: 140px;
  border-radius: 8px;
  object-fit: contain;
  border: 2px solid var(--bos-success);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #fff;
}
/* Inline-Bild in Text-Antworten (Text + Bild kombiniert) */
.fc-card__answer-inline-img {
  display: block;
  max-width: 180px;
  max-height: 100px;
  border-radius: 6px;
  margin-top: 6px;
  object-fit: contain;
  border: 1px solid var(--bos-border);
}

/* Hinweis / Erklärung */
.fc-card__hint {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  font-size: 0.88em;
  color: var(--bos-muted);
}

/* ── BILDERGALERIE: Thumbnails aller Bilder ── */
.fc-card__gallery {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--bos-border);
}
.fc-gallery__label {
  font-size: 0.78em;
  color: var(--bos-muted);
  margin-bottom: 8px;
}
.fc-gallery__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fc-gallery__thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--bos-border);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, border-color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.fc-gallery__thumb:active {
  transform: scale(0.92);
}
.fc-gallery__thumb--correct { border-color: var(--bos-success); }
.fc-gallery__thumb--wrong   { border-color: var(--bos-muted); opacity: 0.7; }
.fc-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.fc-gallery__thumb-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.6em;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* ── LIGHTBOX: Großbild-Overlay (press-to-zoom) ── */
.fc-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.fc-lightbox--visible {
  opacity: 1;
  pointer-events: auto;
}
.fc-lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* Swipe-Overlays */
.fc-swipe-indicator {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6em;
  font-weight: bold;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.fc-swipe-indicator--left {
  background: rgba(220, 38, 38, 0.15);
  color: var(--bos-error);
}
.fc-swipe-indicator--right {
  background: rgba(5, 150, 105, 0.15);
  color: var(--bos-success);
}

/* Exit Animation */
.fc-card--exit-left {
  transform: translateX(-150%) rotate(-15deg) !important;
  opacity: 0 !important;
  transition: transform 0.3s ease, opacity 0.3s ease !important;
}
.fc-card--exit-right {
  transform: translateX(150%) rotate(15deg) !important;
  opacity: 0 !important;
  transition: transform 0.3s ease, opacity 0.3s ease !important;
}

/* Swipe-Hinweis */
.fc-swipe-hint {
  text-align: center;
  font-size: 0.82em;
  color: var(--bos-muted);
  padding: 8px;
  animation: fc-hint-pulse 2s ease-in-out infinite;
}
@keyframes fc-hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============================================================ */
/* ERGEBNIS-SCREEN                                               */
/* ============================================================ */
.fc-result { padding: 20px 0; }
.fc-result h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.3em;
}
.fc-result__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}
.fc-result__stat {
  text-align: center;
}
.fc-result__value {
  display: block;
  font-size: 2.2em;
  font-weight: bold;
  line-height: 1.2;
}
.fc-result__stat--sure .fc-result__value { color: var(--bos-success); }
.fc-result__stat--unsure .fc-result__value { color: var(--bos-error); }
.fc-result__label {
  font-size: 0.9em;
  color: var(--bos-muted);
}
.fc-result__bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bos-border);
  margin-bottom: 24px;
}
.fc-result__bar-fill {
  height: 100%;
  transition: width 0.5s ease;
}
.fc-result__bar-fill--sure { background: var(--bos-success); }
.fc-result__bar-fill--unsure { background: var(--bos-error); }
.fc-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Error State */
.fc-error { padding: 40px 0; }

/* ============================================================ */
/* RESPONSIVE: Flashcard                                         */
/* ============================================================ */
@media (max-width: 768px) {
  .fc-swipe-btn { display: none; } /* Desktop-Buttons auf Mobile ausblenden */
  .fc-card-wrapper { gap: 0; }
  .fc-card { max-width: 100%; min-height: 280px; border-radius: 12px; }
  .fc-card__content { padding: 18px; }
  .fc-card__question { font-size: 1.05em; }
  /* Split-Image: weniger Höhe auf Mobile */
  .fc-card--split-image .fc-card__qimage {
    margin: -18px -18px 12px -18px;
    padding-bottom: 38%;
    border-radius: 12px 12px 0 0;
  }
  .fc-card__answer-images {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .fc-card__answer-img { max-height: 100px; }
  .fc-result__stats { gap: 24px; }
  .fc-result__value { font-size: 1.8em; }
  .fc-result__actions { flex-direction: column; align-items: stretch; }
  .fc-result__actions .bos-btn { text-align: center; }
  .fc-gallery__thumb { width: 60px; height: 60px; border-radius: 6px; }
  .fc-gallery__row { gap: 6px; }
  .bos-mode-switch__tab { padding: 6px 12px; font-size: 0.88em; }
  /* Background-Image Overlay auf Mobile */
  .fc-card--bg-image::after {
    border-radius: 12px;
  }
}

/* Dark Mode Flashcard */
html[data-theme="dark"] .fc-card,
body.bos-theme-dark .fc-card,
body[data-theme="dark"] .fc-card {
  background: var(--bos-card-bg);
  border-color: var(--bos-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
/* Dark Mode: Hintergrundbild-Overlay invertieren */
html[data-theme="dark"] .fc-card--bg-image::after,
body.bos-theme-dark .fc-card--bg-image::after,
body[data-theme="dark"] .fc-card--bg-image::after {
  background: linear-gradient(
    180deg,
    rgba(22,33,62,0.4) 0%,
    rgba(22,33,62,0.75) 40%,
    rgba(22,33,62,0.9) 100%
  );
}
html[data-theme="dark"] .fc-card--bg-image .fc-card__question,
body.bos-theme-dark .fc-card--bg-image .fc-card__question,
body[data-theme="dark"] .fc-card--bg-image .fc-card__question {
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
/* Dark Mode: Split-Image Gradient */
html[data-theme="dark"] .fc-card--split-image .fc-card__qimage::after,
body.bos-theme-dark .fc-card--split-image .fc-card__qimage::after,
body[data-theme="dark"] .fc-card--split-image .fc-card__qimage::after {
  background: linear-gradient(transparent, var(--bos-card-bg));
}
html[data-theme="dark"] .fc-swipe-btn,
body.bos-theme-dark .fc-swipe-btn,
body[data-theme="dark"] .fc-swipe-btn {
  background: var(--bos-card-bg);
  border-color: var(--bos-border);
}
html[data-theme="dark"] .fc-swipe-btn--left:hover,
body.bos-theme-dark .fc-swipe-btn--left:hover,
body[data-theme="dark"] .fc-swipe-btn--left:hover {
  background: rgba(220, 38, 38, 0.1);
}
html[data-theme="dark"] .fc-swipe-btn--right:hover,
body.bos-theme-dark .fc-swipe-btn--right:hover,
body[data-theme="dark"] .fc-swipe-btn--right:hover {
  background: rgba(5, 150, 105, 0.1);
}
html[data-theme="dark"] .fc-card__divider span,
body.bos-theme-dark .fc-card__divider span,
body[data-theme="dark"] .fc-card__divider span {
  background: var(--bos-card-bg);
}
html[data-theme="dark"] .fc-card__answer-item,
body.bos-theme-dark .fc-card__answer-item,
body[data-theme="dark"] .fc-card__answer-item {
  background: rgba(5, 150, 105, 0.12);
}
html[data-theme="dark"] .fc-card__answer-images,
body.bos-theme-dark .fc-card__answer-images,
body[data-theme="dark"] .fc-card__answer-images {
  background: rgba(255,255,255,0.04);
  border-color: var(--bos-border);
}
html[data-theme="dark"] .fc-card__answer-img,
body.bos-theme-dark .fc-card__answer-img,
body[data-theme="dark"] .fc-card__answer-img {
  background: #1a2040;
  border-color: var(--bos-success);
}
html[data-theme="dark"] .fc-card__hint,
body.bos-theme-dark .fc-card__hint,
body[data-theme="dark"] .fc-card__hint {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}
html[data-theme="dark"] .fc-card__gallery,
body.bos-theme-dark .fc-card__gallery,
body[data-theme="dark"] .fc-card__gallery {
  border-top-color: var(--bos-border);
}
html[data-theme="dark"] .fc-gallery__thumb,
body.bos-theme-dark .fc-gallery__thumb,
body[data-theme="dark"] .fc-gallery__thumb {
  border-color: var(--bos-border);
}
html[data-theme="dark"] .fc-gallery__thumb--correct,
body.bos-theme-dark .fc-gallery__thumb--correct,
body[data-theme="dark"] .fc-gallery__thumb--correct {
  border-color: var(--bos-success);
}
