/* special.css */
@layer special {

  /* ================================
     GLOBAL FIXES / HACKS
     ================================ */

  body.nav-lock{
    overflow:hidden;
    overscroll-behavior:contain;
  }

  html, body{
    max-width:100%;
    overflow-x:hidden;
  }

  /* Notification Wrapper Fix */
  .site-header .right-side .notification-center,
  .site-header .right-side .notification,
  .site-header .right-side .notifications,
  .site-header .right-side .notification-wrapper,
  .site-header .right-side .notif,
  .site-header .right-side .bell,
  .site-header .right-side .bell-wrap{
    display:inline-flex !important;
    align-items:center;
    width:auto !important;
    max-width:100%;
    margin:0 !important;
  }

  .site-header .right-side a.logout{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
    margin:0;
  }

  .site-header #hamburger{
    display:none !important;
  }

/* ================================
   LOGIN (simple, logo centered)
   ================================ */

.auth-page{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem;
}

.auth-card{
  width:100%;
  max-width:420px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(
      120deg,
      rgba(37,99,235,.96),
      rgba(29,78,216,.94)
    ) border-box;
  border:2px solid transparent; /* Randstärke */
  border-radius:16px;
  padding:2rem 1.8rem;
  box-shadow:0 16px 40px rgba(15,23,42,.12);
  text-align:center;
}

.auth-brand-logo{
  display:block;
  margin:0 auto 1rem;
  width:160px;
  height:auto;
  max-width:75%;
}

.auth-brand-name{
  font-size:1.2rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:1.6rem;
  color:#ffffff00;
}

.auth-title{
  font-size:1.5rem;
  font-weight:800;
  margin-bottom:1.2rem;
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap:.6rem;
  text-align:left;
}

.auth-label{
  font-weight:600;
  font-size:.9rem;
}

.auth-input{
  padding:.65rem .75rem;
  border-radius:.65rem;
  border:1px solid #d1d5db;
  font-size:.95rem;
}

.auth-input:focus{
  outline:none;
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,.18);
}

.auth-submit{
  margin-top:1rem;
  padding:.7rem;
  border-radius:.75rem;
  border:0;
  background:#3b82f6;
  color:white;
  font-weight:700;
  cursor:pointer;
}

.auth-submit:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* ================================
   INTRO PAGE
   ================================ */
:root{
  --intro-timeout: 2600ms;

  --intro-fg: #f8fafc;
  --intro-muted: rgba(248,250,252,.72);
  --intro-accent: #3b82f6;

  --intro-radius: 24px;

  --intro-card-bg: #162033;
  --intro-card-border: rgba(255,255,255,.10);

  --intro-shadow:
    0 32px 80px rgba(0,0,0,.34),
    0 14px 32px rgba(0,0,0,.20);
}

/* Base */

html,
body{
  min-height:100%;
}

body.intro-body{
  margin:0;
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)),
    url('/assets/images/Background.jpg') center center / cover no-repeat fixed;
}

/* Page */

.intro-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:transparent;
}

/* Maintenance */

