/* System-wide site CSS consolidated from calendar.php and index.php */
:root {
  /* Provide a local fallback for the broken `fcicons` font so browsers don't attempt
     to load the embedded/base64 font that emits "Glyph bbox was incorrect" warnings. */
}

@font-face {
  font-family: 'fcicons';
  src: local('Segoe UI Symbol'), local('Noto Color Emoji'), local('Arial Unicode MS'), local('Symbola');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --eggshell: #f5f2e8;
  --btn-primary-start: #dbeefd;
  --btn-primary-end: #c6e3ff;
  --btn-success-start: #e6f9e6;
  --btn-success-end: #cfefd1;
  --btn-danger-start: #ffecec;
  --btn-danger-end: #ffd7d7;
  --btn-warning-start: #fff8dc;
  --btn-warning-end: #fff1b8;
  --panel-border: rgba(0,0,0,0.9);
}

/* ── Globale Box-Sizing-Basis (verhindert horizontales Overflow) ──── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Globale Basisschrift: 16px = 12 pt ───────────────────────────── */
html { font-size: 16px; overflow-x: hidden; }

/* Global body / wallpaper */
body {
  margin: 0; padding: 0; min-height:100vh;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  background-color: #071a2b;
  background-image: url('wallpaper.svg'), radial-gradient(ellipse at center, rgba(10,40,70,0.6), rgba(6,20,40,0.9));
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-size: cover, cover;
  -webkit-font-smoothing: antialiased;
  color: #fff;
  overflow-x: hidden;
}

/* Common layout helpers */
.page-wrap { padding: 80px 24px 24px 24px; max-width: 1200px; margin: 0 auto; }
.dashboard-wrap { padding: 120px 40px 24px 40px; }

/* Windows 7 Aero glass window */
.window {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.16) 100%
  );
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.5);
  border-top-color: rgba(255,255,255,0.6);
  border-bottom-color: rgba(255,255,255,0.3);
  box-shadow: 
    0 0 0 1px rgba(0,0,0,0.1) inset,
    0 8px 32px rgba(0,0,0,0.3),
    0 2px 8px rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 0;
  color: #ffffff;
}

.window .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.05) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px 8px 0 0;
}

.window h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.window .title {
  display: block;
  padding: 10px 14px;
  margin: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.08) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,0.2);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.window .body {
  padding: 14px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Windows 7 Taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  z-index: 50;
  
  /* Windows 7 taskbar glass effect */
  background: linear-gradient(
    180deg,
    rgba(35,42,50,0.9) 0%,
    rgba(20,25,30,0.95) 100%
  );
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  
  border-top: 1px solid rgba(255,255,255,0.15);
  box-shadow: 
    0 -1px 0 rgba(0,0,0,0.3) inset,
    0 -3px 12px rgba(0,0,0,0.5);
  
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.taskbar .nav {
  display: flex;
  gap: 2px;
  padding: 0;
  align-items: center;
}

/* FullCalendar tweaks - Windows 7 style */
#calendar { width:100%; background: transparent; }
.fc .fc-daygrid-day-frame,
.fc .fc-scrollgrid { background: transparent; }
.fc .fc-daygrid-day { background: transparent; }
.fc .fc-daygrid-day-frame { border: 1px solid rgba(255,255,255,0.12); box-sizing: border-box; }
.fc .fc-daygrid-day-number { color: #ffffff; font-weight:700; text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.fc .fc-toolbar-title { color: #ffffff; font-weight:600; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* FullCalendar navigation buttons – dark Aero style */
.fc .fc-button {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.85);
  border-radius: 5px; font-weight: 500;
  text-shadow: none; box-shadow: none;
  transition: background .15s, color .15s;
}
.fc .fc-button:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.32);
  color: #fff;
}
.fc .fc-button:active,
.fc .fc-button-active {
  background: rgba(60,120,220,.55);
  border-color: rgba(60,120,220,.8);
  color: #fff; box-shadow: none;
}

