*{box-sizing:border-box}
:root{--text:#0f172a;--muted:#475569}
html,body{min-height:100%}
body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);background:
radial-gradient(circle at 85% 30%,rgba(147,197,253,.24),transparent 30%),
radial-gradient(circle at 13% 75%,rgba(191,219,254,.25),transparent 26%),
linear-gradient(135deg,#fbfdff,#eef8ff 55%,#fff)}
body:before{content:"";position:fixed;left:0;right:0;bottom:-110px;height:330px;pointer-events:none;z-index:0;background:radial-gradient(ellipse at center,rgba(96,165,250,.25),transparent 65%),linear-gradient(120deg,transparent,rgba(139,92,246,.12),transparent)}
body:after{content:"";position:fixed;left:0;right:0;bottom:0;height:210px;opacity:.32;pointer-events:none;z-index:0;background:repeating-linear-gradient(165deg,rgba(59,130,246,.16) 0 1px,transparent 1px 12px);clip-path:polygon(0 70%,16% 58%,35% 72%,55% 54%,74% 66%,100% 46%,100% 100%,0 100%)}
a{text-decoration:none}
.logoutTop{position:fixed;top:28px;right:34px;z-index:9999;color:#0f172a;background:rgba(255,255,255,.96);border:1px solid #dbeafe;border-radius:13px;box-shadow:0 14px 34px rgba(15,23,42,.12);padding:16px 25px;font-weight:900}
.moduleBackTop{position:fixed;top:22px;left:24px;z-index:9999;color:#0759c8;background:rgba(255,255,255,.96);border:1px solid #dbeafe;border-radius:10px;box-shadow:0 10px 28px rgba(15,23,42,.12);padding:12px 18px;font-weight:900}
.dashboardPage{position:relative;z-index:1;min-height:100vh;padding:92px 5vw 40px;display:flex;flex-direction:column;justify-content:center}
.heroMini{text-align:center;margin:0 auto 42px;max-width:760px}
.heroMini span{display:inline-block;padding:9px 16px;border-radius:999px;background:rgba(255,255,255,.8);border:1px solid #dbeafe;color:#2563eb;font-weight:800}
.heroMini h1{font-size:44px;line-height:1.05;margin:20px 0 12px}
.heroMini p{margin:0;color:#475569;font-size:17px;line-height:1.65}
.moduleGrid{width:100%;max-width:1320px;margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(230px,1fr));gap:28px}
.moduleCard{position:relative;min-height:430px;border-radius:18px;background:rgba(255,255,255,.94);border:1px solid rgba(203,213,225,.85);box-shadow:0 24px 70px rgba(15,23,42,.12);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:38px 28px 30px;color:#0f172a;transition:.2s ease;overflow:hidden}
.moduleCard:hover{transform:translateY(-7px);box-shadow:0 32px 82px rgba(15,23,42,.16)}
.moduleCard .icon{width:104px;height:104px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:48px;margin-bottom:26px}
.moduleCard.blue .icon{background:rgba(47,128,237,.12)}.moduleCard.purple .icon{background:rgba(139,92,246,.14)}.moduleCard.green .icon{background:rgba(16,185,129,.14)}.moduleCard.orange .icon{background:rgba(249,115,22,.14)}
.moduleCard h2{font-size:27px;line-height:1.15;margin:0 0 18px;font-weight:900}
.moduleCard p{font-size:16px;line-height:1.65;color:#334155;margin:0 0 30px}
.moduleCard.blue{border-bottom:7px solid #2f80ed}.moduleCard.purple{border-bottom:7px solid #8b5cf6}.moduleCard.green{border-bottom:7px solid #10b981}.moduleCard.orange{border-bottom:7px solid #f97316}
.openBtn{width:100%;max-width:250px;min-height:60px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:18px;color:white;font-size:19px;font-weight:900;margin-top:auto;box-shadow:0 14px 30px rgba(59,130,246,.22)}
.blue .openBtn{background:linear-gradient(135deg,#2377f2,#35a2ff)}.purple .openBtn{background:linear-gradient(135deg,#7c3aed,#a855f7)}.green .openBtn{background:linear-gradient(135deg,#10b981,#35d58a)}.orange .openBtn{background:linear-gradient(135deg,#f97316,#ff9700)}.cyan .openBtn{background:linear-gradient(135deg,#0891b2,#22d3ee);box-shadow:0 14px 30px rgba(8,145,178,.24)}.red .openBtn{background:linear-gradient(135deg,#dc2626,#f97316);box-shadow:0 14px 30px rgba(220,38,38,.24)}
.openBtn b{font-size:28px}
.loginBody{display:flex;align-items:center;justify-content:center;padding:24px}
.loginBox{position:relative;z-index:1;width:min(430px,100%);background:rgba(255,255,255,.96);border:1px solid #dbeafe;border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.14);padding:34px}
.loginLogo{width:72px;height:72px;border-radius:20px;background:linear-gradient(135deg,#2377f2,#35a2ff);color:white;display:flex;align-items:center;justify-content:center;font-weight:900;margin-bottom:18px}
.loginBox h1{margin:0 0 8px}.loginBox p{margin:0 0 18px;color:#475569}.loginBox input{width:100%;padding:15px 16px;margin:9px 0;border-radius:12px;border:1px solid #cbd5e1}.loginBox button,.formActions button,.formGrid button{border:0;border-radius:12px;padding:14px 18px;background:#2377f2;color:white;font-weight:900;cursor:pointer}.loginBox button{width:100%;margin-top:12px}.loginBox small{display:block;margin-top:16px;color:#64748b}.loginErr{background:#fee2e2;color:#991b1b;border-radius:10px;padding:10px;margin-bottom:10px}
.modulePage{position:relative;z-index:1;min-height:100vh;padding:92px 5vw 40px}.modulePage h1{font-size:38px;margin:0 0 10px}.modulePage p{color:#475569;font-size:17px}
.tableCard{background:rgba(255,255,255,.95);border:1px solid #dbeafe;border-radius:20px;box-shadow:0 20px 55px rgba(15,23,42,.10);padding:24px;margin-top:22px;overflow:auto}
table{width:100%;border-collapse:collapse}th,td{padding:14px;border-bottom:1px solid #e2e8f0;text-align:left}th{color:#2563eb}input{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:10px}.formActions,.formGrid{display:flex;gap:12px;margin-top:18px;flex-wrap:wrap}.formGrid input{flex:1;min-width:220px}.miniBtn{display:inline-block;background:#2377f2;color:white;border-radius:10px;padding:9px 14px;font-weight:800}.danger{background:#ef4444!important}.okMsg{background:#dcfce7;color:#166534;padding:12px 16px;border-radius:12px;margin:16px 0}
@media(max-width:1180px){.moduleGrid{grid-template-columns:repeat(2,1fr)}.dashboardPage{justify-content:flex-start;padding-top:110px}}
@media(max-width:680px){.moduleGrid{grid-template-columns:1fr}.dashboardPage,.modulePage{padding:95px 18px 30px}.logoutTop{top:18px;right:18px;padding:12px 16px}.heroMini h1{font-size:32px}.moduleCard{min-height:370px}}


/* Anpassung: Dashboard nur 3 Kanban-Kacheln, GPS Hauptmenü-Kachel entfernt */
.moduleGrid{
  grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  max-width: 1050px !important;
}

/* Live-Fahrzeuge-Modul: Dashboard-Button kompakter und links oben neben dem Titelbereich */
.moduleBackTop.compactGpsBack,
.moduleBackTop{
  top: 10px !important;
  left: 165px !important;
  padding: 6px 10px !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(15,23,42,.12) !important;
  z-index: 99999 !important;
  white-space: nowrap !important;
}

/* Falls GPS Maps Pro oben einen Header/Titel hat: genug Abstand links lassen, damit nichts über dem Text liegt */
.gps-header,
.header,
.topbar,
.app-header,
.toolbar,
h1:first-child{
  padding-left: 118px !important;
}

@media(max-width:1180px){
  .moduleGrid{
    grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
    max-width: 980px !important;
  }
}

@media(max-width:850px){
  .moduleGrid{
    grid-template-columns: 1fr !important;
    max-width: 430px !important;
  }
  .gps-header,
  .header,
  .topbar,
  .app-header,
  .toolbar,
  h1:first-child{
    padding-left: 0 !important;
    padding-top: 38px !important;
  }
}


/* Dashboard: Live Fahrzeuge wieder sichtbar, nur GPS Hauptmenü entfernt */
.moduleGrid{
  grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  max-width: 1050px !important;
}


/* Space Dashboard Layout */
body{
 background:
 linear-gradient(rgba(255,255,255,.45),rgba(255,255,255,.45)),
 url('https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?q=80&w=1600&auto=format&fit=crop') center center/cover fixed !important;
}

.moduleGrid,.cards,.dashboard-grid,.kanban{
 max-width:1100px !important;
 margin:0 auto !important;
 justify-content:center !important;
}

.dashboardPage,.content,main{
 display:flex !important;
 align-items:center !important;
 justify-content:center !important;
}

.moduleCard,.card,.kanban-card{
 backdrop-filter: blur(8px);
 background: rgba(255,255,255,.88) !important;
}

.logoutTop{
 top:20px !important;
 right:20px !important;
}


/* Admin readability */
.tableCard{padding:32px!important;overflow:auto!important}
table th,table td{padding:18px!important;font-size:15px!important}
.formGrid input,input{min-height:44px!important}
.modulePage{max-width:1600px!important}
/* only dashboard back button smaller */
.moduleBackTop{
 top:8px!important;
 left:6px!important;
 padding:4px 8px!important;
 font-size:11px!important;
 border-radius:6px!important;
}

.adminModern{max-width:1400px;margin:90px auto 40px;padding:20px;position:relative;z-index:1}
.adminHeader h1{font-size:42px;margin:0}
.adminHeader p{color:#64748b}
.statsGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin:25px 0}
.statCard{background:rgba(255,255,255,.95);border-radius:24px;padding:30px;box-shadow:0 10px 30px rgba(0,0,0,.08);text-align:center}
.statCard .num{font-size:42px;font-weight:900;color:#2563eb}
.tableCard{background:rgba(255,255,255,.95)!important;border-radius:24px;margin-bottom:24px;box-shadow:0 10px 30px rgba(0,0,0,.08)}
.badge{background:#e0edff;color:#2563eb;padding:8px 14px;border-radius:999px;font-weight:700}
.activeDot{color:#16a34a;font-weight:700}
.saveBtn{background:#2563eb;color:#fff;border:0;border-radius:12px;padding:14px 18px;font-weight:800}
.danger{background:#ef4444;color:#fff;border:0;border-radius:10px;padding:10px 14px}
@media(max-width:900px){.statsGrid{grid-template-columns:1fr 1fr}}


/* USER FIX: Dashboard normal kleiner anzeigen (nur Dashboard-Kacheln) */
body:not(.adminClean) .dashboardPage{
  padding:72px 4vw 32px !important;
  justify-content:center !important;
}
body:not(.adminClean) .heroMini{
  margin-bottom:28px !important;
  max-width:700px !important;
}
body:not(.adminClean) .heroMini h1{
  font-size:34px !important;
  margin:14px 0 8px !important;
}
body:not(.adminClean) .heroMini p{
  font-size:15px !important;
  line-height:1.45 !important;
}
body:not(.adminClean) .moduleGrid{
  max-width:900px !important;
  grid-template-columns:repeat(3,minmax(210px,1fr)) !important;
  gap:20px !important;
}
body:not(.adminClean) .moduleCard{
  min-height:300px !important;
  padding:24px 20px 22px !important;
  border-radius:16px !important;
}
body:not(.adminClean) .moduleCard .icon{
  width:72px !important;
  height:72px !important;
  font-size:34px !important;
  margin-bottom:18px !important;
}
body:not(.adminClean) .moduleCard h2{
  font-size:21px !important;
  margin-bottom:12px !important;
}
body:not(.adminClean) .moduleCard p{
  font-size:14px !important;
  line-height:1.45 !important;
  margin-bottom:20px !important;
}
body:not(.adminClean) .openBtn{
  min-height:46px !important;
  max-width:190px !important;
  font-size:15px !important;
  gap:10px !important;
}
body:not(.adminClean) .openBtn b{font-size:21px !important;}
body:not(.adminClean) .logoutTop{
  padding:10px 16px !important;
  font-size:13px !important;
  border-radius:10px !important;
}
@media(max-width:850px){
  body:not(.adminClean) .moduleGrid{grid-template-columns:1fr !important;max-width:380px !important;}
  body:not(.adminClean) .moduleCard{min-height:240px !important;}
}


/* Berichte-Modul ergänzt: Dashboard mit 4 Kacheln, bestehende Funktionen bleiben unverändert */
body:not(.adminClean) .moduleGrid{
  grid-template-columns:repeat(4,minmax(190px,1fr)) !important;
  max-width:1120px !important;
}
@media(max-width:1050px){body:not(.adminClean) .moduleGrid{grid-template-columns:repeat(2,minmax(220px,1fr)) !important;max-width:720px !important;}}
@media(max-width:650px){body:not(.adminClean) .moduleGrid{grid-template-columns:1fr !important;max-width:380px !important;}}
.dashboardNotice{max-width:780px;margin:0 auto 18px;padding:14px 18px;border-radius:14px;background:rgba(255,255,255,.92);border:1px solid rgba(59,130,246,.25);box-shadow:0 10px 28px rgba(15,23,42,.08);color:#0f172a;font-weight:800;text-align:center}
.moduleCard.cyan .icon{background:rgba(6,182,212,.14)}.moduleCard.cyan{border-bottom:7px solid #06b6d4}

/* Geschwindigkeitsalarm Modul */
.moduleCard.red .icon{background:rgba(239,68,68,.14)}.moduleCard.red{border-bottom:7px solid #ef4444}

/* Professional Dashboard Upgrade: Startscreen + Alarm-Center Kachel */
body.dashboardProBody{overflow:auto!important;min-height:100vh!important;background:radial-gradient(circle at 12% 10%,rgba(37,99,235,.18),transparent 28%),radial-gradient(circle at 86% 18%,rgba(14,165,233,.14),transparent 30%),linear-gradient(180deg,#f6fbff 0%,#edf6ff 100%)!important;}
body.dashboardProBody .dashboardPage{display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:100vh!important;padding:84px 4vw 42px!important;gap:18px!important;}
body.dashboardProBody .heroMini{background:rgba(255,255,255,.86);border:1px solid rgba(148,163,184,.22);border-radius:24px;padding:22px 28px;box-shadow:0 20px 60px rgba(15,23,42,.10);backdrop-filter:blur(12px);max-width:920px!important;width:min(920px,100%)!important;margin:0 auto 4px!important;text-align:left!important;}
body.dashboardProBody .heroMini span{display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:#eaf3ff;color:#0b5fd7;padding:8px 12px;font-weight:900;}
body.dashboardProBody .heroMini h1{font-size:40px!important;letter-spacing:-.04em!important;margin:16px 0 0!important;}
.dashboardStatusGrid{width:min(1120px,100%);display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:14px;margin:4px auto 2px;}
.dashStatusCard{position:relative;overflow:hidden;background:rgba(255,255,255,.94);border:1px solid rgba(148,163,184,.24);border-radius:20px;padding:17px 16px;box-shadow:0 16px 42px rgba(15,23,42,.08);}
.dashStatusCard:after{content:"";position:absolute;right:-18px;bottom:-22px;width:74px;height:74px;border-radius:50%;background:rgba(11,108,255,.08);}
.dashStatusCard span{display:block;color:#64748b;font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;}
.dashStatusCard b{display:block;margin-top:8px;font-size:30px;line-height:1;font-weight:950;color:#0b1b3f;}
.dashStatusCard small{display:block;margin-top:7px;color:#64748b;font-size:12px;font-weight:800;}
.dashStatusCard.primary b{color:#0b6cff}.dashStatusCard.move b{color:#0f9f58}.dashStatusCard.stop b{color:#d97706}.dashStatusCard.off b,.dashStatusCard.warn b{color:#dc2626}.dashStatusCard.today b{color:#7c3aed}
.dashboardQuickPanel{width:min(1120px,100%);display:flex;align-items:center;justify-content:space-between;gap:18px;margin:10px auto 0;background:rgba(11,27,63,.92);color:#fff;border-radius:22px;padding:18px 22px;box-shadow:0 18px 45px rgba(11,27,63,.18);}
.dashboardQuickPanel strong{font-size:18px;display:block;margin-bottom:4px}.dashboardQuickPanel p{margin:0;color:#dbeafe;font-weight:750;line-height:1.35}.dashboardQuickPanel a{display:inline-flex;align-items:center;justify-content:center;border-radius:14px;background:#fff;color:#0b5fd7!important;text-decoration:none!important;font-weight:950;padding:13px 16px;white-space:nowrap}.dashWarnSmall{width:min(1120px,100%);}
.moduleCard.dark{border-bottom:7px solid #0f172a}.moduleCard.dark .icon{background:rgba(15,23,42,.10)}.dark .openBtn{background:linear-gradient(135deg,#0f172a,#2563eb);box-shadow:0 14px 30px rgba(15,23,42,.24)}
body.dashboardProBody .moduleGrid{width:min(1120px,100%)!important;max-width:1120px!important;grid-template-columns:repeat(3,minmax(210px,1fr))!important;margin:16px auto 0!important;}
body.dashboardProBody .moduleCard{min-height:282px!important;}
@media(max-width:1120px){.dashboardStatusGrid{grid-template-columns:repeat(3,1fr)}body.dashboardProBody .moduleGrid{grid-template-columns:repeat(2,minmax(220px,1fr))!important;max-width:760px!important}.dashboardQuickPanel{flex-direction:column;align-items:flex-start}.dashboardQuickPanel a{width:100%}}
@media(max-width:680px){body.dashboardProBody .dashboardPage{padding:84px 16px 32px!important}.dashboardStatusGrid{grid-template-columns:repeat(2,1fr)}body.dashboardProBody .heroMini h1{font-size:30px!important}.dashStatusCard{padding:14px}.dashStatusCard b{font-size:25px}body.dashboardProBody .moduleGrid{grid-template-columns:1fr!important;max-width:390px!important}}