.intro-maintenance{
  position:fixed;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000;

  display:flex;
  align-items:center;
  gap:8px;

  padding:10px 16px;
  border-radius:14px;

  color:#fff;
  font-weight:600;

  background:rgba(255,193,7,.18);
  border:1px solid rgba(255,193,7,.35);
  box-shadow:0 10px 24px rgba(0,0,0,.22);

  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.intro-maintenance-icon{
  display:inline-flex;
}

.intro-maintenance-text{
  display:inline-flex;
}

/* Card */

.intro-card{
  position:relative;
  width:min(94vw, 600px);
  overflow:hidden;
  border-radius:var(--intro-radius);
  color:var(--intro-fg);

  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    var(--intro-card-bg);

  border:1px solid var(--intro-card-border);
  box-shadow:var(--intro-shadow);

  transform:translateY(26px) scale(1.08);
  opacity:0;
  filter:blur(10px);

  animation:introIn .55s cubic-bezier(.16,.9,.2,1) forwards;
}

@keyframes introIn{
  0%{
    transform:translateY(26px) scale(1.08);
    opacity:0;
    filter:blur(10px);
  }
  60%{
    transform:translateY(-4px) scale(1.015);
    opacity:1;
    filter:blur(0);
  }
  100%{
    transform:translateY(0) scale(1);
    opacity:1;
    filter:blur(0);
  }
}

.intro-card.fadeout{
  animation:introOut .24s ease forwards;
}

@keyframes introOut{
  0%{
    transform:translateY(0) scale(1);
    opacity:1;
    filter:blur(0);
  }
  100%{
    transform:translateY(-10px) scale(.985);
    opacity:0;
    filter:blur(4px);
  }
}

/* Progress */

.intro-progress{
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  overflow:hidden;
  border-top-left-radius:var(--intro-radius);
  border-top-right-radius:var(--intro-radius);
}

.intro-progress-bar{
  width:100%;
  height:100%;
  transform-origin:left center;
  transform:scaleX(1);

  background:
    linear-gradient(
      90deg,
      rgba(147,197,253,.95),
      rgba(59,130,246,1),
      rgba(96,165,250,.90)
    );

  box-shadow:
    0 0 10px rgba(59,130,246,.40),
    0 0 18px rgba(59,130,246,.20);

  animation:introProgress var(--intro-timeout) linear forwards;
}

@keyframes introProgress{
  0%{ transform:scaleX(1); }
  100%{ transform:scaleX(0); }
}

/* Header */

.intro-header{
  display:flex;
  align-items:center;
  gap:18px;
  padding:26px 24px 14px;
}

.intro-logo{
  width:74px;
  height:74px;
  object-fit:contain;

  border-radius:18px;
  padding:12px;

  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
    rgba(255,255,255,.04);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 12px 28px rgba(0,0,0,.20);
}

.intro-heading{
  flex:1;
  min-width:0;
}

.intro-title{
  font:800 26px/1.15 Inter,system-ui,sans-serif;
  letter-spacing:-0.02em;
}

.intro-subtitle{
  margin-top:8px;
  font:600 14px/1.45 Inter,system-ui,sans-serif;
  color:var(--intro-muted);
}

/* Bottom */

.intro-micro{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 24px 22px;
  font-size:12px;
  color:var(--intro-muted);
}

.intro-status{
  display:flex;
  align-items:center;
  gap:8px;
}

.intro-status-led{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 0 6px rgba(34,197,94,.12);
  animation:ledPulse 1.1s ease-in-out infinite;
}

@keyframes ledPulse{
  0%,100%{ transform:scale(.95); }
  50%{ transform:scale(1.1); }
}

/* Dots */

.intro-dots{
  display:flex;
  gap:6px;
}

.intro-dots i{
  width:6px;
  height:6px;
  border-radius:999px;
  background:#fff;
  opacity:.3;
  animation:introDots 1s infinite;
}

.intro-dots i:nth-child(2){
  animation-delay:.15s;
}

.intro-dots i:nth-child(3){
  animation-delay:.3s;
}

@keyframes introDots{
  0%,80%,100%{
    transform:translateY(0);
    opacity:.3;
  }
  40%{
    transform:translateY(-2px);
    opacity:1;
  }
}

/* Responsive */

@media (max-width: 640px){
  .intro-page{
    padding:18px;
  }

  .intro-card{
    width:min(100%, 560px);
  }

  .intro-header{
    gap:14px;
    padding:22px 18px 12px;
  }

  .intro-logo{
    width:64px;
    height:64px;
    border-radius:16px;
    padding:10px;
  }

  .intro-title{
    font-size:22px;
  }

  .intro-subtitle{
    font-size:13px;
  }

  .intro-micro{
    padding:0 18px 18px;
  }

  .intro-maintenance{
    max-width:calc(100vw - 24px);
    width:max-content;
    text-align:center;
  }
}
  /* ===== Footer Mobile Overrides (Special) – FIXED ===== */
@media (max-width:768px){
  .site-footer{
    display:grid !important;

    /* 1. Zeile: Links | Tools | Lizenz | User (User ganz rechts) */
    grid-template-columns:1fr auto auto auto !important;

    /* WICHTIG: auto statt 1fr -> keine "Leerzeile"-Optik */
    grid-template-rows:auto auto !important;

    grid-template-areas:
      "l r1 r2 u"
      "c c c c" !important;

    align-items:center !important;
    justify-items:center !important;

    column-gap:6px !important;
    row-gap:2px !important;              /* <<< kompakter */

    height:48px !important;
    padding:0 6px !important;

    overflow:visible !important;
    white-space:nowrap !important;

    font-size:.62rem !important;
    line-height:1.05 !important;

    background:#ffffff !important;
    color:#111827 !important;
    border-top:1px solid rgba(209,213,219,.95) !important;
    box-shadow:0 -8px 24px rgba(15,23,42,.08) !important;
  }

  /* Untere Zeile (Copyright) tight */
  .footer-center{
    grid-area:c !important;
    display:block !important;

    text-align:center !important;
    justify-self:center !important;
    align-self:center !important;

    width:100% !important;
    max-width:92vw !important;

    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;

    margin:0 !important;
    padding:0 !important;
  }

  /* Links: nur Links zeigen (kein ganzer Text) */
  .footer-left{
    grid-area:l !important;
    justify-self:start !important;

    font-size:0 !important;             /* versteckt Fließtext */
    overflow:hidden !important;
    margin:0 !important;
    padding:2px !important;
  }

  .footer-left a{
    font-size:.62rem !important;
    display:inline-block !important;
    max-width:40vw !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    margin:0 !important;
    padding:3px !important;
  }

  .footer-left a + a::before{
    content:" · ";
    opacity:.85;
    margin:0 .25rem;
  }

  /* Rechts-Block wird über Areas verteilt */
  .footer-right{ display:contents !important; }

  /* Tools rechts */
  .footer-tools{
    grid-area:r1 !important;
    justify-self:end !important;
    margin:0 !important;
    padding:0 !important;
  }

  /* Lizenz daneben */
  .footer-lic{
    grid-area:r2 !important;
    justify-self:end !important;
    margin:0 !important;
    padding:0 !important;
  }

  /* Login-Meta ganz nach rechts */
  .footer-user{
    grid-area:u !important;
    justify-self:end !important;         /* <<< ganz rechts */
    display:inline-flex !important;
    align-items:center !important;
    gap:4px !important;

    max-width:30vw !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;

    margin:0 !important;
    padding:10px !important;
  }

  /* Buttons ultra-compact */
  .footer-settings-btn span{ display:none !important; }

  .footer-settings-btn{
    padding:.22rem .34rem !important;
    border-radius:.35rem !important;
    font-size:.62rem !important;
    height:22px !important;
    box-shadow:none !important;
  }

  .footer-theme-btn{
    width:20px !important;
    height:20px !important;
    border-radius:.35rem !important;
    font-size:.62rem !important;
    box-shadow:none !important;
  }

  /* Lizenz kompakter */
  .lic-pill{
    font-size:.62rem !important;
    padding:.22rem .55rem !important;
    margin:0 !important;
  }

  .lic-dot{
    width:8px !important;
    height:8px !important;
  }

  /* Panel: sicher im Viewport */
  .footer-settings-panel{
    bottom:calc(100% + 6px) !important;
    max-width:calc(100vw - 12px) !important;
    right:6px !important;

    background:#ffffff !important;
    border:1px solid rgba(209,213,219,.95) !important;
    box-shadow:0 14px 30px rgba(15,23,42,.1) !important;
  }
}

/* =========================
   Menu Editor Layout
   ========================= */
.menu-editor{
  margin-top: 12px;
}

.menu-editor__grid{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}

.menu-editor__roles{
  border: 1px solid rgba(209,213,219,.9);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.menu-editor__roles-title{
  font-weight: 700;
  color: #111827;
  font-size: .9rem;
  margin-bottom: 8px;
}

.menu-editor__roles-list{
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

/* einzelne Rolle */
.menu-role{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(229,231,235,.95);
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
}

.menu-role:hover{
  background: rgba(148,163,184,.08);
}

.menu-role input[type="checkbox"]{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.menu-role__meta{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.menu-role__label{
  font-weight: 700;
  color: #111827;
  font-size: .88rem;
}

.menu-role__key{
  color: #6b7280;
  font-size: .8rem;
}

/* Responsive */
@media (max-width: 900px){
  .menu-editor__grid{
    grid-template-columns: 1fr;
  }

  .menu-editor__roles-list{
    max-height: none;
  }
}

/* =========================================================
   SCANNER – FULLSCREEN OHNE PAGE SCROLL
   Stabil auch auf älteren Android WebViews
   ========================================================= */

/* Fallbacks für alte Geräte */
html, body{
  height:100%;
}

.scanner-body{
  /* 100dvh ist modern, 100vh ist Fallback */
  height:100vh;
  height:100dvh;

  /* iOS/alte WebViews Fallback */
  min-height:-webkit-fill-available;

  overflow:hidden;

  /* Weniger Rand links/rechts -> mehr Nutzfläche */
  padding:6px;
  box-sizing:border-box;

  /* Safe area, wenn unterstützt (sonst egal) */
  padding-top:max(6px, env(safe-area-inset-top));
  padding-bottom:max(6px, env(safe-area-inset-bottom));
}

/* Container */
.scanner-body .scanner-container{
  height:100%;
  display:flex;
  flex-direction:column;

  /* kleinerer Abstand -> weniger Scroll-Risiko */
  gap:6px;

  overflow:hidden;
}

/* =========================================================
   CARDS
   ========================================================= */

.scanner-body .scanner-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;

  /* kompakter */
  padding:8px;

  box-shadow:0 6px 18px rgba(0,0,0,.06);
  overflow:hidden;
}

/* obere Auswahl bleibt "auto" */
.scanner-body .scanner-card:first-child{
  flex:0 0 auto;
}

/* Scan Bereich bekommt Resthöhe */
.scanner-body .scanner-card:nth-child(2){
  flex:1 1 auto;
  display:flex;
  flex-direction:column;

  /* wichtig: verhindert, dass Flex-Kinder rausdrücken */
  min-height:0;
}

/* =========================================================
   TITLES
   ========================================================= */

.scanner-body .scanner-title{
  margin:0 0 6px 0;
  font-size:1.02rem;
  font-weight:700;
}

/* Subtitle frisst Platz -> kleiner */
.scanner-body .scanner-subtitle{
  margin:0 0 6px 0;
  font-size:.85rem;
  opacity:.75;
}

/* =========================================================
   ROWS / COLS
   ========================================================= */

.scanner-body .scanner-row{
  display:flex;
  gap:6px;
  align-items:flex-end;
}

.scanner-body .scanner-col{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}

/* Auswahl-Row: auf breiten Geräten 2 Felder + Button,
   auf schmalen Geräten wird es per Media Query gestapelt */
.scanner-body .scanner-row--selection{
  display:grid;
  grid-template-columns: 1fr 1fr auto;
  gap:6px;
  align-items:end;
}

.scanner-body .scanner-col--save-selection{
  flex:0 0 auto;
}

/* Scan-Row: Feld + großer Button */
.scanner-body .scanner-row--scan{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:6px;
  align-items:end;
}

/* =========================================================
   LABELS
   ========================================================= */

.scanner-body .scanner-label{
  font-size:.82rem;
  font-weight:600;
  opacity:.85;
}

/* =========================================================
   INPUTS / SELECTS
   WICHTIG: font-size >= 16px verhindert teils Zoom/Chaos auf Mobile
   ========================================================= */

.scanner-body .scanner-select,
.scanner-body .scanner-input{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.2);

  /* Mobile stabil */
  font-size:16px;

  box-sizing:border-box;
}

.scanner-body .scanner-select:focus,
.scanner-body .scanner-input:focus{
  outline:none;
  border-color:rgba(0,0,0,.45);
}

.scanner-body .scanner-input--scan{
  font-size:18px;
  letter-spacing:.05em;
}

.scanner-body .scanner-input--note{
  font-size:16px;
}

/* =========================================================
   BUTTONS (oben klare Auswahl-Buttons, groß und gut zu treffen)
   ========================================================= */

.scanner-body .scanner-btn{
  padding:10px 14px;
  border-radius:12px;
  white-space:nowrap;

  /* große Trefferfläche */
  font-size:16px;
  font-weight:700;
}

/* Buttons sollen optisch "klar" sein */
.scanner-body .scanner-btn--save-selection,
.scanner-body .scanner-btn--save-scan{
  min-height:44px;
}

/* =========================================================
   HINTS / STATUS
   ========================================================= */

.scanner-body .scanner-hint{
  font-size:.85rem;
  opacity:.85;
}

.scanner-body .scanner-qty-hint{
  font-size:.85rem;
  opacity:.85;
}

.scanner-body .scanner-badges{
  display:flex;
  gap:6px;
  margin-top:6px;
  flex-wrap:wrap;
}

.scanner-body .scanner-badge{
  font-size:.75rem;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(59,130,246,.12);
  color:#1e3a8a;
}

.scanner-body .scanner-last{
  margin-top:6px;
  font-size:.85rem;
  opacity:.9;
}

/* =========================================================
   MOBILE / ALTE SCANNER (sehr schmal)
   -> alles untereinander, Button volle Breite, kaum Rand
   ========================================================= */
@media (max-width: 520px){
  .scanner-body{
    padding:4px;
    padding-top:max(4px, env(safe-area-inset-top));
    padding-bottom:max(4px, env(safe-area-inset-bottom));
  }

  .scanner-body .scanner-container{
    gap:5px;
  }

  .scanner-body .scanner-card{
    padding:7px;
    border-radius:12px;
  }

  /* Auswahl: untereinander */
  .scanner-body .scanner-row--selection{
    grid-template-columns: 1fr;
  }

  /* Scan: untereinander (Button unter Feld) */
  .scanner-body .scanner-row--scan{
    grid-template-columns: 1fr;
  }

  /* Buttons volle Breite */
  .scanner-body .scanner-btn{
    width:100%;
    min-height:46px;
  }

  /* Subtitle optional: weg, spart Platz */
  .scanner-body .scanner-subtitle{
    display:none;
  }
}

/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width:360px){
  .scanner-body .scanner-title{ font-size:.95rem; }
  .scanner-body .scanner-input--scan{ font-size:1.05rem; }
  .scanner-body .scanner-btn{ padding:8px 12px; }
}

/* Simple Modal (ohne Bootstrap JS) Scanner Sortierer*/
.sort-modal-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  z-index:99998;
}
.sort-modal{
  position:fixed; inset:0;
  display:none;
  z-index:99999;
  align-items:center;
  justify-content:center;
  padding:14px;
}
.sort-modal.is-open,
.sort-modal-backdrop.is-open{
  display:flex;
}
.sort-modal-card{
  width:min(760px, 100%);
  max-height:min(80vh, 680px);
  background:#fff;
  border-radius:14px;
  border:1px solid #ddd;
  box-shadow:0 12px 50px rgba(0,0,0,0.25);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.sort-modal-head{
  padding:12px 14px;
  border-bottom:1px solid #eee;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.sort-modal-body{
  padding:12px 14px;
  overflow:auto;
}
.sort-modal-title{
  margin:0;
  font-size:16px;
}
.sort-modal-close{
  border:1px solid #ddd;
  background:#fff;
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
}
.sort-last-list{
  margin-top:8px;
  border:1px solid #ddd;
  border-radius:10px;
  padding:10px;
}
/* =========================================================
   EXPORT DOC (scoped) – alles beginnt mit .export-doc
   ========================================================= */

.export-doc{
  --text:#111;
  --muted:#555;
  --border:#d9d9d9;
  --soft:#f5f6f7;
  --soft2:#fafafa;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

/* Box sizing */
.export-doc,
.export-doc *{
  box-sizing:border-box;
}

/* Web-Ansicht Hintergrund */
body.export-doc{
  margin:0;
  background:#e6e6e6;
}

/* A4 SEITE (Web Preview) */
.export-doc .export-doc__page,
.export-doc .page{
  max-width:210mm;
  min-height:297mm;
  margin:24px auto;
  padding:24px;
  background:#fff;
  border:1px solid #ccc;
  box-shadow:0 2px 8px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.12);
}

.export-doc.export-doc--no-frames .export-doc__page,
.export-doc.export-doc--no-frames .page{
  border:none;
  box-shadow:none;
  margin:0 auto;
}

/* HEADER (Web) */
.export-doc .export-doc__header,
.export-doc .header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:12px;
  border-bottom:2px solid var(--border);
}

.export-doc .export-doc__company,
.export-doc .company{
  min-width:280px;
  font-size:12px;
  line-height:1.25;
}

.export-doc .export-doc__companyName,
.export-doc .company__name{
  font-weight:800;
  font-size:13px;
  margin-bottom:2px;
}

.export-doc .export-doc__companyLine,
.export-doc .company__line{
  margin-top:2px;
}

.export-doc .export-doc__muted,
.export-doc .company__muted{
  color:var(--muted);
}

.export-doc .export-doc__headerRight,
.export-doc .header__right{
  text-align:right;
  min-width:220px;
}

.export-doc .export-doc__logo,
.export-doc .logo{
  max-width:220px;
  max-height:80px;
  object-fit:contain;
}

/* TOOLBAR / BUTTONS (Web) */
.export-doc .export-doc__toolbar,
.export-doc .toolbar{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.export-doc .export-doc__btn,
.export-doc .btn{
  appearance:none;
  border:1px solid var(--border);
  background:var(--soft);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:13px;
  text-decoration:none;
  color:inherit;
  display:inline-flex;
  align-items:center;
  gap:8px;
  line-height:1;
}

.export-doc .export-doc__btn:hover,
.export-doc .btn:hover{
  background:var(--soft2);
}

.export-doc .export-doc__btnPrimary{
  background:#111;
  color:#fff;
  border-color:#111;
}

.export-doc .export-doc__btnPrimary:hover{
  background:#000;
}

/* TITLE ROW (Web) */
.export-doc .export-doc__titleRow,
.export-doc .titleRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin:16px 0 10px;
}

.export-doc .export-doc__h1,
.export-doc h1{
  margin:0;
  font-size:22px;
  letter-spacing:.2px;
}

.export-doc .export-doc__docNo,
.export-doc .docNo{
  font-size:13px;
  color:var(--muted);
  text-align:right;
  white-space:nowrap;
}

/* =========================================================
   META GRID + CARD
   WICHTIG: beide oberen Kästen gleich breit + gleich hoch
   ========================================================= */
.export-doc .export-doc__metaGrid,
.export-doc .metaGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin:12px 0 18px;
  align-items:stretch;
}

