/* ============================================================
   ProbusEventer – Stylesheet (Sidebar-Layout)
   Brand-Color: #63B8FF
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Sans:wght@400;500&display=swap');

/* ── Reset & Basis ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand:        #63B8FF;
    --brand-dark:   #3A8FD9;
    --brand-light:  #A8D8FF;
    --brand-pale:   #E8F5FF;
    --text:         #1a2535;
    --text-muted:   #6b7a8f;
    --border:       #dce6ef;
    --bg:           #f4f8fc;
    --white:        #ffffff;
    --danger:       #e74c3c;
    --danger-light: #ffeaea;
    --success:      #27ae60;
    --success-light:#eafaf1;
    --warning:      #f39c12;
    --warning-light:#fef9e7;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:    0 4px 16px rgba(99,184,255,0.15);
    --shadow-lg:    0 8px 32px rgba(99,184,255,0.20);
    --radius:       10px;
    --radius-sm:    6px;
    --radius-lg:    16px;
    --font:         'Outfit', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --transition:   0.2s ease;

    /* Sidebar */
    --sidebar-w:         240px;
    --sidebar-w-collapsed: 64px;
    --sidebar-bg:        #1a2535;
    --sidebar-bg-hover:  rgba(255,255,255,0.07);
    --sidebar-bg-active: rgba(99,184,255,0.18);
    --sidebar-text:      rgba(255,255,255,0.78);
    --sidebar-text-active: #ffffff;
    --topbar-h:          52px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* ── Standalone-Header (Login / Passwort-Reset) ─────────────── */
