:root{
  --bg:#f8fafc;--panel:#ffffff;--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;--brand:#4361ee;--brand-hover:#3a54d6;--nav:#ffffff;
  --green:#dcfce7;--greenInk:#166534;--yellow:#fef3c7;--yellowInk:#92400e;--red:#fee2e2;--redInk:#991b1b;--purple:#ede9fe;--purpleInk:#5b21b6;--blue:#dbeafe;--blueInk:#1d4ed8;--orange:#ffedd5;--orangeInk:#9a3412;
  --shadow:0 10px 25px -5px rgba(15,23,42,.08),0 8px 10px -6px rgba(15,23,42,.04);
  --glass-card:rgba(255,255,255,0.92);
  --glass-border:1px solid rgba(226,232,240,0.85);
  --glass-shadow:0 4px 20px -2px rgba(0,0,0,0.04),0 2px 6px -1px rgba(0,0,0,0.02);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}

.app{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:100vh;transition:grid-template-columns .2s cubic-bezier(0.4,0,0.2,1)}
.app.sidebar-collapsed{grid-template-columns:74px minmax(0,1fr)}

/* ==========================================================================
   SIDEBAR - DESIGN GRUPO E-LINE (Inspirado no Sistema de Compras)
   ========================================================================== */
.sidebar{
  background:#ffffff;
  color:#334155;
  border-right:1px solid #e2e8f0;
  padding:16px 14px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  position:sticky;
  top:0;
  height:100vh;
  z-index:30;
  box-shadow:2px 0 12px rgba(0,0,0,0.02);
  transition:all .2s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-brand-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:2px 4px 12px;
  border-bottom:1px solid #f1f5f9;
}

.brand-logo-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-logo-svg{
  width:38px;
  height:24px;
  flex-shrink:0;
}

.brand-text-block{
  display:flex;
  flex-direction:column;
  line-height:1;
}

.brand-sub{
  font-size:9.5px;
  font-weight:800;
  letter-spacing:0.12em;
  color:#94a3b8;
  text-transform:uppercase;
  margin-bottom:2px;
}

.brand-title{
  font-size:18px;
  font-weight:900;
  letter-spacing:-0.03em;
  color:#0f172a;
}

.sidebar-collapse-btn{
  width:26px;
  height:26px;
  border-radius:50%;
  border:1px solid #e2e8f0;
  background:#ffffff;
  color:#64748b;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  font-weight:800;
  line-height:1;
  transition:all 0.15s ease;
  box-shadow:0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-collapse-btn:hover{
  background:#f8fafc;
  color:#0f172a;
  border-color:#cbd5e1;
}

.sidebar-search-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:7px 10px;
  margin:4px 0 6px;
  font-size:12.5px;
  color:#94a3b8;
  cursor:pointer;
  transition:all 0.15s ease;
}

.sidebar-search-box:hover{
  background:#f1f5f9;
  border-color:#cbd5e1;
  color:#64748b;
}

.sidebar-search-icon{
  font-size:12px;
  margin-right:6px;
}

.sidebar-search-text{
  flex:1;
  font-weight:500;
}

.sidebar-kbd-shortcut{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:4px;
  padding:2px 5px;
  font-size:9.5px;
  font-weight:800;
  color:#64748b;
  letter-spacing:0.04em;
  box-shadow:0 1px 2px rgba(0,0,0,0.03);
}

.nav{
  display:flex;
  flex-direction:column;
  gap:3px;
  overflow-y:auto;
  flex:1;
  margin:2px 0;
  padding-right:2px;
}

.nav button{
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  color:#475569;
  text-align:left;
  padding:9px 12px;
  border-radius:9px;
  cursor:pointer;
  font-size:13.5px;
  font-weight:600;
  transition:all 0.15s ease;
  white-space:nowrap;
  user-select:none;
}

.nav button:hover{
  background:#f1f5f9;
  color:#0f172a;
  transform:translateX(2px);
}

.nav button.active{
  background:#4361ee !important;
  color:#ffffff !important;
  box-shadow:0 4px 12px rgba(67,97,238,0.32);
  font-weight:700;
}

.nav-icon-box{
  font-size:15px;
  width:20px;
  text-align:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.nav button .label{
  flex:1;
}

.badge{
  background:#ef4444;
  color:#fff;
  border-radius:999px;
  padding:2px 7px;
  font-size:11px;
  font-weight:800;
}
.badge.orange{background:#f59e0b}

.sidebar-footer-wrap{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid #f1f5f9;
}

.dark-mode-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 4px;
  font-size:12.5px;
  font-weight:600;
  color:#475569;
  user-select:none;
}

.dark-mode-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.switch-ios{
  position:relative;
  display:inline-block;
  width:34px;
  height:18px;
}
.switch-ios input{opacity:0;width:0;height:0}
.slider-ios{
  position:absolute;
  cursor:pointer;
  top:0;left:0;right:0;bottom:0;
  background-color:#cbd5e1;
  transition:.2s cubic-bezier(0.4,0,0.2,1);
  border-radius:18px;
}
.slider-ios:before{
  position:absolute;
  content:"";
  height:14px;
  width:14px;
  left:2px;
  bottom:2px;
  background-color:white;
  transition:.2s cubic-bezier(0.4,0,0.2,1);
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,0.2);
}
.switch-ios input:checked + .slider-ios{background-color:#4361ee}
.switch-ios input:checked + .slider-ios:before{transform:translateX(16px)}

.sidebar-dept-tag{
  font-size:9px;
  font-weight:800;
  letter-spacing:0.06em;
  color:#94a3b8;
  text-transform:uppercase;
  margin-top:6px;
  text-align:center;
}

/* Estado Recolhido da Sidebar */
.app.sidebar-collapsed .sidebar{padding:14px 8px}
.app.sidebar-collapsed .brand-text-block,
.app.sidebar-collapsed .sidebar-search-box,
.app.sidebar-collapsed .nav button .label,
.app.sidebar-collapsed .badge,
.app.sidebar-collapsed .sidebar-dept-tag,
.app.sidebar-collapsed .dark-mode-label span:last-child{display:none}
.app.sidebar-collapsed .sidebar-brand-header{justify-content:center;border-bottom:0}
.app.sidebar-collapsed .nav button{justify-content:center;padding:9px 0}
.app.sidebar-collapsed .sidebar-collapse-btn{transform:rotate(180deg)}

/* ==========================================================================
   ÁREA PRINCIPAL, TOPBAR E CARDS GLASS-NEUMORPHIC
   ========================================================================== */
.main{
  min-width:0;
  padding:16px 22px 32px;
  background:#f8fafc;
}

.topbar{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}

.search{
  flex:1;
  max-width:540px;
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px 14px;
  font-size:13px;
  color:#0f172a;
  box-shadow:0 1px 3px rgba(0,0,0,0.02);
  transition:all 0.15s ease;
}
.search:focus{
  outline:none;
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,0.12);
}

.spacer{flex:1}

.pill{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:8px 12px;
  color:#475569;
  font-size:12px;
  font-weight:600;
  box-shadow:0 1px 2px rgba(0,0,0,0.02);
}

.btn{
  border:0;
  border-radius:9px;
  padding:9px 14px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  transition:all 0.15s ease;
  user-select:none;
}
.btn.primary{
  background:#4361ee;
  color:#ffffff;
  box-shadow:0 3px 10px rgba(67,97,238,0.25);
}
.btn.primary:hover{
  background:#3651d4;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(67,97,238,0.32);
}
.btn.outline{
  background:#ffffff;
  border:1px solid #e2e8f0;
  color:#1e293b;
  box-shadow:0 1px 2px rgba(0,0,0,0.02);
}
.btn.outline:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
}
.btn.soft{
  background:#eef4ff;
  color:#4361ee;
  border:1px solid #dbeafe;
}
.btn.soft:hover{
  background:#e0edff;
}

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

.pagehead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:4px 0 14px;
}
.pagehead h1{
  margin:0;
  font-size:21px;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#0f172a;
}
.pagehead p{
  margin:3px 0 0;
  color:#64748b;
  font-size:12.5px;
}
.pagehead .right{
  display:flex;
  align-items:center;
  gap:6px;
}

/* ==========================================================================
   CARDS DE ESTATÍSTICA (Clean Glass-Neumorphism)
   ========================================================================== */
.stats{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}