.export-doc .export-doc__card,
.export-doc .card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  background:#fff;
  height:100%;
}

.export-doc .export-doc__row,
.export-doc .row{
  display:flex;
  gap:10px;
  margin:6px 0;
  font-size:13px;
  align-items:flex-start;
}

.export-doc .export-doc__k,
.export-doc .row .k{
  width:150px;
  color:var(--muted);
  flex:0 0 auto;
}

.export-doc .export-doc__v,
.export-doc .row .v{
  flex:1 1 auto;
  min-width:0;
  font-weight:600;
}

.export-doc .export-doc__trainerName{
  font-weight:700;
}

.export-doc .export-doc__trainerAddress{
  white-space:pre-line;
}

.export-doc .export-doc__note,
.export-doc .note{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed var(--border);
  font-size:13px;
  line-height:1.45;
  white-space:pre-wrap;
}

/* SECTION TITLE */
.export-doc .export-doc__sectionTitle{
  margin:12px 0 8px;
  font-size:15px;
  font-weight:700;
}

/* TABLE */
.export-doc .export-doc__table,
.export-doc table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  table-layout:fixed;
}

.export-doc .export-doc__table thead th,
.export-doc thead th{
  background:var(--soft);
  text-align:left;
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  font-weight:800;
  font-size:12px;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.export-doc .export-doc__table tbody td,
.export-doc tbody td{
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.export-doc .export-doc__table tbody tr:nth-child(even) td,
.export-doc tbody tr:nth-child(even) td{
  background:#fcfcfc;
}

.export-doc .export-doc__table tfoot th,
.export-doc .export-doc__table tfoot td,
.export-doc tfoot th,
.export-doc tfoot td{
  padding:6px 10px;
  background:var(--soft);
  border-top:2px solid var(--border);
  font-weight:800;
}

/* Spaltenbreiten passend zu deinem 8-Spalten-Table */
.export-doc .export-doc__table th:nth-child(1),
.export-doc .export-doc__table td:nth-child(1){
  width:92px;
  white-space:nowrap;
}

.export-doc .export-doc__table th:nth-child(2),
.export-doc .export-doc__table td:nth-child(2),
.export-doc .export-doc__table th:nth-child(3),
.export-doc .export-doc__table td:nth-child(3){
  width:62px;
  white-space:nowrap;
}

.export-doc .export-doc__table th:nth-child(4),
.export-doc .export-doc__table td:nth-child(4){
  width:48px;
  white-space:nowrap;
}

.export-doc .export-doc__table th:nth-child(5),
.export-doc .export-doc__table td:nth-child(5){
  width:auto;
  min-width:360px;
}

.export-doc .export-doc__table th:nth-child(6),
.export-doc .export-doc__table td:nth-child(6){
  width:150px;
}

.export-doc .export-doc__table th:nth-child(7),
.export-doc .export-doc__table td:nth-child(7){
  width:88px;
  white-space:nowrap;
}

.export-doc .export-doc__table th:nth-child(8),
.export-doc .export-doc__table td:nth-child(8){
  width:92px;
  white-space:nowrap;
}

.export-doc .export-doc__titleCell{
  min-width:0;
}

.export-doc .export-doc__titleMain{
  display:block;
  font-weight:600;
  word-break:normal;
  overflow-wrap:anywhere;
}

.export-bemerkung{
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
  hyphens:auto;
  line-height:1.25;
}

/* Ausrichtung */
.export-doc .export-doc__right{
  text-align:right;
}

.export-doc .export-doc__center{
  text-align:center;
}

.export-doc .nowrap,
.export-doc .export-doc__nowrap{
  white-space:nowrap;
}

.export-doc .mono{
  font-variant-numeric:tabular-nums;
}

.export-doc .export-doc__empty,
.export-doc .empty{
  padding:14px;
  color:var(--muted);
}

/* FOOTER (Web) */
.export-doc .export-doc__footer,
.export-doc .footer{
  margin-top:14px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:12px;
  border-top:1px solid var(--border);
  padding-top:10px;
}

/* TOGGLE (Web) */
.export-doc .visibility-toggle{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-left:auto;
}

.export-doc .visibility-toggle > div:first-child{
  font-weight:600;
  font-size:13px;
  color:var(--muted);
}

.export-doc .visibility-toggle > div:last-child{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.export-doc .visibility-toggle label{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  cursor:pointer;
  background:var(--soft);
  transition:background .15s ease, border-color .15s ease;
  user-select:none;
}

.export-doc .visibility-toggle label:hover{
  background:var(--soft2);
}

.export-doc .visibility-toggle input{
  margin:0;
  cursor:pointer;
}

.export-doc .visibility-toggle label:has(input:checked){
  background:#e8f0ff;
  border-color:#2c7be5;
}

/* =========================================================
   PDF / DOMPDF
   ========================================================= */
@page{
  size:A4;
  margin:12mm;
}

body.export-doc.export-doc--pdf{
  margin:0;
  background:#fff;
}

.export-doc.export-doc--pdf .export-doc__pdf-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
}

.export-doc.export-doc--pdf .export-doc__pdf-footer{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
}

.export-doc.export-doc--pdf .export-doc__content{
  margin-top:52mm;
  margin-bottom:18mm;
}

.export-doc.export-doc--pdf .export-doc__hdrTbl,
.export-doc.export-doc--pdf .export-doc__titleTbl,
.export-doc.export-doc--pdf .export-doc__metaTbl,
.export-doc.export-doc--pdf .export-doc__kvTbl,
.export-doc.export-doc--pdf .export-doc__ftrTbl{
  width:100%;
  border-collapse:collapse;
}

.export-doc.export-doc--pdf .export-doc__hdrLeft{
  vertical-align:top;
}

.export-doc.export-doc--pdf .export-doc__hdrRight{
  vertical-align:top;
  text-align:right;
  width:220px;
}

.export-doc.export-doc--pdf .export-doc__titleLeft{
  vertical-align:bottom;
}

.export-doc.export-doc--pdf .export-doc__titleRight{
  vertical-align:bottom;
  text-align:right;
  width:240px;
}

.export-doc.export-doc--pdf .export-doc__docMeta{
  font-size:12px;
  margin-top:2px;
}

.export-doc.export-doc--pdf .export-doc__metaCell{
  width:50%;
  vertical-align:top;
  padding-right:6px;
}

.export-doc.export-doc--pdf .export-doc__metaTbl td.export-doc__metaCell:last-child{
  padding-right:0;
}

.export-doc.export-doc--pdf .export-doc__hr{
  border-top:2px solid var(--border);
  margin:8px 0 0 0;
}

.export-doc.export-doc--pdf .export-doc__tbl{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  table-layout:auto;
  border-radius:0;
  overflow:visible;
}

.export-doc.export-doc--pdf .export-doc__tbl thead{
  display:table-header-group;
}

.export-doc.export-doc--pdf .export-doc__tbl tfoot{
  display:table-footer-group;
}

.export-doc.export-doc--pdf .export-doc__tbl th{
  background:var(--soft);
  text-align:left;
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  font-weight:800;
  font-size:12px;
}

.export-doc.export-doc--pdf .export-doc__tbl td{
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}

.export-doc.export-doc--pdf .export-doc__tbl tr{
  page-break-inside:avoid;
}

.export-doc.export-doc--pdf .export-doc__ftrTbl{
  border-top:1px solid var(--border);
}

.export-doc.export-doc--pdf .export-doc__ftrTbl td{
  padding-top:6px;
  font-size:11px;
  color:var(--muted);
}

.export-doc.export-doc--pdf .export-doc__ftrRight{
  text-align:right;
}

/* LEGACY / KOMPATIBILITÄT */
.export-doc.export-doc--pdf .small{
  font-size:11px;
}

.export-doc.export-doc--pdf .muted{
  color:var(--muted);
}

.export-doc.export-doc--pdf .h1{
  font-size:20px;
  font-weight:800;
  margin:0;
}

.export-doc.export-doc--pdf .hr{
  border-top:2px solid var(--border);
  margin:8px 0 0 0;
}

.export-doc.export-doc--pdf .pdf-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
}

.export-doc.export-doc--pdf .pdf-footer{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
}

.export-doc.export-doc--pdf .content{
  margin-top:52mm;
  margin-bottom:18mm;
}

.export-doc.export-doc--pdf .hdrTbl,
.export-doc.export-doc--pdf .titleTbl,
.export-doc.export-doc--pdf .metaTbl,
.export-doc.export-doc--pdf .kvTbl,
.export-doc.export-doc--pdf .ftrTbl{
  width:100%;
  border-collapse:collapse;
}

.export-doc.export-doc--pdf .hdrLeft{
  vertical-align:top;
}

.export-doc.export-doc--pdf .hdrRight{
  vertical-align:top;
  text-align:right;
  width:220px;
}

.export-doc.export-doc--pdf .companyName{
  font-weight:800;
  font-size:13px;
  margin-bottom:2px;
}

.export-doc.export-doc--pdf .companyLine{
  margin-top:2px;
  line-height:1.25;
}

.export-doc.export-doc--pdf .logo{
  max-width:220px;
  max-height:80px;
  object-fit:contain;
}

.export-doc.export-doc--pdf .titleLeft{
  vertical-align:bottom;
}

.export-doc.export-doc--pdf .titleRight{
  vertical-align:bottom;
  text-align:right;
  width:240px;
}

.export-doc.export-doc--pdf .docMeta{
  font-size:12px;
  margin-top:2px;
}

.export-doc.export-doc--pdf .metaCell{
  width:50%;
  vertical-align:top;
  padding-right:6px;
}

.export-doc.export-doc--pdf .metaTbl td.metaCell:last-child{
  padding-right:0;
}

.export-doc.export-doc--pdf .card{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
}

.export-doc.export-doc--pdf .k{
  width:150px;
  color:var(--muted);
  padding:3px 0;
  vertical-align:top;
}

.export-doc.export-doc--pdf .v{
  font-weight:700;
  padding:3px 0;
  vertical-align:top;
}

.export-doc.export-doc--pdf .tbl{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  table-layout:auto;
  border-radius:0;
  overflow:visible;
}

.export-doc.export-doc--pdf .tbl thead{
  display:table-header-group;
}

.export-doc.export-doc--pdf .tbl tfoot{
  display:table-footer-group;
}

.export-doc.export-doc--pdf .tbl th{
  background:var(--soft);
  text-align:left;
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  font-weight:800;
  font-size:12px;
}

.export-doc.export-doc--pdf .tbl td{
  padding:6px 8px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}

.export-doc.export-doc--pdf .tbl tr{
  page-break-inside:avoid;
}

.export-doc.export-doc--pdf .right{
  text-align:right;
}

.export-doc.export-doc--pdf .center{
  text-align:center;
}

.export-doc.export-doc--pdf .nowrap{
  white-space:nowrap;
}

.export-doc.export-doc--pdf .ftrTbl{
  border-top:1px solid var(--border);
}

.export-doc.export-doc--pdf .ftrTbl td{
  padding-top:6px;
  font-size:11px;
  color:var(--muted);
}

.export-doc.export-doc--pdf .ftrRight{
  text-align:right;
}

/* PRINT (Browser) */
@media print{
  html,
  body{
    height:auto !important;
  }

  body.export-doc{
    background:#fff !important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .export-doc .export-doc__toolbar,
  .export-doc .toolbar{
    display:none !important;
  }

  .export-doc .export-doc__page,
  .export-doc .page{
    min-height:auto !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    border:none !important;
    box-shadow:none !important;
    page-break-after:always;
    break-after:page;
    max-width:none;
  }

  .export-doc .export-doc__page:last-of-type,
  .export-doc .page:last-of-type{
    page-break-after:auto;
    break-after:auto;
  }

  .export-doc .export-doc__card,
  .export-doc .card{
    break-inside:avoid;
    page-break-inside:avoid;
  }

  .export-doc .export-doc__table thead,
  .export-doc thead{
    display:table-header-group;
  }

  .export-doc .export-doc__table tfoot,
  .export-doc tfoot{
    display:table-footer-group;
  }

  .export-doc .export-doc__table,
  .export-doc table{
    break-inside:auto;
    page-break-inside:auto;
    overflow:visible !important;
    border-radius:0;
  }

  .export-doc .export-doc__table tr,
  .export-doc tr{
    break-inside:avoid;
    page-break-inside:avoid;
  }
}

/* MOBILE */
@media (max-width:640px){
  body.export-doc{
    background:#fff;
  }

  .export-doc .export-doc__page,
  .export-doc .page{
    margin:0;
    padding:12px;
    max-width:none;
    min-height:auto;
    border:none;
    box-shadow:none;
  }

  .export-doc .export-doc__header,
  .export-doc .header{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .export-doc .export-doc__headerRight,
  .export-doc .header__right{
    text-align:left;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .export-doc .export-doc__logo,
  .export-doc .logo{
    max-width:140px;
    max-height:56px;
  }

  .export-doc .export-doc__toolbar,
  .export-doc .toolbar{
    margin-top:0;
    gap:6px;
  }

  .export-doc .export-doc__btn,
  .export-doc .btn{
    padding:8px 10px;
  }

  .export-doc .export-doc__titleRow,
  .export-doc .titleRow{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    margin:12px 0 10px;
  }

  .export-doc .export-doc__h1,
  .export-doc h1{
    font-size:20px;
  }

  .export-doc .export-doc__docNo,
  .export-doc .docNo{
    text-align:left;
    white-space:normal;
  }

  .export-doc .export-doc__metaGrid,
  .export-doc .metaGrid{
    grid-template-columns:1fr;
    gap:10px;
    margin:10px 0 14px;
  }

  .export-doc .export-doc__k,
  .export-doc .row .k{
    width:130px;
  }

  .export-doc .export-doc__table,
  .export-doc table{
    display:block;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .export-doc .export-doc__table thead,
  .export-doc .export-doc__table tbody,
  .export-doc .export-doc__table tfoot,
  .export-doc thead,
  .export-doc tbody,
  .export-doc tfoot{
    white-space:nowrap;
  }

  .export-doc .export-doc__footer,
  .export-doc .footer{
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }
}
/* =========================
   prod_packing.css
   Alle Klassen: prd_*
   Responsive + mobiles Scroll erlaubt
   ========================= */

html, body{
  height:100%;
  margin:0;
  overflow-x:hidden;      /* niemals horizontal */
  overflow-y:auto;        /* scroll erlaubt */
}

*, *::before, *::after{
  box-sizing:border-box;  /* verhindert „driften“ durch Padding/Border */
}

.prd_wrap{
  display:block;          /* kein 100vh/flex -> keine falsche Höhenberechnung */
  width:100%;
}

/* Optional: wenn .prd_card außen noch Padding hat, bleibt alles sauber im Viewport */
.prd_card{
  border-radius:14px;
  width:100%;
}

/* Kopf */
.prd_card_head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.prd_title{
  margin:0;
  font-size:18px;
}

.prd_subtitle{
  opacity:.75;
  font-size:11px;
}

/* Wenn keine Aufträge */
.prd_empty{
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fff;
}

/* Grid */
.prd_grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr)); /* verhindert Overflow */
  gap:10px;
  margin-top:10px;
}

@media (max-width: 900px){
  .prd_grid{ grid-template-columns:1fr; }
}

/* Card-Button (blau) – deutlich kleiner und stabil */
.prd_pack_btn{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  text-align:left;

  padding:12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);

  background:#0b5ed7;
  color:#fff;

  cursor:pointer;
  transition:transform .06s ease, box-shadow .06s ease, filter .06s ease;

  min-height:0;           /* wichtig: keine Mindesthöhe erzwingen */
}

.prd_pack_btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  filter:brightness(1.02);
}