.fc .fc-col-header-cell { border-bottom: 1px solid rgba(255,255,255,0.12); }
.fc .fc-daygrid-day-events, .fc .fc-daygrid-day-top { color:#000; }
.fc .fc-event, .fc .fc-event-main { background:#ffffff; color:#000; border:1.5px solid #000; }
.fc .fc-daygrid-event { display:block; padding:4px 6px; box-sizing:border-box; background: rgba(255,255,255,0.9); color:#000; border-radius:4px; }
.fc .fc-daygrid-event .fc-event-title { font-weight:700; color:#000; }

/* Holiday cell styling */
.fc .fc-daygrid-day.holiday-cell { box-shadow: inset 0 0 0 3px rgba(176,0,0,0.9); }
.fc .fc-daygrid-day.holiday-cell .fc-daygrid-day-number { color: #ffffff; font-weight:800; }
.fc-daygrid-day.holiday-cell { background: rgba(255,255,255,0.05) !important; }
.holiday-name { display:block; margin-top:4px; padding:2px 6px; background: rgba(255,215,0,0.15); color:#FFD700; font-size:0.85rem; font-weight:800; border-radius:3px; text-shadow:0 1px 2px rgba(0,0,0,0.8); border-left:3px solid #FFD700; }

/* Weekend tint */
.fc-day-sat, .fc-day-sun { background-color: rgba(255,255,255,0.03) !important; }

/* Stronger day numbers */
.fc .fc-daygrid-day-number { font-weight:700; opacity:1; color:#fff; text-shadow: 0 0 5px rgba(0,0,0,0.5); }

/* ══════════════════════════════════════════════════════════════════════
   Buttons – kontrastreich, explizite Farben in allen States
   ══════════════════════════════════════════════════════════════════════ */

/* ── Standard-Button (grau) ─────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
  transition: background .12s, box-shadow .12s, transform .08s;
  font-size: 15px;
  background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
  border: 1px solid #999;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 3px rgba(0,0,0,.25);
}
.btn:hover {
  color: #1a1a1a;
  background: linear-gradient(180deg, #d6e8f8 0%, #b8d8f5 100%);
  border-color: #3c7fb1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 4px rgba(60,127,177,.4);
}
.btn:active {
  color: #1a1a1a;
  background: linear-gradient(180deg, #a8c8e8 0%, #bcd8f0 100%);
  border-color: #2a6090;
  box-shadow: inset 0 2px 3px rgba(0,0,0,.2);
  transform: translateY(1px);
}

/* ── Primär (blau) ──────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(180deg, #4a90d9 0%, #2F6FD9 100%);
  border-color: #1a52b0;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 4px rgba(0,0,0,.3);
}
.btn-primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #5aa0e8 0%, #3d80e8 100%);
  border-color: #1040a0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 6px rgba(47,111,217,.5);
}
.btn-primary:active {
  color: #fff;
  background: linear-gradient(180deg, #1a52b0 0%, #2060c8 100%);
  border-color: #0e3880;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
  transform: translateY(1px);
}

/* ── Erfolg (grün) ──────────────────────────────────────────────── */
.btn-success {
  background: linear-gradient(180deg, #3ab54a 0%, #1E9B3A 100%);
  border-color: #157030;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 4px rgba(0,0,0,.3);
}
.btn-success:hover {
  color: #fff;
  background: linear-gradient(180deg, #4cc55a 0%, #28ab48 100%);
  border-color: #0f5828;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px rgba(30,155,58,.5);
}
.btn-success:active {
  color: #fff;
  background: linear-gradient(180deg, #157030 0%, #1a8038 100%);
  border-color: #0a4020;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
  transform: translateY(1px);
}

/* ── Gefahr (rot) ───────────────────────────────────────────────── */
.btn-danger {
  background: linear-gradient(180deg, #e04444 0%, #c42828 100%);
  border-color: #901a1a;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 4px rgba(0,0,0,.3);
}
.btn-danger:hover {
  color: #fff;
  background: linear-gradient(180deg, #ee5555 0%, #d43535 100%);
  border-color: #7a1010;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 6px rgba(196,40,40,.5);
}
.btn-danger:active {
  color: #fff;
  background: linear-gradient(180deg, #901a1a 0%, #a82222 100%);
  border-color: #600e0e;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
  transform: translateY(1px);
}

/* ── Warnung (gelb/amber) ───────────────────────────────────────── */
.btn-warning {
  background: linear-gradient(180deg, #f0b429 0%, #d69510 100%);
  border-color: #a87010;
  color: #3a2800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 4px rgba(0,0,0,.25);
}
.btn-warning:hover {
  color: #3a2800;
  background: linear-gradient(180deg, #f8c040 0%, #e0a020 100%);
  border-color: #906008;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(214,149,16,.5);
}
.btn-warning:active {
  color: #3a2800;
  background: linear-gradient(180deg, #a87010 0%, #c08018 100%);
  border-color: #705008;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.25);
  transform: translateY(1px);
}

/* Tooltip for event hover */
#event-tooltip { display:none; position:fixed; pointer-events:none; z-index:99999; transition:opacity .12s; font-family: 'Segoe UI', Tahoma, sans-serif; }
#event-tooltip .inner { background: rgba(0,0,0,0.8); color:#fff; padding:8px 10px; border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,0.6); max-width:320px; }

/* Modal defaults (used by calendar modals) - Windows 7 style */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 120;
  background: rgba(0,0,0,0.4);
  padding: 20px;
  box-sizing: border-box;
}
.modal-panel {
  display: block;
  width: min(720px, 92vw);
  max-width: 720px;
  margin: 0 auto;
  
  /* Windows 7 dialog window styling */
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.16) 100%
  );
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.5);
  border-top-color: rgba(255,255,255,0.6);
  border-bottom-color: rgba(255,255,255,0.3);
  box-shadow: 
    0 0 0 1px rgba(0,0,0,0.1) inset,
    0 12px 40px rgba(0,0,0,0.4),
    0 4px 12px rgba(0,0,0,0.25);
  
  padding: 0;
  border-radius: 8px;
  color: #fff;
  max-height: 90vh;
  overflow: hidden;
}

.modal-panel h3,
.modal-panel .window-header {
  margin: 0;
  padding: 12px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.08) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px 8px 0 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.modal-panel .window-body {
  padding: 16px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.modal-small { width: min(540px, 92vw); }

/* small utility classes */
.file-card { display:flex;justify-content:space-between;align-items:center;padding:10px;border-radius:6px;background:rgba(255,255,255,0.06);border:1px solid rgba(0,0,0,0.06); }

/* Dashboard greeting */
.greeting {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  z-index: 10;
}

/* Dashboard grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Status indicator */
.status-ok {
  color: #33ff57;
  text-shadow: 0 0 4px rgba(51,255,87,0.5);
}

/* Footer hidden by default */
.footer { display:none; }

/* Modal overlay and form elements (moved from calendar.php inline styles) */
.modal-overlay[aria-hidden="false"] { display:flex; }
.modal-panel.modal-small { width: min(540px, 92vw); }
.modal-panel.modal-wide {
  width: min(1200px, 95vw);
  max-width: 1200px;
  display: flex;
  flex-direction: column;
}
/* Event-Modal: Inhalt scrollbar halten, damit Buttons immer erreichbar sind */
#event-modal .tab-pane {
  overflow-y: auto;
  max-height: calc(90vh - 115px); /* 90vh minus Titel-Zeile + Tab-Nav */
}
.modal-panel label {
  display: block;
  margin-bottom: 6px;
  margin-top: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Windows 7 style form inputs */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 10px;
  margin-top: 2px;
  border-radius: 3px;
  border: 1px solid rgba(120,120,120,0.6);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.95) 0%,
    rgba(250,250,250,0.95) 100%
  );
  color: #000;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
  box-shadow: 
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 0 0 1px rgba(255,255,255,0.3);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #3c7fb1;
  box-shadow: 
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 0 0 1px rgba(60,127,177,0.5),
    0 0 4px rgba(60,127,177,0.3);
}

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

.modal-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* small responsive tweak */
@media (max-width:480px) {
  .modal-panel { width:92%; }
}

/* end modal styles */

/* High-priority fixes: restore dashboard "eggshell" windows and enforce wallpaper/body when external rules override */
body {
  background-color: #071a2b !important;
  background-image: url('wallpaper.svg'), radial-gradient(ellipse at center, rgba(10,40,70,0.6), rgba(6,20,40,0.9)) !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
}

/* Index/dashboard windows should use the Windows 7 window appearance */
.dashboard-wrap .window {
  background: linear-gradient(
    180deg,
    rgba(250,250,250,0.98) 0%,
    rgba(242,242,242,0.98) 100%
  );
  backdrop-filter: blur(8px) saturate(105%);
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  border: 1px solid rgba(160,160,160,0.9);
  border-top-color: rgba(255,255,255,0.9);
  border-bottom-color: rgba(100,100,100,0.5);
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.5) inset,
    0 6px 24px rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.15);
  color: #000000;
  padding: 0;
}

.dashboard-wrap .window .title {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.95) 0%,
    rgba(235,235,235,0.95) 100%
  );
  border-bottom: 1px solid rgba(180,180,180,0.7);
  color: #000000;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.dashboard-wrap .window .body {
  padding: 14px;
  color: #000000;
  text-shadow: none;
}

/* Ensure calendar window keeps the Aero look while dashboard uses lighter theme */
.page-wrap .window {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.16) 100%
  );
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.5);
  border-top-color: rgba(255,255,255,0.6);
  border-bottom-color: rgba(255,255,255,0.3);
  box-shadow: 
    0 0 0 1px rgba(0,0,0,0.1) inset,
    0 8px 32px rgba(0,0,0,0.3),
    0 2px 8px rgba(0,0,0,0.2);
}

/* ── FullCalendar: Event-Schrift lesbarer ─────────────────────────── */
.fc .fc-daygrid-event { font-size: 13px; padding: 3px 6px; }
.fc .fc-event-title    { font-size: 13px; font-weight: 700; }
.fc .fc-toolbar-title  { font-size: 1.25rem; }
.fc .fc-col-header-cell-cushion { font-size: 14px; font-weight: 600; }
.fc .fc-daygrid-day-number      { font-size: 14px; }
.fc .fc-button                  { font-size: 14px; }
.fc .fc-list-event-title        { font-size: 15px; }
.fc .fc-list-day-text           { font-size: 15px; }

/* ── Dashboard Header: Desktop etwas größer ───────────────────────── */
.db-hero h1      { font-size: clamp(1.8rem, 3.5vw, 3rem); }
.db-hero .db-date { font-size: clamp(1rem, 1.8vw, 1.3rem); }
.db-stat-card    { font-size: 15px; }
.db-stat-value   { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }

/* ── Kalender-Legende ─────────────────────────────────────────────── */
.cal-legend { font-size: 15px !important; }

/* ══════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE  (≤ 768px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Seitenabstand verkleinern */
  .page-wrap      { padding: 68px 10px 16px; }
  .dashboard-wrap { padding: 68px 10px 16px; }

  /* Fenster-Kacheln stapeln */
  .grid { grid-template-columns: 1fr !important; }

  /* Modals: Vollbild auf Mobile */
  .modal-overlay { padding: 0 !important; align-items: flex-end; }
  .modal-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 92vh !important;
    overflow-y: auto;
  }
  .modal-panel.modal-wide { width: 100% !important; max-width: 100% !important; }

  /* Zweispaltige Formulare → einspaltig */
  .form-row { grid-template-columns: 1fr !important; }
  #event-modal .tab-pane-body.two-col { flex-direction: column !important; }

  /* Tab-Buttons im Modal kleiner */
  .tab-btn { font-size: 13px !important; padding: 8px 12px !important; }

  /* Karte im Tour-Modal auf Mobile verbergen */
  .col-map { display: none !important; }

  /* Kalender: toolbar vereinfachen */
  .fc .fc-header-toolbar { flex-wrap: wrap; gap: 4px; }
  .fc .fc-toolbar-title  { font-size: 1rem; }
  .fc .fc-button         { font-size: 13px; padding: 5px 8px; }
  .fc .fc-daygrid-event  { font-size: 11px; padding: 2px 4px; }

  /* Buttons auf Mobile etwas kleiner (touch-freundlich aber nicht riesig) */
  .btn { padding: 10px 16px; font-size: 15px; }

  /* Profile-Grid → einspaltig */
  .profile-grid { grid-template-columns: 1fr !important; }

  /* Rangliste Tabellen-Schrift + Scroll statt Overflow */
  /* FullCalendar-Tabellen vom block-Override ausnehmen */
  #calendar table  { display: table !important;          width: 100% !important; overflow: visible !important; }
  #calendar thead  { display: table-header-group !important; }
  #calendar tbody  { display: table-row-group !important; }
  #calendar tr     { display: table-row !important;      white-space: normal !important; }
  #calendar td,
  #calendar th     { display: table-cell !important;     white-space: normal !important; }
  table { font-size: 14px; display: block; overflow-x: auto; width: 100%; }
  th, td { padding: 6px 8px; white-space: nowrap; }

  /* Addr-Popup Breit */
  #addr-popup { width: 96vw !important; padding: 16px !important; }

  /* Event-Modal zwei-col Tab → Karte verstecken */
  #event-modal .col-map { display: none !important; }

  /* ── Dashboard: Abstände auf Mobile verkleinern ───────────────────── */
  .db-hero  { padding: 70px 16px 20px !important; }
  .db-stats { padding: 0 10px !important; gap: 8px !important; }
  .db-grid  { padding: 0 10px 80px !important; grid-template-columns: 1fr !important; }

  /* Stat-Karten auf Mobile: 2 pro Reihe */
  .db-stat-card { min-width: calc(50% - 4px) !important; flex-basis: calc(50% - 4px) !important; }
}

/* ── Sehr kleine Geräte (≤ 400px) ────────────────────────────────── */
@media (max-width: 400px) {
  html { font-size: 15px; }
  .fc .fc-daygrid-event { font-size: 10px; }
}

/* end of site.css */
