/*
 * galona-ui.css | v12 | 02.05.2026 | FIX-861: PDF-Modal-Styles (verschiebbar/resize) + Title-Bar + Resize-Handles
 * galona-ui.css | v11 | 23.04.2026 | .badge-hdr: Badge auf dunklem Hintergrund
 * galona-ui.css | v10 | 23.04.2026 | hdr-badge width:90px, .bb navy/weiss, btn-o Border sichtbar
 * galona-ui.css | v5 | 22.04.2026 | badge width:90px (gleiche Breite wie eb-btn)
 * GALONA Design System — Buttons, Badges, Status
 * Eingebunden von: portal, admin, mandant, warenbuch
 * © 2024-2026 Galona Global Services LLC
 */

/* ── CSS-VARIABLEN ─────────────────────────────────────────── */
:root {
  --navy:        #1a3a6b;
  --navy2:       #0f2347;
  --navy-light:  #e8f0fe;
  --green:       #1e8e3e;
  --green2:      #166d30;
  --red:         #c5221f;
  --red-light:   #fce8e6;
  --orange:      #e67e22;
  --gold:        #c9a84c;
  --bg:          #f4f6fb;
  --white:       #ffffff;
  --border:      #dde3f0;
  --muted:       #6b7a99;
  --text:        #1a2233;
  --r:           8px;
}

/* ── BASIS-BUTTON ──────────────────────────────────────────── */
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
  box-sizing: border-box;
  width: 90px;
  justify-content: center;
}
.g-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Grössen */
.g-btn-sm  { padding: 5px 12px;  font-size: 12px; }
.g-btn-lg  { padding: 13px 24px; font-size: 15px; font-weight: 700; }
.g-btn-full{ width: 100%; }