.prd_pack_btn:active{
  transform:none;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  filter:brightness(.99);
}

.prd_pack_btn.prd_disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:none;
  box-shadow:none;
}

/* Texte kompakter */
.prd_t1{
  font-size:14px;
  font-weight:800;
  margin:0 0 4px 0;
  line-height:1.15;
  word-break:break-word;
}

.prd_t2{
  font-size:12px;
  opacity:.9;
  margin:0 0 6px 0;
  line-height:1.2;
  word-break:break-word;
}

/* Palettenbereich */
.prd_pal_main{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-top:4px;
  flex-wrap:wrap;
}

.prd_pal_big{
  font-size:20px;
  font-weight:900;
  line-height:1;
}

.prd_pal_small{
  font-size:11px;
  opacity:.85;
}

/* Restbox kompakter */
.prd_restbox{
  margin-top:6px;
  padding:8px 10px;
  border-radius:10px;
  border:1px dashed rgba(255,255,255,.55);
  background:rgba(255,255,255,.10);
  width:100%;
}

.prd_rbig{
  font-size:14px;
  font-weight:900;
  line-height:1.1;
}

.prd_rsmall{
  font-size:11px;
  opacity:.9;
  margin-top:2px;
  line-height:1.2;
}

.prd_hint_red{
  color:#ffd1d1;
  font-weight:900;
}

