:root{
  --bg:#0b0f17;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#9aa7bd;
  --border: rgba(255,255,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.35);

  /* BS Vörden */
  --bsv-yellow:#f2e400;
  --bsv-yellow-soft: rgba(242,228,0,.16);
  --bsv-black:#0b0b0b;

  --primary: var(--bsv-yellow);
  --primary-ink:#0b0b0b;

  --danger:#ef4444;
  --ok:#22c55e;

  --radius: 18px;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 50% 0%, rgba(242,228,0,.10), transparent 55%),
    radial-gradient(900px 600px at 0% 100%, rgba(34,197,94,.06), transparent 55%),
    var(--bg);
}

a{color:inherit; text-decoration:none;}
a:hover{opacity:.95;}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(11,15,23,.78);
  backdrop-filter: blur(10px);
}
.brand{display:flex; align-items:center; gap:12px;}
.brand-logo{
  width:40px; height:40px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  padding: 4px;
}
.brand-title{font-weight: 900; letter-spacing:.2px;}
.brand-sub{color: var(--muted); font-size: 13px; margin-top:2px;}
.topbar-slot{display:flex; align-items:center; gap:10px;}

/* Cards / layout helpers */
.card{
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.70));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
}
.right{display:flex; gap:10px; align-items:center;}
h1{margin:0 0 10px; font-size: 26px;}
h2{margin:18px 0 10px; font-size: 18px;}
.muted{color: var(--muted);}

/* Alerts */
.alert{
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.12);
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0;
}
.ok{
  border: 1px solid rgba(34,197,94,.35);
  background: rgba(34,197,94,.12);
  padding: 10px 12px;
  border-radius: 14px;
  margin: 10px 0;
}

/* Forms */
.form{display:flex; flex-direction:column; gap:10px; margin-top:12px;}
label{font-size:13px; color: var(--muted);}
input, select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline: none;
}
input:focus, select:focus{
  border-color: rgba(242,228,0,.45);
  box-shadow: 0 0 0 4px rgba(242,228,0,.10);
}
.inline{display:inline-flex;}

/* Buttons */
.btn{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 700;
}
.btn:hover{filter: brightness(1.06);}
.btn:active{transform: translateY(1px);}
.btn-small{padding: 9px 11px; border-radius: 12px; font-size: 13px;}

.btn-primary{
  border-color: rgba(242,228,0,.55);
  background: linear-gradient(180deg, rgba(242,228,0,.95), rgba(242,228,0,.80));
  color: var(--primary-ink);
  box-shadow: 0 12px 28px rgba(242,228,0,.10);
}
.btn-primary:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
  filter:none;
}

/* Admin nav */
.nav{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.nav a{
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 750;
  font-size: 13px;
}
.nav a.active{
  border-color: rgba(242,228,0,.55);
  background: rgba(242,228,0,.14);
}

/* Tables */
table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}
th,td{
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align:left;
  font-size: 14px;
}
th{color: var(--muted); font-weight: 800; background: rgba(255,255,255,.03);}
tr:hover td{background: rgba(255,255,255,.02);}

/* ===== KIOSK CART UI ===== */
.kiosk h1{font-size: clamp(22px, 3.2vw, 30px);}
.pills{display:flex; flex-wrap:wrap; gap:10px; margin-top:8px;}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.pill-warn{
  border-color: rgba(242,228,0,.35);
  background: rgba(242,228,0,.12);
}

.kiosk-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-bottom: 84px; /* space for sticky bar */
}

.kitem{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.14);
  overflow:hidden;
  transition: transform .06s ease;
}
.kitem:active{transform: scale(.995);}

.kitem-top{
  padding: 14px 14px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  cursor:pointer;
}
.kname{font-size: 16px; font-weight: 900; line-height:1.2;}
.kmeta{margin-top: 8px; display:flex; gap:8px; align-items:center; color: var(--muted); font-size: 13px;}
.kbadge{
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}

.kprice{
  flex:0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(242,228,0,.45);
  background: rgba(242,228,0,.12);
  font-weight: 950;
  color: var(--text);
  white-space:nowrap;
}

.qtyrow{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.qtybtn{
  width: 56px;
  height: 48px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  cursor:pointer;
}
.qtybtn:active{transform: scale(.98);}
.qty{
  width: 88px !important;
  text-align:center;
  padding: 12px 10px !important;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

/* sticky bar */
.stickybar{
  position: sticky;
  bottom: 10px;
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(11,15,23,.86);
  backdrop-filter: blur(10px);
  padding: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.stleft{display:flex; flex-direction:column; gap:3px;}
.sttitle{font-weight: 950;}
.stsub{color: var(--muted); font-size: 13px;}

@media (max-width: 560px){
  .container{padding-top: 12px;}
  .row{flex-direction:column; align-items:stretch;}
  .right{justify-content:flex-end;}
  .stickybar{flex-direction:column; align-items:stretch;}
}



/* ADMIN_DASH_V2_START */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0 16px;
}
.kpi{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.14);
  padding: 14px;
}
.kpi-warn{
  border-color: rgba(242,228,0,.35);
  background: rgba(242,228,0,.10);
}
.kpi-title{color: var(--muted); font-size: 13px; font-weight: 850;}
.kpi-value{font-size: 22px; font-weight: 950; margin-top: 6px;}
.kpi-sub{font-size: 13px; margin-top: 4px;}

.chart-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 18px;
}
.chart-card{
  position: relative;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.14);
  padding: 14px;
  overflow:hidden;
}
.chart-card canvas{
  display:block;
  width:100% !important;
  height:100% !important;  /* wichtig: kein Auto-Height */
}