.stat{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:11px;
  padding:11px 14px;
  box-shadow:0 1px 3px rgba(0,0,0,0.03);
  transition:all 0.15s ease;
}
.stat:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.05);
  border-color:#cbd5e1;
}
.stat .n{
  font-size:22px;
  font-weight:900;
  line-height:1.1;
  color:#0f172a;
}
.stat .t{
  font-size:11.5px;
  font-weight:600;
  color:#64748b;
  margin-top:3px;
}
.stat.green{border-top:3px solid #16a34a;background:linear-gradient(180deg,#ffffff,#f0fdf4)}
.stat.yellow{border-top:3px solid #f59e0b;background:linear-gradient(180deg,#ffffff,#fffbeb)}
.stat.red{border-top:3px solid #dc2626;background:linear-gradient(180deg,#ffffff,#fff1f2)}
.stat.purple{border-top:3px solid #7c3aed;background:linear-gradient(180deg,#ffffff,#f5f3ff)}

/* ==========================================================================
   CARDS, GRIDS E COMPONENTES GERAIS (Clean Glass-Neumorphism Grupo E-LINE)
   ========================================================================== */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card p.muted {
  margin: -6px 0 12px;
  font-size: 12px;
  color: #64748b;
}

.card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #334155;
}

.card .row:last-child {
  border-bottom: 0;
}

.card .row strong {
  color: #0f172a;
}

/* Status & Indicators */
.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.status.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status.ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status.warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status.bad {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Tags Gerais */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.tag.blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag.yellow { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.tag.red { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.tag.purple { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.tag.orange { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.tag.gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Botões Auxiliares */
.btn-xs {
  padding: 4px 8px !important;
  font-size: 11px !important;
}

.btn.danger-soft {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.btn.danger-soft:hover {
  background: #fecaca;
}

.btn.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.btn.warning:hover {
  background: #fde68a;
}

/* ==========================================================================
   TABELAS CORPORATIVAS (Glass-Neumorphism Elegante)
   ========================================================================== */
.tablewrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 11.5px;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

tbody tr.clickable:hover {
  background: #f1f5f9;
}

.rowactions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 8px;
}

/* Pendências Table Styles */
.pending-row td {
  cursor: pointer;
}
.pending-client {
  font-weight: 700;
  color: #0f172a;
  display: block;
}
.pending-os {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   ALOCAÇÃO DE VEÍCULOS E EQUIPES (Drag & Drop Board)
   ========================================================================== */
.alloc-note {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #1e40af;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.alloc-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.alloc-board, .alloc-summary {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.alloc-board h3, .alloc-summary h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.alloc-board p, .alloc-summary p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
}

.tech-pool {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  transition: all 0.15s ease;
}

.tech-pool.dragover, .lane.dragover {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.lane {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.lane-head strong {
  font-size: 13.5px;
  color: #0f172a;
  display: block;
}

.lane-head small {
  font-size: 11px;
  color: #64748b;
}

.assigned-list {
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: grab;
  transition: all 0.15s ease;
  user-select: none;
}

.tech-pill:hover {
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(59,130,246,0.15);
}

.tech-pill:active {
  cursor: grabbing;
}

.tech-pill .x {
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 4px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.1s ease;
}

.tech-pill .x:hover {
  background: #fee2e2;
  color: #ef4444;
}

.drop-hint {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
  margin-top: auto;
}

.empty-drop {
  font-size: 11.5px;
  color: #94a3b8;
  font-style: italic;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  font-size: 12px;
}

.summary-row strong {
  color: #0f172a;
  display: block;
}

.summary-row small {
  color: #64748b;
  font-size: 10.5px;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.tiny-tag {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

/* Barra de Seleção de Recursos / Veículos */
.resource-row{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 0 10px;
}

.chip{
  white-space:nowrap;
  background:#ffffff;
  border:1px solid #e2e8f0;
  padding:6px 14px;
  border-radius:20px;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  color:#334155;
  box-shadow:0 1px 2px rgba(0,0,0,0.03);
  transition:all 0.15s ease;
  user-select:none;
}
.chip:hover{
  background:#f1f5f9;
  border-color:#cbd5e1;
}
.chip.active{
  background:#4361ee !important;
  border-color:#4361ee !important;
  color:#ffffff !important;
  box-shadow:0 3px 10px rgba(67,97,238,0.28);
}

.calendar-wrap{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 4px 16px -2px rgba(0,0,0,0.04);
}
.cal-scroll{overflow:auto}
.calendar{
  display:grid;
  grid-template-columns:56px repeat(7,minmax(135px,1fr));
  min-width:1000px;
}
.calendar.day{
  grid-template-columns:56px minmax(320px,1fr);
  min-width:430px;
}
.headcell{
  padding:8px 6px;
  border-bottom:1px solid #e2e8f0;
  border-left:1px solid #e2e8f0;
  text-align:center;
  font-size:12px;
  color:#64748b;
  background:#fbfdff;
}
.headcell.daypick{cursor:pointer}
.headcell strong{
  display:block;
  color:#0f172a;
  font-size:17px;
  margin-top:2px;
}
.time{
  height:62px;
  padding:5px 6px;
  border-top:1px solid #f1f5f9;
  color:#94a3b8;
  font-size:11px;
  font-weight:600;
  background:#fbfdff;
}
.slot{
  height:62px;
  border-top:1px solid #f1f5f9;
  border-left:1px solid #f1f5f9;
  position:relative;
  overflow:visible;
}

.empty{padding:35px;text-align:center;color:var(--muted)}
.drawer-overlay{position:fixed;inset:0;background:rgba(15,23,42,.26);z-index:40;opacity:0;pointer-events:none;transition:.2s}.drawer-overlay.open{opacity:1;pointer-events:auto}.drawer{position:fixed;right:0;top:0;height:100vh;width:min(430px,94vw);background:#fff;z-index:41;box-shadow:-18px 0 45px rgba(15,23,42,.18);transform:translateX(105%);transition:.22s ease;display:flex;flex-direction:column}.drawer.open{transform:translateX(0)}.drawerhead{display:flex;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.drawerhead strong{font-size:16px}.drawerclose{margin-left:auto;border:0;background:#f1f5f9;border-radius:9px;width:34px;height:34px;cursor:pointer}.tabs{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line)}.tabs button{border:0;background:#fff;padding:12px 6px;color:var(--muted);font-weight:750;cursor:pointer}.tabs button.active{color:var(--brand);border-bottom:2px solid var(--brand)}.drawerbody{padding:16px;overflow:auto}.service-title{display:flex;justify-content:space-between;gap:8px;align-items:start}.drawer h2{font-size:20px;margin:10px 0}.kv{display:grid;grid-template-columns:24px 1fr;gap:8px;margin:10px 0;font-size:13px;color:#334155}.section{border-top:1px solid var(--line);margin-top:14px;padding-top:12px}.section h3{font-size:13px;margin:0 0 7px}.note{font-size:13px;color:#475569;line-height:1.45}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.actions .btn{flex:1}.hidden{display:none!important}.client-card{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:11px;margin-bottom:9px}.client-card strong{display:block;margin-bottom:4px}.previous-box{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:11px;margin-top:10px;font-size:13px}.previous-box strong{display:block;margin-bottom:6px;color:#9a3412}.previous-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px}.previous-grid span{color:#475569}.action-state{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.action-state .btn{width:100%}.btn.success{background:#16a34a;color:#fff}.btn.warning{background:#f97316;color:#fff}.btn.neutral{background:#f8fafc;color:#334155;border:1px solid var(--line)}.timeline{display:flex;flex-direction:column;gap:12px}.event{display:grid;grid-template-columns:12px 1fr;gap:9px;font-size:13px}.dot{width:10px;height:10px;background:#3b82f6;border-radius:50%;margin-top:4px}.event small{display:block;color:var(--muted);margin-top:2px}
.modalback{position:fixed;inset:0;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px;z-index:60}.modal{width:min(720px,96vw);background:#fff;border-radius:16px;box-shadow:var(--shadow);padding:18px}.modal h2{margin:0 0 14px}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px;background:#fff}.field.full{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.toast{position:fixed;right:24px;bottom:24px;background:#0f172a;color:#fff;padding:12px 14px;border-radius:10px;box-shadow:var(--shadow);z-index:80;font-size:13px}.report-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.report-card{cursor:pointer;transition:.16s;position:relative}.report-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.08)}.report-card.active{outline:2px solid var(--brand);background:#f7fbff}.report-card.active:after{content:'✓ filtro ativo';position:absolute;right:12px;top:12px;font-size:10px;font-weight:800;color:var(--brand);text-transform:uppercase;letter-spacing:.03em}.report-num{font-size:28px;font-weight:900}.report-table td:last-child{font-weight:800}.report-filterbar{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:var(--muted);font-size:12px}.report-filterbar strong{color:var(--ink)}.drop-day{background:#eff6ff!important;outline:2px dashed #60a5fa;outline-offset:-2px}
.month-calendar{display:grid;grid-template-columns:repeat(7,minmax(135px,1fr));min-width:1000px;background:#fff}.month-weekday{padding:10px;border-bottom:1px solid var(--line);border-left:1px solid var(--line);text-align:center;font-size:12px;font-weight:800;color:var(--muted);background:#fbfdff}.month-cell{min-height:128px;border-left:1px solid #edf2f7;border-top:1px solid #edf2f7;padding:7px;background:#fff;position:relative}.month-cell.other{background:#fafafa;color:#94a3b8}.month-cell.today-month{background:#f5f9ff}.month-cell.drop-month{background:#eff6ff;outline:2px dashed #60a5fa;outline-offset:-2px}.month-num{font-size:12px;font-weight:900;margin-bottom:5px}.month-cell.today-month .month-num{display:inline-flex;width:27px;height:27px;align-items:center;justify-content:center;border-radius:50%;background:var(--brand);color:#fff}.month-services{display:flex;flex-direction:column;gap:4px}.month-service{border-radius:6px;padding:5px 6px;font-size:10px;line-height:1.18;cursor:pointer;border-left:3px solid currentColor;overflow:hidden}.month-service{position:relative}.month-service strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:18px}.month-service .svc-status{position:absolute;right:4px;top:4px;font-size:10px;background:rgba(255,255,255,.8);border-radius:999px;padding:1px 3px}.month-service.green{background:var(--green);color:var(--greenInk)}.month-service.yellow{background:var(--yellow);color:var(--yellowInk)}.month-service.red{background:var(--red);color:var(--redInk)}.month-service.purple{background:var(--purple);color:var(--purpleInk)}.month-service.blue{background:var(--blue);color:var(--blueInk)}.month-service.orange{background:var(--orange);color:var(--orangeInk)}

.settings-shell{display:grid;grid-template-columns:220px minmax(0,1fr);gap:12px;align-items:start}
.settings-menu{background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px;position:sticky;top:16px}
.settings-menu button{width:100%;border:0;background:transparent;text-align:left;padding:10px 11px;border-radius:9px;cursor:pointer;color:#475569;font-weight:700;margin:2px 0}
.settings-menu button.active,.settings-menu button:hover{background:#eef4ff;color:#1d4ed8}
.settings-pane{display:none}.settings-pane.active{display:block}.settings-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px}.settings-card h3{margin:0 0 4px;font-size:15px}.settings-card>p{margin:0 0 12px;color:var(--muted);font-size:12px}.editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.editor-list{border-top:1px solid #eef2f7}.editor-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2f7}.editor-main strong{display:block;font-size:13px}.editor-main small{color:var(--muted)}.editor-actions{display:flex;gap:6px}.iconbtn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 9px;cursor:pointer;font-size:12px}.iconbtn:hover{background:#f8fafc}.switchrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #eef2f7}.switchrow:first-of-type{border-top:0}.switch{position:relative;width:42px;height:24px;background:#cbd5e1;border-radius:999px;cursor:pointer;transition:.15s}.switch.on{background:#22c55e}.switch:after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;background:#fff;border-radius:50%;transition:.15s;box-shadow:0 1px 3px rgba(0,0,0,.18)}.switch.on:after{left:21px}.admin-note{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;border-radius:10px;padding:10px 12px;font-size:12px;margin-bottom:12px}.formline{display:grid;grid-template-columns:1fr 1fr;gap:10px}.formline .field input,.formline .field select{width:100%;border:1px solid var(--line);border-radius:9px;padding:9px 10px}.danger-zone{border-color:#fecdd3;background:#fffafb}.configmodal .modal{width:min(760px,96vw)}.configmodal.user-permission-open .modal{width:min(980px,96vw);max-height:92vh;overflow:auto}.user-permissions-box{grid-column:1/-1;border:1px solid #dbeafe;background:#f8fbff;border-radius:12px;padding:12px}.user-permissions-box h4{margin:0 0 4px;font-size:14px}.user-permissions-box>p{margin:0 0 12px;color:var(--muted);font-size:12px}.permission-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.permission-group{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px}.permission-group h5{margin:0 0 8px;font-size:12px}.permission-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.permission-check{display:flex;align-items:flex-start;gap:7px;font-size:12px;color:#334155}.permission-check input{margin-top:2px}.permission-cars{display:flex;flex-wrap:wrap;gap:8px}.permission-car{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:6px 9px;background:#fff;font-size:12px}.permission-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}.user-access-note{margin-top:10px;padding:9px 10px;border-radius:9px;background:#fff7ed;color:#9a3412;font-size:11px}.access-pill{display:inline-flex;align-items:center;gap:6px}.demo-access{background:#fff7ed!important;color:#9a3412!important;border-color:#fed7aa!important}.return-admin{display:none}.return-admin.show{display:inline-flex}.no-access{padding:30px;text-align:center;color:var(--muted)}.agenda-simple .stats,.agenda-simple .clean-note{display:none}.agenda-simple .pagehead p{display:none}.agenda-simple .resource-row{margin-top:4px}.permission-hidden{display:none!important}.user-summary{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.user-summary span{font-size:10px;border-radius:999px;padding:3px 6px;background:#f1f5f9;color:#475569}.user-current{outline:2px solid #93c5fd;border-radius:10px;padding-left:8px;padding-right:8px}.permission-disabled{opacity:.55;pointer-events:none}
.service-rule-box{grid-column:1/-1;border:1px solid #dbeafe;background:#f8fbff;border-radius:12px;padding:12px}.service-rule-box h4{margin:0 0 5px;font-size:14px}.service-rule-box>p{margin:0 0 10px;color:var(--muted);font-size:12px}.rule-grid{display:grid;grid-template-columns:1fr 110px;gap:8px 12px;align-items:center;border-top:1px solid #e2e8f0;padding-top:9px}.rule-grid+.rule-grid{margin-top:8px}.checkline{display:flex!important;align-items:center;gap:8px;color:#334155!important;font-size:12px!important;margin:0!important}.checkline input{width:auto!important}.rule-days input{width:100%!important}.rule-help{grid-column:1/-1;color:var(--muted);font-size:11px;margin-top:-3px}.dashboard-alert-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.dashboard-alert-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:12px;font-weight:900}.dashboard-alert{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 0;border-top:1px solid #eef2f7;cursor:pointer}.dashboard-alert:first-of-type{border-top:0}.dashboard-alert:hover{background:#f8fafc}.dashboard-alert .ico{font-size:18px;text-align:center}.dashboard-alert strong{display:block;font-size:13px}.dashboard-alert small{display:block;color:var(--muted);margin-top:2px}.dashboard-alert .age{font-size:11px;font-weight:850;border-radius:999px;padding:4px 7px;background:#fff1f2;color:#b91c1c;white-space:nowrap}.dashboard-alert.warning .age{background:#fffbeb;color:#b45309}.execution-box{border:1px solid #bbf7d0;background:#f0fdf4;border-radius:10px;padding:10px;margin-top:12px}.execution-box strong{display:block;margin-bottom:5px}.execution-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;font-size:12px;color:#334155}


.report-advanced{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px}.report-advanced-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.report-advanced-head h3{margin:0;font-size:15px}.report-advanced-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.report-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr)) auto;gap:10px;align-items:end}.report-filter-field label{display:block;font-size:11px;font-weight:800;color:#64748b;margin:0 0 5px}.report-filter-field select,.report-filter-field input{width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px 10px;color:#0f172a}.report-filter-actions{display:flex;gap:7px;align-items:end}.report-applied{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;min-height:24px}.filter-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:#eef4ff;color:#1d4ed8;padding:5px 9px;font-size:11px;font-weight:800}.filter-chip button{border:0;background:transparent;color:inherit;cursor:pointer;padding:0;font-weight:900}.report-count-note{font-size:12px;color:var(--muted);margin-top:8px}.report-empty-filters{font-size:12px;color:#94a3b8}
@media(max-width:1000px){.app{grid-template-columns:190px 1fr}.stats{grid-template-columns:repeat(2,1fr)}.grid2,.grid3{grid-template-columns:1fr}.pill.voalle{display:none}.report-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-filter-actions{grid-column:1/-1}}
@media(max-width:700px){.permission-columns{grid-template-columns:1fr}.permission-checks{grid-template-columns:1fr}.report-grid{grid-template-columns:1fr 1fr}.action-state{grid-template-columns:1fr}.settings-shell{grid-template-columns:1fr}.settings-menu{position:static}.formline{grid-template-columns:1fr}.app,.app.sidebar-collapsed{grid-template-columns:1fr}.sidebar{height:auto;position:relative}.sidebar-toggle{display:none}.nav{display:grid;grid-template-columns:repeat(2,1fr)}.main{padding:10px}.topbar{flex-wrap:wrap}.search{max-width:none;width:100%}.stats{grid-template-columns:1fr 1fr}.formgrid{grid-template-columns:1fr}.field.full{grid-column:auto}.alloc-grid{grid-template-columns:1fr}.lane-grid{grid-template-columns:1fr}.rule-grid{grid-template-columns:1fr}.rule-days{max-width:160px}.execution-grid{grid-template-columns:1fr}.report-filter-grid{grid-template-columns:1fr}.report-filter-actions{grid-column:auto;flex-wrap:wrap}}


/* V0.20 — Legenda da agenda + Integração 3SAT */
.threesat-pill{white-space:nowrap}.integration-card code{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:6px;padding:2px 5px}.integration-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.integration-head h3{margin:0 0 4px}.integration-head p{margin:0;color:var(--muted);font-size:12px}.integration-status{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;white-space:nowrap}.integration-status.off{background:#f1f5f9;color:#64748b}.integration-status.warn{background:#fef3c7;color:#92400e}.integration-status.ok{background:#dcfce7;color:#166534}.integration-status.error{background:#fee2e2;color:#991b1b}.integration-notice{border:1px solid #bfdbfe;background:#eff6ff;color:#1e40af;border-radius:10px;padding:10px 12px;font-size:12px;margin:10px 0 12px}.integration-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.integration-info{border:1px solid var(--line);background:#fbfdff;border-radius:10px;padding:10px;min-width:0}.integration-info span{display:block;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.integration-info strong{display:block;margin-top:5px;font-size:12px;overflow-wrap:anywhere}.integration-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.three-sat-mappings{display:flex;flex-direction:column;border-top:1px solid #eef2f7}.three-sat-map-row{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(160px,1fr) minmax(130px,.7fr);gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2f7}.three-sat-map-row strong{display:block;font-size:13px}.three-sat-map-row small{display:block;color:var(--muted);margin-top:2px}.three-sat-map-row input{width:100%;border:1px solid var(--line);border-radius:9px;padding:9px 10px;text-transform:uppercase;background:#fff}.mapping-state{font-size:11px;color:var(--muted);text-align:right}.mapping-state.linked{color:#15803d;font-weight:800}.three-sat-table{min-width:950px}.three-sat-table td{vertical-align:top}.position-address{max-width:330px;white-space:normal}.ignition-pill{display:inline-flex;border-radius:999px;padding:4px 7px;font-size:10px;font-weight:850}.ignition-pill.on{background:#dcfce7;color:#166534}.ignition-pill.off{background:#f1f5f9;color:#475569}.integration-loading{opacity:.65;pointer-events:none}
@media(max-width:1000px){.threesat-pill{display:none}.integration-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.three-sat-map-row{grid-template-columns:1fr 1fr}.mapping-state{grid-column:1/-1;text-align:left}}
@media(max-width:700px){.integration-grid{grid-template-columns:1fr}.three-sat-map-row{grid-template-columns:1fr}.mapping-state{grid-column:auto}.integration-head{flex-direction:column}}


/* V0.23 — Serviços atrasados na Dashboard */
.dashboard-stats{grid-template-columns:repeat(6,minmax(0,1fr))}.stat.overdue-stat{background:linear-gradient(180deg,#fff,#fff1f2);border-color:#fecdd3;cursor:pointer}.stat.overdue-stat:hover{border-color:#fb7185;box-shadow:0 4px 14px rgba(190,24,93,.08)}.dashboard-overdue-card{margin-top:12px;border-color:#fecdd3;background:linear-gradient(180deg,#fff,#fffafa)}.dashboard-overdue-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.dashboard-overdue-head h3{margin:0;color:#991b1b}.dashboard-overdue-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.dashboard-overdue-count{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:14px;font-weight:900}.dashboard-overdue-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #fee2e2;cursor:pointer}.dashboard-overdue-row:first-of-type{border-top:0}.dashboard-overdue-row:hover{background:#fff7f7}.dashboard-overdue-row strong{display:block;font-size:13px}.dashboard-overdue-row small{display:block;color:var(--muted);margin-top:2px}.dashboard-overdue-date{font-size:11px;color:#64748b;white-space:nowrap}.dashboard-overdue-age{font-size:11px;font-weight:900;color:#b91c1c;background:#fee2e2;border-radius:999px;padding:5px 8px;white-space:nowrap}.dashboard-overdue-empty{padding:18px;text-align:center;color:#15803d;font-size:13px}.dashboard-overdue-note{font-size:11px;color:#64748b;margin-top:4px}
@media(max-width:1200px){.dashboard-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-overdue-row{grid-template-columns:minmax(0,1fr) auto}.dashboard-overdue-date{grid-column:1/-1}.dashboard-overdue-head{align-items:center}}

/* V0.24 — Previsão do Tempo na Agenda e Configuração de Cidade */
.weather-top-pill{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(180deg,#f0fdf4,#e0f2fe);border:1px solid #bae6fd;border-radius:999px;padding:6px 14px;font-size:12px;font-weight:700;color:#0369a1;cursor:pointer;user-select:none;transition:all .15s ease}
.weather-top-pill:hover{background:#e0f2fe;border-color:#7dd3fc;transform:translateY(-1px);box-shadow:0 3px 10px rgba(3,105,161,.16)}
.weather-top-pill.offline{background:#f8fafc;border-color:#e2e8f0;color:#64748b;cursor:pointer}
.headcell{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:6px 4px;min-height:68px}
.headcell strong{font-size:16px;line-height:1.2}
.weather-badge-day{display:inline-flex;align-items:center;justify-content:center;gap:5px;margin-top:4px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:600;color:#334155;box-shadow:0 1px 3px rgba(0,0,0,.04);transition:all .15s ease;white-space:nowrap;user-select:none}
.weather-badge-day:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(0,0,0,.08);border-color:#94a3b8}
.weather-badge-day .w-icon{font-size:13px;line-height:1}
.weather-badge-day .w-temp{white-space:nowrap;font-size:10.5px;font-weight:700;color:#1e293b}
.weather-badge-day .w-rain{white-space:nowrap;color:#0284c7;font-weight:700;font-size:10px;background:#e0f2fe;padding:1px 5px;border-radius:999px;display:inline-flex;align-items:center;gap:1px}
.weather-badge-day .w-rain.rain-high{background:#fee2e2;color:#b91c1c;font-weight:800}
.weather-badge-day.weather-rain-warn{background:#eff6ff;border-color:#93c5fd;color:#1e40af}
.weather-badge-day.weather-rain-warn .w-rain{background:#dbeafe;color:#1d4ed8;font-weight:800}
.weather-badge-day.weather-storm-warn{background:#fef2f2;border-color:#fca5a5;color:#991b1b}
.weather-badge-day.weather-storm-warn .w-rain{background:#fee2e2;color:#dc2626;font-weight:900}
.weather-badge-day.is-historical{border-style:dashed;background:#f8fafc;opacity:.92}
.weather-badge-day.is-historical .w-temp{color:#475569}
.threesat-pill.interactive-pill{cursor:pointer;transition:all .15s ease}
.threesat-pill.interactive-pill:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(0,0,0,.12)}
.threesat-pill .refresh-icon-btn{display:inline-block;font-size:11px;margin-left:4px;transition:transform .3s ease}
.threesat-pill:hover .refresh-icon-btn{transform:rotate(180deg)}
.city-search-results{border:1px solid var(--line);background:#fff;border-radius:10px;margin-top:8px;max-height:180px;overflow-y:auto;box-shadow:0 6px 16px rgba(0,0,0,.08)}
.city-search-item{padding:9px 12px;font-size:12px;cursor:pointer;border-bottom:1px solid #f1f5f9;display:flex;align-items:center;justify-content:space-between}
.city-search-item:last-child{border-bottom:0}
.city-search-item:hover{background:#f0fdf4;color:#166534}
.city-search-item span.coords{font-size:10px;color:var(--muted)}
@media(max-width:850px){.weather-top-pill{display:none}.weather-badge-day .w-rain{display:none}}

/* V0.25 — Técnicos Dinâmicos (👤 / 👥) e Multi-Veículos (🚗 2x) */
.service .svc-crew{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:700;margin:2px 0;opacity:.95;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service .svc-crew .crew-icon{font-size:11px;line-height:1}
.service .svc-crew.crew-multi{color:#1e3a8a;background:rgba(255,255,255,.65);padding:1px 5px;border-radius:4px;display:inline-flex}
.service .svc-car{display:flex;align-items:center;gap:4px;margin-top:2px;font-size:10px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service .svc-multi-car{background:rgba(255,255,255,.8);padding:2px 5px;border-radius:5px;color:#0f172a;font-weight:800;border:1px dashed rgba(15,23,42,.35)}
.service .multi-car-pill{background:#1e293b;color:#fff;border-radius:4px;padding:1px 4px;font-size:9px;font-weight:800;letter-spacing:-.2px}
.service.has-second-car{box-shadow:0 0 0 2px rgba(15,23,42,.2),0 4px 12px rgba(15,23,42,.12);border-right:4px solid #1e293b}

.tech-select-chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}
.tech-select-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:999px;padding:5px 10px;font-size:12px;font-weight:600;background:#fff;color:#334155;cursor:pointer;user-select:none;transition:all .15s ease}
.tech-select-chip:hover{background:#f1f5f9;border-color:#cbd5e1}
.tech-select-chip.selected{background:#2563eb;border-color:#2563eb;color:#fff}
.tech-select-chip .check{font-size:10px;font-weight:900}

.vehicle-pair-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.second-car-toggle{display:flex;align-items:center;gap:8px;font-size:12px;color:#334155;cursor:pointer;margin-top:6px}
.crew-summary-badge{display:inline-flex;align-items:center;gap:4px;background:#eef2ff;color:#3730a3;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800}
.multi-car-drawer-box{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:10px;margin-top:8px}
.drawer-car-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:6px;font-size:12px;font-weight:750;margin-right:6px}

/* V0.26 — Sinalizador Chamativo de Reagendado e Modal de Confirmação */
.svc-resched-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  background:linear-gradient(135deg,#DC2626,#991B1B);
  color:#FFFFFF!important;
  font-size:9.5px;
  font-weight:900;
  letter-spacing:.3px;
  padding:2px 5px;
  border-radius:4px;
  margin-bottom:3px;
  border:1px solid rgba(255,255,255,.65);
  box-shadow:0 0 8px rgba(220,38,38,.65);
  animation:resched-pulse 1.8s infinite ease-in-out;
  text-transform:uppercase;
}
.svc-resched-badge.multi-resched{
  background:linear-gradient(135deg,#7F1D1D,#450A0A);
  border-color:#FCA5A5;
  box-shadow:0 0 12px rgba(239,68,68,.9);
  animation:resched-pulse-critical 1.4s infinite ease-in-out;
}
.svc-resched-badge .r-icon{font-size:10px;line-height:1}

@keyframes resched-pulse{
  0%{transform:scale(1);box-shadow:0 0 4px rgba(220,38,38,.5)}
  50%{transform:scale(1.04);box-shadow:0 0 10px rgba(239,68,68,.85)}
  100%{transform:scale(1);box-shadow:0 0 4px rgba(220,38,38,.5)}
}
@keyframes resched-pulse-critical{
  0%{transform:scale(1);box-shadow:0 0 6px rgba(239,68,68,.7)}
  50%{transform:scale(1.06);box-shadow:0 0 15px rgba(239,68,68,1)}
  100%{transform:scale(1);box-shadow:0 0 6px rgba(239,68,68,.7)}
}

/* Card Elevation & Complete Hover View: Expande o card por inteiro para frente sem deixar informações soltas */
.service{
  transition: transform .15s ease, box-shadow .15s ease, left .14s ease, width .14s ease;
}
.service:not(.resizing):hover{
  height: auto !important;
  min-height: var(--svc-base-height, 40px) !important;
  left: 4px !important;
  width: calc(100% - 8px) !important;
  min-width: 140px;
  overflow: visible !important;
  z-index: 150 !important;
  transform: translateY(-2px);
  padding-bottom: 20px !important;
  box-shadow: 0 18px 38px rgba(15,23,42,.35), 0 4px 14px rgba(15,23,42,.18) !important;
  filter: none !important;
}
.service:not(.resizing):hover .svc-crew,
.service:not(.resizing):hover .svc-car,
.service:not(.resizing):hover .mini,
.service:not(.resizing):hover .svc-title-text{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
}
.service .mini{
  opacity: .9;
  padding-right: 18px;
}
.service strong{
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
  padding-right: 24px;
}

/* Cantinho inferior direito para redimensionar (aumentar/diminuir tempo) */
.service-resize-handle{
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 18px;
  height: 18px;
  display: flex !important;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2px;
  border-radius: 4px 0 6px 0;
  cursor: ns-resize;
  opacity: .55;
  z-index: 30;
  user-select: none;
  touch-action: none;
  transition: opacity .15s ease, background-color .15s ease, transform .12s ease;
}
.service:hover .service-resize-handle{
  display: flex !important;
  opacity: .95;
}
.service-resize-handle:hover{
  opacity: 1 !important;
  background: rgba(0,0,0,.22);
  transform: scale(1.15);
}
.service-resize-handle .resize-grip-icon{
  display: block;
  pointer-events: none;
}
.service-resize-handle.permission-hidden{
  display: none !important;
}

/* Estado ativo durante o redimensionamento */
.service.resizing,
.service.resizing:hover{
  min-height: 32px !important;
  max-height: none !important;
  transform: none !important;
  transition: none !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.55), 0 12px 28px rgba(15,23,42,.3) !important;
  z-index: 250 !important;
  cursor: ns-resize !important;
  user-select: none !important;
}
.service.resizing .service-resize-handle{
  opacity: 1 !important;
  background: rgba(0,0,0,.28);
  transform: scale(1.2);
}

.month-service:hover{
  z-index: 40 !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.24) !important;
  transform: translateY(-1px);
}

.service.is-rescheduled{
  border-left:5px solid #DC2626!important;
  box-shadow:0 0 0 2px rgba(220,38,38,.35),0 4px 12px rgba(15,23,42,.12);
}
.month-service.is-rescheduled{
  border-left:4px solid #DC2626!important;
  box-shadow:0 0 0 1.5px rgba(220,38,38,.4);
}

.reschedule-drawer-alert{
  background:#FEF2F2;
  border:1.5px solid #F87171;
  border-left:5px solid #DC2626;
  border-radius:10px;
  padding:11px 13px;
  margin:12px 0 14px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  box-shadow:0 2px 8px rgba(220,38,38,.08);
}
.reschedule-drawer-alert .alert-ico{font-size:22px;line-height:1}
.reschedule-drawer-alert h4{margin:0 0 4px;font-size:13px;color:#991B1B;font-weight:800;display:flex;align-items:center;gap:6px}
.reschedule-drawer-alert p{margin:0;font-size:12px;color:#7F1D1D;line-height:1.4}
.reschedule-drawer-alert ul{margin:6px 0 0;padding-left:16px;font-size:11.5px;color:#991B1B}
.reschedule-drawer-alert li{margin-bottom:3px}

.re-reschedule-box{
  background:#FFFBEB;
  border:1.5px solid #FBBF24;
  border-radius:10px;
  padding:12px;
  margin:10px 0;
}
.re-reschedule-box.critical{
  background:#FEF2F2;
  border-color:#F87171;
}

/* V0.28 — Seleção de Intervalo de Horário na Agenda (Click & Drag) */
.slot{
  cursor: pointer;
  transition: background-color .1s ease;
  user-select: none;
}
.slot:hover{
  background-color: rgba(37,99,235,.03);
}
.month-cell{
  cursor: pointer;
}
.month-cell:hover{
  background-color: #f8fbff;
}

.calendar-selection-ghost{
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(219,234,254,.92), rgba(191,219,254,.92));
  border: 2px dashed #2563eb;
  color: #1e3a8a;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 750;
  z-index: 60;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(37,99,235,.22);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
  animation: ghost-pulse .9s infinite alternate ease-in-out;
}
.calendar-selection-ghost .ghost-title{
  font-weight: 850;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #1d4ed8;
}
.calendar-selection-ghost .ghost-time{
  font-size: 11px;
  font-weight: 750;
  color: #1e40af;
  margin-top: 2px;
}
.calendar-selection-ghost .ghost-hint{
  font-size: 9.5px;
  color: #3b82f6;
  font-weight: 600;
  margin-top: auto;
}

@keyframes ghost-pulse{
  0%{box-shadow:0 4px 12px rgba(37,99,235,.18);border-color:#2563eb}
  100%{box-shadow:0 8px 24px rgba(37,99,235,.32);border-color:#1d4ed8}
}

/* V0.29 — Bloqueio Operacional da Agenda */
.btn-lock-agenda{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
  transition: all .16s ease;
}
.btn-lock-agenda.active-locked{
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}
.btn-lock-agenda.active-locked:hover{
  background: #fee2e2 !important;
}

.agenda-locked .service{
  cursor: pointer !important;
}
.agenda-locked .service:active{
  cursor: pointer !important;
}
.agenda-locked .service-resize-handle{
  display: none !important;
}
.agenda-locked .slot{
  cursor: default !important;
}
.agenda-locked .slot:hover{
  background-color: transparent !important;
}
.agenda-locked .month-cell{
  cursor: default !important;
}
.agenda-locked .chip.vehicle-drag{
  cursor: pointer !important;
}

/* V0.30 — Visão de Dia Lateral por Recursos (Field Service Style) */
.calendar.resource-day {
  display: grid;
  min-width: max(100%, calc(56px + (var(--resource-cols, 3) * 190px)));
  background: #fff;
}
.resource-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--line);
  position: sticky;
  left: 0;
  z-index: 10;
}
.resource-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: #fbfdff;
  border-bottom: 1.5px solid var(--line);
  border-left: 1px solid var(--line);
  position: relative;
  text-align: center;
  min-height: 64px;
}
.resource-head-swatch {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  margin-bottom: 5px;
}
.resource-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.resource-head small {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.calendar.resource-day .time {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #fbfdff;
  border-right: 1px solid var(--line);
}
.calendar.resource-day .slot {
  min-width: 180px;
}

/* ==========================================================================
   FIELD SERVICE SPLIT VIEW (SCHEDULE + LIVE MAP & ROUTES)
   ========================================================================== */
.agenda-fieldservice-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
  transition: all .25s ease;
}

.agenda-fieldservice-wrap.split-active {
  grid-template-columns: minmax(480px, 1.1fr) minmax(420px, 0.9fr);
}

.agenda-fieldservice-wrap.map-expanded {
  grid-template-columns: 0px 1fr;
}
.agenda-fieldservice-wrap.map-expanded .agenda-calendar-pane {
  display: none;
}

.agenda-calendar-pane {
  min-width: 0;
  width: 100%;
}

.agenda-map-pane {
  display: none;
  flex-direction: column;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,23,42,.06);
  min-height: 680px;
  position: sticky;
  top: 16px;
}

.agenda-fieldservice-wrap.split-active .agenda-map-pane,
.agenda-fieldservice-wrap.map-expanded .agenda-map-pane {
  display: flex;
}

.map-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  flex-wrap: wrap;
}

.map-pane-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
}

.map-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16,185,129,.7);
}

.map-live-dot.pulse {
  animation: map-pulse 2s infinite;
}

@keyframes map-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.map-status-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
}

.map-status-pill.live {
  background: #dcfce7;
  color: #166534;
}

.map-status-pill.simulated {
  background: #fef3c7;
  color: #92400e;
}

.map-pane-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-vehicle-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.map-veh-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.map-veh-tab:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.map-veh-tab.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.map-veh-tab .tab-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.map-canvas-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: #e5e7eb;
}

.day-routes-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Custom Leaflet Map Markers */
.client-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  border: 2.5px solid #ffffff;
  cursor: pointer;
  transition: transform .15s cubic-bezier(0.4,0,0.2,1);
}

.client-map-pin:hover {
  transform: scale(1.3) translateY(-3px);
  z-index: 1000 !important;
}

.client-map-pin.highlighted {
  transform: scale(1.4) translateY(-4px);
  box-shadow: 0 0 0 6px rgba(59,130,246,.5), 0 4px 14px rgba(0,0,0,.45);
  z-index: 1001 !important;
}

.hq-map-pin {
  background: #0f172a;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(15,23,42,.4);
}

.live-vehicle-marker-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.live-vehicle-marker-svg {
  width: 44px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 2px solid var(--veh-color, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: transform .18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .18s ease;
  padding: 2px;
}

.live-vehicle-marker-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.live-vehicle-marker-wrap:hover .live-vehicle-marker-svg {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  z-index: 10;
}

/* Ignition & Movement Aura States */
.live-vehicle-marker-wrap.is-off .live-vehicle-marker-svg {
  opacity: 0.82;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  filter: grayscale(0.2);
}

.live-vehicle-marker-wrap.is-idling .live-vehicle-marker-svg {
  border-color: #d97706;
  box-shadow: 0 0 0 2.5px rgba(245, 158, 11, 0.4), 0 4px 12px rgba(0,0,0,.2);
}

.live-vehicle-marker-wrap.is-moving .live-vehicle-marker-svg {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.5), 0 5px 16px rgba(0,0,0,.3);
}

/* Radar pulse: ONLY visible and actively pulsing when vehicle is in motion (speed > 0) */
.live-vehicle-radar {
  display: none !important;
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 12px;
  background: var(--veh-color, rgba(22, 163, 74, 0.45));
  pointer-events: none;
  z-index: 1;
}

.live-vehicle-marker-wrap.is-moving .live-vehicle-radar {
  display: block !important;
  background: var(--veh-color, rgba(22, 163, 74, 0.45));
  animation: vehicle-radar-ping 1.3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-vehicle-marker-wrap.is-idling .live-vehicle-radar,
.live-vehicle-marker-wrap.is-off .live-vehicle-radar {
  display: none !important;
  animation: none !important;
}

@keyframes vehicle-radar-ping {
  0% { transform: scale(0.92); opacity: 0.85; }
  75%, 100% { transform: scale(1.95); opacity: 0; }
}

.live-vehicle-speed-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #16a34a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
  z-index: 4;
  white-space: nowrap;
}

.live-vehicle-plate-badge {
  margin-top: 3px;
  background: #0f172a;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Map Drawer & Summary */
.map-routes-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  max-height: 220px;
  overflow-y: auto;
}

.route-summary-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  transition: border-color .15s ease;
}

.route-summary-card:hover {
  border-color: #94a3b8;
}

.route-summary-bar {
  width: 5px;
  height: 100%;
  min-height: 36px;
  border-radius: 999px;
}

.route-summary-title {
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-summary-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.btn-map-toggle.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

@media (max-width: 1100px) {
  .agenda-fieldservice-wrap.split-active {
    grid-template-columns: 1fr;
  }
  .agenda-map-pane {
    position: static;
    min-height: 520px;
  }
}

/* V0.27 — 3SAT Live Indicator & Status Dot */
.interactive-pill {
  cursor: pointer;
  user-select: none;
  transition: all .16s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.interactive-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.threesat-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  position: relative;
}
.threesat-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,.2);
}
.threesat-status-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245,158,11,.2);
}
.threesat-status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,.2);
}
.pulse-dot.online:after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #22c55e;
  opacity: 0.6;
  animation: dot-radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes dot-radar-ping {
  0% { transform: scale(0.9); opacity: 0.8; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Vehicle model tag pill */
.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
}

/* Field Service & Productivity Reports */
.report-fieldservice-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.report-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.productivity-progress-bar {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.productivity-progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width .3s ease;
}
.productivity-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(100px, 1fr) 70px 80px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #eef2f7;
  font-size: 12.5px;
}
.productivity-row:first-of-type {
  border-top: 0;
}

/* Manager Dashboard & Daily Fleet Journey Timeline */
.manager-dashboard-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15,23,42,.05);
}

.manager-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.manager-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.manager-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

.manager-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.manager-kpi-card .kpi-val {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 4px;
  line-height: 1.2;
}

.manager-kpi-card .kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.manager-kpi-card.blue { border-left: 4px solid #3b82f6; }
.manager-kpi-card.green { border-left: 4px solid #10b981; }
.manager-kpi-card.amber { border-left: 4px solid #f59e0b; }
.manager-kpi-card.purple { border-left: 4px solid #8b5cf6; }
.manager-kpi-card.slate { border-left: 4px solid #64748b; }

/* Fleet Vehicles Timeline */
.manager-vehicles-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vehicle-journey-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}

.vehicle-journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.vehicle-journey-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vehicle-journey-title strong {
  font-size: 14px;
  color: #0f172a;
}

.vehicle-journey-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: #475569;
  flex-wrap: wrap;
}

.vehicle-journey-metrics strong {
  color: #0f172a;
}

/* Timeline Track Steps */
.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  position: relative;
  padding-left: 8px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  padding-bottom: 14px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 17px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.timeline-step.completed .timeline-icon-box {
  background: #ecfdf5;
  border-color: #10b981;
  color: #059669;
}

.timeline-step.in-progress .timeline-icon-box {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
  animation: map-pulse 2s infinite;
}

.timeline-step.lunch .timeline-icon-box {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #d97706;
}

.timeline-step.parking .timeline-icon-box {
  background: #f1f5f9;
  border-color: #64748b;
  color: #334155;
}

.timeline-step.company .timeline-icon-box {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #15803d;
}

.timeline-content {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-step.in-progress .timeline-content {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.timeline-main-info {
  display: flex;
  flex-direction: column;
}

.timeline-main-info strong {
  font-size: 13px;
  color: #0f172a;
}

.timeline-main-info .timeline-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.timeline-time-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
}

.timeline-time-info .time-badge {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.timeline-transit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* ==========================================================================
   CLIENT AUTOCOMPLETE, DIRECTORY & EDIT MODAL ENHANCEMENTS
   ========================================================================== */

.client-input-container {
  position: relative;
  width: 100%;
}

.client-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.client-input-wrapper input {
  flex: 1;
}

.client-autocomplete-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
}

.client-autocomplete-item {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background .12s ease;
}

.client-autocomplete-item:last-child {
  border-bottom: none;
}

.client-autocomplete-item:hover,
.client-autocomplete-item.focused {
  background: #eff6ff;
}

.client-autocomplete-item .cli-main strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.client-autocomplete-item .cli-main span {
  font-size: 11.5px;
  color: #64748b;
}

.client-autocomplete-item .cli-phone {
  font-size: 11.5px;
  color: #0284c7;
  font-weight: 600;
  white-space: nowrap;
}

.client-autocomplete-empty {
  padding: 12px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  background: #f8fafc;
}

.client-autocomplete-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  border-top: 1px solid #bbf7d0;
  cursor: pointer;
  transition: background .15s ease;
}

.client-autocomplete-footer-btn:hover {
  background: #dcfce7;
}

/* Modal Form Layout Extensions */
.formgrid .field.with-btn {
  display: flex;
  flex-direction: column;
}

.field-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.field-input-group input {
  flex: 1;
}

.coords-pill {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.coords-pill.found {
  color: #16a34a;
  font-weight: 600;
}

/* Clientes Directory Grid */
.clients-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.clients-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 420px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.client-card-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease;
}

.client-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.client-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.client-card-top h3 {
  margin: 0;
  font-size: 14.5px;
  color: #0f172a;
}

.client-card-meta {
  font-size: 12px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-card-meta .meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-card-meta .meta-row strong {
  color: #0f172a;
}

.client-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* Tags de Tipo de Cliente */
.tag.tag-dedicado {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.25);
  letter-spacing: 0.2px;
}

.tag.tag-bandalarga {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.2);
}

.client-type-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.client-type-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.client-type-chip.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.client-type-chip[data-client-type-filter="Dedicado"].active {
  background: #6d28d9;
  border-color: #6d28d9;
}

.client-type-chip[data-client-type-filter="Banda Larga"].active {
  background: #0284c7;
  border-color: #0284c7;
}

/* Tabela / Lista de Clientes */
.clients-tablewrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.clients-table thead {
  background: #f8fafc;
  border-bottom: 2px solid var(--line);
}

.clients-table th {
  padding: 12px 14px;
  font-weight: 700;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.clients-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.clients-table tbody tr {
  transition: background .15s ease;
}

.clients-table tbody tr:hover {
  background: #f8fafc;
}

.client-list-name-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-list-name-col strong {
  font-size: 13.5px;
  color: #0f172a;
}

.client-list-name-col span {
  font-size: 11.5px;
  color: #64748b;
}

.client-addresses-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

.client-addresses-editor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.client-address-row-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color .15s ease;
}

.client-address-row-card:focus-within {
  border-color: #93c5fd;
  background: #ffffff;
}

.client-address-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-address-row-top input {
  font-size: 12px;
  padding: 6px 8px;
  font-weight: 600;
  color: #1e293b;
}

.client-address-row-card .field-input-group {
  display: flex;
  gap: 6px;
}

.client-address-row-card .field-input-group input {
  font-size: 12px;
  padding: 7px 9px;
  flex: 1;
}

.client-address-row-card .coords-pill {
  font-size: 11px;
}

.client-address-row-card .btn-remove-addr {
  color: #ef4444;
  background: transparent;
  border: 1px solid #fecaca;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}

.client-address-row-card .btn-remove-addr:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* Modal de Seleção de Localização no Mapa com Alfinete */
.map-picker-floating-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  white-space: nowrap;
}

.map-picker-preset-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}

.map-picker-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.map-picker-preset-btn:active {
  transform: translateY(0);
}

/* Estilo do Alfinete Animado */
.leaflet-interactive.map-picker-pin {
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
  transition: transform .1s ease;
}

@keyframes map-pin-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.map-pin-pulse {
  animation: map-pin-bounce 0.8s ease;
}

/* ==========================================================================
   ESTILOS MODERNOS DE CLIMA & PREVISÃO DO TEMPO (7 DIAS + HISTÓRICO)
   ========================================================================== */
.weather-badge-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-top: 2px;
  transition: all 0.2s ease;
  user-select: none;
  backdrop-filter: blur(4px);
}

.weather-badge-day:hover {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.weather-badge-day .w-icon {
  font-size: 12.5px;
  line-height: 1;
}

.weather-badge-day .w-temp {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.weather-badge-day .w-rain {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.weather-badge-day .w-rain.rain-high {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
}

.weather-badge-day.weather-rain-warn {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.weather-badge-day.weather-storm-warn {
  border-color: #fca5a5;
  background: #fff1f2;
}

.weather-badge-day.is-historical {
  opacity: 0.82;
  background: #f8fafc;
  border-style: dashed;
}

.weather-badge-day.loading {
  opacity: 0.5;
}

/* ==========================================================================
   ESTILOS 3SAT INTERATIVO & REFRESH
   ========================================================================== */
.threesat-pill.interactive-pill {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.threesat-pill.interactive-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  filter: brightness(1.05);
}

.threesat-pill.interactive-pill:active {
  transform: translateY(0);
}

.threesat-pill .refresh-icon-btn {
  display: inline-block;
  font-size: 12px;
  margin-left: 3px;
  transition: transform 0.3s ease;
  opacity: 0.85;
}

.threesat-pill.interactive-pill:hover .refresh-icon-btn {
  transform: rotate(45deg);
  opacity: 1;
}

.threesat-pill.spinning .refresh-icon-btn,
.map-status-pill.spinning .refresh-icon-btn {
  animation: threesat-spin 0.8s linear infinite;
}

@keyframes threesat-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.map-status-pill.interactive-map-pill {
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-status-pill.interactive-map-pill:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

/* ==========================================================================
   V0.27 — SISTEMA DE LOGIN, PERFIL, CONTROLE DE ACESSO & SEGURANÇA
   Estética Glassmorphism Inspirada no Sistema de Compras
   ========================================================================== */

/* 1. TELA DE LOGIN OVERLAY */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 10% 20%, #0f172a 0%, #080d1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-screen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Background Ambient Glows */
.login-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  opacity: 0.15;
}

.login-glow-1 {
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: #3b82f6;
}

.login-glow-2 {
  bottom: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background: #6366f1;
}

.login-glow-3 {
  top: 40%;
  left: 60%;
  width: 35vw;
  height: 35vw;
  background: #0ea5e9;
  opacity: 0.08;
}

/* Login Card Glassmorphism */
.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2.2rem;
  padding: 40px 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #fff;
  animation: loginCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card.shake {
  animation: loginShake 0.4s ease-in-out;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Logo & Branding */
.login-brand {
  text-align: center;
  margin-bottom: 30px;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.45);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.login-brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #f8fafc;
}

.login-brand p {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #94a3b8;
}

/* Input Fields */
.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 8px;
  margin-left: 4px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 13px 14px 13px 44px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  background: rgba(30, 41, 59, 0.9);
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.login-input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
  color: #3b82f6;
}

.login-pwd-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  font-size: 15px;
  border-radius: 8px;
  transition: color 0.15s ease;
}

.login-pwd-toggle:hover {
  color: #f8fafc;
}

/* Login Extra Options */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 24px;
  font-size: 12.5px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  accent-color: #3b82f6;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-forgot-btn {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.login-forgot-btn:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Submit Button */
.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -5px rgba(37, 99, 235, 0.5);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Login Feedback / Alerts */
.login-alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 12.5px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.login-alert.blocked {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(220, 38, 38, 0.6);
  color: #fecaca;
  font-weight: 700;
}

.login-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* 2. TOPBAR USER PROFILE WIDGET & DROPDOWN */
.user-profile-widget {
  position: relative;
}

.user-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.user-profile-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.user-name-display {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
}

.user-chevron {
  font-size: 10px;
  color: var(--muted);
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.user-profile-widget.active .user-chevron {
  transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
  padding: 8px;
  z-index: 1000;
  animation: dropdownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-dropdown-header .user-avatar-circle {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.user-dropdown-header h4 {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
}

.user-dropdown-header p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.user-dropdown-items {
  padding: 6px 0;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: 9px;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.user-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.user-dropdown-item.danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.user-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

/* Sidebar User Card & Logout Button */
.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.sidebar-user-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
  flex: 1;
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* Topbar Direct Logout Button */
.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.topbar-logout-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.15);
  transform: translateY(-1px);
}

body.dark-theme .topbar-logout-btn {
  background: #1e1b2e;
  border-color: #4c1d24;
  color: #fb7185;
}

body.dark-theme .topbar-logout-btn:hover {
  background: #38121a;
  border-color: #9f1239;
  color: #fff;
}

body.dark-theme .user-profile-trigger {
  background: #111a2e;
  border-color: #1e293b;
  color: #f8fafc;
}

body.dark-theme .user-dropdown-menu {
  background: #111a2e;
  border-color: #1e293b;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

body.dark-theme .user-dropdown-header {
  border-color: #1e293b;
}

body.dark-theme .user-dropdown-item {
  color: #cbd5e1;
}

body.dark-theme .user-dropdown-item:hover {
  background: #1e293b;
  color: #fff;
}

body.dark-theme .user-dropdown-divider {
  background: #1e293b;
}

/* 3. PASSWORD STRENGTH METER */
.pwd-strength-wrap {
  margin-top: 6px;
}

.pwd-strength-bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pwd-strength-fill.weak { width: 33%; background: #ef4444; }
.pwd-strength-fill.medium { width: 66%; background: #f59e0b; }
.pwd-strength-fill.strong { width: 100%; background: #10b981; }

.pwd-strength-text {
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

.pwd-strength-text.weak { color: #ef4444; }
.pwd-strength-text.medium { color: #f59e0b; }
.pwd-strength-text.strong { color: #10b981; }

/* 4. SECURITY & LOGS VIEW (#view-seguranca) */
.security-subtabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 16px;
}

.security-subtab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-subtab-btn:hover {
  color: var(--ink);
}

.security-subtab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.security-subpane {
  display: none;
}

.security-subpane.active {
  display: block;
}

.security-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.security-log-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.security-category-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.security-category-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.security-category-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.log-type-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.log-type-tag.security { background: #fee2e2; color: #991b1b; }
.log-type-tag.access { background: #dbeafe; color: #1e40af; }
.log-type-tag.operational { background: #f0fdf4; color: #166534; }
.log-type-tag.general { background: #f1f5f9; color: #475569; }

.ip-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #334155;
}

.unblock-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
}

/* ==========================================================================
   DASHBOARD ESTRATÉGICO MODULAR (ABAS & ANALYTICS)
   ========================================================================== */
.dashboard-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.dashboard-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.dashboard-tab-btn:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.015);
  border-radius: 6px 6px 0 0;
}

.dashboard-tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: #eff6ff;
  border-radius: 6px 6px 0 0;
}

.dashboard-subpane {
  display: none;
  animation: fadeInPane 0.2s ease-in-out;
}

.dashboard-subpane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ranking e Barras de Progresso */
.ranking-progress-bar {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}

.ranking-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.4s ease;
}

.ranking-progress-fill.green {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.ranking-progress-fill.purple {
  background: linear-gradient(90deg, #a855f7, #7c3aed);
}

.ranking-progress-fill.amber {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Otimizador de Rotas e Sugestões Logísticas */
.optimization-suggestion-card {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.15s ease;
}

.optimization-suggestion-card:hover {
  border-color: #4ade80;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.12);
}

.optimization-suggestion-card.warning-opt {
  background: #fffbeb;
  border-color: #fde68a;
}

.optimization-suggestion-card.warning-opt:hover {
  border-color: #f59e0b;
}

.optimization-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.optimization-body {
  flex: 1;
}

.optimization-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.optimization-desc {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}

.optimization-savings-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 6px;
}

/* Destaque Dinâmico para o Dia Atual no Cabeçalho da Agenda */
.headcell.today-col {
  background: linear-gradient(180deg, #eff6ff, #dbeafe) !important;
  border-bottom: 2px solid #2563eb !important;
  color: #1d4ed8 !important;
  position: relative;
}

.headcell.today-col::after {
  content: 'HOJE';
  position: absolute;
  top: 4px;
  right: 6px;
  background: #2563eb;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Barra de Filtros Globais do Dashboard */
.dashboard-filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.dash-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr 1.1fr 1.1fr;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 1200px) {
  .dash-filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BARRA DE LEGENDA EXECUTIVA (Inspirada no Sistema de Compras)
   ========================================================================== */
.agenda-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 11.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.legend-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.legend-group-title {
  font-weight: 700;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.legend-divider {
  width: 1px;
  height: 16px;
  background: #cbd5e1;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.legend-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.legend-chip-veh {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.legend-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
}

.legend-chip.status-confirmado {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.legend-chip.status-aguardando {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.legend-chip.status-semagendamento {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.legend-chip.status-reagendado {
  background: #fdf2f8;
  color: #9d174d;
  border-color: #fbcfe8;
}

.legend-chip.status-faltaconcluir {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

.legend-chip.telemetry-onsite {
  background: #f0fdf4;
  color: #15803d;
  border-color: #86efac;
  font-weight: 700;
}

.legend-chip.telemetry-transit {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 700;
}

/* ==========================================================================
   ÍCONES E MÓDULO DE CLIMA DINÂMICO & MODERNO
   ========================================================================== */
.weather-badge-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
}

.weather-badge-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  border-color: #94a3b8;
  background: #f8fafc;
}

.weather-svg-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.weather-temp-range {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.weather-temp-range .t-min {
  color: #64748b;
  font-weight: 600;
}

.weather-temp-range .t-max {
  color: #0f172a;
  font-weight: 800;
}

.weather-rain-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  background: #e0f2fe;
  color: #0369a1;
}

.weather-rain-pill.rain-high {
  background: #fee2e2;
  color: #b91c1c;
}

.weather-badge-day.weather-storm-warn {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

/* ==========================================================================
   REDESENHO DOS CARDS DE SERVIÇO NA AGENDA
   ========================================================================== */
.service {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  border-left: 4px solid var(--svc-accent-color, #2563eb) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  overflow: hidden !important;
  user-select: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0.15s ease !important;
}

.service:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px) !important;
  z-index: 50 !important;
}

.svc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.svc-type-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges de Status de Agendamento (Coordenação) */
.svc-sched-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-badge-green,
.status-badge-emerald {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-badge-amber {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge-purple {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.status-badge-orange {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.status-badge-blue {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-badge-neutral {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* Nome do Cliente / Título do Serviço */
.svc-client-name {
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  color: inherit;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Metadados: Equipe e Carro */
.svc-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  margin-bottom: 4px;
}

/* Rodapé do Card */
.svc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  padding-top: 3px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.svc-time-pill {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.9;
  white-space: nowrap;
}

/* Indicador de Telemetria GPS (Separado do Status de Agendamento) */
.svc-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.svc-telemetry-badge.on-site {
  background: #15803d;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.3);
}

.svc-telemetry-badge.in-transit {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3);
}

.svc-telemetry-badge.completed {
  background: #047857;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.3);
}

.svc-telemetry-badge.at-base {
  background: #475569;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(71, 85, 105, 0.3);
}

/* ==========================================================================
   TEMA ESCURO (DARK MODE - SISTEMA DE COMPRAS)
   ========================================================================== */
body.dark-theme {
  --bg: #090e1a;
  --panel: #111a2e;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --line: #1e293b;
  --card-bg: #111a2e;
  --glass-card: rgba(17, 26, 46, 0.92);
  --glass-border: 1px solid rgba(30, 41, 59, 0.85);
  background: #090e1a;
  color: #f1f5f9;
}

body.dark-theme .sidebar {
  background: #0d1527;
  border-right-color: #1e293b;
  color: #cbd5e1;
}

body.dark-theme .sidebar-brand-header {
  border-bottom-color: #1e293b;
}

body.dark-theme .brand-title {
  color: #f8fafc;
}

body.dark-theme .sidebar-search-box {
  background: #111a2e;
  border-color: #1e293b;
  color: #94a3b8;
}

body.dark-theme .sidebar-kbd-shortcut {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .nav button {
  color: #94a3b8;
}

body.dark-theme .nav button:hover {
  background: #1e293b;
  color: #f8fafc;
}

body.dark-theme .nav button.active {
  background: #4361ee !important;
  color: #ffffff !important;
}

body.dark-theme .sidebar-footer-wrap {
  border-top-color: #1e293b;
}

body.dark-theme .topbar .search {
  background: #111a2e;
  border-color: #1e293b;
  color: #f8fafc;
}

body.dark-theme .pill,
body.dark-theme .btn.outline,
body.dark-theme .stat,
body.dark-theme .card,
body.dark-theme .calendar-wrap,
body.dark-theme .agenda-legend-bar,
body.dark-theme .chip,
body.dark-theme .dashboard-filter-bar {
  background: #111a2e;
  border-color: #1e293b;
  color: #f8fafc;
}

body.dark-theme .chip:hover {
  background: #1e293b;
}

body.dark-theme .headcell,
body.dark-theme .time {
  background: #0d1527;
  border-color: #1e293b;
  color: #94a3b8;
}

body.dark-theme .slot {
  border-color: #1e293b;
}

body.dark-theme .headcell strong,
body.dark-theme .pagehead h1 {
  color: #f8fafc;
}

body.dark-theme .weather-badge-day {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .weather-temp-range .t-max {
  color: #f8fafc;
}

body.dark-theme .weather-temp-range .t-min {
  color: #94a3b8;
}

/* Dark Theme Tables & Allocation Board */
body.dark-theme .tablewrap,
body.dark-theme .alloc-board,
body.dark-theme .alloc-summary {
  background: #111a2e;
  border-color: #1e293b;
  color: #f1f5f9;
}

body.dark-theme thead,
body.dark-theme th {
  background: #0d1527;
  border-color: #1e293b;
  color: #94a3b8;
}

body.dark-theme td {
  border-color: #1e293b;
  color: #f1f5f9;
}

body.dark-theme tbody tr:hover,
body.dark-theme tbody tr.clickable:hover {
  background: #1e293b;
}

body.dark-theme .pending-client {
  color: #f8fafc;
}

body.dark-theme .card h3,
body.dark-theme .alloc-board h3,
body.dark-theme .alloc-summary h3,
body.dark-theme .lane-head strong,
body.dark-theme .summary-row strong {
  color: #f8fafc;
}

body.dark-theme .card .row {
  border-color: #1e293b;
  color: #cbd5e1;
}

body.dark-theme .card .row strong {
  color: #f8fafc;
}

body.dark-theme .alloc-note {
  background: linear-gradient(135deg, #1e293b 0%, #111a2e 100%);
  border-color: #334155;
  color: #93c5fd;
}

body.dark-theme .lane {
  background: #0d1527;
  border-color: #1e293b;
}

body.dark-theme .lane-head {
  border-color: #1e293b;
}

body.dark-theme .tech-pool {
  background: #0d1527;
  border-color: #334155;
}

body.dark-theme .tech-pill {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .tech-pill .x {
  background: #334155;
  color: #94a3b8;
}

body.dark-theme .tech-pill .x:hover {
  background: #7f1d1d;
  color: #fca5a5;
}

body.dark-theme .summary-row {
  background: #0d1527;
  border-color: #1e293b;
}

body.dark-theme .empty {
  background: #0d1527;
  color: #94a3b8;
}