/* Varianten */
.g-btn-primary { background: var(--navy);  color: #fff; }
.g-btn-primary:hover { background: var(--navy2); }

.g-btn-success { background: var(--green); color: #fff; }
.g-btn-success:hover { background: var(--green2); }

.g-btn-danger  { background: var(--red);   color: #fff; }
.g-btn-danger:hover  { opacity: .85; }

.g-btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.g-btn-outline:hover { background: var(--bg); }

.g-btn-muted {
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
}
.g-btn-muted:hover { background: var(--bg); }

/* Button auf dunklem Hintergrund (card-hdr, navbar) */
.g-btn-hdr {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.g-btn-hdr:hover { background: rgba(255,255,255,.28); }

/* Status-Buttons (Toggle aktiv/inaktiv/gesperrt) */
.g-btn-aktiv    { background: #1a7a4a; color: #fff; border: none; }
.g-btn-inaktiv  { background: #e8a030; color: #fff; border: none; }
.g-btn-gesperrt { background: var(--red); color: #fff; border: none; }

/* ── ALIASE — Rückwärtskompatibilität ──────────────────────── */
/* Portal + Admin verwenden .btn .btn-p .btn-n .btn-o .btn-d .btn-sm */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px; border-radius: var(--r);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; text-decoration: none;
  transition: opacity .15s; white-space: nowrap; box-sizing: border-box;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-p  { background: var(--green);  color: #fff; }
.btn-p:hover  { background: var(--green2); }
.btn-n  { background: var(--navy);   color: #fff; }
.btn-n:hover  { background: var(--navy2); }
.btn-d  { background: var(--red);    color: #fff; }
.btn-d:hover  { opacity: .85; }
.btn-o  { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-o:hover  { background: var(--bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-hdr {
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  border-radius: var(--r); cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.btn-hdr:hover { background: rgba(255,255,255,.28); }
.btn-aktiv    { background: #1a7a4a; color: #fff; border: none; border-radius: var(--r); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-inaktiv  { background: #e8a030; color: #fff; border: none; border-radius: var(--r); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-gesperrt { background: var(--red); color: #fff; border: none; border-radius: var(--r); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }

/* Warenbuch-spezifische Aliases */
.btn-ok, .btn-buchen { background: var(--green); color: #fff; border: none; border-radius: var(--r); font-weight: 700; cursor: pointer; }
.btn-next, .btn-drucken, .btn-uebernehmen, .btn-ausfullen, .btn-logo, .btn-n { background: var(--navy); color: #fff; border: none; border-radius: var(--r); font-weight: 700; cursor: pointer; }
.btn-back, .btn-secondary, .btn-close-det { background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: var(--r); font-weight: 600; cursor: pointer; }
.btn-save { background: var(--green); color: #fff; border: none; border-radius: var(--r); font-weight: 700; cursor: pointer; }

/* Mandant Login */
.btn-login { width: 100%; background: var(--navy); color: #fff; border: none; border-radius: var(--r); font-size: 15px; font-weight: 700; cursor: pointer; }
.btn-logout { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: var(--r); cursor: pointer; font-size: 12px; }

/* Abmelden-Button im Portal */
.btn-abn { width: 100%; padding: 9px; background: none; border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; color: var(--muted); cursor: pointer; }
.btn-abn:hover { background: var(--bg); }

/* ── BADGES / STATUS ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1;
  height: 22px;
  box-sizing: border-box;
  white-space: nowrap;
}
/* Grün = aktiv */
.bg, .badge-aktiv     { background: #e6f4ea; color: #1e8e3e; }
/* Rot = gesperrt/fehler */
.br, .badge-gesperrt  { background: var(--red-light); color: var(--red); }
/* Blau = info / Einmal-PW */
.bb, .badge-info      { background: #e8f0fe; color: var(--navy); }
/* Grau = inaktiv */
.badge-inaktiv        { background: #f0f0f0; color: #666; }
/* Orange = warnung */
.badge-warn           { background: #fff3e0; color: #e65100; }

/* ── INLINE-AKTIONSBUTTONS (Tabellen) ──────────────────────── */
.eb-btn {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  margin-left: 3px;
  font-family: inherit;
  transition: background .1s;
  white-space: nowrap;
  box-sizing: border-box;
  width: 90px;
  justify-content: center;
}
.eb-btn:hover  { background: var(--bg); }
.eb-del        { color: var(--red); border-color: #f5c6c6; }
.eb-del:hover  { background: var(--red-light); }

/* ── HDR-BADGE (Admin-Dashboard Status-Badges in Card-Header) ── */
.hdr-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 90px !important;
  height: 24px !important;
  padding: 0 8px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}
.hdr-aktiv    { background: #1a7a4a !important; color: #fff !important; }
.hdr-inaktiv  { background: #e8a030 !important; color: #fff !important; }
.hdr-gesperrt { background: var(--red) !important; color: #fff !important; }

/* .bb: navy Hintergrund weisse Schrift, auto Breite */
.bb, .badge-info { background: var(--navy) !important; color: #fff !important; width: auto !important; }

/* btn-o Border sichtbarer */
.btn-o { border: 1.5px solid #aab4c8 !important; }

/* Badge auf dunklem Hintergrund (card-hdr) */
.badge-hdr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}

/* ── FIX-861 PDF-VORSCHAU-MODAL (verschiebbar + groessenanpassbar) ─── */
.pdf-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 15%; top: 8%;
  width: 70%; height: 84%;
  min-width: 400px; min-height: 300px;
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 12px 60px rgba(0,0,0,.45);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pdf-modal-titlebar {
  background: var(--navy);
  color: #fff;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: move;
  user-select: none;
  font-size: 13px;
}
.pdf-modal-tit {
  font-weight: 700;
  letter-spacing: .3px;
}
.pdf-modal-sub {
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.pdf-modal-btn {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  width: 30px;
  height: 26px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pdf-modal-btn:hover { background: rgba(255,255,255,.28); }
.pdf-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #f0f0f0;
}
/* Resize-Handles */
.pdf-modal-resize-r {
  position: absolute;
  top: 32px; right: 0; bottom: 8px;
  width: 6px;
  cursor: ew-resize;
  background: transparent;
}
.pdf-modal-resize-b {
  position: absolute;
  left: 8px; right: 8px; bottom: 0;
  height: 6px;
  cursor: ns-resize;
  background: transparent;
}
.pdf-modal-resize-br {
  position: absolute;
  right: 0; bottom: 0;
  width: 14px; height: 14px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.25) 50%);
}
.pdf-modal-resize-r:hover,
.pdf-modal-resize-b:hover,
.pdf-modal-resize-br:hover {
  background-color: rgba(26,58,107,.15);
}