/* Details Block */
.prd_details{
  white-space:pre-line;
  font-size:11px;
  opacity:.9;
  margin-top:6px;
  word-break:break-word;
}

/* Hilfetext */
.prd_help{
  margin-top:6px;
  font-size:11px;
  opacity:.9;
}

.prd_help_dim{
  opacity:.8;
}

/* Sticky Bottom Bar – bleibt unten, aber blockiert kein Layout */
.prd_fixed_bottom{
  position:sticky;
  bottom:0;
  padding-top:10px;
  margin-top:10px;
  background:linear-gradient(to top, rgba(255,255,255,1) 65%, rgba(255,255,255,0));
}

.prd_bar{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Buttons kleiner */
.prd_btn{
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
}

.prd_btn_primary{
  background:#0b5ed7;
  color:#fff;
  border-color:rgba(0,0,0,.12);
}

.prd_btn_big{
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
  font-weight:900;

  display:block;
  margin:0 auto;     /* horizontal mittig */
}


/* Modal Form */
.prd_user_form{
  display:block;
}

.prd_label{
  display:block;
}

.prd_label_txt{
  font-weight:800;
  margin-bottom:4px;
}

.prd_mt_10{
  margin-top:8px;
}

.prd_hint{
  font-size:11px;
  opacity:.8;
  margin-top:3px;
}

/* Info Box im Modal */
.prd_info_box{
  margin-top:10px;
  padding:8px 10px;
  border:1px dashed rgba(0,0,0,.2);
  border-radius:10px;
  background:#fff;
}

.prd_info_title{
  font-weight:900;
}

.prd_info_text{
  font-size:11px;
  opacity:.85;
  margin-top:4px;
}

.prd_form_actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
/* Touch-Tastatur (NumPad) im Restplatten-Modal */
.prd_keypad{
  margin-top:10px;

  display:grid;
  grid-template-columns:repeat(3, auto); /* nicht mehr volle Breite */
  justify-content:center;                /* Block mittig */
  gap:8px;

  user-select:none;
  -webkit-user-select:none;
  touch-action:manipulation;
}

.prd_keypad .prd_key{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  width:64px;        /* feste kompakte Breite */
  height:44px;       /* deutlich kleiner */
  border-radius:10px;

  border:1px solid rgba(0,0,0,.15);
  background:#fff;

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

  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:transform .05s ease, background .05s ease;
}

.prd_keypad .prd_key:active{
  transform:scale(.95);
  background:rgba(0,0,0,.05);
}

.prd_keypad .prd_key_fn{
  background:rgba(0,0,0,.06);
  font-weight:800;
}

/* Eingabefeld etwas kleiner */
.prd_keypad_input{
  font-size:16px;
  height:40px;
}
/* File: prod_planung.css
   Hinweis: keine Inline-CSS im PHP. Diese Datei bindest du in deinem globalen CSS oder separat ein.
*/

/* =========================================================
   Produktionsplanung – vollständige CSS (VOLL-BREITE)
   + Zeitstrahl/Board horizontal scrollbar
   ========================================================= */

/* ---- ROOT / THEME OVERRIDES (FIX GELB) ---- */
.prod-plan {
  background: #fff !important;
  --card-bg: #fff;
}

/* Killt gelbe Card-Header aus globalem Theme */
.prod-plan .card-h,
.prod-plan__head {
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
}

/* Falls dein Theme Pseudo-Elemente fürs Header-Highlight nutzt */
.prod-plan .card-h::before,
.prod-plan .card-h::after,
.prod-plan__head::before,
.prod-plan__head::after {
  content: none !important;
  display: none !important;
}

/* Killt gelbe Sticky/Header-Hintergründe */
.prod-plan__timeline-head {
  background: #fff !important;
  background-color: #fff !important;
}

/* Falls die ganze Card gelb ist */
.prod-plan.card,
.card.prod-plan {
  background: #fff !important;
}

/* ---- Container / Layout ---- */
.prod-plan__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.prod-plan__title h2 {
  margin: 0;
}

.prod-plan__hint {
  margin-top: 6px;
  opacity: .8;
}

.prod-plan__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.prod-plan__date {
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
}

/* Vollbreite Layout (Pool oben, Board unten) */
.prod-plan__grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

/* ---- Pool (oben) ---- */
.prod-plan__pool {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.prod-plan__pool-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-plan__pool-title {
  font-weight: 900;
}

.prod-plan__pool-filter {
  width: 100%;
}

.prod-plan__pool-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.prod-plan__pool-list::-webkit-scrollbar { width: 10px; }
.prod-plan__pool-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.18);
  border-radius: 999px;
}
.prod-plan__pool-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,.06);
  border-radius: 999px;
}

