.login-bg{background:linear-gradient(135deg,#0a1628 0%,#1a2744 55%,#0f2040 100%)}
/* ═══════════════════════════════════════════════════════
   Vereinsmanager – Custom CSS
   KV Bauernheim e.V. | Albus IT
   ══════════════════════════════════════════════════════ */

[x-cloak]{display:none!important}*{font-family:'DM Sans',sans-serif}
h1,h2,h3,h4,.font-heading{font-family:'Outfit',sans-serif}
::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
.nav-link{display:flex;align-items:center;gap:11px;padding:9px 14px;border-radius:9px;cursor:pointer;transition:all .15s;color:rgba(255,255,255,.48);font-size:13.5px;font-weight:500;margin-bottom:1px}
.nav-link:hover{background:rgba(255,255,255,.07);color:rgba(255,255,255,.88)}
.nav-link.active{background:var(--primary-light);color:#fff}.nav-link.active .nav-icon{color:#a5b4fc}
.nav-link.disabled{opacity:.3;pointer-events:none}.nav-icon{width:16px;text-align:center;font-size:13px}
.badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:99px;font-size:11.5px;font-weight:600}
.badge-active{background:#dcfce7;color:#15803d}.badge-passive{background:#fef9c3;color:#a16207}
.badge-honorary{background:#ede9fe;color:#6d28d9}.badge-left{background:#fee2e2;color:#b91c1c}
.badge-planned{background:#dbeafe;color:#1d4ed8}.badge-confirmed{background:#dcfce7;color:#15803d}
.badge-cancelled{background:#fee2e2;color:#b91c1c}.badge-public{background:#f0fdf4;color:#166534}
.badge-internal{background:#f5f3ff;color:#5b21b6}
.badge-eingang{background:#dcfce7;color:#15803d}.badge-verbrauch{background:#fef9c3;color:#a16207}
.badge-korrektur{background:#dbeafe;color:#1d4ed8}
input[type=text],input[type=email],input[type=tel],input[type=date],input[type=datetime-local],input[type=number],input[type=password],select,textarea{border:1px solid #e2e8f0;border-radius:10px;padding:9px 13px;font-size:13.5px;color:#334155;width:100%;background:#f8fafc;transition:border-color .15s,box-shadow .15s;font-family:'DM Sans',sans-serif}
input:focus,select:focus,textarea:focus{outline:none;border-color:#6366f1;background:#fff;box-shadow:0 0 0 3px rgba(99,102,241,.12)}
label.lbl{display:block;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin-bottom:5px}
.btn{display:inline-flex;align-items:center;gap:7px;padding:9px 18px;border-radius:10px;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .15s;border:none;font-family:'DM Sans',sans-serif}
:root{
  --primary:#4f46e5;
  --primary-hover:#4338ca;
  --primary-light:rgba(99,102,241,0.15);
  --primary-text:#fff;
  --sidebar-bg:#1a2035;
  --sidebar-bg2:#1a2744;
  --sidebar-bg3:#0f2040;
}
.btn-primary{background:var(--primary);color:var(--primary-text)}.btn-primary:hover{background:var(--primary-hover)}
.btn-secondary{background:#f1f5f9;color:#475569}.btn-secondary:hover{background:#e2e8f0}
.btn-danger{background:#fef2f2;color:#dc2626}.btn-danger:hover{background:#fee2e2}
.btn-amber{background:#f59e0b;color:#fff}.btn-amber:hover{background:#d97706}
.btn-green{background:#22c55e;color:#fff}.btn-green:hover{background:#16a34a}
.btn-sm{padding:6px 12px;font-size:12.5px;border-radius:8px}.btn:disabled{opacity:.6;cursor:not-allowed}
.modal{background:var(--color-background-primary,#fff);border-radius:1rem;overflow:hidden;display:flex;flex-direction:column;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.18);margin:auto}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:0.5px solid var(--color-border-tertiary,#e2e8f0);flex:none}
.modal-body{padding:16px 20px;overflow-y:auto;flex:1}
.modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:0.5px solid var(--color-border-tertiary,#e2e8f0);background:var(--color-background-secondary,#f8fafc);flex:none}
.modal-close{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--color-text-secondary,#64748b);cursor:pointer;border:none;background:transparent;transition:background .15s}
.modal-close:hover{background:var(--color-background-secondary,#f1f5f9)}
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.48);backdrop-filter:blur(4px);z-index:50;display:flex;align-items:flex-start;justify-content:center;padding:20px;overflow-y:auto}
@media(min-width:1024px){.modal-bg>div{max-height:82vh!important;max-width:min(var(--modal-mw,480px),calc(100vw - 80px))!important}}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes popIn{from{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)}}
.fade-up{animation:fadeUp .25s ease-out}.pop-in{animation:popIn .22s ease-out}
tr.hover-row:hover td{background:#f8fafc}
.kpi-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px}
.event-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;transition:all .2s}
.event-card:hover{border-color:#6366f1;box-shadow:0 4px 20px rgba(99,102,241,.12)}
.event-date-badge{min-width:54px;height:60px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f0f0ff;color:#4f46e5;flex-none}
.event-date-badge .day{font-family:'Outfit',sans-serif;font-size:22px;font-weight:800;line-height:1}
.event-date-badge .month{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;opacity:.7}
.slot-bar{height:6px;border-radius:3px;background:#e2e8f0;overflow:hidden}
.slot-fill{height:100%;border-radius:3px;background:#4f46e5;transition:width .3s}
.slot-fill.full{background:#22c55e}
.tab-btn{padding:8px 18px;border-radius:9px;font-size:13.5px;font-weight:600;cursor:pointer;transition:all .15s;border:none;background:transparent;color:#64748b;white-space:nowrap;flex-shrink:0}
.tab-btn.active{background:#4f46e5;color:#fff}
.tab-btn:hover:not(.active){background:#f1f5f9;color:#334155}
.stock-low{background:#fef9c3!important;color:#a16207!important}
.stock-ok{background:#dcfce7!important;color:#15803d!important}
.stock-out{background:#fee2e2!important;color:#b91c1c!important}

/* ── Quill Editor ── */
#quill-vorlage-editor{background:#fff;font-size:14px}
.ql-toolbar.ql-snow{border-radius:8px 8px 0 0;border-color:#e2e8f0;background:#f8fafc}
.ql-container.ql-snow{border-radius:0 0 8px 8px;border-color:#e2e8f0}
.ql-editor{min-height:160px;font-size:14px;line-height:1.6}

/* ── RESPONSIVE ── */
/* Sidebar drawer (mobile + tablet bis 1024px) */
.sidebar-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:40;backdrop-filter:blur(2px)}
@media(max-width:1023px){

aside.app-sidebar{position:fixed;left:0;top:0;height:100dvh;z-index:45;transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1);overflow-y:auto;background:linear-gradient(160deg,#1a2035 0%,#0f1a2e 100%)}
  aside.app-sidebar.open{transform:translateX(0);box-shadow:4px 0 32px rgba(0,0,0,.4)}
  main.app-main{width:100%!important}
}
@media(min-width:1024px){
  aside.app-sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;flex-shrink:0}
  main.app-main{flex:1;min-width:0;height:100vh;overflow-y:auto}
  /* Mobile table → cards */
  .mobile-card-table thead{display:none}
  .mobile-card-table tr{display:flex;flex-direction:column;background:#fff;border:1px solid #e2e8f0;border-radius:14px;margin-bottom:10px;padding:14px;gap:4px}
  .mobile-card-table td{border:none!important;padding:2px 0!important;font-size:13px;display:flex;justify-content:space-between;align-items:center}
  .mobile-card-table td:first-child{font-weight:600;font-size:14px;margin-bottom:4px}
  .mobile-card-table td[data-label]:before{content:attr(data-label);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;flex:none;margin-right:8px}
  .mobile-card-table tbody{display:flex;flex-direction:column}
  .mobile-card-table tfoot tr{background:#f8fafc;padding:12px 14px}
  /* Tab bar scroll on mobile */
  .tab-bar-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .tab-bar-scroll::-webkit-scrollbar{display:none}
  .tab-bar-scroll>div{min-width:max-content}
  /* Full-width modals on mobile */
  .modal-bg{padding:0;align-items:flex-end}
  .modal-bg>div{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;max-height:95vh;width:100%!important;max-width:100%!important}
  /* KPI grids */
  .kpi-grid-6{grid-template-columns:repeat(2,1fr)!important}
  /* Event cards full width */
  .events-grid{grid-template-columns:1fr!important}
}
@media(min-width:769px){
  .mobile-only{display:none!important}
}

/* Member portal styles */
.portal-card{background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:24px;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.portal-shift-card{background:linear-gradient(135deg,#f0f0ff,#e8e4ff);border:1px solid #c4b5fd;border-radius:16px;padding:20px}

/* User role badges */
.badge-admin{background:#fef3c7;color:#92400e}
.badge-vorstand{background:#dbeafe;color:#1d4ed8}
.badge-kassenwart{background:#dcfce7;color:#166534}
.badge-orgateam{background:#f3e8ff;color:#6b21a8}
.badge-mitglied{background:#e0e7ff;color:#3730a3}

/* ── RESPONSIVE: Mobile & Tablet ─────────────────────────────────────── */

/* Touch-Targets: min. 44px für alle klickbaren Elemente */
@media(max-width:768px){
  .btn{min-height:44px;padding-left:1rem;padding-right:1rem;}
  .btn-sm{min-height:36px;}
  .nav-link{min-height:44px;padding:10px 12px;}
  input[type=text],input[type=email],input[type=url],input[type=password],
  input[type=number],input[type=date],textarea,select{
    min-height:44px;font-size:16px!important; /* verhindert iOS-Zoom */
  }
}

/* Admin-Tabellen: Card-Layout auf kleinen Screens */
@media(max-width:640px){
  .table-mobile-card thead{display:none}
  .table-mobile-card tr{
    display:block;border:1px solid #e2e8f0;border-radius:12px;
    margin-bottom:10px;padding:12px;background:#fff;
  }
  .table-mobile-card td{
    display:flex;justify-content:space-between;align-items:center;
    padding:4px 0;border:none;font-size:13px;
  }
  .table-mobile-card td::before{
    content:attr(data-label);
    font-size:11px;font-weight:600;color:#94a3b8;
    text-transform:uppercase;letter-spacing:0.05em;flex-shrink:0;margin-right:8px;
  }
}

/* Modal: immer full-width auf Mobile */
@media(max-width:640px){
  .modal-bg>div,.modal-bg .modal{
    max-width:calc(100vw - 24px)!important;
    margin:12px!important;
    max-height:90dvh!important;
  }
}

/* Portal Cards: volle Breite auf Mobile */
@media(max-width:640px){
  .portal-card{padding:1rem!important;}
  .portal-card .btn-primary,.portal-card .btn-secondary{
    width:100%;justify-content:center;
  }
}

/* Vereinsdaten Vorstand: Stack auf Mobile */
@media(max-width:480px){
  .vorstand-item{flex-wrap:wrap;}
  .vorstand-item .contact-btns{margin-top:8px;width:100%;justify-content:flex-end;}
}

/* Stammdaten Tabs: horizontales Scrollen */
@media(max-width:640px){
  .stammdaten-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;padding-bottom:4px;}
  .stammdaten-tabs button{white-space:nowrap;flex-shrink:0;}
}

/* Fixe Bottom-Navigation für Mobile Portal */
@media(max-width:1023px){
  .portal-bottom-nav{
    position:fixed;bottom:0;left:0;right:0;z-index:40;
    background:#fff;border-top:1px solid #e2e8f0;
    display:flex;padding:8px 0 max(8px,env(safe-area-inset-bottom));
    box-shadow:0 -4px 20px rgba(0,0,0,.08);
  }
  .portal-bottom-nav a,.portal-bottom-nav button{
    flex:1;display:flex;flex-direction:column;align-items:center;
    gap:3px;font-size:10px;font-weight:600;color:#94a3b8;
    padding:4px 0;border:none;background:none;cursor:pointer;
    text-decoration:none;
  }
  .portal-bottom-nav a.active,.portal-bottom-nav button.active{color:var(--primary);}
  .portal-bottom-nav i{font-size:18px;}
  /* Platz für Bottom-Nav schaffen */
  .app-main{padding-bottom:72px;}
}
@media(min-width:1024px){
  .portal-bottom-nav{display:none!important;}
}

/* Overflow fixes für schmale Screens */
@media(max-width:640px){
  .event-date-badge{min-width:44px;}
  .modal-header{flex-wrap:wrap;gap:8px;}
  .card-actions{flex-wrap:wrap;}
}