
/* ============================================================
   RurMobil Dispatch V4.6.0
   Redesign nach freigegebenem Dashboard-/Zentrale-Mockup
   ============================================================ */

:root{
  --rm-blue:#0867c7;
  --rm-blue-deep:#0757ad;
  --rm-blue-soft:#eaf4ff;
  --rm-yellow:#ffae00;
  --rm-yellow-soft:#fff5df;
  --rm-green:#18a966;
  --rm-red:#e34955;
  --rm-text:#12233d;
  --rm-muted:#74839a;
  --rm-bg:#f7f9fc;
  --rm-line:#e4e9f0;
  --rm-card:#ffffff;
  --rm-shadow:0 8px 28px rgba(18,45,80,.055);
}

.dispatch-shell{
  --sidebar-w:310px;
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--sidebar-w) minmax(0,1fr);
  background:var(--rm-bg);
  transition:grid-template-columns .22s ease;
}
.dispatch-shell.sidebar-collapsed{--sidebar-w:88px}

.dispatch-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-right:1px solid var(--rm-line);
  padding:16px 14px;
  z-index:20;
  overflow:hidden;
}
.dispatch-sidebar-head{
  min-height:150px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding:0 3px 16px;
}
.dispatch-logo{
  display:flex;
  align-items:center;
  min-width:0;
  padding-top:8px;
}
.dispatch-logo img{
  width:245px;
  height:105px;
  object-fit:contain;
  object-position:left center;
  transition:width .2s ease,opacity .2s ease;
}
.sidebar-toggle{
  flex:0 0 auto;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--rm-line);
  border-radius:12px;
  background:#fff;
  color:#53647d;
  box-shadow:0 4px 14px rgba(20,42,72,.04);
}
.sidebar-toggle svg{width:20px;height:20px}
.dispatch-shell.sidebar-collapsed .dispatch-sidebar-head{
  min-height:106px;
  justify-content:center;
  position:relative;
}
.dispatch-shell.sidebar-collapsed .dispatch-logo{display:none}
.dispatch-shell.sidebar-collapsed .sidebar-toggle{margin-top:4px}

.dispatch-nav{
  display:flex;
  flex-direction:column;
  gap:7px;
  overflow:auto;
  scrollbar-width:none;
}
.dispatch-nav::-webkit-scrollbar{display:none}
.dispatch-nav button{
  width:100%;
  min-height:48px;
  border:0;
  background:transparent;
  border-radius:11px;
  padding:0 14px;
  display:flex;
  align-items:center;
  gap:14px;
  text-align:left;
  color:#34465f;
  font-weight:650;
  font-size:14px;
  transition:background .15s ease,color .15s ease;
  white-space:nowrap;
}
.dispatch-nav button:hover{background:#f5f8fc}
.dispatch-nav button.active{
  color:#fff;
  background:linear-gradient(135deg,var(--rm-blue),var(--rm-blue-deep));
  box-shadow:0 7px 17px rgba(8,103,199,.18);
}
.dispatch-nav .nav-icon{
  width:23px;
  height:23px;
  flex:0 0 23px;
  display:grid;
  place-items:center;
}
.dispatch-nav .nav-icon svg{width:21px;height:21px;stroke:currentColor}
.dispatch-nav .nav-label{overflow:hidden;text-overflow:ellipsis}
.dispatch-shell.sidebar-collapsed .dispatch-nav button{
  width:54px;
  min-width:54px;
  height:50px;
  padding:0;
  justify-content:center;
  margin:0 auto;
}
.dispatch-shell.sidebar-collapsed .nav-label{display:none}

.dispatch-sidebar-bottom{
  margin-top:auto;
  display:grid;
  gap:9px;
  padding-top:14px;
}
.dispatch-support{
  border:1px solid var(--rm-line);
  border-radius:13px;
  padding:12px 13px;
  display:flex;
  gap:11px;
  align-items:center;
  background:#fff;
}
.dispatch-support .support-icon{
  width:34px;height:34px;border-radius:10px;
  display:grid;place-items:center;
  color:#55677f;background:#f4f7fb;
}
.dispatch-support strong{font-size:12px}
.dispatch-support span{font-size:11px;color:var(--rm-muted)}
.dispatch-shell.sidebar-collapsed .dispatch-support .support-copy,
.dispatch-shell.sidebar-collapsed .dispatch-sidebar-bottom .btn span,
.dispatch-shell.sidebar-collapsed #syncTime{display:none}
.dispatch-shell.sidebar-collapsed .dispatch-support{justify-content:center;padding:9px}
.dispatch-shell.sidebar-collapsed .dispatch-sidebar-bottom .btn{
  width:54px;height:44px;padding:0;margin:auto;
}

.dispatch-main{
  min-width:0;
  padding:15px 20px 30px;
}
.dispatch-topbar{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 4px 10px;
}
.dispatch-title-block h2{
  margin:0;
  color:var(--rm-text);
  font-size:28px;
  line-height:1.1;
}
.dispatch-title-block p{margin:5px 0 0;color:var(--rm-muted);font-size:13px}
.dispatch-top-actions{display:flex;align-items:center;gap:9px}
.dispatch-top-search{
  min-width:250px;
  height:42px;
  border-radius:12px!important;
  background:#fff!important;
}
.admin-chip{
  min-width:205px;
  height:52px;
  padding:6px 12px 6px 7px;
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:9px;
  align-items:center;
  border:1px solid var(--rm-line);
  border-radius:14px;
  background:#fff;
}
.admin-avatar{
  width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--rm-blue-soft);color:var(--rm-blue);font-weight:900;
}
.admin-chip strong{display:block;font-size:12px;color:var(--rm-text)}
.admin-chip small{display:block;font-size:10px;color:var(--rm-muted);margin-top:2px;max-width:125px;overflow:hidden;text-overflow:ellipsis}
.admin-chip .admin-chevron{color:#71829a}

.dispatch-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin:15px 0 18px;
}
.dispatch-page-head h1{
  margin:0;
  color:var(--rm-text);
  font-size:31px;
  letter-spacing:-.02em;
}
.dispatch-page-head p{margin:6px 0 0;color:var(--rm-muted);font-size:13px}
.dispatch-page-actions{display:flex;gap:9px;align-items:center}