.prod-plan__pool-item {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  cursor: grab;
  user-select: none;
  background: #fff;
}

.prod-plan__pool-item:active { cursor: grabbing; }

.prod-plan__pool-item:hover {
  border-color: rgba(0,0,0,.20);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.prod-plan__pool-num { font-weight: 900; white-space: nowrap; }
.prod-plan__pool-kg { opacity: .85; font-size: 12px; white-space: nowrap; }
.prod-plan__pool-date { opacity: .7; font-size: 12px; justify-self: end; white-space: nowrap; }

/* Drag Ghost */
.prod-plan__pool-item.is-ghost {
  position: fixed;
  width: 280px;
  opacity: .9;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}

/* ---- Board (volle Breite) ---- */
.prod-plan__board {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 12px;

  /* HIER DER FIX: horizontales Scrollen erzwingen */
  overflow-x: auto;
  overflow-y: auto;

  background: #fff;

  /* Scrollbar immer nutzbar */
  -webkit-overflow-scrolling: touch;
}

/* Optional: schönere horizontale Scrollbar */
.prod-plan__board::-webkit-scrollbar { height: 12px; width: 12px; }
.prod-plan__board::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.18);
  border-radius: 999px;
}
.prod-plan__board::-webkit-scrollbar-track {
  background: rgba(0,0,0,.06);
  border-radius: 999px;
}

