/* Lions Glühwein-Planer – alle Regeln sind auf .lgp bzw. .lgp-* beschränkt, damit das Theme unberührt bleibt. */
.lgp, .lgp-overlay, .lgp-toast {
  --lgp-bg: #F2F3F7; --lgp-surface: #FFFFFF; --lgp-surface-2: #E9EBF1; --lgp-ink: #161B26; --lgp-muted: #5A6174; --lgp-line: #D6D9E2;
  --lgp-accent: #173B73; --lgp-accent-ink: #FFFFFF; --lgp-gold: #B8871F;
  --lgp-low: #C3372C; --lgp-low-bg: #FCE9E6; --lgp-ok: #2C7A4B; --lgp-ok-bg: #E6F3EA; --lgp-full-bg: #E3ECF8;
  --lgp-staff-bg: #E2E4EA; --lgp-closed: #ECEDF1; --lgp-hatch: #DADDE5;
  --lgp-shadow: 0 10px 30px rgba(20, 30, 60, .16);
  color: var(--lgp-ink); font-size: 15px; line-height: 1.45;
}
.lgp *, .lgp-overlay *, .lgp-toast { box-sizing: border-box; }
.lgp [hidden], .lgp-overlay [hidden], .lgp-toast[hidden] { display: none !important; }

/* Volle Breite, auch wenn das Theme den Inhalt schmal hält */
.lgp { width: min(1500px, calc(100vw - 32px)); margin-left: calc(50% - min(750px, 50vw - 16px)); margin-block: 16px 40px; }
.lgp-wrap { display: flex; flex-direction: column; gap: 14px; }
.lgp-busy { cursor: progress; }

/* Theme-Stile neutralisieren */
.lgp button, .lgp-overlay button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; text-transform: none; letter-spacing: normal; box-shadow: none; line-height: 1.2; min-height: 0; width: auto; cursor: pointer; border-radius: 0; }
.lgp input, .lgp select, .lgp-overlay input, .lgp-overlay select { font: inherit; color: var(--lgp-ink); margin: 0; box-shadow: none; max-width: 100%; }
.lgp table, .lgp th, .lgp td { margin: 0; background: none; font-size: inherit; line-height: inherit; }
.lgp h2, .lgp h3, .lgp h4, .lgp-overlay h3 { margin: 0; line-height: 1.2; letter-spacing: normal; text-transform: none; }
.lgp p, .lgp-overlay p { margin: 0; }
.lgp ul { margin: 0; }
.lgp a.lgp-btn, .lgp-overlay a.lgp-btn { text-decoration: none; }
.lgp :focus-visible, .lgp-overlay :focus-visible { outline: 2px solid var(--lgp-gold); outline-offset: 2px; }

