/* ═══════════════════════════════════════════════════════════════════════
   Evion Firmenportal · Gerüst-Stile (Shell)
   ─────────────────────────────────────────────────────────────────────────
   WÖRTLICH ÜBERNOMMEN aus dem Adminportal der Website:
     ../Evion_Website_0210/assets/css/admin.css (Stand 03.10.2026)
   Abschnitte: Grundlagen, Login, Formulare, Buttons, Layout/Sidebar,
   Mobile Kopfleiste, Seitenkopf, Karten, Kennzahlen, Hinweise, Mobil, Touch.
   Ziel: Portal und Adminportal sehen identisch aus.

   Ändert sich das Design des Adminportals, diese Datei dort neu abgleichen
   (Website-Repo nur lesen!). Portal-eigene Ergänzungen und Abweichungen
   stehen NICHT hier, sondern in portal.css (wird danach geladen).
   Bewusste Abweichungen hier sind mit „PORTAL:“ markiert.
   ═══════════════════════════════════════════════════════════════════════ */

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

    :root {
      --navy: #08162a;
      --navy-700: #0d2040;
      --teal: #0d9488;
      --teal-dark: #0f766e;
      --teal-pale: #f0fdfa;
      --cyan: #0f766e;
      --cyan-light: #ccfbf1;
      --white: #ffffff;
      --gray-50: #f9fafb;
      --gray-100: #f3f4f6;
      --gray-200: #e5e7eb;
      --gray-300: #d1d5db;
      --gray-400: #9ca3af;
      --gray-500: #6b7280;
      --gray-700: #374151;
      --gray-800: #1f2937;
      --gray-900: #111827;
      --green: #16a34a;
      --green-bg: #dcfce7;
      --yellow: #d97706;
      --yellow-bg: #fef3c7;
      --red: #dc2626;
      --red-bg: #fef2f2;
      --blue: #2563eb;
      --blue-bg: #eff6ff;
      --radius: 8px;
      --radius-lg: 12px;
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
      --shadow: 0 4px 16px rgba(0, 0, 0, .1);
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--gray-50);
      color: var(--gray-800);
      font-size: 14px;
      line-height: 1.5;
      /* Kein grauer Blitz beim Antippen, kein iOS-Textscaling im Querformat */
      -webkit-tap-highlight-color: transparent;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    /* Scrollsperre, solange Menü oder Dialog offen ist. Ohne sie scrollt
       auf iOS der Hintergrund unter dem Overlay einfach weiter. */
    body.no-scroll { overflow: hidden; }


    /* ── SCROLLBAR ── */
    ::-webkit-scrollbar {
      width: 6px;
    }

    ::-webkit-scrollbar-track {
      background: var(--gray-100);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--gray-300);
      border-radius: 3px;
    }

    /* ── RESET ── */
    button {
      cursor: pointer;
      font-family: inherit;
    }

    input,
    select,
    textarea {
      font-family: inherit;
      font-size: 14px;
    }

    a {
      text-decoration: none;
    }

    /* ══════════════════════════════
       LOGIN
    ══════════════════════════════ */
    #loginScreen {
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--navy);
      padding: 24px;
      padding-top: max(24px, env(safe-area-inset-top));
      padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    #loginScreen::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image: radial-gradient(circle, rgba(255, 255, 255, .03) 1px, transparent 1px);
      background-size: 32px 32px;
    }

    .login-box {
      background: linear-gradient(135deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .04) 60%, rgba(255, 255, 255, .01) 100%);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(255, 255, 255, .14);
      border-radius: 24px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
      width: 100%;
      max-width: 400px;
      overflow: hidden;
      position: relative;
      z-index: 1;
    }

    .login-head {
      background: rgba(255, 255, 255, .04);
      padding: 28px 32px 22px;
      text-align: center;
      border-bottom: 1px solid rgba(255, 255, 255, .09);
    }

    .login-logo {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      margin-bottom: 16px;
    }

    .login-logo svg {
      flex-shrink: 0;
    }

    .login-logo-text {
      font-size: 1.15rem;
      font-weight: 900;
      color: var(--white);
      letter-spacing: .03em;
      text-transform: uppercase;
      line-height: 1;
      text-align: left;
    }

    .login-logo-text span {
      display: block;
      font-size: .7rem;
      font-weight: 400;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .45);
      margin-top: 3px;
    }

    .login-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--white);
      margin-bottom: 4px;
    }

    .login-sub {
      font-size: .78rem;
      color: rgba(255, 255, 255, .4);
    }

    .login-body {
      padding: 28px 32px 24px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Login-Formularfelder im Glas-Stil */
    .login-body .fg label {
      color: rgba(255, 255, 255, .75);
    }

    .login-body .fg input {
      background: rgba(255, 255, 255, .08);
      border: 1.5px solid rgba(255, 255, 255, .14);
      border-radius: 12px;
      color: var(--white);
      padding: 12px 16px;
    }

    .login-body .fg input::placeholder {
      color: rgba(255, 255, 255, .35);
    }

    .login-body .fg input:focus {
      border-color: #5eead4;
      box-shadow: 0 0 0 3px rgba(94, 234, 212, .15);
      background: rgba(255, 255, 255, .12);
    }

    .login-body .btn--primary {
      background: #0d9488;
      border-color: #0d9488;
    }

    .login-body .btn--primary:hover {
      background: #0f766e;
      border-color: #0f766e;
    }

    #loginErr {
      border-radius: 10px;
      background: rgba(239, 68, 68, .15);
      border: 1px solid rgba(239, 68, 68, .3);
      color: #fca5a5;
    }

    /* ── FORM ELEMENTS ── */
    .fg {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .fg label {
      font-size: .75rem;
      font-weight: 600;
      color: var(--gray-600, #4b5563);
      text-transform: uppercase;
      letter-spacing: .05em;
    }

    .fg input,
    .fg select,
    .fg textarea {
      background: rgba(255, 255, 255, .92);
      border: 1.5px solid rgba(13, 148, 136, .25);
      border-radius: 12px;
      padding: 10px 14px;
      outline: none;
      transition: border-color .15s, box-shadow .15s, background .15s;
      color: var(--gray-900);
      width: 100%;
      box-shadow: 0 1px 4px rgba(13, 148, 136, .06);
    }

    .fg input:focus,
    .fg select:focus,
    .fg textarea:focus {
      border-color: var(--teal);
      box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
    }

    .fg select {
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
      background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      background-size: 15px;
      padding-right: 42px;
      color-scheme: light;
    }

    .fg select option {
      background-color: #ffffff;
      color: #111827;
    }

    .fg select option:checked {
      background-color: #f0fdfa;
      color: #0d9488;
    }

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

    .fg .ferr {
      font-size: .78rem;
      color: var(--red);
      min-height: 18px;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    /* ── BUTTONS ── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 18px;
      border-radius: var(--radius);
      font-size: .85rem;
      font-weight: 600;
      border: none;
      transition: all .15s;
    }

    .btn--primary {
      background: #0d9488;
      color: var(--white);
    }

    .btn--primary:hover {
      background: #0f766e;
    }

    .btn--outline {
      background: none;
      border: 1.5px solid var(--gray-200);
      color: var(--gray-700);
    }

    .btn--outline:hover {
      border-color: var(--gray-300);
      background: var(--gray-50);
    }

    .btn--sm {
      padding: 5px 12px;
      font-size: .78rem;
    }

    .btn--danger {
      background: var(--red-bg);
      color: var(--red);
      border: none;
    }

    .btn--danger:hover {
      background: #fecaca;
    }

    .btn--success {
      background: var(--green-bg);
      color: var(--green);
      border: none;
    }

    .btn--full {
      width: 100%;
      justify-content: center;
    }

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

    /* ══════════════════════════════
       LAYOUT
    ══════════════════════════════ */
    #app {
      /* PORTAL: admin.css hat hier display:none und blendet per JS ein; das
         Portal steuert die Sichtbarkeit über das hidden-Attribut. */
      display: flex;
      flex-direction: row;
      min-height: 100vh;
      min-height: 100dvh;
    }

    .sidebar {
      width: 240px;
      flex-shrink: 0;
      background: var(--navy);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      z-index: 100;
      border-right: 1px solid rgba(255, 255, 255, .06);
      transition: transform .3s;
      /* Notch/Home-Indicator freihalten */
      padding-top: env(safe-area-inset-top);
      padding-bottom: env(safe-area-inset-bottom);
      padding-left: env(safe-area-inset-left);
    }

    .sb-logo {
      padding: 22px 20px 18px;
      border-bottom: 1px solid rgba(255, 255, 255, .07);
    }

    .sb-logo a {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .sb-logo-text {
      font-size: 1rem;
      font-weight: 900;
      color: var(--white);
      letter-spacing: .03em;
      text-transform: uppercase;
      line-height: 1;
    }

    .sb-logo-text span {
      display: block;
      font-size: .62rem;
      font-weight: 400;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .45);
      margin-top: 3px;
    }

    .sb-badge {
      display: inline-block;
      background: var(--cyan);
      color: var(--white);
      font-size: .6rem;
      font-weight: 800;
      padding: 1px 6px;
      border-radius: 100px;
      margin-left: 6px;
      vertical-align: 1px;
    }

    .sb-nav {
      flex: 1;
      padding: 10px 10px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    .sb-section {
      font-size: .65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .1em;
      color: rgba(255, 255, 255, .2);
      padding: 12px 12px 4px;
    }

    .sb-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-radius: 6px;
      border: none;
      background: none;
      color: rgba(255, 255, 255, .48);
      font-size: .875rem;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      width: 100%;
      transition: all .15s;
    }

    .sb-item:hover {
      background: rgba(255, 255, 255, .06);
      color: rgba(255, 255, 255, .8);
    }

    .sb-item.active {
      background: rgba(15, 118, 110, .15);
      color: #2dd4bf;
    }

    .sb-item svg {
      flex-shrink: 0;
      width: 17px;
      height: 17px;
    }

    .sb-item .sb-count {
      margin-left: auto;
      background: var(--cyan);
      color: var(--white);
      font-size: .62rem;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 100px;
    }

    .sb-user {
      padding: 14px 18px;
      border-top: 1px solid rgba(255, 255, 255, .06);
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .sb-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: rgba(15, 118, 110, .2);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      color: var(--cyan);
      font-size: .65rem;
      font-weight: 700;
    }

    .sb-uname {
      font-size: .8rem;
      font-weight: 600;
      color: rgba(255, 255, 255, .75);
    }

    .sb-logout {
      margin-left: auto;
      background: none;
      border: none;
      color: rgba(255, 255, 255, .3);
      padding: 4px;
      border-radius: 4px;
    }

    .sb-logout:hover {
      color: rgba(255, 255, 255, .7);
    }

    .main {
      margin-left: 240px;
      flex: 1;
      padding: 28px 32px;
    }

    /* ══════════════════════════════
       MOBILE KOPFLEISTE
       Ersetzt den früheren schwebenden Burger-Button, der auf jeder
       Seite direkt auf der Überschrift lag. Sticky, damit das Menü an
       jeder Scrollposition erreichbar bleibt. Sichtbar ab dem
       Mobil-Block am Dateiende.
    ══════════════════════════════ */
    .mob-bar {
      display: none; position: sticky; top: 0; z-index: 90; flex-shrink: 0;
      align-items: center; gap: 10px;
      padding: 0 12px 0 6px;
      padding-top: env(safe-area-inset-top);
      /* Im Querformat auf Notch-Geräten läge der Burger sonst unter der Aussparung */
      padding-left: max(6px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
      height: calc(56px + env(safe-area-inset-top));
      background: rgba(255, 255, 255, .9);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--gray-200);
    }
    .mob-bar__brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
    .mob-bar__brand svg { width: 28px; height: 28px; flex-shrink: 0; }
    .mob-bar__text { display: flex; flex-direction: column; min-width: 0; }
    .mob-bar__name {
      font-size: .95rem; font-weight: 800; color: var(--navy);
      letter-spacing: -.02em; line-height: 1.1; white-space: nowrap;
    }
    .mob-bar__sub {
      font-size: .58rem; font-weight: 700; letter-spacing: .16em;
      text-transform: uppercase; color: var(--teal-dark); line-height: 1.1; margin-top: 1px;
    }
    .mob-toggle {
      display: flex; align-items: center; justify-content: center;
      width: 44px; height: 44px; flex-shrink: 0;
      background: none; border: none; border-radius: 10px;
      color: var(--gray-700); cursor: pointer; transition: background .15s;
    }
    .mob-toggle:active { background: var(--gray-100); }

    /* Sidebar-Backdrop — im Adminportal fehlte er bisher komplett,
       das Menü ließ sich nur über den Burger wieder schließen. */
    .sidebar-backdrop {
      position: fixed; inset: 0; background: rgba(8, 22, 42, .45); z-index: 99;
      opacity: 0; pointer-events: none; transition: opacity .3s;
    }
    .sidebar-backdrop--show { opacity: 1; pointer-events: auto; }
    @media (min-width: 901px) { .sidebar-backdrop { display: none; } }

    /* ── PAGE HEADER ── */
    .ph {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .ph__title {
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--gray-900);
      letter-spacing: -.03em;
    }

    .ph__sub {
      font-size: .83rem;
      color: var(--gray-500);
      margin-top: 2px;
    }

    /* ── CARDS ── */
    .card {
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-sm);
      margin-bottom: 20px;
    }

    .card__head {
      padding: 14px 20px;
      border-bottom: 1px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .card__title {
      font-size: .9rem;
      font-weight: 700;
      color: var(--gray-900);
    }

    .card__body {
      padding: 20px;
    }

    .card__body--p0 {
      padding: 0;
    }

    /* ── STAT GRID ── */
    .stat-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
      margin-bottom: 20px;
    }

    .stat {
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      box-shadow: var(--shadow-sm);
    }

    .stat__label {
      font-size: .65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .07em;
      color: var(--gray-400);
      margin-bottom: 8px;
    }

    .stat__val {
      font-size: 1.8rem;
      font-weight: 900;
      color: var(--gray-900);
      letter-spacing: -.03em;
      line-height: 1;
    }

    .stat__sub {
      font-size: .73rem;
      color: var(--gray-400);
      margin-top: 5px;
    }

    /* ── EMPTY STATE ── */
    .empty {
      text-align: center;
      padding: 32px 20px;
      color: var(--gray-400);
    }

    .empty svg {
      display: block;
      margin: 0 auto 10px;
      opacity: .4;
    }

    .empty p {
      font-size: .84rem;
    }

    /* ── ALERT ── */
    .alert {
      padding: 11px 14px;
      border-radius: var(--radius);
      font-size: .84rem;
      margin-bottom: 16px;
    }

    .alert--err {
      background: var(--red-bg);
      color: var(--red);
      border: 1px solid #fecaca;
    }

    .alert--ok {
      background: var(--green-bg);
      color: var(--green);
      border: 1px solid #bbf7d0;
    }

    /* ══════════════════════════════════════════════════════════════
       MOBIL – Auszug aus dem Mobil-Block der admin.css (nur Gerüst)
    ══════════════════════════════════════════════════════════════ */
    @media (max-width: 900px) {
      /* ── Kopfleiste & Off-Canvas-Menü ── */
      .mob-bar { display: flex; }
      /* Kopfleiste über volle Breite: #app ist sonst eine Zeile */
      #app { flex-direction: column; }
      .sidebar {
        transform: translateX(-100%);
        width: min(284px, 84vw);
        box-shadow: 4px 0 28px rgba(8, 22, 42, .28);
      }
      .sidebar.open { transform: translateX(0); }

      .main {
        margin-left: 0;
        padding: 18px 16px;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
      }
      input, select, textarea { font-size: 16px; }
    }

    @media (max-width: 640px) {
      /* ── Seitenkopf ── */
      .ph { gap: 12px; }
      .ph__title { font-size: 1.25rem; }
      .ph .btn { width: 100%; justify-content: center; }
    }

    /* ══════════════════════════════
       TOUCH (Auszug)
    ══════════════════════════════ */
    @media (hover: none) and (pointer: coarse) {
      .sb-logout { position: relative; }
      .sb-logout::after {
        content: ''; position: absolute; left: 50%; top: 50%;
        width: 44px; height: 44px; transform: translate(-50%, -50%);
      }
      .btn { padding: 11px 18px; }
      .btn--sm { padding: 9px 14px; }
      .sb-item { padding: 12px 12px; }
      input[type="checkbox"] { width: 20px; height: 20px; }
    }

    /* PORTAL: Sichtbarkeit über das hidden-Attribut (siehe #app oben) */
    [hidden] { display: none !important; }

    /* ══════════════════════════════════════════════════════════════
       DROPDOWNS (Nice-Select, helle Variante) – wörtlich aus admin.css
       (Abschnitt „CUSTOM DROPDOWNS (NICE-SELECT LIGHT THEME)“, Stand
       03.10.2026). Logik: assets/js/dropdown.js (aus admin.js).
    ══════════════════════════════════════════════════════════════ */
    /* ── CUSTOM DROPDOWNS (NICE-SELECT LIGHT THEME) ── */
    .nice-select {
      position: relative;
      width: 100%;
    }

    .nice-select select {
      display: none !important;
    }

    /* Adjustments for inline filters and status dropdowns */
    .nice-select.input,
    .nice-select.status-sel {
      display: inline-block;
      width: auto;
    }

    .nice-select.input .nice-select__trigger {
      padding: 6px 10px;
      font-size: .82rem;
      font-weight: 600;
      width: auto;
      border-radius: 12px;
    }

    .nice-select.status-sel .nice-select__trigger {
      padding: 4px 10px;
      font-size: .78rem;
      font-weight: 600;
      width: auto;
      border-radius: 12px;
    }

    /* Vorlagen-Dropdown im Zeitstrahl-Kopf */
    .nice-select.tpl-sel .nice-select__trigger {
      padding: 6px 12px;
      font-size: .8rem;
      font-weight: 600;
      border-radius: 10px;
    }

    .nice-select.input .nice-select__trigger svg,
    .nice-select.status-sel .nice-select__trigger svg {
      width: 13px;
      height: 13px;
    }

    .nice-select.input .nice-select__list,
    .nice-select.status-sel .nice-select__list {
      width: max-content;
      min-width: 100%;
    }

    .nice-select__trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
      border: 1.5px solid rgba(13, 148, 136, .25);
      background: rgba(255, 255, 255, .92);
      border-radius: 12px;
      padding: 10px 14px;
      font-size: 14px;
      font-family: inherit;
      color: var(--gray-900);
      text-align: left;
      cursor: pointer;
      box-shadow: 0 1px 4px rgba(13, 148, 136, .06);
      transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
    }

    .nice-select__trigger svg {
      color: var(--teal);
      flex-shrink: 0;
      transition: transform .12s ease;
    }

    .nice-select.open .nice-select__trigger svg {
      transform: rotate(180deg);
    }

    .nice-select__trigger.is-placeholder .nice-select__value {
      color: var(--gray-400);
    }

    .nice-select__trigger:focus-visible,
    .nice-select.open .nice-select__trigger {
      border-color: var(--teal);
      box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
      background: #ffffff;
      outline: none;
    }

    .nice-select__list {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      z-index: 9999;
      list-style: none;
      margin: 0;
      padding: 6px;
      background: #ffffff;
      border: 1px solid var(--gray-200);
      border-radius: 14px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
      max-height: 250px;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: var(--gray-300) transparent;
      opacity: 0;
      transform: translateY(-4px);
      pointer-events: none;
      transition: opacity .1s ease-out, transform .1s ease-out;
    }

    .nice-select.open .nice-select__list {
      opacity: 1;
      transform: none;
      pointer-events: auto;
    }

    .nice-select__option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 8px 12px;
      border-radius: 8px;
      font-size: 14px;
      color: var(--gray-700);
      cursor: pointer;
      transition: background .12s ease, color .12s ease;
    }

    .nice-select__option:hover {
      background: var(--teal-pale);
      color: var(--teal-dark);
    }

    .nice-select__option .nice-select__check {
      opacity: 0;
      color: var(--teal);
      flex-shrink: 0;
    }

    .nice-select__option.selected {
      color: var(--teal);
      font-weight: 600;
      background: var(--teal-pale);
    }

    .nice-select__option.selected .nice-select__check {
      opacity: 1;
    }

    .nice-select__option:first-child {
      color: var(--gray-400);
    }

    .nice-select__option:first-child .nice-select__check {
      display: none;
    }

    .nice-select__list::-webkit-scrollbar {
      width: 6px;
    }

    .nice-select__list::-webkit-scrollbar-track {
      background: transparent;
      margin: 6px 0;
    }

    .nice-select__list::-webkit-scrollbar-thumb {
      background: var(--gray-200);
      border-radius: 99px;
    }

    .nice-select__list::-webkit-scrollbar-thumb:hover {
      background: var(--gray-300);
    }


    /* Mobil (aus dem Mobil-Block der admin.css): kein iOS-Zoom, Filter volle Breite */
    @media (max-width: 900px) {
      .nice-select__trigger,
      .nice-select.input .nice-select__trigger,
      .nice-select.status-sel .nice-select__trigger { font-size: 16px; }
    }
    @media (max-width: 640px) {
      .nice-select.input, .nice-select.status-sel { width: 100% !important; }
      .nice-select.input .nice-select__trigger,
      .nice-select.status-sel .nice-select__trigger { width: 100%; }
    }

    /* PORTAL: Erster Eintrag nur bei echtem Platzhalter (Wert "") gedimmt;
       gesperrte Felder sichtbar gesperrt (siehe dropdown.js). */
    :where(.nice-select:not(.mit-platzhalter)) .nice-select__option:first-child:not(.selected) { color: var(--gray-700); }
    :where(.nice-select:not(.mit-platzhalter)) .nice-select__option:first-child .nice-select__check { display: inline; }
    .nice-select:not(.mit-platzhalter) .nice-select__option.selected:first-child { color: var(--teal); }
    .nice-select__trigger:disabled { opacity: .5; cursor: not-allowed; }

    /* ══════════════════════════════════════════════════════════════
       TABELLE, BADGES, TABS, MODAL – wörtlich aus admin.css
       (Abschnitte „TABLE“, „BADGES“, „TABS“, „MODAL“, Stand 03.10.2026)
    ══════════════════════════════════════════════════════════════ */
    /* ── TABLE ── */
    .tbl {
      width: 100%;
      border-collapse: collapse;
    }

    .tbl th {
      text-align: left;
      padding: 10px 16px;
      font-size: .65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--gray-400);
      border-bottom: 2px solid var(--gray-100);
      background: var(--gray-50);
    }

    .tbl td {
      padding: 12px 16px;
      border-bottom: 1px solid var(--gray-100);
      vertical-align: middle;
    }

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

    .tbl tr:hover td {
      background: var(--gray-50);
    }

    .tbl-link {
      color: var(--navy);
      font-weight: 600;
      cursor: pointer;
    }

    .tbl-link:hover {
      color: var(--cyan);
    }

    /* ── BADGES ── */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: .7rem;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 100px;
      white-space: nowrap;
    }

    .badge--green {
      background: var(--green-bg);
      color: var(--green);
    }

    .badge--yellow {
      background: var(--yellow-bg);
      color: var(--yellow);
    }

    .badge--red {
      background: var(--red-bg);
      color: var(--red);
    }

    .badge--blue {
      background: var(--blue-bg);
      color: var(--blue);
    }

    .badge--gray {
      background: var(--gray-100);
      color: var(--gray-500);
    }

    .badge--cyan {
      background: var(--cyan-light);
      color: #0f766e;
    }

    /* ── TABS ── */
    .tabs {
      display: flex;
      gap: 2px;
      border-bottom: 2px solid var(--gray-200);
      margin-bottom: 20px;
    }

    .tab-btn {
      background: none;
      border: none;
      padding: 10px 18px;
      font-size: .84rem;
      font-weight: 600;
      color: var(--gray-400);
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      transition: all .15s;
    }

    .tab-btn:hover {
      color: var(--gray-700);
    }

    .tab-btn.active {
      color: #0d9488;
      border-bottom-color: #0d9488;
    }

    .tab-dot {
      display: inline-block;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--red);
      margin-left: 6px;
      vertical-align: middle;
      position: relative;
      top: -1px;
    }

    /* ── MODAL ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .5);
      z-index: 500;
      align-items: flex-start;
      justify-content: center;
      padding: 20px;
      overflow-y: auto;
    }

    .modal-overlay.open {
      display: flex;
    }

    .modal {
      background: var(--white);
      border-radius: var(--radius-lg);
      box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
      width: 100%;
      max-width: 640px;
      margin: auto;
      animation: slideIn .2s ease;
    }

    .modal--wide {
      max-width: 900px;
    }

    @keyframes slideIn {
      from {
        transform: translateY(-16px);
        opacity: 0;
      }

      to {
        transform: none;
        opacity: 1;
      }
    }

    .modal__head {
      padding: 18px 24px;
      border-bottom: 1px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal__title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--gray-900);
    }

    .modal__close {
      background: none;
      border: none;
      color: var(--gray-400);
      font-size: 1.2rem;
      padding: 4px 8px;
      border-radius: 4px;
    }

    .modal__close:hover {
      background: var(--gray-100);
      color: var(--gray-700);
    }

    .modal__body {
      padding: 24px;
    }

    .modal__foot {
      padding: 16px 24px;
      border-top: 1px solid var(--gray-100);
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    /* PORTAL: eigene Mobil-Regeln (angelehnt an admin.css, nicht wörtlich): Dialoge als Vollbild, Reiter wischbar */
    @media (max-width: 640px) {
      .modal-overlay { padding: 0; }
      .modal { max-width: none; min-height: 100dvh; border-radius: 0; margin: 0; }
      .tabs { overflow-x: auto; scrollbar-width: none; }
      .tab-btn { white-space: nowrap; }
    }