/* Sticky Kopf (Zeitachse) */
.prod-plan__timeline-head {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

/* linke Spalte Ressource */
.prod-plan__lane-label {
  width: 220px;
  flex: 0 0 auto;
  font-weight: 900;
}

/* Zeitachse: NICHT auf 100% klemmen, sondern darf breiter werden */
.prod-plan__timescale {
  position: relative;
  height: 34px;
  flex: 0 0 auto;        /* wichtig: nicht zusammenquetschen */
  min-width: 1400px;     /* Fallback, JS setzt eh größer */
  border-bottom: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
}

/* Time labels */
.prod-plan__time-label {
  position: absolute;
  top: 2px;
  left: var(--left, 0px);
  transform: translateX(-50%);
  font-size: 12px;
  opacity: .85;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(0,0,0,.06);
  backdrop-filter: blur(2px);
}

/* ---- Lanes ---- */
.prod-plan__lanes {
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* WICHTIG: Damit Content breiter als Viewport sein darf */
  min-width: 1400px;  /* Fallback, JS macht track-min-width */
}

.prod-plan__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.prod-plan__row-left {
  width: 220px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
}

.prod-plan__row-title { font-weight: 900; }
.prod-plan__row-sub { opacity: .75; font-size: 12px; }

/* Track */
.prod-plan__track {
  position: relative;
  height: 64px;
  flex: 0 0 auto; /* wichtig: nicht schrumpfen */
  min-width: var(--track-min-width, 1400px);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(to right, rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: calc(15 * 2px) 100%;
  background-position: 0 0;
}

.prod-plan__track.is-drop-target {
  outline: 2px solid rgba(30,120,255,.35);
  box-shadow: 0 0 0 4px rgba(30,120,255,.08) inset;
}

.prod-plan__drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .10;
  font-weight: 900;
  letter-spacing: .12em;
  pointer-events: none;
}

/* ---- Items ---- */
.prod-plan__item {
  position: absolute;
  top: 10px;
  left: var(--left, 0px);
  width: var(--width, 80px);
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(30,120,255,.10);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 10px;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
}

.prod-plan__item:hover {
  border-color: rgba(0,0,0,.25);
  box-shadow: 0 12px 24px rgba(0,0,0,.10);
}

.prod-plan__item:active,
.prod-plan__item.is-dragging { cursor: grabbing; }

.prod-plan__item-num { font-weight: 900; white-space: nowrap; }
.prod-plan__item-kg,
.prod-plan__item-min { font-size: 12px; opacity: .8; white-space: nowrap; }
.prod-plan__item-min { justify-self: end; opacity: .75; }

.prod-plan__item-del {
  padding: 4px 8px !important;
  line-height: 1 !important;
  border-radius: 10px !important;
}

/* ---- Ressourcen Admin Modal ---- */
.prod-plan-res {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prod-plan-res__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.prod-plan-res__title { font-weight: 900; font-size: 16px; }
.prod-plan-res__sub { opacity: .75; margin-top: 4px; font-size: 12px; }

.prod-plan-res__top-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.prod-plan-res-form label { display: block; margin-top: 10px; }

.prod-plan-res-form .form-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .prod-plan__grid { grid-template-columns: 1fr; }
  .prod-plan__lane-label,
  .prod-plan__row-left { width: 180px; }
}


/* Optionaler Wrapper falls vorhanden */
.zta-container{
  width:100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 12px;              /* zusätzlicher Innenabstand */
}

/* ---- Layout helpers (minimal) ---- */
.zta-topbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
  margin: 6px 0 12px;
}

.zta-title{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .2px;
}

.zta-sub{
  font-size: 12px;
  opacity:.7;
  margin-top:2px;
}

