/* ===== Global Sans (Apple-ähnlich) ===== */
:root{
  --gth-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
              "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
              sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

html{
  font-family: var(--gth-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums; /* schöner in Tabellen/Zahlenkolonnen */
}

body, input, button, select, textarea,
.et_pb_module, .et_pb_text, .et_pb_blurb, .et_pb_toggle {
  font-family: var(--gth-sans) !important;
}


/* Small Buttons global */
.gth-btn-small{
  color:#fff !important;
}

/* ===== GTH Menu Icons (Divi robust) ===== */
@media (min-width: 981px){

  /* Divi Menu Wrapper auf volle Breite ziehen */
  .et_pb_menu .et_pb_menu_inner_container{
    display:flex !important;
    align-items:center !important;
    padding-right:0 !important;
  }

  /* Divi Wrappers müssen “mitwachsen” */
  .et_pb_menu .et_pb_menu__wrap{
    flex:1 !important;
    display:flex !important;
    justify-content:flex-end !important;
  }

  .et_pb_menu .et_pb_menu__menu{
    flex:1 !important;
  }

  .et_pb_menu .et-menu-nav{
    flex:1 !important;
    width:100% !important;
  }

  /* Top-Level Menü als Flex + volle Breite */
  .et_pb_menu .et-menu-nav > ul.et-menu,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main{
    display:flex !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
    width:100% !important;
  }

  /* Submenus wieder normal */
  .et_pb_menu .et-menu-nav ul.sub-menu{
    display:block !important;
  }

  /* Icons ganz nach rechts schieben (Stats startet die Icon-Gruppe) */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-stats,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-stats{
    margin-left:auto !important;
  }

  /* Abstand zwischen Icons */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox{
    margin-left:4px !important;
  }

  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-logout,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-logout{
    margin-left:4px !important; /* kleiner = enger */
  }

  /* Icon-Links kompakter + Text weg */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-stats > a,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-logout > a,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-stats > a,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-logout > a{
    position:relative;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding-left:8px !important;
    padding-right:8px !important;
    color:transparent !important;
    font-size:0 !important;
    line-height:0 !important;
  }

  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-stats > a span,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a span,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-logout > a span,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-stats > a span,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a span,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-logout > a span{
    display:none !important;
  }

  /* Icon Basis */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-stats > a:before,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a:before,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-logout > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-stats > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-logout > a:before{
    font-family:"Font Awesome 6 Free";
    font-weight:900;
    font-size:18px;
    line-height:1;
    color:#111827;
    display:inline-block;
  }

  /* Stats: Chart */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-stats > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-stats > a:before{
    content:"\f201"; /* fa-chart-bar */
  }

  /* Inbox: Headset */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a:before{
    content:"\f590"; /* fa-headset */
  }

  /* Logout */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-logout > a:before,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-logout > a:before{
    content:"\f2f5"; /* fa-right-from-bracket */
  }
}


/* ===== GTH Inbox Badge (Variante 1: offene Anrufe) ===== */
@media (min-width: 981px){

  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a{
    position:relative !important;
  }

  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a::after{
    content: attr(data-gth-count);
    position:absolute;
    top:-1px;
    right:-4px;

    min-width:10px;
    height:10px;
    padding:0 3px;

    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;

    font-size:9px;
    font-weight:700;
    line-height:1;

    background:#e11d48;
    color:#fff;

    border:2px solid #fff;
    box-shadow:0 4px 10px rgba(0,0,0,.12);
  }

  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a[data-gth-count="0"]::after{
    display:none;
  }
}


/* ===== GTH Menu Tooltips (einmalig, sauber) ===== */
@media (min-width: 981px){

  /* Tooltip läuft über das LI, nicht über das A (weil Inbox A::after = Badge) */
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-stats,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-logout{
    position:relative !important;
  }

  .et_pb_menu .et-menu-nav > ul > li.gth-nav-stats::after,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox::after,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-logout::after{
    position:absolute;
    top: calc(100% + 10px);
    right: 0;

    opacity: 0;
    transform: translateY(6px);
    pointer-events:none;

    padding:8px 10px;
    border-radius:10px;
    background:#111827;
    color:#fff;
    font-size:12px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;

    box-shadow:0 10px 22px rgba(0,0,0,.18);
    transition: all .15s ease;
    z-index: 9999;
  }

  .et_pb_menu .et-menu-nav > ul > li.gth-nav-stats:hover::after,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox:hover::after,
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-logout:hover::after{
    opacity:1;
    transform: translateY(0);
  }

  /* Tooltip texts */
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-stats::after{ content:"Analytics"; }
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox::after{ content:"Inbox"; }
  .et_pb_menu .et-menu-nav > ul > li.gth-nav-logout::after{ content:"Logout"; }
}


/* ===== FIX: kein horizontaler Scroll durch Menü ===== */
@media (min-width: 981px){

  /* 100% + padding darf nicht überlaufen */
  .et_pb_menu .et_pb_menu_inner_container{
    box-sizing:border-box !important;
    width:auto !important;          /* statt width:100% */
    max-width:100% !important;
  }

  /* Sicherheit: nichts darf über die Viewport-Breite drücken */
  .et_pb_menu .et-menu-nav,
  .et_pb_menu .et-menu-nav > ul{
    max-width:100% !important;
  }
}


/* Dezenter Hinweis unter Feldern (z. B. "Mehrfachauswahl möglich.") */
.gth-ma-field small,
.gth-ma-field-full small {
  display: block;
  margin-top: 6px;
  font-size: 12px;      /* minimal kleiner */
  color: #6b7280;       /* leichtes Grau (slate-500) */
  line-height: 1.25;
}

/* Headings – dezente Apple-Optik */
h1,h2,h3,h4,h5,h6{
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

/* Optional: etwas feinere Fließtexte */
p, li { letter-spacing: -0.005em; }


/* Box allgemein */
.gth-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


/* Headline */
.gth-headline {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

/* Text wenn leer */
.gth-empty {
    text-align: center;
    opacity: 0.6;
    margin: 20px 0;
}

/* Auftrag Karte kompakt */
.gth-auftrag-card {
  border: 0px solid #eee;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #fff;
}

/* Dünner Divider zwischen Karten – erscheint nur, wenn es >1 Karte gibt */
.gth-auftrag-card + .gth-auftrag-card {
  border-top: 1px solid #eee; /* die Linie */
  margin-top: 8px;
  padding-top: 8px;
}

/* Linke Seite: Auftrag Infos */
.gth-auftrag-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2c3e50;
}

/* Auftrag Titel */
.gth-auftrag-title {
  font-weight: 600;
  font-size: 14px;
}


/* Auftrag Header */
.gth-auftrag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.gth-auftrag-id {
    font-weight: bold;
    font-size: 15px;
    color: #2c3e50;
}

/* Header-Zeile */
.gth-auftrag-headerline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.gth-auftrag-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* Auftrag Details */
.gth-auftrag-details {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #444;
  flex-wrap: wrap;
}

/* engerer Abstand zwischen Zeile 1 und 2 */
.gth-auftrag-card .gth-auftrag-headerline{
  margin-bottom: 4px;   /* vorher vermutlich ~12–16px */
}

.gth-auftrag-card .gth-auftrag-details{
  margin-top: 0;
  gap: 12px;            /* war 20px */
  line-height: 1.25;    /* etwas dichter */
}

/* Titel & Badges etwas dichter führen */
.gth-auftrag-title{ line-height: 1.2; }

.gth-auftrag-details span{
  display: inline-flex;
  align-items: center;
  gap: 6px;             /* Icon–Text Abstand */
}

.gth-auftrag-details i{
  line-height: 0;       /* verhindert zusätzliches Zeilen-Spacing durch Icons */
}


/* Rechte Seite: Aktionen */
.gth-auftrag-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* Datum */
.gth-auftrag-date {
  font-size: 13px;
  color: #555;
}


.gth-btn-icon {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.gth-btn-icon:hover {
    background: #eee;
}

/* Initialen */
.gth-initials {
  background: #4288c9;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  padding: 4px 8px;
}

.gth-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-weight:600;
  font-size:12px;
  line-height:1;
}

/* Farbvarianten – bereits vorhanden laut dir */
.gth-badge.success{background:#e8f8f1;color:#146c43}  /* abgeschlossen */
.gth-badge.warning{background:#fff4e5;color:#7a3e00}  /* offen */
.gth-badge.info{background:#e6f2fb;color:#0b4f8a}     /* geplant */
.gth-badge.geplant  { background: #3498db; }
.gth-badge.offen    { background: #EE7621; }
.gth-badge.erledigt { background: #b3ee3a; }



.gth-team{display:inline-flex;align-items:center;gap:6px}
.gth-chip{display:inline-flex;align-items:center;justify-content:center;height:28px;min-width:28px;padding:0 6px;border-radius:9999px;background:#e8eef7;color:#1f3b63;font-weight:600;font-size:11px}
.gth-chip+.gth-chip{margin-left:4px}
.gth-chip--more{background:#eef0f3;color:#4b5563}

/* ===== /admin — scoped utilities (berühren nichts außerhalb) ===== */
.gth-admin .gth-row{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}
.gth-admin .gth-col-12{grid-column:span 12}
.gth-admin .gth-col-6{grid-column:span 6}
@media (max-width: 900px){ .gth-admin .gth-col-6{grid-column:span 12} }

.gth-input-ma {
  width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; font-size:18px;
  background:#fff; outline:none;
}

.gth-admin .gth-input, .gth-admin .gth-select, .gth-admin .gth-textarea{
  width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; font-size:14px;
  background:#fff; outline:none;
}
.gth-admin .gth-input:focus, .gth-admin .gth-select:focus, .gth-admin .gth-textarea:focus{
  border-color:#c7d2fe; box-shadow:0 0 0 3px rgba(66,136,201,.15)
}

.gth-admin .gth-btn{
  display:inline-block; background:#4288c9; color:#fff; padding:10px 14px; border-radius:10px;
  text-decoration:none; border:0; cursor:pointer; font-weight:600; font-size:14px;
}
.gth-admin .gth-btn:hover{ filter:brightness(.95) }
.gth-admin .gth-btn--ghost{ background:#eef5fb; color:#1f3b63 }

.gth-admin .gth-table{ width:100%; border-collapse:collapse }
.gth-admin .gth-table th,.gth-admin .gth-table td{ padding:10px; border-bottom:1px solid #eee; font-size:14px }


/* Global GTH Button – weiße Schrift in allen Zuständen */
.gth-btn,
.gth-btn:link,
.gth-btn:visited {
  background:#4288c9;
  color:#fff !important;          /* immer weiß */
  display:inline-block;
  padding:10px 14px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  font-weight:400;
  font-size:14px;
  text-decoration:none;
}

.gth-btn:hover,
.gth-btn:focus {
  color:#fff !important;          /* Hover/Focus bleibt weiß */
  filter:brightness(.95);
  outline:none;
  box-shadow:0 0 0 3px rgba(66,136,201,.25); /* keyboard focus sichtbar */
}

.gth-btn:disabled,
.gth-btn[disabled] {
  opacity:.6;
  cursor:not-allowed;
}

/* Falls Buttons Icons enthalten */
.gth-btn svg { fill:#fff; stroke:#fff; }


/* ===== Kundenverwaltung (global, safe) ===== */
.gth-tabs-wrapper { padding:0; margin-bottom:-1px; }
.gth-tabs { display:flex; gap:6px; margin-bottom:-1px; }
.gth-tab { background:#fff; border:1px solid #ccc; border-bottom:none;
  border-top-left-radius:10px; border-top-right-radius:10px;
  padding:10px 20px; cursor:pointer; font-weight:500; color:#555; transition:background .2s; }
.gth-tab.active { font-weight:600; color:#4288c9; }
.gth-tab.disabled { opacity:.5; pointer-events:none; cursor:not-allowed; }

.gth-tab-content-wrapper { position:relative; z-index:1; }
.gth-tab-content { background:#fff; padding:30px; border:1px solid #ccc;
  border-radius:0 0 10px 10px; margin-top:0; display:none; }
.gth-tab-content.active { display:block; }

.gth-shadow { box-shadow:0 0 10px rgba(0,0,0,.05); }
.gth-heading { font-size:16px; font-weight:600; margin:0 0 12px; }

.gth-ma-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width: 900px){ .gth-ma-grid { grid-template-columns:1fr; } }
.gth-ma-field { display:flex; flex-direction:column; }
.gth-ma-field input, .gth-ma-field select, .gth-ma-field textarea {
  width:100%; padding:10px 12px; border:1px solid #ccc; border-radius:8px; font-size:14px; background:#fff;
}
.gth-ma-field input:focus, .gth-ma-field select:focus, .gth-ma-field textarea:focus {
  border-color:#4288c9; outline:none;
}

.gth-ma-field-small { display:flex; align-items:center; gap:10px; margin:0 10px 20px 0; width:auto; }
.gth-ma-field-small label { font-weight:600; white-space:nowrap; }
.gth-ma-field-small input, .gth-ma-field-small select {
  width:90px; padding:4px 8px; border:1px solid #ccc; border-radius:6px; font-size:14px; background:#fff;
}

.gth-input { width:100%; padding:10px 12px; border:1px solid #ccc; border-radius:8px; font-size:14px; background:#fff; }
.gth-input:focus { border-color:#4288c9; outline:none; }

.gth-table { width:100%; border-collapse:collapse; }
.gth-table th, .gth-table td { padding:10px; border-bottom:1px solid #ddd; }
.gth-table th { background:#f4f4f4; text-align:left; }

.gth-hr { grid-column:1 / -1; border-top:1px solid #ccc; margin:20px 0; } /* Utility statt inline-hr */

/* Tabs & Kundenverwaltung – falls noch nicht drin */
.gth-tab-content-wrapper { position:relative; z-index:1; }
.gth-tab-content { background:#fff; padding:30px; border:1px solid #ccc; border-radius:0 0 10px 10px; }

/* Nur in der Tab-Box die obere linke Ecke „abflachen“ (ersetzt dein inline !important) */
.gth-tab-content-wrapper.gth-box { border-top-left-radius: 0; }


/* ===== Admin: Module & Lizenzen ===== */
.gth-grid { display: grid; gap: 24px; }
@media (min-width: 900px){ .gth-grid-2 { grid-template-columns: 1fr 1fr; } }

.gth-subtitle { font-weight: 600; margin: 4px 0 10px; color: #1f2937; }

.gth-table.gth-compact th, .gth-table.gth-compact td { padding: 8px 10px; }
.gth-table--stripe tbody tr:nth-child(odd) { background: #fafafa; }

.gth-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px; }

.gth-badge { display:inline-block; padding: 3px 10px; border-radius: 999px;
  font-weight: 600; font-size: 12px; line-height: 1; }
.gth-badge--core { background:#e8f2ff; color:#1f3b63; }
.gth-badge--addon { background:#f5f7f9; color:#374151; }

.gth-select-inline { display:flex; align-items:center; gap:10px; margin: 0 0 8px; }
.gth-inline-form { display:inline-flex; align-items:center; gap:8px; }
.gth-inline-form .gth-input { max-width: 280px; }


/* optional helpers */
.gth-table.gth-compact th, .gth-table.gth-compact td { padding: 8px 10px; }
.gth-table--stripe tbody tr:nth-child(odd){ background:#fafafa; }

.gth-as-title i { color:#666; }
  .gth-chip i { margin-right:6px; color:#666; }
  .gth-iconbtn i { font-size:16px; line-height:1; }

.gth-photo-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:12px;
}
.gth-photo-grid .gth-photo a{
  display:block; overflow:hidden; border-radius:10px; background:#f5f5f7;
}
.gth-photo-grid img{
  width:100%; height:160px; object-fit:cover; display:block;
}
.gth-photo-grid figcaption{
  font-size:12px; color:#555; margin-top:6px;
}


/* Briefkopf */
.gth-as-kopf .gth-as-kopf-grid{display:flex;gap:40px;justify-content:space-between;flex-wrap:wrap;align-items:flex-start}
.gth-as-addr{min-width:260px}
.gth-as-label{font-size:12px;color:#777;margin-bottom:6px;text-transform:uppercase;letter-spacing:.02em}
.gth-as-lines div{line-height:1.45}
.gth-as-meta{min-width:280px}
.gth-as-title{font-weight:700;font-size:18px;margin-bottom:8px}
.gth-kv{display:grid;grid-template-columns:auto 1fr;gap:6px 18px}
.gth-kv dt{color:#666;font-weight:600}
.gth-kv dd{margin:0}

/* Unterschriften + Buttons */
.gth-sig-row{display:flex;gap:40px;flex-wrap:wrap}
.gth-sig{max-width:420px;height:auto;border:1px dashed #ccc;background:#fafafa;border-radius:10px;padding:6px}
.gth-sig-label{font-size:12px;color:#666;margin-bottom:6px}
.gth-as-actions{text-align:right;margin-top:8px}

/* Fotos in AS */
.gth-as-photos { display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }
.gth-as-photo { margin:0; }
.gth-as-photo a { display:inline-block; line-height:0; }
.gth-as-photo img { max-width:220px !important; height:auto; border-radius:10px; display:block; }
.gth-as-photo figcaption { font-size:12px; color:#666; margin-top:6px; }


/* ===== GTH Edit-Form Layout ===== */
.gth-card { background:#fff; border-radius:12px; box-shadow:0 0 12px rgba(0,0,0,.05); padding:24px; }

/* Grids */
.gth-grid-2 { display:grid; gap:18px; }
.gth-grid-3 { display:grid; gap:18px; }
@media (min-width: 960px){
  .gth-grid-2 { grid-template-columns: 1fr 1fr; }
  .gth-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .gth-col-span-2 { grid-column: span 2; }
}

/* Felder & Labels */
.gth-field, .gth-ma-field, .gth-ma-field-full { display:flex; flex-direction:column; gap:6px; }
.gth-field label, .gth-ma-field label { font-size:13px; font-weight:600; color:#3b3b3b; }
.gth-input, .gth-ma-field input[type="text"], .gth-ma-field input[type="number"],
.gth-ma-field input[type="date"], .gth-ma-field select, .ts-wrapper.gth-input {
  border:1px solid #d7dbe2; border-radius:10px; padding:10px 12px; font-size:14px; height:42px;
}
.gth-ma-field textarea { border:1px solid #d7dbe2; border-radius:10px; padding:12px; font-size:14px; }
.gth-ma-field small { color:#6b7280; }

/* TomSelect an GTH angleichen */
.ts-wrapper.gth-input { padding:0; }
.ts-wrapper.gth-input .ts-control { border:0; background:transparent; padding:0; min-height:40px; }
.ts-wrapper.gth-input .ts-control input { font-size:14px; }

/* Abschnittsüberschriften + Trennlinien */
.gth-section-title { font-size:18px; font-weight:700; margin:14px 0 8px; }
.gth-hr { height:1px; background:#eef1f5; margin:16px 0; }

/* Sticky Actionbar unten */
.gth-sticky-actions {
  position:sticky; bottom:0; z-index:5; background:#f7f8fa;
  margin-top:18px; padding:12px; border-radius:12px; display:flex; gap:10px; justify-content:flex-end;
  border:1px solid #e8ecf2;
}

/* Buttons konsistent */
.gth-btn { border-radius:10px; padding:10px 16px; font-size:14px; }
.gth-btn.secondary { background:#8a8f98 !important; color:#fff !important; }

/* Kleinere Optik-Details */
input[type="checkbox"] { transform: translateY(1px); }
.gth-menge-klein input { max-width:160px; }

/* Checkbox + Text dicht nebeneinander, ohne "space-between" */
.gth-ma-field label.gth-inline-check,
label.gth-inline-check {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px !important;        /* Abstand zwischen Häkchen und Text */
  width: auto !important;      /* nicht auf 100% ziehen */
  min-width: 0;
}
.gth-inline-check input[type="checkbox"] { margin: 0; }


/* Status-Zeile neben dem Dropdown */
.gth-status-row {
  display: flex;
  align-items: center;
  gap: 10px;              /* Abstand Select ↔ Badge */
}

.gth-status-row .gth-badge {
  margin: 0;
  font-weight: 600;
}

/* Header-Zeile der Card */
.gth-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

/* Rechts: Status-Steuerung */
.gth-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.gth-header-label{
  font-weight:600;
  color:#666;
  margin-right:2px;
}
.gth-card-header .gth-badge{ margin:0; font-weight:600; }

@media (max-width: 720px){
  .gth-header-actions{ width:100%; justify-content:flex-start; }
}/* Header-Zeile der Card */
.gth-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

/* Rechts: Status-Steuerung */
.gth-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.gth-header-label{
  font-weight:600;
  color:#666;
  margin-right:2px;
}
.gth-card-header .gth-badge{ margin:0; font-weight:600; }

@media (max-width: 720px){
  .gth-header-actions{ width:100%; justify-content:flex-start; }
}

.gth-status-bar{
  display:flex;
  align-items:center;
  justify-content:flex-start; /* ← wieder linksbündig */
  gap:12px;
  margin:6px 0 12px;
}

.gth-status-label{
  font-weight:700;
  color:#555;
}

.gth-status-select{ min-width:190px; }

/* AS-spezifische Badges */
.gth-badge-as{
  display:inline-flex; align-items:center;  gap:6px;
  padding:4px 10px; font-size:14px; font-weight:600;
  border-radius:999px; border:1px solid transparent; line-height:1.2;
  width: 100%;
}
.gth-badge-as.success{ background:#e8f8f1; color:#146c43; border-color:#b7e4d0; }
.gth-badge-as.warning{ background:#fff4e5; color:#7a3e00; border-color:#ffd9b5; }
.gth-badge-as.info   { background:#e6f2fb; color:#0b4f8a; border-color:#c7e0fb; }

@media (max-width:720px){
  .gth-status-bar{ flex-wrap:wrap; }
}

  /* kurzer Erfolgs-Hinweis (Toast) nahe der Adress-Grid */
  .gth-toast {
    position: absolute;
    right: 8px;
    top: -8px;
    transform: translateY(-100%);
    background: #e8f8f1;      /* wie .gth-badge.success */
    color: #146c43;
    border: 1px solid #b7ead5;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 5;
  }
  .gth-toast.show {
    opacity: 1;
    transform: translateY(-120%);
  }

  /* kurzer Flash auf den Inputs */
  .gth-input-flash { animation: gthInputFlash 1200ms ease-out; }
  @keyframes gthInputFlash {
    0%   { background:#e8f8f1; box-shadow: 0 0 0 0 rgba(20,108,67,.35); }
    100% { background:inherit; box-shadow:none; }
  }

  /* Readonly-Optik, falls nicht schon global vorhanden */
  .gth-input-readonly { background:#f8fafc; color:#555; }

/* 1) Äußeren Rahmen des TomSelect-Wrappers deaktivieren */
.gth-ma-field .ts-wrapper.single{
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  padding: 0;             /* verhindert den „zweiten“ versetzten Radius */
}

/* Manche Themes setzen Fokus-Shadow auf den Wrapper */
.gth-ma-field .ts-wrapper.single.focus,
.gth-ma-field .ts-wrapper.single.has-focus{
  box-shadow: none !important;
}

/* 2) Rahmen nur auf dem inneren Control zeichnen (unser GTH-Input-Stil) */
.gth-ma-field .ts-wrapper.single .ts-control{
  display: flex;
  align-items: center;
  height: 44px;          /* gleiche Höhe wie .gth-input */
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  box-sizing: border-box;
}

/* 3) Fokus wie bei euren Inputs */
.gth-ma-field .ts-wrapper.single .ts-control:focus,
.gth-ma-field .ts-wrapper.single .ts-control.focus{
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}

/* 4) Innenleben kompakter halten (verhindert zusätzliche Höhe) */
.gth-ma-field .ts-wrapper.single .ts-control .item{ margin:0; padding:0; line-height:1.2; }
.gth-ma-field .ts-wrapper.single .ts-control > input{ height:0 !important; padding:0; margin:0; line-height:1; }


/* Grid für Leistungsdaten */
.gth-form-rows .gth-row{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
  margin-top:12px;
}
.gth-field label{
  display:block;
  font-weight:600;
  color:#3b3f46;
  margin:2px 0 6px;
}

/* Input + Einheiten-Badge bündig nebeneinander */
.gth-input-append{
  display:flex;
  align-items:center;
  gap:8px;
}
.gth-chip.gth-unit{
  line-height:1;
  padding:6px 10px;
  border-radius:10px;
}

/* Responsiv: 2 Spalten / 1 Spalte */
@media (max-width:1100px){
  .gth-form-rows .gth-row{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:680px){
  .gth-form-rows .gth-row{ grid-template-columns:1fr; }
}

/* (Optional) Zahlen-Spinners dezent */
.gth-input[type="number"]{
  -moz-appearance: textfield;
}
.gth-input[type="number"]::-webkit-outer-spin-button,
.gth-input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none; margin:0;
}



/* TomSelect: gleiche Höhe/Look wie gth-Inputs */
.ts-wrapper.gth-input-ma .ts-control {
  min-height: 42px;                     /* matcht deine Input-Höhe */
  border-radius: 10px;
  border: 1px solid var(--gth-input-border, #e2e8f0);
  padding: 6px 10px;
}

/* iOS: mind. 16px gegen Focus-Zoom */
.ts-wrapper.gth-input-ma .ts-control,
.ts-wrapper.gth-input-ma .ts-control input,
.ts-wrapper.gth-input-ma .ts-dropdown,
.ts-wrapper.gth-input-ma .ts-dropdown .option {
  font-size: 16px;
  line-height: 1.3;
}

/* Ausgewählte Tags (Items) als Chips */
.ts-wrapper.gth-input-ma .ts-control .item {
  border-radius: 999px;
  padding: 4px 8px;
  margin: 2px;
  background: #f1f5f9;                  /* dezent */
}

/* Entfernen-Icon etwas leichter klickbar */
.ts-wrapper.gth-input-ma .ts-control .remove {
  margin-left: 6px;
}

/* Dropdown: genug Platz, flüssiges Scrollen, über allen Overlays */
.ts-wrapper.gth-input-ma .ts-dropdown {
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 9999;
}

/* Option-Größe für Finger */
.ts-wrapper.gth-input-ma .ts-dropdown .option {
  padding: 10px 12px;
}

/* Fokus / Hover */
.ts-wrapper.gth-input-ma .ts-dropdown .option.active {
  background: #eef2ff;
}


/* Kopf der Positionskarte */
.gth-pos-head{display:flex;gap:16px;align-items:flex-end}
.gth-pos-title{flex:1}
.gth-btn-ghost.gth-pos-delete{
  background:transparent;border:1px solid #f3d1cf;color:#b42318;
  padding:8px 12px;border-radius:10px;line-height:1;cursor:pointer
}
.gth-pos-card.is-deleted{opacity:.55;filter:grayscale(.15)}

/* Foto-Gitter */
.gth-photo-grid{
  display:grid;gap:12px;margin-top:12px;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr))
}
.gth-photo{position:relative;background:#fafbfe;border:1px solid #e5e7eb;border-radius:12px;padding:8px}
.gth-photo img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;display:block}
.gth-photo-existing.to-delete{opacity:.5;filter:grayscale(.35);border-color:#f3d1cf}



/* Delete-Button als Overlay RECHTS OBEN */
.gth-photo-delbtn{
  position: absolute;       /* <— entscheidend */
  top: 10px;
  right: 10px;              /* rechts statt links */
  left: auto !important;    /* überschreibt evtl. alte left-Werte */
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  line-height: 1;

  border-radius: 999px;
  border: 1px solid #f3d1cf;
  background: #fff;
  color: #b42318;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  cursor: pointer;
}

/* optional: Hover-Effekt */
.gth-photo-delbtn:hover{
  background: #fff5f5;
  border-color: #f1c2bf;
}

/* 2) Mehr Luft links bei der Bildbeschreibung */
.gth-photo figcaption{ margin-top:8px; }
.gth-photo figcaption .gth-input{
  padding-left:10px;          /* weiter weg vom linken Rand */
  padding-right:14px;
  font-size:16px;
}

/* Dropzone für neue Bilder */
.gth-drop{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;margin-top:6px;padding:18px;border:1px dashed #d7dde7;border-radius:12px;cursor:pointer
}
.gth-drop input[type=file]{display:none}
.gth-drop-cta{font-weight:600}
.gth-drop small{color:#6b7280}

/* Previews neuer Uploads */
.gth-new-previews{
  display:grid;gap:12px;margin-top:10px;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr))
}
.gth-photo-preview{background:#fafbfe;border:1px solid #e5e7eb;border-radius:12px;padding:8px}
.gth-photo-preview img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;display:block;margin-bottom:6px}

/* Falls die Vorschau-Inputs per JS erzeugt werden, gleicher Padding-Fix */
.gth-photo-preview .gth-input{
  padding-left:20px;
  padding-right:14px;
}

/* Karte & Kopfzeile für neue Positionen */
.gth-pos-card{ padding:16px; }
.gth-pos-head{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-bottom:8px;
}
.gth-pos-head > label{ font-weight:600; }

/* Danger-Variante für den Button – nutzt deinen gth-btn-Basislook */
.gth-pos-remove{
  background:#fee4e2; border:1px solid #f3d1cf; color:#b42318;
}
.gth-pos-remove:hover{ background:#ffe9e7; }

/* Dezenter Hilfetext + etwas Luft zwischen Caption-Feldern */
.gth-subtle{ display:block; margin:8px 0 4px; font-size:12px; color:#64748b; }
.gth-photo-cap{ margin-top:6px; }


/* Kopfzeile in jedem Feld: Label links, Aktion rechts */
.gth-field-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}

/* Checkbox "löschen" dezent wie Ghost-Button */
.gth-pos-delete-label{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid #f3d1cf;
  color:#b42318;
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  user-select:none;
}
.gth-pos-delete-label input{ margin:0; }

/* Vorschau der vorhandenen Signatur */
.gth-sign-preview{
  display:block;
  max-width:100%;
  width:320px;       /* wirkt clean, skaliert bei schmalen Viewports runter */
  height:auto;
  border-radius:12px;
  border:1px solid #e5e7eb;
  margin:4px 0 10px;
}

/* dezentere Hilfstexte (nutzt deine Farbwelt) */
.gth-subtle{ color:#6b7280; font-size:12px; }


.gth-field-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;}
.gth-sign-toolbar{display:flex;gap:8px;align-items:center;}
.gth-danger{border-color:#f3d1cf;color:#b42318;}

.gth-sign-preview{
  display:block; max-width:100%; width:320px; height:auto;
  border-radius:12px; border:1px solid #e5e7eb; margin:4px 0 10px;
}

.gth-sign-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);
  display:flex;align-items:center;justify-content:center;z-index:9999;}
.gth-sign-dialog{background:#fff;border-radius:14px;padding:16px;width:min(720px,92vw);
  box-shadow:0 10px 30px rgba(0,0,0,.15);}
#gth-sign-canvas{width:100%;height:260px;border:1px dashed #cbd5e1;border-radius:12px;background:#fff;touch-action:none;}
.gth-modal-actions{display:flex;justify-content:space-between;gap:8px;margin-top:12px;}
.gth-subtle{color:#6b7280;font-size:12px;}


.gth-disclaimer{
  margin-top:8px;
  font-size:13px;
  color:#6b7280; /* neutral-500 */
}

/* kleiner Chip, wie deine Units */
.gth-chip{ display:inline-flex; align-items:center; gap:6px; 
  padding:4px 10px; border-radius:999px; font-size:12px; line-height:1; 
  border:1px solid transparent; }

.gth-chip-nachtrag{
  background:#e9f2ff;
  border-color:#c7d8ff;
  color:#1f3a8a; /* navy-ish */
}


/* Legacy-Overlay sicher killen */
.gth-card.is-locked::before,
.gth-card.is-locked::after { display:none !important; content:none !important; }

/* Soft-Lock Optik (Werte bleiben submitbar) */
.is-softlocked input[readonly],
.is-softlocked textarea[readonly]{ background:#f8fafc; color:#555; }
select[data-readonly="1"]{ pointer-events:none; background:#f8fafc; color:#555; }

/* Safety: [hidden] wirklich verstecken */
[hidden]{ display:none !important; }


/* gesperrte Eingaben dezenter darstellen */
  .is-locked .gth-input:disabled,
  .is-locked input:disabled,
  .is-locked select:disabled,
  .is-locked textarea:disabled {
    background:#f8fafc !important;
    color:#6b7280 !important;
    cursor:not-allowed !important;
    opacity:1 !important;
  }
  /* klickbare Deko-Buttons nicht anklickbar, wenn gesperrt */
  .is-locked .gth-btn:not([type="submit"]) { pointer-events:none; opacity:.6; }
  /* Foto-Overlay in gesperrtem Zustand */
  .is-locked .gth-photo-delbtn { display:none; }


/* ====== Page Header / Subtabs ====== */
.gth-page-title{margin:0 0 6px;font-size:28px;font-weight:800;letter-spacing:.2px}
.gth-subtabs{display:flex;gap:18px;border-bottom:1px solid #e9edf2;margin-bottom:8px}
.gth-subtabs a{display:inline-flex;align-items:center;gap:8px;padding:8px 0;color:#475569;text-decoration:none}
.gth-subtabs a.is-active{color:#0f172a;position:relative}
.gth-subtabs a.is-active:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:#4288c9;border-radius:3px}
.gth-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:999px;background:#eef3f8;font-size:12px}

/* ====== Compact Info Card ====== */
.gth-card{background:#fff;border-radius:14px;box-shadow:0 1px 2px rgba(16,24,40,.06);padding:16px;margin-bottom:14px}
.gth-card--padless{padding:16px 16px 0}
.gth-card--info{padding:20px 14px}
.gth-card-title{margin:0 0 8px;font-size:15px;font-weight:700}
.gth-kv{display:grid;grid-template-columns:120px 1fr;gap:4px 14px}
.gth-kv.kv-compact{grid-template-columns:110px 1fr;font-size:13px;line-height:1.35}
.gth-kv>div:first-child{color:#64748b}

/* ====== Form Layout (weniger monoton) ====== */
.gth-form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px 16px}
.gth-col-12{grid-column:span 12}
.gth-col-8{grid-column:span 8}
.gth-col-6{grid-column:span 6}
.gth-col-4{grid-column:span 4}
.gth-col-3{grid-column:span 3}
@media (max-width:980px){.gth-col-8,.gth-col-6,.gth-col-4,.gth-col-3{grid-column:span 12}}

.gth-fieldset{border:1px solid #eef2f7;background:#fafbfe;border-radius:12px;padding:12px 12px 2px;margin-bottom:14px}
.gth-legend{margin:0 0 8px;font-size:13px;font-weight:700;color:#334155}

/* Inputs – etwas „crispy“ + Brand Focus */
.gth-field label{display:block;font-size:12px;color:#6b7280;margin:0 0 6px}
.gth-input,.gth-textarea{width:100%;border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;background:#fff}
.gth-input:focus,.gth-textarea:focus{outline:0;border-color:#99c1e6;box-shadow:0 0 0 3px rgba(66,136,201,.2)}

.gth-custcard{display:flex;flex-direction:column;gap:2px}
.gth-cust-num{font-size:12px;color:#838b8b;letter-spacing:.06em;text-transform:uppercase;font-weight:600}
.gth-cust-num-label{opacity:.85;margin-right:.5ch}
.gth-cust-name{font-size:16px;font-weight:600;color:#0f172a;line-height:1.25}
.gth-cust-street,.gth-cust-city{font-size:14px;line-height:1.35;color:#334155}

/* H1 + Chip sauber ausrichten */
.gth-page-title{
  display:flex; align-items:center; gap:12px;
  margin:0 0 6px; font-size:26px; font-weight:700; letter-spacing:.2px;
}

/* allgemeiner Chip */
.gth-chip{
  display:inline-flex; align-items:center; justify-content:center;
  height:30px; padding:0 12px;
  border-radius:9999px; font-weight:700;
  line-height:1; white-space:nowrap;
  border:1px solid transparent;
}

/* KD-Nummern-Chip (größer, kontrastierter) */
.gth-chip--num{
  font-size:14px; letter-spacing:.02em;
  background:#eaf2fb;             /* sanftes Blau */
  color:#1e3a8a;                   /* dunkles Blau */
  border-color:#d6e6f9;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6), 0 1px 1px rgba(15,23,42,.04);
  transform:translateY(2px);       /* optische Baseline zum H1 */
}

/* kleinere Zähl-Chips (z.B. bei Tabs) – optional */
.gth-chip--count{
  height:22px; padding:0 8px; font-size:12px; font-weight:700;
  background:#eef3f8; color:#475569; border-color:#e4eaf2;
}

/* Responsiv etwas kompakter */
@media (max-width:980px){
  .gth-page-title{font-size:20px}
  .gth-chip--num{height:26px; padding:0 10px; font-size:13px; transform:translateY(1px);}
}

.gth-form{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px 16px;}
.gth-form > .gth-field{min-width:0;}           /* verhindert "zusammendrücken" */
.gth-col-12{grid-column:span 12;}
.gth-col-9{grid-column:span 9;}
.gth-col-3{grid-column:span 3;}
.gth-input{width:100%;}

/* ==== Inputs kompakter + mehr Innenabstand (END DER DATEI) ==== */
.gth-form input.gth-input,
.gth-form select.gth-select,
.gth-form textarea.gth-textarea {
  padding: 10px 10px;        /* vorher 10px 12px */
}

/* Safety, falls Divi input[type=...] überschreibt */
.gth-form input.gth-input[type="text"],
.gth-form input.gth-input[type="email"],
.gth-form input.gth-input[type="tel"],
.gth-form input.gth-input[type="number"] {
  padding: 10px 10px;        /* gleiche Werte, höhere Spezifität */
}


.gth-rows { display: grid; gap: 10px; }
.gth-row { display:flex; align-items:center; justify-content:space-between; padding:12px 14px;
           border:1px solid #e9edf3; background:#fff; border-radius:12px; }
.gth-row-main { min-width: 0; }
.gth-row-icon { margin-right:10px; color:#3b82f6; }
.gth-row-title { font-weight:600; text-decoration:none; color:#1f2937; font-size:13px; }
.gth-row-sub { color:#6b7280; font-size:12px; margin-top:2px; }
.gth-row-sub i { margin-right:6px; }
.gth-row-actions { display:flex; gap:8px; }
.gth-btn-icon { display:inline-flex; align-items:center; justify-content:center;
                width:36px; height:36px; border-radius:10px; border:1px solid #e9edf3; background:#f8fafc; }
.gth-btn-icon i { font-size:15px; }
.gth-btn-icon:hover { background:#eef3f8; }

.gth-disabled{ opacity:.5; cursor:not-allowed !important; pointer-events:none; }
.gth-drop.gth-disabled{ opacity:.6; pointer-events:none; }




/* ===== GTH Menu Badge (uses data-gth-count) ===== */
@media (min-width: 981px){

  /* Bezugspunkt fürs Badge */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a{
    position:relative !important;
  }

  /* Badge */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a:after,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a:after{
    content: attr(data-gth-count);
    position:absolute;
    right:-5px !important;

    /* HIER tiefer/höher machen */
    top:20px !important;              /* <- z.B. 18px ist bei dir realistisch, weil a 80px hoch ist */

    transform:none !important;
    min-width:12px;
    height:12px;
    padding:0 4px;
    border-radius:999px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    font-size:10px;
    line-height:1;
    font-weight:700;

    background:#e74c3c;
    color:#fff;
    box-shadow:0 2px 6px rgba(0,0,0,.18);
  }

  /* wenn leer oder 0 -> aus */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a[data-gth-count=""]:after,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a[data-gth-count=""]:after,
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a[data-gth-count="0"]:after,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a[data-gth-count="0"]:after{
    display:none !important;
    animation:none !important;
  }

  /* ✅ NUR blinken wenn count nicht 0/leer ist */
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a:not([data-gth-count="0"]):not([data-gth-count=""]):after,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a:not([data-gth-count="0"]):not([data-gth-count=""]):after{
    animation: gthBadgeBlink 2.1s ease-in-out infinite;
  }
}

/* ===== Badge blinkt (nur Badge, nicht das Icon) ===== */
@keyframes gthBadgeBlink {
  0%, 100% { opacity: 1; transform: translateY(0) scale(1); }
  50%      { opacity: .25; transform: translateY(0) scale(1); }
}

/* Optional: wenn User "reduce motion" aktiviert hat -> kein Blinken */
@media (prefers-reduced-motion: reduce){
  .et_pb_menu .et-menu-nav > ul.et-menu > li.gth-nav-inbox > a:after,
  .et_pb_menu .et-menu-nav > ul#menu-menu_main > li.gth-nav-inbox > a:after{
    animation: none !important;
  }
}


/* ================================
   GTH Analytics – KPI Dashboard v1
   (nur Klassen, kein Inline-Cüll)
   ================================ */

.gth-analytics-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.gth-analytics-box{
  background: #fff !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.gth-analytics-box:before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:6px;
  background: linear-gradient(180deg, rgba(66,136,201,1), rgba(66,136,201,.20));
}

.gth-analytics-inner{
  padding-left: 10px;
}

/* Head */
.gth-analytics-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.gth-analytics-title{
  margin:0;
  font-size:26px;
  font-weight:900;
  color:#111827;
  letter-spacing:-.02em;
}

.gth-analytics-sub{
  margin:4px 0 0 0;
  color:#6b7280;
  font-weight:700;
  font-size:13px;
}

.gth-analytics-tabs{
  
  padding-top:15px;
  margin:12px 0 18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.gth-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:32px;
  padding:0 14px;
  border-radius:12px;              /* pill */
  border:1px solid #e5e7eb;         /* 1px border */
  background:#fff;                  /* clean */
  color:#111827;
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  line-height:1;
  box-shadow:none;
}

/* Hover -> GTH Grün */
.gth-tab:hover{
  border-color:#2ecc71;
  background:rgba(46,204,113,.10);
  color:#166534;
}

/* Active -> GTH Blau (wie bisher, nur pill-clean) */
.gth-tab.active{
  border-color:rgba(66,136,201,.55);
  background:rgba(66,136,201,.14);
  color:#1d4ed8;
}

/* Grid */
.gth-analytics-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}

/* KPI Card */
.gth-ana-card{
  background:#fff !important;
  border:1px solid rgba(17,24,39,.06) !important;
  border-radius:16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  padding:16px;
  position: relative;
  overflow:hidden;
}

.gth-ana-card:before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:2px;
  background: linear-gradient(90deg, rgba(66,136,201,1), rgba(66,136,201,0));
  opacity:.9;
}

.gth-ana-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.gth-ana-left{ min-width: 220px; }

.gth-ana-label{
  margin:0 0 8px 0;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:900;
  color:#6b7280;
}

.gth-ana-big{
  font-size:46px;
  font-weight:950;
  color:#111827;
  line-height:1;
}

.gth-ana-right{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
  text-align:right;
}

.gth-ana-right .k{
  font-size:13px;
  font-weight:800;
  color:#6b7280;
}

.gth-ana-right .v{
  font-size:22px;
  font-weight:950;
  color:#e74c3c;
  line-height:1;
}

/* Status Pills */
.gth-ana-pills{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.gth-ana-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  padding:10px 12px;
  font-weight:900;
  color:#374151;
}

.gth-ana-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:#9ca3af;
}

.gth-dot-orange{ background:#f59e0b; }
.gth-dot-green{ background:#22c55e; }

.gth-ana-pill .label{
  font-weight:900;
  color:#374151;
}

.gth-ana-pill .count{
  font-weight:950;
  color:#111827;
  opacity:.9;
}

/* Bottom Lists */
.gth-ana-bottom{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:16px;
}

.gth-ana-subtitle{
  margin:0 0 8px 0;
  font-size:13px;
  font-weight:950;
  color:#6b7280;
  letter-spacing:.02em;
}

.gth-ana-empty{
  color:#9ca3af;
  font-weight:800;
  font-size:13px;
}

.gth-ana-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.gth-ana-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #eef2f7;
}

.gth-ana-row .k{
  font-weight:900;
  color:#111827;
}

.gth-ana-row .v{
  font-weight:950;
  color:#111827;
  opacity:.85;
}

/* Responsive */
@media (max-width: 920px){
  .gth-ana-bottom{ grid-template-columns:1fr; }
  .gth-ana-big{ font-size:40px; }
}

/* ===== Analytics Delta (Vergleich) ===== */
.gth-ana-delta{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  color:#374151;
}

.gth-delta-up{
  border-color:rgba(34,197,94,.35);
  background:rgba(34,197,94,.08);
  color:#15803d;
}
.gth-delta-down{
  border-color:rgba(231,76,60,.35);
  background:rgba(231,76,60,.08);
  color:#b91c1c;
}
.gth-delta-flat{
  border-color:rgba(107,114,128,.25);
  background:rgba(107,114,128,.06);
  color:#4b5563;
}

/* ===== GTH Analytics Layout System (universal) ===== */

.gth-analytics-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}

/* Universal Spans */
.gth-span-12{ grid-column: span 12; }
.gth-span-6 { grid-column: span 6; }
.gth-span-4 { grid-column: span 4; }
.gth-span-3 { grid-column: span 3; }

/* Mobile: alles untereinander */
@media (max-width: 920px){
  .gth-span-12,.gth-span-6,.gth-span-4,.gth-span-3{
    grid-column: span 12 !important;
  }
}

/* Kunden-Card: Bottom 1 Spalte */
.gth-ana-bottom.gth-ana-bottom-1col{
  grid-template-columns: 1fr;
}


html, body{ overflow-x:hidden; }


.et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a{ position:relative; }

.et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a[data-gth-count]::after{
  content: attr(data-gth-count);
  position:absolute;
  top:-10px;
  right:-12px;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:#e11d48;
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:18px;
  text-align:center;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}

.et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a[data-gth-count="0"]::after{ display:none; }

.et_pb_menu .et-menu-nav > ul > li.gth-nav-inbox > a[data-gth-count]:not([data-gth-count="0"])::after{
  animation:gthInboxPulse 1s infinite;
}
@keyframes gthInboxPulse{
  0%,100%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.12); opacity:.55; }
}

.gth-button{
  padding:10px 16px;
  background:#4288c9;
  color:#fff !important;
  text-decoration:none;
  border-radius:6px;
  font-weight:500;
  display:inline-block;
  white-space:nowrap;
  transition:background-color .2s ease;
}
.gth-button:hover{ background:#0056b3; }
.gth-button.is-disabled{ pointer-events:none; opacity:.45; }


/* Dashboard: Sektionen lesbar machen */
.gth-dashboard-box{
  background:#fff;
  border-radius:16px;
  box-shadow:0 0 12px rgba(0,0,0,.06);
  padding:18px;
  margin:0px 0;
}

/* Headline im Dashboard immer dunkel */
.gth-dashboard-box h2,
.gth-dashboard-box h3{
  color:#222 !important;
  margin-top:0;
}

/* Checkbox-Zeile: Flex darf NICHT vom Standard-Label überschrieben werden */
.gth-ma-field label.gth-checkline{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  margin:0 !important;             /* wichtig */
  line-height:1 !important;        /* wichtig */
  height:44px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:0 12px;
  background:#fff;
  box-sizing:border-box;
}

/* Checkbox selbst sauber mittig */
.gth-ma-field label.gth-checkline input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0 !important;
  display:block;
  flex:0 0 auto;
  accent-color:#4288c9;
}

/* Text nicht “runterrutschen” */
.gth-ma-field label.gth-checkline span{
  display:block;
  line-height:1.2;
}