/* WICHTIG: feste Höhe statt min-height */
.chart-wide{
  grid-column: 1 / -1;
  height: 280px;
}

.chart-title{font-weight: 950; margin-bottom: 10px;}
.grid-2{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  margin-top: 6px;
}

@media (max-width: 980px){
  .kpi-grid{grid-template-columns: repeat(2, minmax(0,1fr));}
  .chart-grid{grid-template-columns: 1fr;}
  .chart-wide{height: 320px;}
  .grid-2{grid-template-columns: 1fr;}
}
/* ADMIN_DASH_V2_END */

/* KIOSK_UPGRADES_START */
.favwrap{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.14);
}
.favhead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.favtitle{font-weight: 950;}
.favbar{
  display:flex;
  gap: 10px;
  overflow-x:auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.favbar::-webkit-scrollbar{height:8px;}
.favbar::-webkit-scrollbar-thumb{background: rgba(255,255,255,.10); border-radius: 999px;}

.favchip{
  flex: 0 0 auto;
  min-width: 220px;
  border-radius: 16px;
  border: 1px solid rgba(242,228,0,.35);
  background: rgba(242,228,0,.10);
  padding: 12px 12px;
  text-align:left;
  cursor:pointer;
  color: var(--text);
}
.favchip:active{transform: scale(.995);}
.favname{display:block; font-weight: 950; font-size: 15px; line-height:1.2;}
.favprice{display:inline-block; margin-top: 6px; color: var(--muted); font-size: 13px;}

.stbtns{display:flex; gap:10px; align-items:center;}

.kdone{
  text-align:left;
}
.kdone-title{
  font-size: 26px;
  font-weight: 950;
}
.kdone-msg{
  margin-top: 10px;
  font-size: 16px;
  color: var(--text);
}
.kdone-actions{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 560px){
  .favchip{min-width: 78%;}
  .stbtns{width:100%;}
  .stbtns .btn{flex:1;}
}
/* KIOSK_UPGRADES_END */

/* ADMIN_FAVORITES_START */
.fav-admin-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.fav-admin-card{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.14);
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.fav-admin-name{
  font-weight: 950;
  font-size: 16px;
}
.fav-admin-meta{
  font-size: 13px;
}
/* ADMIN_FAVORITES_END */

/* HEATMAP_START */
.heatwrap{overflow:auto; border-radius: 18px; border:1px solid rgba(255,255,255,.10);}
.heattable{border-collapse: collapse; width: 100%;}
.heattable th, .heattable td{padding: 6px 6px; border-bottom:1px solid rgba(255,255,255,.06); text-align:center; font-size: 12px;}
.heattable th{position: sticky; top:0; background: rgba(11,15,23,.92); backdrop-filter: blur(8px); z-index:1; color: var(--muted);}
.heatlabel{position: sticky; left:0; background: rgba(11,15,23,.92); z-index:1; font-weight: 900;}
.heatcell span{opacity:.9;}
/* HEATMAP_END */

/* ADMIN_NAV_DROPDOWN_START */
.admin-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom: 14px;
}

.nav-spacer{flex:1 1 auto;}

.nav-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.nav-pill:hover{
  border-color: rgba(242,228,0,.35);
  background: rgba(0,0,0,.26);
}

.nav-pill.active{
  border-color: rgba(242,228,0,.55);
  box-shadow: 0 0 0 2px rgba(242,228,0,.10) inset;
}

.nav-dd{
  position:relative;
  outline:none;
}

.nav-dd-btn{
  cursor:pointer;
}

.nav-caret{opacity:.75;}

.nav-dd-menu{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  display:none;
  z-index: 50;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(11,15,23,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu{
  display:block;
}

.nav-dd-item{
  display:flex;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.92);
  text-decoration:none;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 13px;
}

.nav-dd-item:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(242,228,0,.25);
}

.nav-dd-item.active{
  border-color: rgba(242,228,0,.55);
  background: rgba(242,228,0,.08);
}

/* Mobile: Dropdown nicht off-screen */
@media (max-width: 520px){
  .nav-dd-menu{
    left: 0;
    right: 0;
    min-width: auto;
  }
}
/* ADMIN_NAV_DROPDOWN_END */


/* users-teams-tabs-modals */
.subtabs{display:flex;gap:10px;margin:14px 0 18px 0;flex-wrap:wrap}
.subtab{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;text-decoration:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04)}
.subtab.active{border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.07)}
.toolbar{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:10px 0 14px 0;flex-wrap:wrap}
.toolbar-left{display:flex;gap:10px;align-items:center;flex:1}
.toolbar-right{display:flex;gap:10px;align-items:center}
.table-wrap{overflow:auto}