.zta-topbar__right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.zta-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.zta-field__lbl{
  font-size: 12px;
  opacity:.72;
}

.zta-input{
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background:#fff;
  width:100%;
}

/* ---- KPIs ---- */
.zta-kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap:10px;
  margin: 0 0 14px;
}

@media (max-width: 1100px){
  .zta-kpis{
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 640px){
  .zta-kpis{
    grid-template-columns: 1fr;
  }
}

.zta-kpi{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 12px 14px;
  background:#fff;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}

.zta-kpi__lbl{
  font-size: 12px;
  opacity:.7;
}

.zta-kpi__val{
  font-size: 20px;
  font-weight: 900;
  margin-top:4px;
}

.zta-kpi__hint{
  font-size: 12px;
  opacity:.65;
  margin-top:2px;
}

/* ---- Grid ---- */
.zta-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  align-items:start;
}

@media (max-width: 1100px){
  .zta-grid{
    grid-template-columns: 1fr;
  }
}

.zta-card{
  min-width: 0; /* wichtig gegen Overflow */
}

/* ---- Filter ---- */
.zta-filterbar{
  margin-top: 10px;
}

.zta-filterform{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}

/* ---- Modal ---- */
.zta-modalbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}

/* ---- Checkbox style ---- */
.zta-check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  position: relative;
}

.zta-check input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.zta-check-ui{
  width: 18px;
  height: 18px;
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  display:inline-block;
  position: relative;
  box-shadow: 0 2px 6px rgba(15,23,42,.08);
}

.zta-check:hover .zta-check-ui{
  border-color: rgba(59,130,246,.35);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}

.zta-check input:checked + .zta-check-ui{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.14);
  background: linear-gradient(180deg, rgba(239,246,255,1), rgba(255,255,255,1));
}

.zta-check input:checked + .zta-check-ui::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(59,130,246,1);
  box-shadow: 0 0 0 2px rgba(59,130,246,.20);
}

tr.is-saving{
  opacity:.72;
}

/* ---- Planer ---- */
.zta-planer-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-top: 6px;
}

.zta-planer-legend{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.zta-legend-item{
  display:inline-flex;
  gap:6px;
  align-items:center;
  font-size:12px;
  opacity:.85;
}

.zta-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  border:1px solid rgba(0,0,0,.15);
}

.zta-dot-u10{ background: rgba(59,130,246,.20); }
.zta-dot-u20{ background: rgba(59,130,246,.60); }
.zta-dot-k10{ background: rgba(245,158,11,.25); }
.zta-dot-k20{ background: rgba(245,158,11,.70); }
.zta-dot-we{ background: rgba(15,23,42,.10); }

.zta-planer-wrap{
  margin-top: 10px;
  overflow:auto;
  border:1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 8px;                 /* zusätzlicher Innenabstand */
  background:#fff;
}

.zta-planer-table{
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  background:#fff;
}

.zta-planer-table th,
.zta-planer-table td{
  border-bottom:1px solid rgba(0,0,0,.06);
  border-right:1px solid rgba(0,0,0,.06);
}

.zta-planer-table thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  font-size:12px;
  padding:8px 6px;
}

.zta-planer-day{
  text-align:center;
  min-width: 26px;
}

.zta-planer-day.is-we{
  background: rgba(15,23,42,.03);
}

.zta-planer-sticky{
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  min-width: 220px;
}

.zta-planer-emp{
  font-weight: 800;
  font-size: 12px;
  padding: 8px 10px;
}

.zta-planer-cell{
  width: 26px;
  height: 28px;
  padding: 0;
  position: relative;
  background:#fff;
}

.zta-planer-cell.is-we{
  background: rgba(15,23,42,.03);
}

.zta-planer-bar{
  position:absolute;
  left:4px;
  right:4px;
  top:6px;
  bottom:6px;
  border-radius: 8px;
  background: transparent;
}

.zta-planer-cell.is-u10 .zta-planer-bar{ background: rgba(59,130,246,.18); }
.zta-planer-cell.is-u20 .zta-planer-bar{ background: rgba(59,130,246,.55); }
.zta-planer-cell.is-k10 .zta-planer-bar{ background: rgba(245,158,11,.25); }
.zta-planer-cell.is-k20 .zta-planer-bar{ background: rgba(245,158,11,.70); }

}
/* IMAP MAIL*/
.mail-shell{
  display:grid;
  grid-template-columns:240px 420px 1fr;
  gap:16px;
}

.mail-pane{
  min-width:0;
  overflow:hidden;
}

.mail-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.mail-search{
  flex:1 1 220px;
  min-width:180px;
}

.mail-search input,
.mail-filter select{
  width:100%;
}

.mail-list{
  display:flex;
  flex-direction:column;
  height:calc(100vh - 320px);
  min-height:420px;
  overflow:auto;
}

.mail-item{
  display:block;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-decoration:none;
  color:inherit;
  background:transparent;
}

.mail-item:hover{
  background:rgba(255,255,255,.04);
}

.mail-item.is-active{
  background:rgba(255,255,255,.08);
}

.mail-item.is-unread .mail-item__top,
.mail-item.is-unread .mail-item__subject{
  font-weight:700;
}

.mail-item__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.mail-item__name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mail-item__date{
  flex:0 0 auto;
  font-size:12px;
  opacity:.75;
}

.mail-item__subject{
  margin-bottom:4px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mail-item__preview{
  font-size:13px;
  opacity:.75;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mail-folder-list{
  padding:8px 0;
}

.mail-folder-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  text-decoration:none;
  color:inherit;
}

.mail-folder-link.is-active{
  font-weight:700;
  background:rgba(255,255,255,.08);
}

.mail-reader{
  height:calc(100vh - 320px);
  min-height:420px;
  overflow:auto;
  padding:20px;
}

.mail-reader__body{
  white-space:pre-wrap;
  line-height:1.5;
}

.mail-empty{
  padding:18px;
  opacity:.8;
}

.mail-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:12px;
  background:rgba(255,255,255,.08);
}

@media (max-width: 1400px){
  .mail-shell{
    grid-template-columns:220px 360px 1fr;
  }
}

@media (max-width: 1100px){
  .mail-shell{
    grid-template-columns:1fr;
  }

  .mail-list,
  .mail-reader{
    height:auto;
    min-height:unset;
  }
}
/* footer Wartung */
.footer-maintenance-form {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.footer-maintenance-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 165, 0, 0.35);
  background: rgba(255, 165, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.footer-maintenance-btn:hover {
  transform: translateY(-1px);
}

.footer-maintenance-btn.is-active {
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.25);
  opacity: 1;
}

.footer-maintenance-btn.is-inactive {
  opacity: 0.75;
}

.header-maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 165, 0, 0.35);
  background: rgba(255, 165, 0, 0.12);
  white-space: nowrap;
}

.header-maintenance-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  animation: maintenance-blink 1s linear infinite;
}

.header-maintenance-badge-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

@keyframes maintenance-blink {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 800px) {
  .header-maintenance-badge {
    margin-left: 8px;
    padding: 5px 8px;
  }

  .header-maintenance-badge-text {
    display: none;
  }
}