:root{
  --bg:#f1f5f9;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
}

*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}

.topbar{
  background:#fff;border-bottom:1px solid var(--border);
  display:flex;justify-content:space-between;gap:16px;
  padding:16px 18px;align-items:center;
}
.brand{display:flex;gap:12px;align-items:center}
.logo{
  width:44px;height:44px;border-radius:16px;background:#0f172a;color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:800;
}
.title{font-weight:700;font-size:18px;line-height:1.1}
.subtitle{font-size:12px;color:var(--muted)}
.clockbox{text-align:right}
.dateLine{font-size:12px;color:var(--muted)}
.clock{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:22px;font-weight:700}

.wrap{max-width:1100px;margin:0 auto;padding:18px}
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.tab{
  border:1px solid var(--border);background:#fff;border-radius:14px;
  padding:10px 12px;cursor:pointer;box-shadow:var(--shadow);
  font-weight:600;
}
.tab.active{border-color:#0f172a}
.panel{display:none;background:#fff;border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow)}
.panel.active{display:block}
.hint{margin-top:4px;color:var(--muted);font-size:13px}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:14px}
.card{
  border:1px solid var(--border);border-radius:16px;background:#f8fafc;
  padding:12px;transition:.15s;box-shadow:var(--shadow);
  display:flex;flex-direction:column;gap:6px;
}
.card:hover{background:#fff;transform:translateY(-1px)}
.card span{font-size:12px;color:var(--muted)}


.muted{opacity:.75}

.card.card-menu { position: relative; cursor: pointer; }

.card.card-menu .submenu{
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  padding: 8px;
  display: none;
  z-index: 100;
}

.card.card-menu.open .submenu{ display: block; }

.card.card-menu .submenu a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
}

.card.card-menu .submenu a:hover{
  background: #f3f6fb;
}

.card.card-menu {
  position: relative;
  cursor: pointer;
}

/* Pfeil rechts oben */
.card.card-menu .chevron {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 14px;
  opacity: .6;
  transition: transform .2s ease, opacity .2s ease;
}

.card.card-menu.open .chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Submenu: nur über .open sichtbar (kein Hover!) */
.card.card-menu .submenu{
  position: absolute;
  left: 14px;
  right: 14px;
  top: 100%;
  margin-top: 8px;

  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  padding: 8px;

  display: none;
  z-index: 100;
}

.card.card-menu.open .submenu{
  display: block;
}

.card.card-menu .submenu a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
}

.card.card-menu .submenu a:hover{
  background: #f3f6fb;
}

.card.card-menu.open {
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}

.card.card-menu .submenu {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
}

.card.card-menu.open .submenu {
  opacity: 1;
  transform: translateY(0);
}
/* --- Form Layout Helpers (Telefonische Anfrage etc.) --- */
.form-card {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  max-width: 980px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  align-items: end;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Responsive: auf schmalen Screens 1 Spalte */
@media (max-width: 820px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.form-card {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  max-width: 980px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  align-items: end;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .form-grid { grid-template-columns: 1fr; }
}
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
select {
  min-height: 42px;
  width: 100%;
}
label select {
  display: block;
}
/* --- Fix: Kacheln auf gleiche Höhe + Inhalt gleich ausrichten --- */
.cards, .tiles, .grid, .card-grid {
  align-items: stretch;
}

.card, .tile, .panel-card {
  display: flex;
  flex-direction: column;
}

.card > *:last-child,
.tile > *:last-child,
.panel-card > *:last-child {
  margin-top: auto;
}

/* Optional: Standard-Absätze in Cards beruhigen (p hat oft fette margins) */
.card p, .tile p, .panel-card p {
  margin: 6px 0;
}
/* Kachel-Titel einheitlich: egal ob h2/h3/h4 verwendet wurde */
.card h1, .card h2, .card h3, .card h4,
.tile h1, .tile h2, .tile h3, .tile h4 {
  font-size: inherit;
  margin: 0;
  font-weight: 700;
}

.fg-footer {
  margin-top: 28px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(90deg, #2d6cdf 0%, #b91c1c 100%);
  color: #fff;
}

.fg-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 14px;
  align-items: start;
}

.fg-footer-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.fg-footer-links a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 6px;
  opacity: .95;
}

.fg-footer-links a:hover {
  text-decoration: underline;
  opacity: 1;
}

.fg-footer-text a {
  color: #fff;
  text-decoration: underline;
}

.fg-footer-right {
  text-align: right;
}

.fg-footer-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-weight: 600;
  margin-bottom: 10px;
}

.fg-footer-mini {
  opacity: .9;
  font-size: 12px;
}

.topbar::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #2d6cdf 0%, #b91c1c 100%);
}
html, body {
  height: 100%;
}

body {
   min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* <- HIER */
}


.fg-footer-inner { padding: 12px 16px; }
.fg-footer-title { margin-bottom: 6px; }

main { flex: 1 0 auto; }

