/* ROVEX UX-Runde 22.11.2026 – Track "shell": Start, Dashboard, Navigation, Kopfzeile, REX-Knopf,
   Baustellen/Baustellenpläne/Planer/Firmenstruktur. Nur Darstellung. */

/* ==== C-START (Start, Dashboard, Navigation, Kopfzeile) ==== */
/* Start: neutraler Lade-Bildschirm, bis „me“ antwortet (app.js entfernt ihn). Sicherheitsnetz: nach 20 s durchlässig. */
.rx-boot{position:fixed;inset:0;z-index:5000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;
  background:radial-gradient(circle at top right,rgba(218,58,61,.16),transparent 28%),linear-gradient(180deg,#181818 0%,#202020 100%);
  color:#b5b6bf;font:500 13px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;animation:rx-boot-failsafe 0s linear 20s forwards}
.rx-boot img{width:min(200px,52vw);height:auto}
.rx-boot-spinner{width:26px;height:26px;border-radius:50%;border:3px solid #ffffff1f;border-top-color:var(--accent,#da3a3d);animation:rx-spin .9s linear infinite}
@keyframes rx-spin{to{transform:rotate(360deg)}}
@keyframes rx-boot-failsafe{to{visibility:hidden;opacity:0;pointer-events:none}}
/* Rollenrahmen steht, Startdaten laden noch: schmaler Ladebalken; Ansichten mit Formularen erst danach bedienbar. */
body.rx-data-loading::before{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:4000;pointer-events:none;
  background:linear-gradient(90deg,transparent,var(--accent,#da3a3d),transparent) no-repeat;background-size:40% 100%;animation:rx-bar 1.1s ease-in-out infinite}
@keyframes rx-bar{from{background-position:-60% 0}to{background-position:160% 0}}
body.rx-data-loading .views>.view.view-active:not(#view-dashboard),body.rx-data-loading #worker-hours-section{opacity:.5;pointer-events:none;transition:opacity .2s}
.rx-queued{outline:2px solid #ffb0a7;outline-offset:2px;cursor:progress}
@media (prefers-reduced-motion:reduce){.rx-boot-spinner{animation-duration:2.4s}body.rx-data-loading::before{animation:none;background-size:100% 100%;opacity:.5}}

/* Menü: Gruppen flach bei wenigen Punkten (nav-groups.js setzt .nav-flat); Beschriftung mit Zähler bricht nicht zentriert um. */
.sidebar-nav.nav-flat .nav-group-head{display:none}
.sidebar-nav.nav-flat .nav-group-items{display:flex;margin:0;padding:0;border:0;gap:4px}
.sidebar-nav.nav-flat .nav-group-items .nav-item{font-size:.9rem;padding:9px 12px}
.sidebar .nav-item>span{flex:1 1 auto;min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar .nav-group-items{margin-left:8px;padding-left:6px}
.sidebar .nav-group-head>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.sidebar .nav-item>b{flex:0 0 auto}
@media (max-width:840px),(pointer:coarse){.sidebar .nav-item,.sidebar .nav-group-head{min-height:40px}}
@media (max-width:840px){
  .sidebar .logo-wrap{min-height:0;padding:10px 14px;border-radius:14px}
  .sidebar .logo-wrap img{max-height:44px;width:auto;max-width:100%}
  .sidebar{gap:12px;width:min(290px,86vw)}
}

/* Kopfzeile: auf dem Handy Seitentitel statt Logo (Logo nur vor der Anmeldung); Sprache steckt dann im Benutzermenü. */
@media (max-width:840px){
  .topbar{gap:8px;min-height:44px}
  .topbar-left{min-width:0}
  body[data-rx-auth="1"] .topbar-title-wrap{display:flex;flex-direction:column;min-width:0;flex:1}
  body[data-rx-auth="1"] .topbar-title-wrap h1{font-size:1.05rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body[data-rx-auth="1"] .topbar-subtitle{display:none}
  body[data-rx-auth="1"] .topbar-logo-mobile{display:none}
  body[data-rx-auth="1"] #rxi-lang{display:none}
  .topbar-right{gap:8px}
}
/* Ansichten mit eigenem Datum: Datum oben nicht ein zweites Mal. */
body[data-rx-view="dashboard"] #current-date,body[data-rx-view="truckroutes"] #current-date,body[data-rx-view="planner"] #current-date,body[data-rx-view="my-plan"] #current-date{display:none}
/* Erste Überschrift einer Ansicht = Titel in der Kopfzeile → nur noch für Screenreader. */
.rx-dup-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}

/* Benutzermenü (Chip oben rechts). */
.topbar-right{position:relative}
.rx-user-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:1200;min-width:240px;max-width:calc(100vw - 24px);padding:6px;border-radius:14px;background:#1f1f24;border:1px solid #3a3a3a;box-shadow:0 16px 40px rgba(0,0,0,.45);display:flex;flex-direction:column;gap:2px}
.rx-user-menu[hidden]{display:none}
.rx-um-head{display:flex;flex-direction:column;gap:2px;padding:8px 10px 10px;border-bottom:1px solid #ffffff14;margin-bottom:4px;min-width:0}
.rx-um-head strong{font-size:.92rem;color:#f2f2f4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rx-um-head small{font-size:.78rem;color:#a9abb5}
.rx-user-menu [data-rx-um]{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:8px 10px;border:0;border-radius:9px;background:none;color:#e8e8ea;font:inherit;font-size:.9rem;text-align:left;cursor:pointer}
.rx-user-menu [data-rx-um]:hover,.rx-user-menu [data-rx-um]:focus-visible{background:rgba(255,255,255,.07);outline:none}
.rx-user-menu [data-rx-um] i{width:18px;text-align:center;color:#b9bbc5}
.rx-user-menu .is-danger,.rx-user-menu .is-danger i{color:#ff9d93}
.rx-um-lang{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;min-height:42px}
.rx-um-label{display:flex;align-items:center;gap:10px;font-size:.9rem;color:#e8e8ea}
.rx-um-label i{width:18px;text-align:center;color:#b9bbc5}
.rx-um-langs{display:flex;gap:4px}
.rx-um-langs button{min-width:40px;min-height:36px;padding:0 8px;border-radius:8px;border:1px solid #3a3a3a;background:#292929;color:#d8d8dc;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}
.rx-um-langs button[aria-checked="true"]{background:rgba(232,106,95,.18);border-color:#e86a5f88;color:#fff}
/* Profil: Push-Geräte des Teams eingeklappt. */
.rx-push-devices{margin-top:14px;border-top:1px solid #ffffff14;padding-top:10px}
.rx-push-devices>summary{cursor:pointer;color:#cfd0d6;font-size:.9rem;min-height:36px;display:flex;align-items:center;gap:8px}
.rx-push-devices>.admin-backup-section{margin-top:8px}

/* REX: Inhalt kann unter dem Knopf hervorscrollen; auf dem Handy nur ein runder Symbolknopf. */
body:has(#rxd-launch:not([hidden])) .main{padding-bottom:96px}
@media (max-width:600px){
  #rxd-launch{padding:4px;width:56px;height:56px;justify-content:center;border-radius:50%}
  #rxd-launch strong{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  #rxd-launch #rxd-dot{position:absolute;top:6px;right:6px}
  body:has(#rxd-launch:not([hidden])) .main{padding-bottom:84px}
}

/* Dashboard, Handy: kompakte Kopfzeile (kein Eyebrow/Slogan), Datum + Aktualisieren in einer Zeile, Tabs als eine scrollende Zeile. */
@media (max-width:840px){
  #dashboard-shell .db-hero{padding:2px 0 12px;gap:10px}
  #dashboard-shell .db-hero .db-eyebrow,#dashboard-shell #db-headline{display:none}
  #dashboard-shell .db-hero h2{font-size:24px;letter-spacing:-.6px;margin:0}
  #dashboard-shell .db-hero-tools{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;width:100%;max-width:none;gap:8px}
  #dashboard-shell .db-sync{max-width:none;min-width:0}
  #dashboard-shell .db-sync>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #dashboard-shell .db-date{white-space:nowrap;flex:0 0 auto}
  #dashboard-shell .db-icon-btn{width:40px;height:40px}
  #dashboard-shell .db-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;gap:4px;margin-bottom:14px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  #dashboard-shell .db-tabs::-webkit-scrollbar{display:none}
  #dashboard-shell .db-tab{flex:0 0 auto;white-space:nowrap;min-height:40px;min-width:auto;padding:10px 13px}
}
/* Dashboard: Prioritäten mit Unterzeile (Liste, Schnellaktion, Hinweis „ohne Auftragswert“). */
#dashboard-shell .db-priority-wrap{border-top:1px solid #ffffff09}
#dashboard-shell .db-priority-wrap>.db-priority{border-top:0}
#dashboard-shell .db-priority-sub{display:flex;flex-wrap:wrap;gap:6px 14px;margin:-6px 0 10px 46px}
#dashboard-shell .db-sub-btn{border:0;background:none;padding:6px 0;min-height:32px;font-size:12px;color:#ffb2a8;text-align:left}
#dashboard-shell .db-sub-btn.is-muted{color:#9a9ca8}
#dashboard-shell .db-sub-btn:hover{color:#fff}
#dashboard-shell .db-fu-list{list-style:none;margin:0 0 12px 46px;padding:0;display:flex;flex-direction:column;gap:6px}
#dashboard-shell .db-fu{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid #ffffff0d;border-radius:10px;background:#ffffff04}
#dashboard-shell .db-fu.is-done{opacity:.75}
#dashboard-shell .db-fu-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
#dashboard-shell .db-fu-copy strong{font-size:12px;font-weight:600;color:#eeedf2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#dashboard-shell .db-fu-copy small{font-size:12px;color:#a7a9b3;overflow-wrap:anywhere}
#dashboard-shell .db-fu-actions{display:flex;gap:6px;flex-shrink:0}
#dashboard-shell .db-fu-btn{min-height:36px;padding:0 10px;border-radius:8px;border:1px solid #ffffff1c;background:#ffffff06;color:#dcdde3;font-size:12px}
#dashboard-shell .db-fu-btn:hover{background:#ffffff10}
#dashboard-shell .db-fu-btn.is-lost{border-color:#ff766840;color:#ffac9e}
#dashboard-shell .db-fu-all{margin:0 0 12px 46px}
@media (max-width:480px){
  #dashboard-shell .db-priority-sub,#dashboard-shell .db-fu-list,#dashboard-shell .db-fu-all{margin-left:0}
  #dashboard-shell .db-fu{flex-direction:column;align-items:stretch}
  #dashboard-shell .db-fu-actions{justify-content:flex-end}
  #dashboard-shell .db-fu-btn{min-height:40px}
}
/* Dashboard: Agenda je Baustelle, Namen zum Aufklappen. */
#dashboard-shell .db-agenda-people{margin-top:4px;font-size:12px;color:#a5a7b3}
#dashboard-shell .db-agenda-people>summary{cursor:pointer;min-height:28px;display:flex;align-items:center;gap:6px;list-style:none;color:#c7c9d2}
#dashboard-shell .db-agenda-people>summary::-webkit-details-marker{display:none}
#dashboard-shell .db-agenda-people>summary::after{content:"▾";font-size:11px;color:#8d909c}
#dashboard-shell .db-agenda-people[open]>summary::after{content:"▴"}
#dashboard-shell .db-agenda-people p{margin:4px 0 0;line-height:1.6;overflow-wrap:anywhere}
/* Wochenkarte im Dashboard: auf dem Handy ein Tag mit Umschalter (wie im Planer). */
.wp-dash-switch{display:none}
@media (max-width:760px){
  .wp-dash-switch{display:flex;gap:6px;overflow-x:auto;margin:0 0 10px;scrollbar-width:none}
  .wp-dash-switch::-webkit-scrollbar{display:none}
  .wp-dash-switch button{flex:0 0 auto;min-height:40px;min-width:52px;padding:4px 10px;border-radius:10px;border:1px solid #ffffff1a;background:#ffffff05;color:#cfcad4;font:inherit;font-size:12px;text-transform:capitalize}
  .wp-dash-switch button.is-today{border-color:#d5695d66}
  .wp-dash-switch button[aria-pressed="true"]{background:#a33e3633;border-color:#d5695d99;color:#fff}
  .wp-dash .wp-dash-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);overflow:visible}
  .wp-dash .wp-dash-day:not(.is-sel),.wp-dash .wp-dash-cell:not(.is-sel){display:none}
  .wp-dash .wp-dash-label,.wp-dash .wp-dash-day,.wp-dash .wp-dash-free,.wp-dash .wp-dash-more{font-size:12px}
  .wp-dash .wp-dash-chip{font-size:12px;white-space:normal}
  .wp-dash .wp-dash-cell{min-height:40px}
  .wp-dash .wp-dash-abs{font-size:12px;min-width:18px;height:18px;border-radius:9px}
}
/* Großschreibung nur am Anfang („Quinta-feira, 19 de novembro“ statt „Quinta-Feira, 19 De Novembro“). */
.mp-day h3{text-transform:none}
.mp-day h3::first-letter{text-transform:uppercase}
.pl-calendar-bar strong{text-transform:none}
.pl-calendar-bar strong::first-letter{text-transform:uppercase}
@media (max-width:840px){.mp-day h3 span{font-size:12px}}
/* ==== C-END ==== */

/* ==== F-START (Baustellen, Baustellenpläne, Planer, Firmenstruktur) ==== */
/* Firmenstruktur: Tabs Equipas | Funções-chave | Gerência */
#view-schedule .schedule-tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid rgba(255,255,255,.1); overflow-x: auto; scrollbar-width: none; }
#view-schedule .schedule-tabs::-webkit-scrollbar { display: none; }
#view-schedule .schedule-tabs button { flex: 0 0 auto; min-height: 44px; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-muted, #aaa); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#view-schedule .schedule-tabs button[aria-selected="true"] { color: var(--text-main, #fff); border-bottom-color: var(--accent, #da3a3d); }
#view-schedule .schedule-tabs button:focus-visible { outline: 2px solid var(--accent, #da3a3d); outline-offset: 2px; }
#view-schedule [data-schedule-pane][hidden] { display: none !important; }
/* ==== F-END ==== */