.lgp-top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; justify-content: space-between; }
.lgp .lgp-title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.lgp-sub { color: var(--lgp-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.lgp-user { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; }
.lgp-role { font-weight: 600; }
.lgp-uname { color: var(--lgp-muted); }
.lgp-loading { padding: 24px; color: var(--lgp-muted); }

.lgp-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.lgp-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lgp-navlbl { font-weight: 600; font-size: 18px; min-width: 12ch; text-align: center; font-variant-numeric: tabular-nums; }
.lgp .lgp-ib { border: 1px solid var(--lgp-line); background: var(--lgp-surface); border-radius: 8px; width: 34px; height: 34px; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; }
.lgp .lgp-ib:disabled { opacity: .35; cursor: default; }
.lgp .lgp-ib-sm { width: 26px; height: 26px; font-size: 14px; flex: none; }
.lgp-seg { display: inline-flex; background: var(--lgp-surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.lgp .lgp-seg button { padding: 6px 11px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--lgp-muted); }
.lgp .lgp-seg button[aria-pressed="true"] { background: var(--lgp-surface); color: var(--lgp-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lgp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--lgp-muted); align-items: center; }
.lgp-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.lgp .lg-low { background: var(--lgp-low-bg); box-shadow: inset 3px 0 0 var(--lgp-low); }
.lgp .lg-ok { background: var(--lgp-ok-bg); box-shadow: inset 3px 0 0 var(--lgp-ok); }
.lgp .lg-staff { background: var(--lgp-staff-bg); }
.lgp .lg-vol { border: 1.5px dashed var(--lgp-muted); }

.lgp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
@media (max-width: 1050px) { .lgp-layout { grid-template-columns: minmax(0, 1fr); } }

.lgp-gridwrap { overflow-x: auto; background: var(--lgp-surface); border: 1px solid var(--lgp-line); border-radius: 12px; position: relative; }
.lgp table.lgp-grid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; border: 0; }
.lgp table.lgp-grid.lgp-week { min-width: 1060px; }
.lgp .lgp-grid th, .lgp .lgp-grid td { border: 0; border-bottom: 1px solid var(--lgp-line); border-right: 1px solid var(--lgp-line); padding: 0; vertical-align: top; text-align: left; }
.lgp .lgp-grid tr > *:last-child { border-right: 0; }
.lgp .lgp-grid thead th { position: sticky; top: 0; background: var(--lgp-surface); z-index: 2; }
.lgp .lgp-grid .lgp-hcol { width: 62px; position: sticky; left: 0; background: var(--lgp-surface); z-index: 1; font-size: 12.5px; font-weight: 600; color: var(--lgp-muted); text-align: right; padding: 6px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lgp .lgp-grid thead .lgp-hcol { z-index: 3; }
.lgp .lgp-grid .lgp-dh { padding: 8px 10px; border-top: 4px solid var(--cc, var(--lgp-line)); font-weight: 400; }
.lgp-d1 { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.lgp-d1 small { font-weight: 600; font-size: 12px; color: var(--lgp-muted); }
.lgp-club { font-size: 13px; font-weight: 700; color: var(--cc); }
.lgp-hours { font-size: 12px; color: var(--lgp-muted); }
.lgp .lgp-dsel { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--cc); background: var(--lgp-surface); border: 1px solid var(--lgp-line); border-radius: 6px; padding: 2px 4px; height: 26px; }
.lgp .lgp-grid .lgp-dh.lgp-out { border-top-color: var(--lgp-line); color: var(--lgp-muted); }
.lgp-warn, .lgp-good { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 0 7px; }
.lgp-warn { color: var(--lgp-low); background: var(--lgp-low-bg); }
.lgp-good { color: var(--lgp-ok); background: var(--lgp-ok-bg); }
.lgp .lgp-foreign { opacity: .5; }

.lgp .lgp-grid td.lgp-cl { height: 62px; }
.lgp .lgp-grid td.lgp-closed, .lgp .lgp-grid td.lgp-out { background: repeating-linear-gradient(135deg, var(--lgp-closed) 0 6px, var(--lgp-hatch) 6px 7px); }
.lgp .lgp-grid td.lgp-staff { background: var(--lgp-staff-bg); }
.lgp-sb { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; min-height: 62px; padding: 8px; color: var(--lgp-muted); font-size: 13px; text-align: center; gap: 2px; }
.lgp-sb b { color: var(--lgp-ink); }
.lgp .lgp-grid td.lgp-slot { padding: 4px; transition: background .12s; }
.lgp .lgp-grid td.lgp-low { background: var(--lgp-low-bg); box-shadow: inset 3px 0 0 var(--lgp-low); }
.lgp .lgp-grid td.lgp-ok { box-shadow: inset 3px 0 0 var(--lgp-ok); }
.lgp .lgp-grid td.lgp-full { background: var(--lgp-full-bg); box-shadow: inset 3px 0 0 var(--lgp-ok); }
.lgp .lgp-grid td.lgp-over { outline: 2px solid var(--lgp-gold); outline-offset: -2px; background: #FBF3E0; }
.lgp-slots { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 3px; }
@media (max-width: 560px) { .lgp-slots { grid-template-columns: 1fr 1fr; } }
.lgp .lgp-chip, .lgp .lgp-add, .lgp .lgp-empty, .lgp .lgp-inl { height: 26px; border-radius: 6px; font-size: 13px; min-width: 0; }
.lgp .lgp-chip { display: flex; align-items: center; padding: 0 7px; background: var(--lgp-surface); border: 1px solid var(--lgp-line); font-weight: 600; white-space: nowrap; overflow: hidden; cursor: default; user-select: none; }
.lgp .lgp-chip span { overflow: hidden; text-overflow: ellipsis; }
.lgp .lgp-chip.lgp-vol { border-style: dashed; border-color: var(--lgp-muted); }
.lgp .lgp-chip.lgp-editable { cursor: grab; }
.lgp .lgp-chip.lgp-editable:hover { border-color: var(--lgp-accent); }
.lgp .lgp-chip.lgp-dragging { opacity: .4; }
.lgp .lgp-chip.lgp-mine { border: 1px solid var(--lgp-gold); box-shadow: inset 0 0 0 1px var(--lgp-gold); }
.lgp .lgp-add { border: 1px dashed #B5BAC6; background: transparent; color: var(--lgp-muted); font-weight: 700; font-size: 15px; line-height: 1; text-align: center; }
.lgp .lgp-add:hover { background: var(--lgp-surface); color: var(--lgp-accent); border-color: var(--lgp-accent); }
.lgp .lgp-empty { display: block; }
.lgp .lgp-inl { width: 100%; border: 1.5px solid var(--lgp-accent); padding: 0 6px; background: var(--lgp-surface); outline: none; }

.lgp-side { display: flex; flex-direction: column; gap: 12px; }
.lgp-card { background: var(--lgp-surface); border: 1px solid var(--lgp-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.lgp .lgp-card h3 { font-size: 16px; font-weight: 700; }
.lgp-card p { font-size: 14px; color: var(--lgp-muted); }
.lgp-card p b { color: var(--lgp-ink); }
.lgp .lgp-card ul { padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.lgp-noaccess { margin: 16px; max-width: 520px; }
.lgp-note { font-size: 12.5px !important; }
.lgp-eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--lgp-muted); }
.lgp-stats { display: flex; flex-direction: column; gap: 6px; }
.lgp-stat { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 8px; }
.lgp-stat.lgp-me .lgp-nm { font-weight: 800; }
.lgp-nm { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.lgp-nm small { color: var(--lgp-muted); font-weight: 400; }
.lgp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); flex: none; }
.lgp-pill { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lgp-pill.low { color: var(--lgp-low); background: var(--lgp-low-bg); }
.lgp-pill.ok { color: var(--lgp-ok); background: var(--lgp-ok-bg); }
.lgp-linkrow { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lgp-linkrow code { font-size: 12px; background: var(--lgp-surface-2); color: var(--lgp-ink); border-radius: 6px; padding: 5px 7px; word-break: break-all; user-select: all; }
.lgp-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lgp-row.lgp-tight { flex-wrap: nowrap; margin-top: 3px; }
.lgp .lgp-btn, .lgp-overlay .lgp-btn { display: inline-block; border: 1px solid var(--lgp-line); background: var(--lgp-surface); color: var(--lgp-ink); border-radius: 8px; padding: 6px 11px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.lgp .lgp-btn:hover, .lgp-overlay .lgp-btn:hover { border-color: var(--lgp-accent); }
.lgp .lgp-btn.lgp-primary, .lgp-overlay .lgp-btn.lgp-primary { background: var(--lgp-accent); color: var(--lgp-accent-ink); border-color: var(--lgp-accent); }
.lgp .lgp-btn.lgp-danger, .lgp-overlay .lgp-btn.lgp-danger { color: var(--lgp-low); border-color: #E3B3AE; }
.lgp .lgp-btn.lgp-sm, .lgp-overlay .lgp-btn.lgp-sm { padding: 3px 8px; font-size: 12.5px; }
.lgp .lgp-btn:disabled, .lgp-overlay .lgp-btn:disabled { opacity: .5; cursor: progress; }
.lgp .lgp-link { color: var(--lgp-accent); text-decoration: underline; font-size: 13px; }
.lgp-settings { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 14px; }
.lgp-tr { display: flex; gap: 4px; align-items: center; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.lgp .lgp-settings select, .lgp .lgp-settings input { padding: 3px 4px; border: 1px solid var(--lgp-line); border-radius: 6px; background: var(--lgp-surface); height: auto; }
.lgp .lgp-log { list-style: none; padding: 0; max-height: 300px; overflow: auto; gap: 7px; }
.lgp-log li { font-size: 13px; line-height: 1.35; border-left: 2px solid var(--lgp-line); padding-left: 8px; }
.lgp-log time { display: block; font-size: 11.5px; color: var(--lgp-muted); font-variant-numeric: tabular-nums; }
.lgp-who { font-weight: 700; }

.lgp-pop { position: absolute; z-index: 20; width: 280px; background: var(--lgp-surface); border: 1px solid var(--lgp-line); border-radius: 12px; box-shadow: var(--lgp-shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.lgp .lgp-pop h4 { font-size: 15px; font-weight: 700; }
.lgp-pop p { font-size: 13.5px; color: var(--lgp-muted); }
.lgp-meta { font-size: 12.5px; color: var(--lgp-muted); font-variant-numeric: tabular-nums; }
.lgp-f { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--lgp-muted); }
.lgp .lgp-f input, .lgp .lgp-f select, .lgp-overlay .lgp-f input, .lgp-overlay .lgp-f select { border: 1px solid var(--lgp-line); border-radius: 7px; padding: 6px 8px; background: var(--lgp-surface); color: var(--lgp-ink); font-size: 14px; font-weight: 400; width: 100%; height: auto; }
.lgp-grow { flex: 1; }
.lgp-confirm { background: var(--lgp-low-bg); border-radius: 8px; padding: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.lgp-check { display: flex; gap: 8px; font-size: 13px; color: var(--lgp-muted); align-items: flex-start; font-weight: 400; }
.lgp-check input { margin-top: 3px; flex: none; }

.lgp-overlay { position: fixed; inset: 0; background: rgba(10, 14, 24, .45); display: grid; place-items: center; z-index: 100000; padding: 16px; }
.lgp-modal { background: var(--lgp-surface); color: var(--lgp-ink); border-radius: 14px; box-shadow: var(--lgp-shadow); width: min(440px, 100%); max-height: calc(100% - 20px); overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.lgp-overlay h3 { font-size: 19px; font-weight: 700; }
.lgp-form { display: flex; flex-direction: column; gap: 10px; }
.lgp-err { color: var(--lgp-low); font-size: 13px; font-weight: 600; }
.lgp-okbox { background: var(--lgp-ok-bg); border-radius: 10px; padding: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.lgp-okbox .lgp-row { margin-top: 2px; }
.lgp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lgp-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--lgp-ink); color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 14px; font-weight: 600; z-index: 100001; max-width: calc(100% - 32px); box-shadow: var(--lgp-shadow); }

@media (prefers-reduced-motion: reduce) { .lgp * { transition: none !important; } }

/* Druckansicht */
#lgp-print { display: none; }
@media print {
  html.lgp-printing body > *:not(#lgp-print) { display: none !important; }
  html.lgp-printing #lgp-print { display: block !important; font: 10pt/1.3 system-ui, sans-serif; color: #000; }
  #lgp-print h1 { font-size: 15pt; margin: 0 0 2pt; }
  #lgp-print p { margin: 0 0 8pt; font-size: 9pt; }
  .lgp-ptable { width: 100%; border-collapse: collapse; margin-bottom: 12pt; page-break-inside: avoid; table-layout: fixed; }
  .lgp-ptable th, .lgp-ptable td { border: .5pt solid #888; padding: 2pt 4pt; vertical-align: top; text-align: left; font-size: 8.5pt; }
  .lgp-ptable thead th { background: #eee; }
  .lgp-ptable tbody th { width: 40pt; }
  .lgp-pclosed { background: #f2f2f2; }
  .lgp-pstaff { background: #e6e6e6; color: #555; }
  .lgp-plow { background: #fde8e6; }
  @page { size: A4 landscape; margin: 10mm; }
}