html, body { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.wrap {
  width: 100%;
}
/* Sticky Footer robust */


main { flex: 1 0 auto; }
main.wrap { width: 100%; }

.logo img {
  height: 42px;
  width: auto;
  display: block;
}
.logo.logo--img{
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.logo.logo--img img{
  height: 44px;
  width: auto;
  display: block;
}
/* --- Logo als Bild (nicht im Kreis abschneiden) --- */
.logo.logo--img{
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
}

.logo.logo--img img{
  height: 32px !important;
  width: auto !important;
  display: block !important;
}
.logo.logo--img{
  background: #fff !important;
  padding: 6px 10px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,.06) !important;
}
.logo.logo--img img{
  height: 28px !important;
}
.title{
  font-size: 18px;
}
.footer{
  margin-top: 40px;
  padding: 20px 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  background: transparent;
}
.footer{
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 40px;
}
/* Grid stabil: alle Kacheln gleich breit */
.grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Alle direkten Kinder im Grid sollen "normal" sein */
.grid > *{
  min-width: 0;
}

/* Links im Grid nicht "inline" behandeln */

.card{
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}
.card span{
  margin-top: 6px;
}

.card-title svg.icon{
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 auto !important;
  display: block;
}

/* Icons: sowohl <img class="icon"> als auch inline <svg class="icon"> */
.icon{
  width:22px;
  height:22px;
  display:block;
}

/* Inline-SVG: gewinnt gegen globale svg-Regeln */
svg.icon{
  width:22px !important;
  height:22px !important;
  flex:0 0 auto;
}
.icon{
  width:20px;
  height:20px;
  opacity:.8;
  stroke:#334155;
}
.tab{
  display:flex;
  align-items:center;
  gap:6px;
}

.tab-icon{
  width:16px;
  height:16px;
  opacity:.8;
}

.tab.active .tab-icon{
  stroke:#b88c00;
  opacity:1;
}

.tab-icon{
  width:14px;
  height:14px;
  opacity:.8;
  filter: sepia(1) saturate(6) hue-rotate(10deg);
}


.tab.active .tab-icon{
  opacity:.9;
}
.db-indicator {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
}

.dot{
  display:inline-block;   /* <-- DAS ist der Gamechanger */
  width:10px;
  height:10px;
  border-radius:50%;
  vertical-align:middle;
}

.dot.online{ background:#22c55e; }
.dot.offline{ background:#ef4444; }

.db-indicator .dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ef4444; /* nur Test, damit WIRKLICH was sichtbar ist */
}
.db-indicator .dot{
  display:inline-block;
  width:15px;
  height:15px;
  border-radius:50%;
  vertical-align:middle;
}

.db-indicator .dot.online{ background:#22c55e; }
.db-indicator .dot.offline{ background:#ef4444; }

.layout{
  display:flex;
  gap:16px;
  padding:16px;
}

.sidebar{
  width:220px;
  flex:0 0 220px;
}

.content{
  flex:1;
  min-width:0;
}

.userbox{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:12px 14px;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  position:sticky;
  top:16px;
}

.user-name{ font-weight:600; }
.user-level{ font-size:13px; color:#64748b; margin-top:6px; }

.user-name{
  font-weight:600;
  margin-bottom:6px;
}

.user-level{
  font-size:13px;
  color:#64748b;
  margin-bottom:8px;
}
body.konfig {
  background-color: #fff6f6;
}

body.konfig h1 {
  color: #c40000;
}

.card {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 1000px;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.form-row label {
  font-weight: 600;
  margin-bottom: 5px;
}

.form-row input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.success {
  background: #e6f7ea;
  border: 1px solid #a4d7b0;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.error {
  background: #fdecea;
  border: 1px solid #e4a1a1;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.btn {
  background: #0d6efd;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #0b5ed7;
}
.card h2 {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}
/* ===== Mail-Module scoped ===== */
.mail-page .card {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
}

.mail-page .card h2 {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.mail-page .form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.mail-page .form-row label {
  font-weight: 600;
  margin-bottom: 5px;
}

.mail-page .form-row input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.mail-page .form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.mail-page .success {
  background: #e6f7ea;
  border: 1px solid #a4d7b0;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.mail-page .error {
  background: #fdecea;
  border: 1px solid #e4a1a1;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.form-grid{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 12px 16px;
  align-items:center;
}

.form-grid input,
.form-grid select{
  height: 38px;
}
.fullrow{ grid-column: 1 / -1; }
.subgrid-5{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr 1.6fr;
  gap:10px;
}
.subgrid-5 label{ font-size:12px; color:#334155; }
.subgrid-5 input{ width:100%; }

.subgrid-5{
  margin-top:12px;
  display:grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr 1.6fr;
  gap:10px;
}
.subgrid-5 label{ font-size:12px; color:#334155; }
.subgrid-5 input{ width:100%; }

.side-tool-link{
  display:block;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  text-decoration:none;
  font-weight:600;
  color:#0f172a;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}

.side-tool-link:hover{
  background:#f8fafc;
}

.sidebar-link {
  display:block;
  margin-top:12px;
  padding:8px 10px;
  border-radius:8px;
  background:#f1f5f9;
  text-decoration:none;
  color:#0f172a;
  font-weight:500;
}

.sidebar-link:hover {
  background:#e2e8f0;
}
.sidebar .divider{
  height:1px;
  background:#e5e7eb;
  margin:12px 0;
}
.sidebar a[href*="urlaub"]{
  display:block;
  padding:8px 10px;
  border-radius:8px;
  background:#f1f5f9;
  font-weight:600;
  text-decoration:none;
}

.sidebar a[href*="urlaub"]:hover{
  background:#e2e8f0;
}
.btn{
  background: #ffffff;
  color: #0f172a;          /* dunkler Text */
  border: 1px solid #94a3b8; /* dunklere Border */
  opacity: 1;              /* falls irgendwo opacity greift */
  font-weight: 600;        /* besser lesbar */
}
.btn:hover{
  border-color:#0f172a;
}