.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;padding:18px;z-index:9999}
.modal-backdrop.open{display:flex}
.modal{width:min(640px,100%);border-radius:18px;border:1px solid rgba(255,255,255,.14);background:rgba(10,16,28,.92);backdrop-filter: blur(10px);box-shadow: 0 24px 80px rgba(0,0,0,.55);overflow:hidden}
.modal-header{display:flex;justify-content:space-between;align-items:flex-start;padding:16px 16px 10px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
.modal-title{font-weight:700;font-size:18px}
.modal-body{padding:14px 16px 16px 16px;display:grid;gap:10px}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:6px}
.label{font-size:13px;opacity:.85;margin-top:6px}
.row{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.check{display:inline-flex;gap:10px;align-items:center;user-select:none}
.btn-ghost{background:transparent;border:1px solid rgba(255,255,255,.12)}

/* --- Users/Teams page: tabs + modal (Users/Teams page: tabs + modal) --- */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:8px 0 14px}
.head-actions{display:flex;gap:10px;flex-wrap:wrap}

.tabs{display:flex;gap:10px;margin:10px 0 12px}
.tab{
  padding:8px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  cursor:pointer
}
.tab:hover{background:rgba(255,255,255,.10)}
.tab.active{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.22)}

.tabpane{display:none}
.tabpane.active{display:block}

dialog.modal{
  border:0;padding:0;background:transparent;color:inherit;
  width:min(860px, calc(100vw - 48px));
}
dialog.modal::backdrop{
  background:rgba(0,0,0,.60);
  backdrop-filter:blur(6px);
}
.modal-box{
  background:rgba(10,18,32,.92);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:18px;
  box-shadow:0 25px 80px rgba(0,0,0,.65);
}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:10px}
.modal-title{font-weight:800;font-size:1.1rem}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}

.xbtn{
  width:34px;height:34px;border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:inherit;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.xbtn:hover{background:rgba(255,255,255,.10)}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid2 .span2{grid-column:1 / -1}
.lbl{display:block;font-size:.85rem;opacity:.85;margin:4px 0 6px}
.row{display:flex;justify-content:space-between;align-items:center;gap:10px}

.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:10px}
.team-card{padding:12px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.team-name{font-weight:800}

.table-wrap{overflow:auto}
.right{text-align:right}
.small{font-size:.85rem}
.strong{font-weight:800}
.mono{font-variant-numeric:tabular-nums;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}

.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:.78rem;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);margin-right:6px}
.badge.ok{border-color:rgba(46,204,113,.35)}
.badge.warn{border-color:rgba(241,196,15,.35)}


/* ===== AUTH (Login) ===== */
.auth-wrap{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 26px 14px;
}
.auth-card{
  width: min(980px, 100%);
  display:grid;
  grid-template-columns: 320px 1fr;
  overflow:hidden;
  padding:0;
}
.auth-left{
  padding: 22px;
  border-right: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(700px 300px at 40% 10%, rgba(242,228,0,.22), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.10));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 16px;
}
.auth-brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.auth-brand img{
  width:56px;
  height:56px;
  border-radius: 16px;
  padding: 6px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
}
.auth-title{font-weight: 950; font-size: 18px; letter-spacing:.2px;}
.auth-sub{color: var(--muted); font-size: 13px; margin-top:2px;}
.auth-right{padding: 22px;}
.auth-form{display:flex; flex-direction:column; gap: 12px; margin-top: 10px;}
.auth-row{display:grid; grid-template-columns:1fr; gap: 10px;}
.auth-actions{display:flex; gap: 10px; align-items:center; justify-content:space-between; margin-top: 6px; flex-wrap:wrap;}

@media (max-width: 760px){
  .auth-card{grid-template-columns: 1fr;}
  .auth-left{border-right:none; border-bottom: 1px solid rgba(255,255,255,.08);}
}



/* ===== USERS OVERVIEW ===== */
.table-wrap{
  width:100%;
  overflow:auto;
  border-radius: 18px;
}

.users-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px; /* “floating rows” */
  table-layout: fixed;
}

.users-table thead th{
  text-align:left;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.60);
  padding: 10px 14px;
  white-space: nowrap;
}

.users-table tbody tr{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.users-table tbody td{
  padding: 12px 14px;
  vertical-align: middle;
  overflow:hidden;
  text-overflow: ellipsis;
}

.users-table tbody tr:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(242,228,0,.25);
}

.users-table .pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.15);
}

/* WICHTIG: Desktop wieder echte Tabelle erzwingen (falls mobile-styles global greifen) */
@media (min-width: 900px){
  .users-table{ display: table; }
  .users-table thead{ display: table-header-group; }
  .users-table tbody{ display: table-row-group; }
  .users-table tr{ display: table-row; }
  .users-table th, .users-table td{ display: table-cell; }
}

/* Mobile: falls du Cards willst, lass deine bestehenden Regeln greifen – wir zerstören nichts */