/* Diese Seiten haben kein Sidebar-Layout, aber nutzen pe-header */
.pe-header {
    background: var(--brand);
    padding: 0 32px;
    display: flex;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 2px 12px rgba(58,143,217,0.3);
}
.pe-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.pe-logo {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.pe-logo img  { width: 32px; height: 32px; object-fit: contain; }
.pe-logo-icon { font-size: 22px; line-height: 1; }
.pe-brand-text {
    font-family: var(--font);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.pe-sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: width 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Sidebar Brand ─────────────────────────────────────────── */
.pe-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 68px;
    cursor: pointer;
    flex-shrink: 0;
}
.pe-sidebar-brand:hover { background: var(--sidebar-bg-hover); }

.pe-sidebar-logo {
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.pe-sidebar-logo img  { width: 28px; height: 28px; object-fit: contain; }
.pe-sidebar-logo span { font-size: 18px; }

.pe-sidebar-brand-text {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.pe-sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.pe-sidebar-close:hover { background: var(--sidebar-bg-hover); color: #fff; }

/* ── Sidebar Nav ───────────────────────────────────────────── */
.pe-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.pe-sidebar-section-label {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 14px 10px 5px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}

.pe-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--sidebar-text);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 2px;
    position: relative;
    /* FIX: Touch-Verbesserungen für Firefox Android */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.pe-sidebar-link:hover {
    background: var(--sidebar-bg-hover);
    color: #fff;
}
.pe-sidebar-link.active {
    background: var(--sidebar-bg-active);
    color: var(--sidebar-text-active);
}
.pe-sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
}

.pe-sidebar-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.pe-sidebar-label {
    flex: 1;
    transition: opacity 0.2s;
}

.pe-sidebar-badge {
    background: #e65100;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

/* ── Sidebar Footer ────────────────────────────────────────── */
.pe-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    overflow: hidden;
}

.pe-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.pe-sidebar-avatar {
    width: 32px;
    height: 32px;
    background: var(--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pe-sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.2s;
}

.pe-sidebar-user-name {
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pe-sidebar-user-role {
    font-size: 10.5px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pe-sidebar-logout {
    color: rgba(255,255,255,0.45);
    font-size: 18px;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.pe-sidebar-logout:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ── Collapsed State (Desktop) ─────────────────────────────── */
.pe-sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
}
.pe-sidebar.collapsed .pe-sidebar-brand-text,
.pe-sidebar.collapsed .pe-sidebar-label,
.pe-sidebar.collapsed .pe-sidebar-section-label,
.pe-sidebar.collapsed .pe-sidebar-badge,
.pe-sidebar.collapsed .pe-sidebar-user-info {
    opacity: 0;
    pointer-events: none;
    width: 0;
}
.pe-sidebar.collapsed .pe-sidebar-link {
    justify-content: center;
    padding: 10px;
}
.pe-sidebar.collapsed .pe-sidebar-icon { width: auto; }
.pe-sidebar.collapsed .pe-sidebar-footer { justify-content: center; }
.pe-sidebar.collapsed .pe-sidebar-logout { display: none; }

/* Tooltip bei collapsed */
.pe-sidebar.collapsed .pe-sidebar-link:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(var(--sidebar-w-collapsed) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a2535;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 300;
}

/* ── Mobile Overlay ────────────────────────────────────────── */
.pe-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 150;
    opacity: 0;
    pointer-events: none;          /* FIX: Unsichtbares Overlay soll keine Touch-Events blockieren */
    transition: opacity 0.25s;
}
.pe-sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;          /* FIX: Nur wenn sichtbar, Events annehmen */
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT WRAPPER
   ══════════════════════════════════════════════════════════════ */
.pe-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--sidebar-w);
    transition: margin-left 0.25s ease;
}

.pe-layout.pe-layout-guest {
    margin-left: 0;
}

/* Wenn Sidebar kollabiert */
body:has(.pe-sidebar.collapsed) .pe-layout {
    margin-left: var(--sidebar-w-collapsed);
}

/* ── Topbar ────────────────────────────────────────────────── */
.pe-topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 160;                  /* FIX: Höher als Overlay (150), damit Hamburger immer klickbar */
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.pe-topbar-guest {
    background: var(--brand);
}

.pe-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
}
.pe-topbar-logo {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pe-topbar-logo img  { width: 28px; height: 28px; object-fit: contain; }
.pe-topbar-logo span { font-size: 18px; }

/* Hamburger-Button */
.pe-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    /* FIX: Touch-Verbesserungen für Firefox Android */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.pe-hamburger:hover { background: var(--bg); }
.pe-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.pe-topbar-title {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collapse-Toggle im Topbar für Desktop */
.pe-topbar-title::before {
    display: none;
}

.pe-topbar-user {
    margin-left: auto;
}
.pe-topbar-avatar {
    width: 30px;
    height: 30px;
    background: var(--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

/* Collapse toggle via Brand-Klick (Desktop-only) */
.pe-sidebar-brand { user-select: none; }

/* ── Flash-Message ─────────────────────────────────────────── */
.pe-flash-wrap {
    padding: 16px 32px 0;
}

/* ── Main / Content ────────────────────────────────────────── */
.pe-main {
    flex: 1;
    padding: 28px 32px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.pe-main-full {
    flex: 1;
    padding: 28px 32px;
}

/* ── Footer ────────────────────────────────────────────────── */
.pe-footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.6);
    padding: 16px 32px;
    text-align: center;
    font-family: var(--font);
    font-size: 12px;
    line-height: 1.8;
    margin-top: auto;
}

.pe-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--transition);
}
.pe-footer a:hover { color: #fff; }
.pe-footer strong  { color: rgba(255,255,255,0.85); }
.pe-footer-separator { margin: 0 8px; opacity: 0.3; }

/* ── Cards ─────────────────────────────────────────────────── */
.pe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.pe-card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pe-card-title {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pe-card-body { padding: 24px; }

/* ── Formulare ─────────────────────────────────────────────── */
.pe-form-group { margin-bottom: 20px; }

.pe-label {
    display: block;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.pe-label-required::after { content: ' *'; color: var(--danger); }

.pe-input, .pe-select, .pe-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.pe-input:focus, .pe-select:focus, .pe-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99,184,255,0.18);
}
.pe-input.error { border-color: var(--danger); }
.pe-input.error:focus { box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }

.pe-input-icon-wrap { position: relative; }
.pe-input-icon-wrap .pe-input { padding-left: 40px; }
.pe-input-icon-wrap .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.pe-input-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── Buttons ───────────────────────────────────────────────── */
.pe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.pe-btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.pe-btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(99,184,255,0.35);
    transform: translateY(-1px);
}
.pe-btn-outline { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.pe-btn-outline:hover { background: var(--brand-pale); }
.pe-btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.pe-btn-danger:hover { background: #c0392b; border-color: #c0392b; }
.pe-btn-sm      { padding: 6px 12px; font-size: 12.5px; }
.pe-btn-lg      { padding: 13px 28px; font-size: 15.5px; }
.pe-btn-block   { width: 100%; justify-content: center; }

/* ── Alerts ────────────────────────────────────────────────── */
.pe-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    line-height: 1.5;
}
.pe-alert-error   { background: var(--danger-light);  color: #b71c1c; border-color: #ffcdd2; }
.pe-alert-success { background: var(--success-light); color: #1a5c35; border-color: #c8e6c9; }
.pe-alert-warning { background: var(--warning-light); color: #7d4c00; border-color: #ffe082; }
.pe-alert-info    { background: var(--brand-pale);    color: #1565C0; border-color: var(--brand-light); }

/* ── Tabellen ──────────────────────────────────────────────── */
.pe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pe-table th {
    background: var(--brand-pale);
    color: var(--brand-dark);
    font-family: var(--font);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 11px 16px;
    text-align: left;
    border-bottom: 2px solid var(--brand-light);
}
.pe-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.pe-table tr:hover td { background: var(--brand-pale); }
.pe-table tr:last-child td { border-bottom: none; }

/* ── Badges ────────────────────────────────────────────────── */
.pe-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.pe-badge-supervisor { background: #ede7f6; color: #5e35b1; }
.pe-badge-admin      { background: #fff3e0; color: #e65100; }
.pe-badge-benutzer   { background: var(--brand-pale); color: var(--brand-dark); }
.pe-badge-aktiv      { background: var(--success-light); color: var(--success); }
.pe-badge-gesperrt   { background: var(--danger-light); color: var(--danger); }
.pe-badge-inaktiv    { background: #f5f5f5; color: #777; }

/* ── Login-Seite (Split-Screen) ────────────────────────────── */
body.pe-login-page {
    background: var(--sidebar-bg);
    flex-direction: row;
    min-height: 100vh;
}

.pe-login-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Linke Branding-Seite */
.pe-login-branding {
    width: 42%;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px 32px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Dezente Hintergrunds-Grafik */
.pe-login-branding::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,184,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.pe-login-branding::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,184,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.pe-login-branding-inner { position: relative; z-index: 1; }

.pe-login-brand-logo {
    width: 64px;
    height: 64px;
    background: var(--brand);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(99,184,255,0.3);
    overflow: hidden;
}
.pe-login-brand-logo img  { width: 48px; height: 48px; object-fit: contain; }
.pe-login-brand-logo span { font-size: 30px; }

.pe-login-brand-name {
    font-family: var(--font);
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.pe-login-brand-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 40px;
}

.pe-login-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pe-login-feature {
    font-family: var(--font);
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
}

.pe-login-brand-footer {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    position: relative;
    z-index: 1;
}

/* Rechte Formular-Seite */
.pe-login-form-side {
    flex: 1;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.pe-login-form-box {
    width: 100%;
    max-width: 400px;
}

.pe-login-form-header {
    margin-bottom: 28px;
}
.pe-login-form-header h2 {
    font-family: var(--font);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.pe-login-form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.pe-login-forgot {
    color: var(--brand-dark);
    font-size: 13.5px;
    text-decoration: none;
    transition: color var(--transition);
}
.pe-login-forgot:hover { color: var(--brand); }

.pe-login-hint {
    margin-top: 24px;
    padding: 12px 14px;
    background: var(--brand-pale);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.pe-login-hint strong { color: var(--brand-dark); }

/* Responsive Login */
@media (max-width: 720px) {
    .pe-login-branding { display: none; }
    .pe-login-form-side { padding: 32px 20px; }
    body.pe-login-page { background: var(--bg); }
}

/* ── Passwort-Stärke ───────────────────────────────────────── */
.pw-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 8px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0;
}
.pw-strength-text { font-size: 12px; margin-top: 4px; }

/* ── Page-Header ───────────────────────────────────────────── */
.pe-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.pe-page-title {
    font-family: var(--font);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pe-page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Grid ──────────────────────────────────────────────────── */
.pe-grid { display: grid; gap: 24px; }
.pe-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pe-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pe-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Stat-Cards ────────────────────────────────────────────── */
.pe-stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}
.pe-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: var(--brand-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.pe-stat-value {
    font-family: var(--font);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.pe-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ── Animationen ───────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.35s ease forwards; }

/* ── Utilities ─────────────────────────────────────────────── */
.text-muted      { color: var(--text-muted); }
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.mt-1            { margin-top: 8px; }
.mt-2            { margin-top: 16px; }
.mt-3            { margin-top: 24px; }
.mb-1            { margin-bottom: 8px; }
.mb-2            { margin-bottom: 16px; }
.mb-3            { margin-bottom: 24px; }
.flex            { display: flex; }
.items-center    { align-items: center; }
.gap-2           { gap: 8px; }
.gap-3           { gap: 12px; }
.justify-between { justify-content: space-between; }
.w-full          { width: 100%; }

/* ══════════════════════════════════════════════════════════════
   Tischplan – gemeinsam genutzte Klassen
   ══════════════════════════════════════════════════════════════ */
.tisch-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #555;
    border-radius: 8px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    line-height: 1.3;
    touch-action: none;
}
.tisch-size-2  { width: 64px;  height: 64px;  border-radius: 50%; }
.tisch-size-4  { width: 78px;  height: 78px;  border-radius: 50%; }
.tisch-size-6  { width: 100px; height: 70px; }
.tisch-size-8  { width: 120px; height: 70px; }
.tisch-size-10 { width: 140px; height: 70px; }
.tisch-item.rotated { transform: rotate(90deg); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    /* Sidebar versteckt sich, Hamburger erscheint */
    .pe-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w) !important;
    }
    .pe-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }
    .pe-sidebar-close { display: flex; }
    .pe-sidebar-overlay { display: block; }

    .pe-layout {
        margin-left: 0 !important;
    }
    .pe-hamburger {
        display: flex;
    }
    .pe-main  { padding: 16px; }
    .pe-flash-wrap { padding: 12px 16px 0; }
    .pe-grid-2, .pe-grid-3, .pe-grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .pe-page-header { flex-direction: column; align-items: flex-start; }
    .pe-topbar { padding: 0 16px; }
}

/* ══════════════════════════════════════════════════════════════
   GUESTPLANNER – Zusätzliche Stile
   ══════════════════════════════════════════════════════════════ */

/* Tabs */
.pe-tab-bar { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--border); }
.pe-tab {
    padding: 8px 16px; text-decoration: none; color: var(--text-muted); font-size: 14px;
    font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: 0.15s; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    white-space: nowrap;
}
.pe-tab:hover  { color: var(--brand); background: var(--brand-pale); }
.pe-tab-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* Empty state */
.pe-empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.pe-empty-icon  { font-size: 40px; margin-bottom: 12px; }

/* Table row muted (storniert) */
.pe-row-muted td { opacity: 0.5; }

/* Extra badge variants */
.pe-badge-neutral { background: #f0f0f0; color: #666; }
.pe-badge-primary { background: var(--brand-pale); color: var(--brand-dark); }
.pe-badge-warning { background: var(--warning-light); color: var(--warning); }
.pe-badge-danger  { background: var(--danger-light); color: var(--danger); }

/* Warning button */
.pe-btn-warning {
    background: var(--warning-light); color: var(--warning);
    border: 1px solid var(--warning);
}
.pe-btn-warning:hover { background: var(--warning); color: white; }

/* ══════════════════════════════════════════════════════════════
   FIX: Touch-Verbesserungen für Firefox Android
   Verhindert 300ms-Delay und unzuverlässige Touch-Events auf
   interaktiven Elementen.
   ══════════════════════════════════════════════════════════════ */
.pe-btn,
.pe-sidebar-brand,
.pe-sidebar-close,
.pe-sidebar-logout,
.pe-sidebar-link {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