.rm-card{
  background:#fff;
  border:1px solid var(--rm-line);
  border-radius:14px;
  box-shadow:var(--rm-shadow);
}
.rm-primary{
  background:linear-gradient(135deg,var(--rm-blue),var(--rm-blue-deep))!important;
  color:#fff!important;
  border:0!important;
}
.rm-primary:hover{filter:brightness(.98)}
.rm-yellow{background:var(--rm-yellow)!important;color:#fff!important}

.rm-kpi-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(150px,1fr));
  gap:14px;
  margin-bottom:20px;
}
.rm-kpi{
  min-height:118px;
  padding:19px 20px;
  display:grid;
  grid-template-columns:48px 1fr;
  gap:14px;
  align-items:start;
}
.rm-kpi-icon{
  width:48px;height:48px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--rm-blue-soft);
  color:var(--rm-blue);
}
.rm-kpi.yellow .rm-kpi-icon{background:var(--rm-yellow-soft);color:var(--rm-yellow)}
.rm-kpi-icon svg{width:24px;height:24px;stroke:currentColor}
.rm-kpi-label{font-size:13px;color:#23364f;margin-bottom:3px}
.rm-kpi-value{
  font-size:32px;
  line-height:1;
  color:var(--rm-blue);
  font-weight:850;
  letter-spacing:-.03em;
  margin-top:4px;
}
.rm-kpi.yellow .rm-kpi-value{color:var(--rm-yellow)}
.rm-kpi-sub{font-size:10.5px;color:var(--rm-muted);margin-top:8px}

.overview-chart-card{
  padding:24px 28px 22px;
  min-height:430px;
}
.chart-card-head h3{margin:0;color:var(--rm-text);font-size:17px}
.chart-card-head p{margin:5px 0 0;color:var(--rm-muted);font-size:11px}
.overview-chart-main{
  display:grid;
  grid-template-columns:minmax(300px,1fr) minmax(470px,1.3fr);
  align-items:center;
  gap:34px;
  min-height:300px;
  padding:15px 20px 8px;
}
.overview-donut-wrap{display:grid;place-items:center}
.overview-donut{
  --p1:25%;
  --p2:45%;
  --p3:70%;
  width:255px;height:255px;border-radius:50%;
  background:conic-gradient(
    var(--rm-blue) 0 var(--p1),
    #75b7ee var(--p1) var(--p2),
    var(--rm-yellow) var(--p2) var(--p3),
    #d9dde4 var(--p3) 100%
  );
  position:relative;
  box-shadow:inset 0 0 0 1px rgba(8,55,110,.03);
}
.overview-donut:after{
  content:"";
  position:absolute;inset:56px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 1px var(--rm-line);
}
.overview-donut-center{
  position:absolute;
  inset:0;
  z-index:2;
  display:grid;
  place-items:center;
  text-align:center;
  pointer-events:none;
}
.overview-donut-center strong{font-size:36px;color:var(--rm-blue);line-height:1}
.overview-donut-center span{font-size:11px;color:var(--rm-muted);margin-top:5px}
.overview-legend{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.legend-stat{
  border:1px solid var(--rm-line);
  border-radius:13px;
  padding:17px;
  display:grid;
  grid-template-columns:10px 1fr auto;
  gap:10px;
  align-items:center;
  min-height:83px;
}
.legend-dot{width:10px;height:10px;border-radius:50%}
.legend-stat .legend-name{font-size:12px;color:#30435d}
.legend-stat strong{font-size:27px;color:var(--rm-text)}
.legend-stat small{grid-column:2/4;color:var(--rm-muted);font-size:10px}

.dispatch-filterbar{
  padding:10px;
  display:grid;
  grid-template-columns:minmax(260px,1fr) 190px 190px auto;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
}
.dispatch-filterbar .input,
.dispatch-filterbar select{height:44px;border-radius:10px}
.new-ride-btn{height:44px;padding:0 18px;white-space:nowrap}

.dispatch-workspace{
  display:grid;
  grid-template-columns:minmax(300px,.92fr) minmax(420px,1.2fr) minmax(330px,.92fr);
  gap:14px;
  align-items:start;
}
.dispatch-column-card{overflow:hidden}
.dispatch-card-head{
  height:50px;
  padding:0 16px;
  border-bottom:1px solid var(--rm-line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.dispatch-card-head h3{margin:0;font-size:15px;color:var(--rm-text)}
.dispatch-card-head .head-link{
  border:0;background:transparent;color:var(--rm-blue);font-size:10px;font-weight:800;
}
.ride-list{
  padding:0;
  max-height:635px;
  overflow:auto;
}
.ride-list-item{
  border:0;
  border-bottom:1px solid var(--rm-line);
  width:100%;
  background:#fff;
  padding:14px 15px;
  display:grid;
  grid-template-columns:61px 1fr auto;
  gap:10px;
  text-align:left;
  color:inherit;
}
.ride-list-item:hover{background:#fbfdff}
.ride-list-item.selected{
  background:#f7fbff;
  box-shadow:inset 3px 0 0 var(--rm-blue);
}
.ride-list-time{
  font-size:20px;font-weight:850;color:var(--rm-blue);letter-spacing:-.02em
}
.ride-list-main strong{font-size:12px;color:var(--rm-text)}
.ride-route-line{
  margin-top:5px;
  display:flex;align-items:flex-start;gap:6px;
  color:#6f7d91;font-size:9.8px;line-height:1.35;
}
.route-bullet{
  width:6px;height:6px;border-radius:50%;background:var(--rm-blue);margin-top:4px;flex:0 0 auto
}
.route-bullet.destination{background:var(--rm-yellow)}
.ride-service-line{
  margin-top:7px;font-size:9.8px;color:#42556f;display:flex;gap:5px;align-items:center
}
.ride-list-side{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:9px}
.ride-price{font-size:11px;font-weight:800;color:#30435b}
.ride-status-pill{
  padding:4px 7px;border-radius:999px;font-size:8.8px;font-weight:800;
  background:#eaf2ff;color:#235fc9;
}
.ride-status-pill.green{background:#e9f9f0;color:#168450}
.ride-status-pill.orange{background:#fff4df;color:#b67300}
.ride-status-pill.red{background:#fff0f1;color:#ba3440}
.empty-inline{padding:35px 18px;text-align:center;color:var(--rm-muted);font-size:12px}

.ride-detail{padding:15px 16px 16px}
.detail-hero{
  display:grid;
  grid-template-columns:48px 1fr auto;
  gap:12px;
  align-items:start;
  border:1px solid var(--rm-line);
  border-radius:13px;
  padding:13px;
  background:#fff;
}
.detail-service-icon{
  width:48px;height:48px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--rm-blue-soft);color:var(--rm-blue);
  font-size:22px;
}
.detail-hero h3{margin:2px 0 3px;font-size:16px;color:var(--rm-text)}
.detail-hero p{margin:0;font-size:9.5px;color:var(--rm-muted)}
.detail-grid{margin-top:12px;display:grid;gap:0}
.detail-line{
  display:grid;
  grid-template-columns:82px 1fr auto;
  gap:10px;
  padding:8px 2px;
  border-bottom:1px solid #edf0f4;
  font-size:10.5px;
  align-items:start;
}
.detail-line label{color:#687890}
.detail-line strong{color:#243953}
.detail-line .detail-accent{color:var(--rm-blue);font-weight:850}
.assignment-box{
  margin-top:12px;
  border:1px solid var(--rm-line);
  border-radius:13px;
  padding:12px;
}
.assignment-box h4{font-size:11px;margin:0 0 9px;color:var(--rm-text)}
.assignment-row{display:grid;grid-template-columns:1fr auto;gap:8px}
.assignment-row select{height:40px;padding:8px 10px}
.current-assignment{
  margin-top:9px;
  background:#fafcff;border:1px solid #edf1f6;border-radius:10px;
  padding:9px 11px;font-size:10px;color:#66758a
}
.detail-status-row{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.detail-status-row select{height:40px;padding:8px 10px}
.detail-actions{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:7px;margin-top:12px}
.detail-actions .btn{height:40px;padding:0 9px;font-size:9.5px}
.detail-actions .btn.danger-outline{
  color:var(--rm-red);border:1px solid #f1cbd0;background:#fff;
}

.dispatch-driver-list{padding:0}
.dispatch-driver-row{
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:9px;
  align-items:center;
  min-height:60px;
  padding:9px 13px;
  border-bottom:1px solid var(--rm-line);
}
.driver-initial{
  width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--rm-blue-soft);color:var(--rm-blue);
  font-size:13px;font-weight:850;
}
.dispatch-driver-row strong{display:block;font-size:10.5px;color:var(--rm-text)}
.dispatch-driver-row small{display:block;color:var(--rm-muted);font-size:8.8px;margin-top:3px}
.driver-right{text-align:right}
.driver-status{
  display:flex;align-items:center;justify-content:flex-end;gap:5px;
  font-size:9px;font-weight:750
}
.driver-status i{width:6px;height:6px;border-radius:50%;background:#9aa5b4}
.driver-status.green{color:#168450}.driver-status.green i{background:#1bad69}
.driver-status.orange{color:#ba7600}.driver-status.orange i{background:var(--rm-yellow)}
.driver-status.gray{color:#65758a}.driver-status.gray i{background:#8795a8}
.driver-location{margin-top:4px;color:#718096;font-size:8.5px}
.compact-map-wrap{margin-top:14px;overflow:hidden}
.compact-map{height:270px;border-radius:0 0 14px 14px}
.full-map-card{overflow:hidden}
.full-map-card .map-live{height:650px;border:0;border-radius:0}
.gps-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px}
.gps-side{padding:0;overflow:hidden}
.gps-driver-list{max-height:650px;overflow:auto}

.section-view{animation:rmFade .15s ease}
@keyframes rmFade{from{opacity:.4;transform:translateY(3px)}to{opacity:1;transform:none}}

.premium-table-card{
  margin-top:0!important;
  border-radius:14px!important;
  box-shadow:var(--rm-shadow)!important;
}
.premium-table-card table{min-width:980px}
.premium-table-card th{
  background:#fafcff!important;
  color:#60728a!important;
  font-size:10.5px!important;
}
.premium-table-card td{font-size:10.5px!important}
.premium-page .driver-card,
.premium-page .settings-section,
.premium-page .stat-card{box-shadow:var(--rm-shadow)}

.quick-edit-modal{max-width:620px}
.quick-edit-modal .modal-grid{grid-template-columns:1fr 1fr}

#dataErrorBanner{margin:0 0 12px}
.map-api-missing{height:100%;display:grid;place-items:center;text-align:center;padding:20px;color:#8b3d45;background:#fff6f7}
.map-api-missing strong{display:block;margin-bottom:6px}

@media(max-width:1450px){
  .dispatch-workspace{grid-template-columns:minmax(300px,.9fr) minmax(420px,1.15fr)}
  .dispatch-right-column{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:14px}
  .compact-map-wrap{margin-top:0}
  .rm-kpi-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:1120px){
  .dispatch-shell{--sidebar-w:88px}
  .dispatch-logo{display:none}
  .dispatch-sidebar-head{min-height:106px;justify-content:center}
  .dispatch-nav button{width:54px;min-width:54px;height:50px;padding:0;justify-content:center;margin:0 auto}
  .dispatch-nav .nav-label{display:none}
  .dispatch-support .support-copy,.dispatch-sidebar-bottom .btn span,#syncTime{display:none}
  .dispatch-support{justify-content:center;padding:9px}
  .dispatch-filterbar{grid-template-columns:1fr 1fr}
  .dispatch-workspace{grid-template-columns:1fr}
  .dispatch-right-column{grid-column:auto;display:grid;grid-template-columns:1fr 1fr}
  .overview-chart-main{grid-template-columns:1fr}
  .overview-legend{max-width:720px;width:100%;margin:auto}
  .gps-layout{grid-template-columns:1fr}
}
@media(max-width:820px){
  .dispatch-shell{display:block}
  .dispatch-sidebar{
    position:relative;height:auto;border-right:0;border-bottom:1px solid var(--rm-line);
  }
  .dispatch-sidebar-head{min-height:80px;justify-content:space-between}
  .dispatch-logo{display:flex}.dispatch-logo img{width:210px;height:72px}
  .dispatch-nav{display:grid;grid-template-columns:repeat(2,1fr)}
  .dispatch-nav button{width:100%;height:46px;justify-content:flex-start;padding:0 12px}
  .dispatch-nav .nav-label{display:block}
  .dispatch-sidebar-bottom{display:none}
  .dispatch-main{padding:12px}
  .dispatch-topbar{align-items:flex-start;flex-direction:column}
  .dispatch-top-actions{width:100%;flex-wrap:wrap}
  .dispatch-top-search{flex:1;min-width:200px}
  .admin-chip{min-width:190px}
  .rm-kpi-grid{grid-template-columns:repeat(2,1fr)}
  .dispatch-filterbar{grid-template-columns:1fr}
  .dispatch-right-column{grid-template-columns:1fr}
  .overview-legend{grid-template-columns:1fr 1fr}
}
@media(max-width:540px){
  .rm-kpi-grid{grid-template-columns:1fr}
  .overview-chart-card{padding:18px 14px}
  .overview-chart-main{padding:10px 0}
  .overview-donut{width:220px;height:220px}
  .overview-donut:after{inset:50px}
  .overview-legend{grid-template-columns:1fr}
  .detail-actions{grid-template-columns:1fr 1fr}
  .quick-edit-modal .modal-grid{grid-template-columns:1fr}
}

/* V4.8.0 */
.modal-backdrop{overflow-y:auto!important;align-items:flex-start!important;padding:24px 12px!important}
.modal-backdrop>.modal,.modal-backdrop>form.modal{max-height:calc(100vh - 48px)!important;overflow-y:auto!important;overscroll-behavior:contain;margin:auto!important}
.dispatch-workspace{grid-template-columns:minmax(320px,.95fr) minmax(440px,1.25fr) minmax(300px,.8fr)}
.dispatch-right-column{display:block!important;grid-column:auto!important}
.table-action-group{display:flex;gap:6px;flex-wrap:wrap}
.table-action-group .btn{padding:6px 8px;font-size:9px}
.document-stack{display:flex;gap:5px;flex-wrap:wrap}

/* V4.8.1.3 – Dispatch-Menü-Korrektur */
.modal-backdrop{overflow-y:auto!important;align-items:flex-start!important;padding:24px 12px!important}
.modal-backdrop>.modal,.modal-backdrop>form.modal{max-height:calc(100vh - 48px)!important;overflow-y:auto!important;overscroll-behavior:contain;margin:auto!important}
.dispatch-workspace{grid-template-columns:minmax(320px,.95fr) minmax(440px,1.25fr) minmax(300px,.8fr)!important}
.dispatch-right-column{display:block!important;grid-column:auto!important}
.table-action-group{display:flex;flex-wrap:wrap;gap:6px}
.table-action-group .btn{padding:6px 8px;font-size:9px}

/* ============================================================
   V4.8.1.4 – Aktionen wiederhergestellt
   ============================================================ */
.driver-card-actions{
  display:flex!important;
  flex-wrap:wrap;
  gap:7px;
}
.driver-card-actions .btn{
  flex:1 1 auto;
  min-width:92px;
}
.detail-actions{
  flex-wrap:wrap;
}
.detail-actions .btn{
  min-width:105px;
}
.table-action-group{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

/* ============================================================
   V4.8.2.2 – Administratorprofil
   ============================================================ */
.admin-chip-button{
  appearance:none;
  -webkit-appearance:none;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.admin-chip-button:hover{
  border-color:#bdd0e6;
  box-shadow:0 8px 22px rgba(24,57,94,.08);
}
.admin-chip-button:focus-visible{
  outline:3px solid rgba(8,103,199,.18);
  outline-offset:2px;
}
.admin-avatar{
  font-weight:800;
  font-size:12px;
}
