/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #7dc232;
  --green-dark:   #5e9a22;
  --green-light:  #e8f5d6;
  --green-glow:   rgba(125,194,50,.2);
  --sidebar-bg:   #0d1117;
  --sidebar-w:    200px;
  --topbar-h:     50px;
  --main-bg:      #f0f2f5;
  --card-bg:      #ffffff;
  --text-primary: #1a1a2e;
  --text-muted:   #7a8499;
  --border:       #dde1e9;
  --red:          #e53e3e;
  --yellow:       #f59e0b;
  --font:         'Inter', sans-serif;
  --radius:       6px;
  --shadow:       0 1px 3px rgba(0,0,0,.06);
  --shadow-md:    0 4px 12px rgba(0,0,0,.1);
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--main-bg);
  color: var(--text-primary);
  font-size: 13px;
  overflow-x: hidden;
}

/* =============================================
   LAYOUT
   ============================================= */
body { display: flex; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-icon svg { width: 34px; height: 34px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-main { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.logo-sub  { font-size: 7.5px; font-weight: 600; color: var(--green); letter-spacing: 1.8px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 6px 0; }
.sidebar-nav ul { list-style: none; }

.nav-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.4px;
  color: rgba(255,255,255,.25);
  padding: 16px 14px 5px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .13s;
  border-left: 3px solid transparent;
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  font-weight: 400;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.nav-item.active {
  background: var(--green);
  border-left-color: transparent;
  color: #fff;
  font-weight: 600;
}
.nav-item.active .nav-icon svg { color: #fff; }
.nav-icon svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-arrow { font-size: 12px; color: rgba(255,255,255,.25); }

/* Sub-nav items */
.nav-sub-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 32px;
  cursor: pointer;
  color: rgba(255,255,255,.45);
  font-size: 12px; font-weight: 400;
  transition: color .13s, background .13s;
  border-left: 3px solid transparent;
}
.nav-sub-item:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.04); }
.nav-sub-item.active {
  color: var(--green);
  font-weight: 600;
  border-left-color: var(--green);
}
.sub-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

/* ===== PAINEL ENTREGAS ===== */
.entregas-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.estat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.estat-card.destacado { border-top: 2px solid var(--green); }
.estat-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f0f2f5;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.estat-icon svg { width: 18px; color: #9aa3b2; }
.estat-icon.green { background: #e8f5d6; }
.estat-icon.green svg { color: var(--green-dark); }
.estat-icon.red { background: #fee2e2; }
.estat-icon.red svg { color: var(--red); }
.estat-body { flex: 1; min-width: 0; }
.estat-label { font-size: 10.5px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.estat-value { font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estat-value.truncate { font-size: 13px; }
.estat-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.estat-badge { display: inline-block; padding: 1px 6px; border-radius: 99px; font-size: 10px; font-weight: 600; vertical-align: middle; margin-left: 4px; }
.estat-badge.gray { background: #e8ecf2; color: var(--text-muted); }
.estat-bike svg { width: 36px; height: 36px; color: #c8d0dc; }

/* Action bar */
.entregas-actionbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.btn-sel-count {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: var(--green);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; transition: background .13s;
}
.btn-sel-count svg { width: 13px; }
.btn-sel-count:hover { background: var(--green-dark); }
.btn-filtro {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; transition: background .13s;
}
.btn-filtro svg { width: 12px; color: var(--text-muted); }
.btn-filtro:hover { background: #f0f2f5; }

/* Motorista name col */
.mot-name-cell { display: flex; align-items: center; gap: 7px; }
.mot-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mot-dot.verde  { background: #22c55e; }
.mot-dot.vermelho { background: var(--red); }
.mot-dot.laranja { background: #f59e0b; }
.mot-icons { display: flex; align-items: center; gap: 4px; }
.mot-icons .wa-icon { width: 18px; height: 18px; }
.mot-icons .wa-icon svg { width: 10px; }
.bike-icon svg { width: 16px; height: 16px; color: #6b7280; }

/* Entregue badge */
.badge-entregue {
  display: inline-block; padding: 2px 8px;
  background: var(--green); color: #fff;
  border-radius: 4px; font-size: 11px; font-weight: 700;
  text-align: center;
}
.badge-rota {
  display: inline-block; padding: 2px 8px;
  background: #dbeafe; color: #1d4ed8;
  border-radius: 4px; font-size: 11px; font-weight: 700;
}
.badge-oc {
  display: inline-block; padding: 2px 8px;
  background: #fef3c7; color: #92400e;
  border-radius: 4px; font-size: 11px; font-weight: 700;
}

/* Three-dot menu btn */
.btn-ctx {
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 4px;
  color: var(--text-muted); font-size: 16px; line-height: 1;
  transition: background .12s;
}
.btn-ctx:hover { background: #f0f2f5; color: var(--text-primary); }

/* Context menu */
.ctx-menu {
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 300;
  min-width: 180px;
  animation: fadeIn .12s;
}
.ctx-menu.hidden { display: none; }
.ctx-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 11.5px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.ctx-item:last-child { border-bottom: none; }
.ctx-item:hover { background: #f7f9fc; color: var(--green-dark); }
.ctx-item svg { width: 13px; color: var(--text-muted); }

/* ===== FILTRO PANEL (right drawer) ===== */
.filtro-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,30,.3);
  z-index: 100010;
}
.filtro-overlay.hidden { display: none; }

.filtro-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  background: var(--card-bg);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 24px rgba(0,0,0,.12);
  z-index: 100011;
  display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.filtro-panel.hidden { display: none; }

.filtro-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: #1a1a2e;
  border-bottom: 2px solid var(--green);
}
.filtro-title { font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.filtro-close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 15px; cursor: pointer; transition: color .13s;
}
.filtro-close:hover { color: #fff; }

.filtro-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.filtro-group { margin-bottom: 14px; }
.filtro-label {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px;
}
.filtro-input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 12px; color: var(--text-primary);
  background: #f7f9fc; transition: border-color .2s;
}
.filtro-input:focus { outline: none; border-color: var(--green); background: #fff; }
.filtro-search-wrap { position: relative; }
.filtro-search-icon {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 14px; color: var(--text-muted); pointer-events: none;
}
.filtro-select {
  width: 100%; padding: 7px 28px 7px 10px;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 12px; color: var(--text-primary);
  background: #f7f9fc; appearance: none; cursor: pointer;
  transition: border-color .2s;
}
.filtro-select:focus { outline: none; border-color: var(--green); }
.filtro-time-row {
  display: flex; align-items: center; gap: 8px;
}
.filtro-time-row .filtro-input { flex: 1; }
.filtro-time-sep { color: var(--text-muted); font-size: 14px; }

.filtro-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #f7f9fc;
}
.btn-filtrar {
  width: 100%; padding: 10px;
  background: var(--green);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer; transition: background .15s;
}
.btn-filtrar:hover { background: var(--green-dark); }



/* ===== MAIN ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-breadcrumb { font-size: 13px; }
.breadcrumb-link { color: var(--text-muted); cursor: pointer; }
.breadcrumb-link:hover { color: var(--green-dark); }
.breadcrumb-sep { color: var(--text-muted); margin: 0 5px; }
.breadcrumb-current { font-weight: 700; color: var(--text-primary); }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green-glow);
  animation: pulse 2.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #e8ecf2;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border);
}
.topbar-avatar svg { width: 17px; color: #9aa3b2; }

/* ===== COLETA STATIC BADGE ===== */
.coleta-label-static { display: flex; align-items: center; }
.coleta-badge {
  display: inline-block;
  padding: 6px 16px;
  background: #1a1a2e;
  color: #fff;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 600;
  letter-spacing: .2px;
}

/* =============================================
   PANEL — TABLE VIEW
   ============================================= */
.panel-view { padding: 14px 22px 32px; }
.panel-view.hidden { display: none; }

/* Controls row */
.panel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-actions { display: flex; gap: 7px; }

.btn-map {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--green);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background .15s, filter .15s;
}
.btn-map svg { width: 13px; }
.btn-map:hover { background: var(--green-dark); }

.btn-search {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: #1a1a2e;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.btn-search svg { width: 13px; }
.btn-search:hover { background: #2d2d4e; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .18s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-number { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -1px; }
.stat-label  { font-size: 12px; color: var(--text-muted); margin: 2px 0 10px; }

.stat-bar-wrap {
  height: 5px; background: #e8ecf2; border-radius: 99px;
  position: relative; margin-bottom: 8px;
  overflow: visible;
}
.stat-bar {
  height: 100%; background: #1a1a2e;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.stat-bar.green-bar { background: var(--green); }
.stat-pct {
  position: absolute; right: 0; top: -15px;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
}
.stat-sub {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
}
.stat-sub strong { color: var(--text-primary); }

/* Alert card */
.alert-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  border-top: 3px solid var(--green);
}
.alert-num { font-size: 36px; font-weight: 800; color: var(--text-primary); letter-spacing: -1px; }
.alert-label { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.4; }
.btn-consultar {
  padding: 6px 24px;
  background: var(--green);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 700;
  color: #fff; cursor: pointer;
  transition: background .15s;
}
.btn-consultar:hover { background: var(--green-dark); }

.btn-ver-coletas {
  display: flex; align-items: center; gap: 5px;
  margin-top: 12px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  font-family: var(--font); font-size: 11.5px; font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background .15s, color .15s;
}
.btn-ver-coletas svg { width: 13px; flex-shrink: 0; }
.btn-ver-coletas:hover { background: var(--green); color: #fff; }

/* Table section */
.table-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #1a1a2e;
  border-bottom: 2px solid var(--green);
}
.table-title { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.table-search {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 5px;
  padding: 5px 11px;
  font-family: var(--font); font-size: 12px; color: #fff;
  width: 220px;
  transition: border-color .2s;
}
.table-search::placeholder { color: rgba(255,255,255,.35); }
.table-search:focus { outline: none; border-color: var(--green); }

.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
}
.data-table thead tr { background: #252d3d; }
.data-table thead th {
  text-align: left;
  padding: 9px 13px;
  color: rgba(255,255,255,.8);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f7f9fc; }
.data-table tbody td {
  padding: 10px 13px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Type badge */
.type-vendedor { color: var(--red); font-weight: 600; }
.type-loja     { color: var(--text-primary); }

/* Link-style cells */
.cell-link { color: var(--green-dark); font-weight: 500; cursor: pointer; }
.cell-link:hover { text-decoration: underline; }

/* WhatsApp icon */
.wa-icon {
  display: inline-flex; align-items: center;
  width: 20px; height: 20px;
  background: #25d366; border-radius: 50%;
  cursor: pointer; transition: transform .13s;
  justify-content: center;
}
.wa-icon:hover { transform: scale(1.15); }
.wa-icon svg { width: 11px; fill: #fff; }

/* Row highlights */
.row-alert td { color: var(--red); }

@keyframes blinkRed {
  0% { background-color: transparent; }
  50% { background-color: rgba(229, 62, 62, 0.2); }
  100% { background-color: transparent; }
}
.blink-red {
  animation: blinkRed 1.5s infinite;
  border-left: 3px solid var(--red);
}
.blink-red td {
  color: #7f1d1d;
}
.blink-red:hover {
  background-color: rgba(229, 62, 62, 0.3) !important;
}

/* Warning row highlight (yellow — horário < 13h) */
.row-warning {
  background: #fffbeb !important;
  border-left: 3px solid #f59e0b;
}
.row-warning td { color: #78350f; }
.row-warning:hover { background: #fef3c7 !important; }
.warn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  color: #d97706;
  vertical-align: middle;
  margin-right: 3px;
  flex-shrink: 0;
}
.warn-icon svg { width: 14px; height: 14px; }
.horario-cell {
  display: flex; align-items: center; gap: 3px;
  font-weight: 600;
}

/* Select wrapper (used in map filters) */
.select-wrapper { position: relative; display: inline-block; }
.select-wrapper select {
  appearance: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 32px 7px 11px;
  font-family: var(--font); font-size: 12px;
  color: var(--text-primary);
  cursor: pointer; min-width: 160px;
  transition: border-color .2s;
}
.select-wrapper select:focus { outline: none; border-color: var(--green); }
.select-wrapper::after {
  content: '▾';
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted); font-size: 11px;
}
.select-wrapper.small select { min-width: 140px; font-size: 11.5px; }

/* =============================================
   MAP VIEW
   ============================================= */
.map-topbar {
  padding: 8px 22px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.btn-back {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: #1a1a2e;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 600; color: #fff;
  cursor: pointer; transition: background .15s, transform .1s;
}
.btn-back svg { width: 13px; }
.btn-back:hover { background: #2d2d4e; transform: translateX(-2px); }

.map-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h) - 44px);
  gap: 0;
}

.map-sidebar {
  width: 270px; flex-shrink: 0;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.map-filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.mf-row { margin-bottom: 9px; }
.mf-row label {
  display: block;
  font-size: 10.5px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 3px; text-transform: uppercase; letter-spacing: .4px;
}
.map-input {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 12px;
  transition: border-color .2s;
  background: #f7f9fc;
}
.map-input:focus { outline: none; border-color: var(--green); background: #fff; }

.map-cards { flex: 1; overflow-y: auto; padding: 7px; }

.map-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px;
  margin-bottom: 7px;
  font-size: 11px;
  cursor: pointer;
  transition: box-shadow .13s, border-color .13s;
}
.map-card:hover { box-shadow: var(--shadow-md); border-color: var(--green); }
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; }
.mc-key { color: var(--text-muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .3px; }
.mc-val { font-weight: 600; font-size: 11px; }
.mc-val.red { color: var(--red); }
.mc-val.green { color: var(--green-dark); }
.mc-footer {
  margin-top: 7px; padding-top: 7px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.mc-cep { font-size: 11.5px; font-weight: 700; }
.mc-bairro { font-size: 9.5px; color: var(--text-muted); }

.map-container { flex: 1; position: relative; }
#leaflet-map { width: 100%; height: 100%; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,30,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100020;
  backdrop-filter: blur(3px);
  animation: fadeIn .18s;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-box {
  background: var(--card-bg);
  border-radius: 8px;
  width: min(860px, 96vw);
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  animation: slideUp .2s cubic-bezier(.4,0,.2,1);
  border: 1px solid var(--border);
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:none;opacity:1} }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: #1a1a2e;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--green);
}
.modal-title { font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .5px; text-transform: uppercase; }
.modal-close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 15px; cursor: pointer; line-height: 1;
  transition: color .13s;
}
.modal-close:hover { color: #fff; }

.modal-body { flex: 1; overflow: auto; padding: 0; }
.modal-table thead th { font-size: 10px; padding: 9px 12px; }
.modal-table tbody td { font-size: 12px; padding: 9px 12px; }

.modal-pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 5px; padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.pag-btn {
  padding: 4px 11px;
  background: #e8ecf2; border: none; border-radius: 4px;
  font-family: var(--font); font-size: 11.5px; cursor: pointer;
  transition: background .13s; color: var(--text-primary);
}
.pag-btn:hover { background: #d8dde8; }
.pag-current {
  min-width: 26px; text-align: center;
  background: var(--green);
  border-radius: 4px; padding: 4px 8px;
  font-size: 11.5px; font-weight: 700; color: #fff;
}

.modal-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: #f7f9fc;
  border-radius: 0 0 8px 8px;
}
.btn-excel {
  padding: 6px 14px;
  background: #1a1a2e;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 11.5px; font-weight: 600; color: #fff;
  cursor: pointer; transition: background .13s;
}
.btn-excel:hover { background: #2d2d4e; }

.modal-hint {
  flex: 1;
  background: var(--green-light);
  border: 1px solid #b5da80;
  color: #3a6614;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 11.5px; font-weight: 500;
  text-align: center; cursor: pointer;
  transition: background .13s;
}
.modal-hint:hover { background: #d5edaf; }

.btn-fechar {
  padding: 6px 18px;
  background: var(--green);
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; transition: background .13s;
}
.btn-fechar:hover { background: var(--green-dark); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  :root { --sidebar-w: 52px; }
  .nav-label, .nav-arrow, .logo-text, .nav-section-label { display: none; }
  .sidebar-logo { justify-content: center; padding: 12px 8px; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .panel-controls { flex-direction: column; align-items: stretch; }
  .panel-actions { flex-wrap: wrap; }
  .map-layout { flex-direction: column; }
  .map-sidebar { width: 100%; height: 250px; }
}

/* =============================================
   MINHA CONTA
   ============================================= */
.conta-tabs {
  display: flex; gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0px;
}
.conta-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.conta-tab svg { width: 16px; }
.conta-tab.active {
  background: var(--green);
  color: white;
  border-radius: 4px 4px 0 0;
  border-bottom-color: var(--green);
}

.conta-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.conta-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.conta-card-body {
  padding: 24px;
}
.conta-avatar-section {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 32px;
}
.conta-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
}
.conta-avatar-placeholder svg { width: 40px; }
.conta-avatar-actions { display: flex; flex-direction: column; gap: 8px; }
.conta-avatar-buttons { display: flex; gap: 12px; }
.conta-avatar-hint { font-size: 11px; color: var(--text-muted); }

.conta-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font); font-size: 13px;
  color: var(--text-primary);
}
.input-disabled { background: #f1f5f9; color: #64748b !important; }
.input-enabled { background: white; }

.conta-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 12px;
  background: #f8fafc;
  border-radius: 0 0 var(--radius) var(--radius);
}

.btn-primary {
  border: 1px solid;
  border-radius: 4px;
  font-family: var(--font); font-weight: 600; font-size: 13px;
  cursor: pointer;
}
.btn-secondary {
  background: white; border: 1px solid var(--border); color: var(--text-primary);
  border-radius: 4px;
  font-family: var(--font); font-weight: 600; font-size: 13px;
  cursor: pointer;
}
.btn-secondary:hover { background: #f1f5f9; }

/* Automações */
.automacao-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.automacao-icon {
  width: 40px; height: 40px;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.automacao-icon svg { width: 20px; }

.automacao-content {
  flex: 1;
}

.automacao-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.automacao-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.automacao-input {
  width: 54px;
  text-align: center;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  background: white;
  transition: border-color 0.2s;
}
.automacao-input:focus {
  outline: none;
  border-color: var(--green);
}

.automacao-obs {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.3;
}
.automacao-obs svg {
  width: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider {
  background-color: var(--green);
}
input:focus + .slider {
  box-shadow: 0 0 1px var(--green);
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.slider.round {
  border-radius: 22px;
}
.slider.round:before {
  border-radius: 50%;
}

/* =============================================
   APLICAR ACTIONS DROPDOWN
   ============================================= */
.hidden {
  display: none !important;
}

.dropdown-aplicar {
  position: relative;
  display: inline-block;
}

.btn-aplicar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: #1a1a2e;
  border: 1px solid #1a1a2e;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .13s;
}

.btn-aplicar:hover {
  background: #2d2d4e;
  border-color: #2d2d4e;
}

.dropdown-menu-aplicar {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 300;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  animation: fadeIn .12s;
}

.dropdown-menu-aplicar.hidden {
  display: none !important;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background .1s, color .1s;
  border-bottom: 1px solid var(--border);
}

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

.dropdown-item:hover {
  background: #f7f9fc;
  color: var(--green-dark);
}

.dropdown-item svg {
  color: var(--text-muted);
  transition: color .1s;
}

.dropdown-item:hover svg {
  color: var(--green-dark);
}

/* =============================================
   CONSULTA DE TICKETS VIEW
   ============================================= */
.consulta-container {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  align-items: flex-start;
}

.consulta-filters-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.filters-header {
  padding: 16px 16px 8px;
}

.filters-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
}

.filters-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}

.btn-filter-action {
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 4px;
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .13s;
}

.btn-filter-action:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.filters-body {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom scrollbar for filter body */
.filters-body::-webkit-scrollbar {
  width: 6px;
}
.filters-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.filters-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.filters-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-field input, .filter-field select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-primary);
  background: #f7f9fc;
  outline: none;
  transition: border-color .15s, background-color .15s;
}

.filter-field input:focus, .filter-field select:focus {
  border-color: var(--green);
  background: white;
}

.filter-field-row {
  display: flex;
  gap: 8px;
}

.filter-field-row .filter-field {
  flex: 1;
}

.btn-field-refresh, .btn-field-calendar {
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 4px;
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .13s;
  flex-shrink: 0;
}

.btn-field-refresh:hover, .btn-field-calendar:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.consulta-tickets-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tickets-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  gap: 12px;
}

.tickets-top-actions {
  display: flex;
  gap: 8px;
}

.btn-top-action {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
  color: var(--text-primary);
}

.btn-top-action:hover {
  background: #f1f5f9;
}

.btn-top-action.green {
  color: var(--green-dark);
  border-color: var(--green);
}

.btn-top-action.green:hover {
  background: var(--green-light);
}

.tickets-top-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.tickets-pagination {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =============================================
   DASHBOARD / PAINEL PRINCIPAL
   ============================================= */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.welcome-text h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}
.welcome-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.dashboard-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dash-filter-item {
  height: 36px;
}
.dash-input, .dash-select {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 12.5px;
  height: 36px;
  outline: none;
  color: var(--text-primary);
  transition: border-color .15s;
}
.dash-input:focus, .dash-select:focus {
  border-color: var(--green);
}
.dash-select-wrapper {
  position: relative;
}
.dash-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 11px;
}
.dash-select {
  padding-right: 28px;
  appearance: none;
  cursor: pointer;
}
.btn-dash-search {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  background: #273142;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.btn-dash-search:hover {
  background: #37465c;
}

/* KPI Cards Layout */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kpi-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon-wrapper svg {
  width: 18px;
  height: 18px;
}
.kpi-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.kpi-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 2px;
}
.kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.kpi-subtitle {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 500;
}

/* KPI Themes */
.importados-bg { background: #f0fdf4; color: #22c55e; }
.coletados-bg { background: #eff6ff; color: #3b82f6; }
.recebidos-bg { background: #f3e8ff; color: #a855f7; }
.cancelados-bg { background: #fef2f2; color: #ef4444; }
.emrota-bg { background: #ecfeff; color: #06b6d4; }
.ocorrencias-bg { background: #fef2f2; color: #ef4444; }
.entregue-bg { background: #ecfdf5; color: #10b981; }
.pedidos-bg { background: rgba(255, 255, 255, 0.2); color: #fff; }

.kpi-border-red {
  border-left: 3px solid #ef4444;
}
.kpi-green-full {
  background: #2aac53;
  border-color: #249747;
  color: #ffffff;
}
.kpi-green-full:hover {
  background: #249747;
}

.text-red { color: #ef4444 !important; }
.text-green { color: #2aac53 !important; }
.text-white { color: #ffffff !important; }
.text-white-muted { color: rgba(255, 255, 255, 0.75) !important; }

/* Charts Layout */
.charts-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.charts-row .chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  flex: 1;
  min-width: 0;
  box-shadow: var(--shadow);
}
.charts-row .chart-card.flex-2 {
  flex: 1.8;
}
.chart-header {
  margin-bottom: 16px;
}
.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  display: block;
}
.chart-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

/* Donut Chart Layout */
.donut-chart-layout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
}
.donut-chart-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}
.donut-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}
.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  line-height: 1.2;
}
.donut-center-text .center-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.donut-center-text .center-value {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
}
.donut-legend {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 20px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 8px;
}
.donut-legend::-webkit-scrollbar {
  width: 4px;
}
.donut-legend::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  padding: 4px 0;
}
.legend-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.legend-marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.legend-val {
  font-weight: 700;
  color: #1e293b;
  flex-shrink: 0;
}

/* Responsividade do Dashboard */
@media (max-width: 1400px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 992px) {
  .charts-row {
    flex-direction: column;
  }
  .donut-chart-layout {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .donut-legend {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-filters {
    width: 100%;
  }
  .dash-filter-item, .dash-input, .dash-select {
    width: 100%;
  }
  .btn-dash-search {
    width: 100%;
  }
}

/* ===== INDICADORES DE PERFORMANCE (PIZZA/ROSCA) ===== */
.indicators-pizza-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  padding: 16px 0 8px;
}
.indicator-pizza-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}
.pizza-canvas-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 8px;
}
.pizza-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}
.pizza-center-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.pizza-label {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
}
.pizza-sub {
  font-size: 9.5px;
  color: var(--text-muted);
}
.text-blue {
  color: #3b82f6 !important;
}

/* ID Mercado Livre Status Badge */
.ml-status-badge-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ml-logo-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}
.ml-logo-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 50%;
}
.ml-status-badge-mini {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}
.ml-status-badge-mini svg {
  width: 10px;
  height: 10px;
}
.badge-status-text {
  font-weight: 700;
  font-size: 11px;
}
.text-ml-yellow {
  color: #F7CA02 !important;
}
.text-orange {
  color: #f97316 !important;
}
.text-shopee-orange {
  color: #f97316 !important;
}
.text-magalu-blue {
  color: #0086ff !important;
}
.text-amazon-amber {
  color: #ff9900 !important;
}

/* Status Badges in Orders Table */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
}
.status-badge.status-cancelado,
.status-badge.status-serviço-cancelado,
.status-badge.status-cancelado-na-tm {
  background: #fef2f2;
  color: #ef4444;
}
.status-badge.status-coletado {
  background: #eff6ff;
  color: #3b82f6;
}
.status-badge.status-entregue-ml,
.status-badge.status-entregue {
  background: #ecfdf5;
  color: #10b981;
}
.status-badge.status-em-rota-de-entrega {
  background: #ecfeff;
  color: #06b6d4;
}
.status-badge.status-ausente,
.status-badge.status-comprador-reagendou {
  background: #fffbeb;
  color: #d97706;
}

/* =============================================
   CENTRAL DE COMUNICAÇÕES
   ============================================= */
.comunicacoes-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 14px;
}

@media (max-width: 1024px) {
  .comunicacoes-layout {
    flex-direction: column;
  }
  .comunicacoes-form-panel,
  .comunicacoes-preview-panel {
    width: 100% !important;
  }
}

.comunicacoes-form-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.comunicacoes-preview-panel {
  flex: 0.8;
  position: sticky;
  top: calc(var(--topbar-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 320px;
  width: 100%;
}

.comunicacoes-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.comunicacoes-card-header {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.comunicacoes-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Radio Cards Selection */
.destinatarios-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .destinatarios-options {
    grid-template-columns: 1fr;
  }
}

.radio-card, .checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.radio-card:hover, .checkbox-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.radio-card input[type="radio"],
.checkbox-card input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #73d13d;
  cursor: pointer;
}

.radio-card:has(input[type="radio"]:checked),
.checkbox-card:has(input[type="checkbox"]:checked) {
  border-color: #73d13d;
  background: #f6ffed;
  box-shadow: 0 0 0 1px #73d13d;
}

.radio-card-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radio-card-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
}

.radio-card-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Vendedores Selecao Box */
.vendedores-selecao-box {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  animation: fadeIn 0.25s ease-out;
}

.vendedores-selecao-box.hidden {
  display: none;
}

.selecao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 11px;
}

.selecao-buttons {
  display: flex;
  gap: 8px;
}

.btn-clean-select {
  background: none;
  border: none;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.btn-clean-select:hover {
  background: rgba(79, 70, 229, 0.08);
  text-decoration: underline;
}

.vendedores-checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  max-height: 160px;
  overflow-y: auto;
}

@media (max-width: 600px) {
  .vendedores-checklist-grid {
    grid-template-columns: 1fr;
  }
}

.vendedor-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.vendedor-checkbox-label:hover {
  background: #f8fafc;
}

.vendedor-checkbox-label input {
  accent-color: #73d13d;
}

.destinatarios-resumo {
  margin-top: 8px;
  padding: 8px 12px;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: var(--radius);
  color: #0050b3;
  font-size: 11.5px;
}

/* Canais de Envio */
.canais-row {
  display: flex;
  gap: 12px;
}

.canais-row .checkbox-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px;
}

.checkbox-card-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.canal-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canal-icon svg {
  width: 18px;
  height: 18px;
}

.email-color {
  color: #3b82f6;
}

.whatsapp-color {
  color: #25d366;
}

/* Mensagem Area */
.tags-helper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-tag {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: #475569;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: monospace;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-tag:hover {
  background: #e2e8f0;
  color: var(--text-primary);
  border-color: #cbd5e1;
  transform: translateY(-0.5px);
}

.comunicacoes-textarea {
  width: 100%;
  height: 140px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
  resize: vertical;
  background: #f8fafc;
  transition: all 0.2s;
}

.comunicacoes-textarea:focus {
  outline: none;
  border-color: #73d13d;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(115, 209, 61, 0.12);
}

.textarea-actions {
  display: flex;
  justify-content: flex-end;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* Coluna Direita: Preview Panel */
.preview-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 4px 0;
}

.preview-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px 6px 0 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.preview-tab:hover {
  color: var(--text-primary);
}

.preview-tab.active {
  background: #fff;
  color: #1a1a2e;
  border: 1px solid var(--border);
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
}

.preview-container {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  min-height: 480px;
}

.preview-box {
  width: 100%;
  animation: fadeIn 0.2s ease-out;
}

.preview-box.hidden {
  display: none;
}

/* Email Mockup */
.email-preview-container {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.email-mockup-header {
  padding: 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-mockup-row {
  display: flex;
  font-size: 11.5px;
}

.email-mockup-label {
  width: 60px;
  color: var(--text-muted);
  font-weight: 600;
}

.email-mockup-val {
  color: var(--text-primary);
  font-weight: 500;
}

.email-mockup-body {
  padding: 24px;
  flex: 1;
  background: #fafafb;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
}

.email-logo-section {
  border-bottom: 2px solid #73d13d;
  padding-bottom: 8px;
}

.email-logo {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a2e;
}

.email-content {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #fff;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  min-height: 120px;
}

.email-footer-section {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  line-height: 1.5;
  margin-top: auto;
}

/* WhatsApp Phone Mockup */
.whatsapp-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e4e4e7;
  padding: 10px 0;
  border-radius: 6px;
}

.phone-mockup {
  width: 290px;
  height: 460px;
  background: #efeae2;
  border: 10px solid #18181b;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.phone-header {
  background: #075e54;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.phone-camera {
  width: 50px;
  height: 12px;
  background: #000;
  border-radius: 0 0 8px 8px;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 10;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  padding: 2px 14px 2px 20px;
  font-size: 9px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.phone-status-icons {
  display: flex;
  gap: 4px;
}

.phone-chat-info {
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 4px;
  gap: 4px;
}

.phone-back-arrow {
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}

.phone-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #075e54;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-chat-name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.phone-chat-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-chat-status {
  font-size: 8px;
  color: rgba(255,255,255,0.75);
  margin-top: -1px;
}

.phone-chat-icons {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}

.phone-chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
  background-size: cover;
  display: flex;
  flex-direction: column;
}

.chat-day-label {
  font-size: 8.5px;
  font-weight: 600;
  color: #657786;
  background: rgba(255,255,255,0.85);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 0 auto 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.chat-bubble {
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 85%;
  position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  font-size: 11px;
  line-height: 1.4;
  color: #303030;
}

.chat-bubble.received {
  align-self: flex-start;
  border-top-left-radius: 0;
  background: #fff;
}

/* Tail effect for bubble */
.chat-bubble.received::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at bottom left, transparent 70%, #fff 70%);
}

.chat-message-text {
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-message-time {
  font-size: 7.5px;
  color: #8c8c8c;
  text-align: right;
  margin-top: 4px;
}

.phone-input-bar {
  background: #f0f0f0;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #e0e0e0;
}

.phone-emoji {
  font-size: 14px;
  color: #656565;
}

.phone-input-field {
  flex: 1;
  height: 24px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 0 10px;
  font-size: 10px;
}

.phone-mic {
  font-size: 12px;
  color: #075e54;
}

/* Spinner & Loader styles */
.loader-box {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 220px;
  text-align: center;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #73d13d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-message {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.sucesso-detalhes-lista {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  max-height: 140px;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.sucesso-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.sucesso-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sucesso-item-nome {
  font-weight: 600;
  color: #334155;
}

.sucesso-item-canais {
  font-size: 11px;
  font-weight: 600;
}

/* Histórico de Envios Table & Badges */
.comunicacoes-historico-table th,
.comunicacoes-historico-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: #334155;
  vertical-align: middle;
}

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

.historico-badge-success {
  background: #f0fdf4;
  color: #166534;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.historico-badge-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.historico-canal-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}

.historico-canal-badge.whatsapp-badge {
  background: #e6fcf5;
  color: #0ca678;
  border-color: #c3fae8;
}

.historico-canal-badge.email-badge {
  background: #e7f5ff;
  color: #1c7ed6;
  border-color: #d0ebff;
}

.btn-detalhes-envio {
  background: white;
  border: 1px solid #cbd5e1;
  color: #4f46e5;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-detalhes-envio:hover {
  background: #f8fafc;
  border-color: #4f46e5;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* =============================================
   NEW LAYOUT — TORRE DE OPERAÇÕES & COLETAS PENDENTES
   ============================================= */

/* Badges de Navegação (Sidebar) */
.nav-badge {
  display: inline-block;
  background: #22c55e;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  line-height: 1.2;
}

/* Novo Grid de Estatísticas */
.stats-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .stats-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .stats-grid-new {
    grid-template-columns: 1fr;
  }
}

.stat-card-new {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card-new:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.stat-card-new-content {
  display: flex;
  flex-direction: column;
}

.stat-card-new-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-card-new-number {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.15;
  margin-bottom: 6px;
}

.stat-card-new-number.red-text {
  color: #ef4444;
}

.stat-card-new-sub {
  font-size: 11px;
  color: #94a3b8;
}

.stat-card-new-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-new-icon svg {
  width: 18px;
  height: 18px;
}

/* Cores de Fundo dos Ícones das Estatísticas */
.stat-card-new-icon.grey-bg {
  background: #e2e8f0;
  color: #64748b;
}

.stat-card-new-icon.green-bg {
  background: #dcfce7;
  color: #16a34a;
}

.stat-card-new-icon.red-bg {
  background: #fee2e2;
  color: #ef4444;
}

.stat-card-new-icon.orange-bg {
  background: #ffedd5;
  color: #f97316;
}

/* Container Branco Principal da Lista de Coletas */
.coletas-main-panel-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 20px 22px 26px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  max-width: 100%;
}

/* Linha de Controles (Abas e Ações) */
.coletas-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.coletas-controls-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.coletas-segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  gap: 2px;
}

.coletas-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.coletas-tab-btn:hover {
  color: #1e293b;
}

.coletas-tab-btn.active {
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.coletas-controls-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botões de Ação de Coletas */
.btn-coletas-mapa,
.btn-coletas-export,
.btn-coletas-filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-coletas-mapa svg,
.btn-coletas-export svg,
.btn-coletas-filtro svg {
  width: 14px;
  height: 14px;
  color: #475569;
}

.btn-coletas-mapa:hover,
.btn-coletas-export:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-coletas-filtro {
  background: #64748b;
  border-color: #64748b;
  color: #ffffff;
}

.btn-coletas-filtro svg {
  color: #ffffff;
}

.btn-coletas-filtro:hover {
  background: #475569;
  border-color: #475569;
  color: #ffffff;
}

/* Grade de Coletores (4 colunas igual à referência) */
.coletas-grid-wrapper {
  margin-top: 6px;
  width: 100%;
  min-width: 0;
}

.coletas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

@media (max-width: 1300px) {
  .coletas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .coletas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .coletas-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cartões Individuais (Padrão Rosa Claro quando Atrasado) */
.coleta-card-new {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 142px;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.coleta-card-new.card-atrasado {
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.coleta-card-new.card-regular {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.coleta-card-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.coleta-card-new.card-atrasado:hover {
  border-color: #fca5a5;
}

.coleta-card-new.selected {
  box-shadow: 0 0 0 2px #ef4444;
}

.coleta-card-header-new {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
}

.coleta-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.coleta-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.35;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.coleta-card-subline {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* WhatsApp Icon nos Cartões */
.coleta-card-wa {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.coleta-card-wa:hover {
  background: #f0fdf4;
  border-color: #22c55e;
  transform: scale(1.06);
}

.coleta-card-body-new {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
}

.coleta-card-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.coleta-card-col-aviso {
  align-items: center;
}

.coleta-card-col-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.coleta-card-col-value {
  font-size: 19px;
  font-weight: 700;
  color: #334155;
  line-height: 1.1;
}

.coleta-card-col-value.text-green-value {
  color: #22c55e;
}

/* Badge do Status/Aviso */
.coleta-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.coleta-card-badge.regular {
  background: #dcfce7;
  color: #16a34a;
}

.coleta-card-badge.atrasado {
  background: #fee2e2;
  color: #ef4444;
}

.coleta-card-badge .badge-dot {
  font-size: 8px;
}

/* =============================================
   MODAL DE LOJAS POR COLETOR (PADRÃO IMAGEM 2)
   ============================================= */
.modal-coletor-lojas-box {
  max-width: 820px;
  width: 92%;
  padding: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.modal-coletor-lojas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px 16px;
  background: #ffffff;
}

.modal-coletor-lojas-title {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
  margin: 0;
  text-transform: uppercase;
}

.modal-coletor-lojas-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-coletor-lojas-close:hover {
  color: #334155;
}

.modal-coletor-lojas-body {
  padding: 4px 26px 26px;
}

.modal-coletor-table-wrap {
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
}

.modal-coletor-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
}

.modal-coletor-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.modal-coletor-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.modal-coletor-table tbody tr.coletor-loja-row-atrasada {
  background: #fff8f8;
}

.modal-coletor-table tbody tr:hover {
  background: #fef2f2;
}

.modal-coletor-table tbody td {
  padding: 14px 12px;
  font-size: 12px;
  color: #475569;
  vertical-align: middle;
}

.modal-coletor-table tbody td.col-tipo {
  color: #475569;
  font-weight: 500;
}

.modal-coletor-table tbody td.col-loja-nome {
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.modal-coletor-table tbody td.col-bairro {
  color: #475569;
  text-transform: uppercase;
  font-size: 11.5px;
}

.modal-coletor-table tbody td.col-cep {
  color: #475569;
  font-size: 12px;
}

.corte-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.corte-time.atrasado {
  color: #ef4444;
  font-weight: 700;
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.pill-count.pendentes {
  background: #fee2e2;
  color: #ef4444;
}

.pill-count.coletados {
  background: #dcfce7;
  color: #16a34a;
}

/* =============================================
   CHEGADA DE MOTORISTAS & LEITURA QR CODE
   ============================================= */

/* Botão de Atalho em Coletas Pendentes */
.btn-coletas-chegada {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-coletas-chegada:hover {
  background: #1e293b;
  border-color: #334155;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-coletas-chegada svg {
  width: 15px;
  height: 15px;
  color: #4ade80;
}

.badge-chegada-bip {
  background: #16a34a;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  animation: pulseGreenGlow 2.5s infinite;
}

@keyframes pulseGreenGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.stat-card-clickable {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  border-color: #86efac;
}

/* Tela Inteira: Chegada de Motoristas & Registro de Portaria */
.chegada-screen-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 24px;
}

.chegada-header {
  background: #0b1329;
  border-bottom: 2px solid #22c55e;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chegada-header .btn-scan-tool {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chegada-header .btn-scan-tool:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.chegada-header .modal-title {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

/* Modo Tela Cheia / Kiosk para Portaria */
.chegada-kiosk-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #0b1329 !important;
  overflow-y: auto !important;
}

.chegada-kiosk-fullscreen .chegada-screen-card {
  border-radius: 0 !important;
  min-height: 100vh !important;
  border: none !important;
  margin-bottom: 0 !important;
}

/* Modal Chegada Box (compatibilidade retroativa) */
.modal-chegada-box {
  width: min(1200px, 98vw);
  max-height: 94vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.chegada-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chegada-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  flex-shrink: 0;
}

.chegada-header-icon svg {
  width: 19px;
  height: 19px;
}

.chegada-header-sub {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
}

.chegada-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chegada-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.chegada-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  background: #f8fafc;
}

/* Scanner Bar & Zone */
.chegada-scanner-zone {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* Banner de Validação Geográfica na Chegada */
.chegada-geo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  border: 1px solid transparent;
  gap: 12px;
  transition: all 0.25s ease;
}

.chegada-geo-banner.loading {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.chegada-geo-banner.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.chegada-geo-banner.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.chegada-geo-banner.aviso {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.geo-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.geo-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.geo-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-geo-action {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-geo-action:hover {
  background: rgba(0,0,0,0.05);
}

.btn-geo-action.primary {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.btn-geo-action.primary:hover {
  background: #15803d;
}

@keyframes spin-geo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.geo-spin {
  animation: spin-geo 1.2s linear infinite;
}

.scanner-input-container {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 6px 4px 14px;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.scanner-input-container.locked {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.75;
}

.scanner-input-container:not(.locked):focus-within {
  background: #ffffff;
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.scanner-icon {
  color: #64748b;
  display: flex;
  align-items: center;
}

.scanner-icon svg {
  width: 18px;
  height: 18px;
}

.scanner-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: #0f172a;
}

.scanner-input:disabled {
  cursor: not-allowed;
  color: #94a3b8;
}

.scanner-input::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

.btn-scanner-bipar {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-scanner-bipar:hover:not(:disabled) {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-scanner-bipar:active:not(:disabled) {
  transform: translateY(0);
}

.btn-scanner-bipar:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.scanner-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.scanner-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-scan-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-scan-tool:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

.btn-scan-tool svg {
  width: 14px;
  height: 14px;
}

.scanner-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-label-hint {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.btn-quick-test {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-test:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
  transform: translateY(-1px);
}

/* Camera scan viewport */
.camera-scan-container {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #0f172a;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.camera-scan-viewport {
  position: relative;
  width: min(380px, 100%);
  height: 240px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-scan-reticle {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px dashed rgba(74, 222, 128, 0.8);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}

.scan-laser-animated {
  width: 100%;
  height: 2px;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  position: absolute;
  top: 0;
  animation: scanLaserMove 2s infinite ease-in-out;
}

@keyframes scanLaserMove {
  0% { top: 0; opacity: 0.8; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0; opacity: 0.8; }
}

.camera-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.camera-status-text {
  font-size: 11.5px;
  color: #cbd5e1;
  text-align: center;
}

/* Feedback Banner */
.chegada-feedback {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideFeedback 0.25s ease;
}

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

.chegada-feedback.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.chegada-feedback.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.chegada-feedback.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* KPI Cards Row */
.chegada-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.chegada-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.chegada-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chegada-kpi-icon svg {
  width: 18px;
  height: 18px;
}

.chegada-kpi-icon.green { background: #dcfce7; color: #16a34a; }
.chegada-kpi-icon.yellow { background: #fef3c7; color: #d97706; }
.chegada-kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
.chegada-kpi-icon.orange { background: #ffedd5; color: #ea580c; }

.chegada-kpi-info {
  display: flex;
  flex-direction: column;
}

.chegada-kpi-num {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.chegada-kpi-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* Table Toolbar */
.chegada-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chegada-filter-tabs {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.chegada-tab-btn {
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chegada-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chegada-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  gap: 8px;
  min-width: 280px;
}

.chegada-search-box svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.chegada-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 12px;
  color: #0f172a;
  width: 100%;
}

/* Table Container & Elements */
.chegada-table-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.chegada-table thead tr {
  background: #4f5358 !important;
}

.chegada-table thead th,
.chegada-table th {
  background: #4f5358 !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 2px solid #3c4045;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.chegada-table thead th:last-child,
.chegada-table th:last-child {
  border-right: none;
}

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

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

.chegada-table tr.row-just-added {
  background: #f0fdf4 !important;
  animation: highlightNewRow 3s ease forwards;
}

@keyframes highlightNewRow {
  0% { background: #dcfce7; }
  100% { background: transparent; }
}

.badge-driver-code {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

.badge-app-ver {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

/* Doca Select Dropdown */
.doca-select {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.doca-select:focus {
  border-color: #22c55e;
}

/* Status Badges */
.chegada-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.chegada-status-badge:hover {
  transform: scale(1.03);
}

.chegada-status-badge.chegou {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.chegada-status-badge.descarregando {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.chegada-status-badge.liberado {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Action button in table */
.btn-action-chegada {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-chegada:hover {
  background: #fee2e2;
  color: #dc2626;
}

.btn-action-chegada svg {
  width: 15px;
  height: 15px;
}

/* Footer styling */
.chegada-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 12px 12px;
}

.chegada-footer-info {
  font-size: 11.5px;
  color: #64748b;
}

.chegada-footer-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================
   DUAS COLUNAS: CHEGADAS & MOTORISTAS PENDENTES
   ============================================= */

.chegada-columns-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .chegada-columns-layout {
    grid-template-columns: 1fr;
  }
}

.chegada-col-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.chegada-col-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.chegada-col-header.green-theme {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
}

.chegada-col-header.orange-theme {
  background: #fff7ed;
  border-bottom-color: #fed7aa;
}

.chegada-col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.chegada-col-header.green-theme .chegada-col-title svg {
  color: #16a34a;
  width: 15px;
  height: 15px;
}

.chegada-col-header.orange-theme .chegada-col-title svg {
  color: #ea580c;
  width: 15px;
  height: 15px;
}

.chegada-count-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.chegada-count-badge.green {
  background: #dcfce7;
  color: #15803d;
}

.chegada-count-badge.orange {
  background: #ffedd5;
  color: #c2410c;
}

.chegada-col-search {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  gap: 6px;
  min-width: 160px;
}

.chegada-col-search svg {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

.chegada-col-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 11px;
  color: #0f172a;
  width: 100%;
}

.chegada-col-table-container {
  max-height: 560px;
  min-height: 380px;
  overflow-y: auto;
}

.badge-pacotes-pendentes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
}

.badge-contrato {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-contrato.mei {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-contrato.freelancer {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-contrato.diaria {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

.badge-contrato.clt {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.btn-bipar-inline {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-bipar-inline:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

/* =============================================
   FILTROS, JUSTIFICATIVA & CONFERENTE (PORTARIA)
   ============================================= */

/* Checkbox Justificativa */
.chegada-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.chegada-checkbox-label:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.chegada-checkbox-label input[type="checkbox"] {
  accent-color: #22c55e;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Conferente badge / selector na barra de bipagem */
.conferente-badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 6px;
}

.input-conferente-field {
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  color: #166534;
  outline: none;
  width: 140px;
  transition: all 0.15s ease;
}

.input-conferente-field:focus {
  background: #ffffff;
  border-color: #86efac;
  border-radius: 4px;
  padding: 2px 6px;
}

/* Campo expansível de Justificativa */
.chegada-justificativa-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 14px;
  animation: slideFeedback 0.2s ease;
}

.justificativa-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.input-justificativa-text {
  flex: 1;
  min-width: 250px;
  padding: 6px 12px;
  border: 1px solid #fdba74;
  border-radius: 6px;
  background: #ffffff;
  font-family: var(--font);
  font-size: 12px;
  color: #1e293b;
  outline: none;
}

.input-justificativa-text:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.btn-preset-pill {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset-pill:hover {
  background: #fed7aa;
  color: #9a3412;
}

/* Filtros de Consulta Section */
.chegada-filter-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chegada-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.chegada-filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.chegada-filter-title svg {
  width: 15px;
  height: 15px;
  color: #34AF22;
}

.chegada-filter-quick-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.filter-chip.active {
  background: #34AF22;
  color: #ffffff;
  border-color: #2b931c;
}

.chegada-filter-grid {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.chegada-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 135px;
}

.chegada-filter-group label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
}

.filter-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 10px;
  gap: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.filter-input-wrap:focus-within {
  background: #ffffff;
  border-color: #34AF22;
  box-shadow: 0 0 0 3px rgba(52, 175, 34, 0.12);
}

.filter-input-wrap svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

.filter-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  width: 100%;
}

.chegada-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-filter-apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #34AF22;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-filter-apply:hover {
  background: #2b931c;
  transform: translateY(-1px);
}

.btn-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filter-clear:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Conferente badge na tabela */
.badge-conferente {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.badge-conferente svg {
  color: #16a34a;
}

.chegada-justificativa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 4px;
}

/* =======================================================
   TOOLBAR DE AÇÕES SUPERIOR (PADRÃO OFICIAL TRACKen)
   Exportar (Cinza Slate) | Bipar QR (Verde) | Filtro (Cinza)
   ======================================================= */
.chegada-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.chegada-toolbar-left,
.chegada-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chegada-toolbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.toolbar-periodo-container {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  gap: 8px;
  font-family: var(--font);
  transition: all 0.2s ease;
}

.toolbar-periodo-container:focus-within {
  background: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.toolbar-periodo-icon {
  display: flex;
  align-items: center;
  color: #64748b;
}

.toolbar-periodo-icon svg {
  width: 15px;
  height: 15px;
}

.toolbar-periodo-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.toolbar-date-input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 6px;
  height: 25px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.toolbar-date-input:focus {
  border-color: #16a34a;
}

.toolbar-periodo-sep {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: lowercase;
}

.toolbar-periodo-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.toolbar-periodo-badge.green {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.toolbar-periodo-badge.blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.toolbar-periodo-badge.active {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

.toolbar-periodo-badge.muted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Botão Exportar / Download Slate */
.btn-card-slate {
  background: #6f8094;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-card-slate:hover {
  background: #5d6e82;
  transform: translateY(-1px);
}

.btn-card-slate:active {
  transform: translateY(0);
}

.btn-card-slate svg {
  width: 16px;
  height: 16px;
}

/* Botão QR Code Verde Vibrante */
.btn-card-green-qr {
  background: #73d13d;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(115, 209, 61, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-card-green-qr:hover {
  background: #65be32;
  transform: translateY(-1px);
}

.btn-card-green-qr:active {
  transform: translateY(0);
}

.btn-card-green-qr svg {
  width: 17px;
  height: 17px;
}

/* Botão Filtro Slate com Ícone de Funil */
.btn-card-filter {
  background: #6f8094;
  color: #ffffff;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-card-filter:hover {
  background: #5d6e82;
  transform: translateY(-1px);
}

.btn-card-filter:active {
  transform: translateY(0);
}

.btn-card-filter svg {
  width: 14px;
  height: 14px;
}

.filter-active-dot {
  width: 9px;
  height: 9px;
  background: #73d13d;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  top: -2px;
  right: -2px;
}

/* =======================================================
   BARRA DE FILTROS ATIVOS
   ======================================================= */
.chegada-active-filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  font-size: 12px;
}

.chegada-active-filters-bar.hidden {
  display: none;
}

.active-filters-label {
  font-weight: 700;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-filters-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.active-filter-badge .badge-remove {
  cursor: pointer;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}

.active-filter-badge .badge-remove:hover {
  color: #dc2626;
}

.btn-clear-active-filters {
  background: none;
  border: none;
  color: #dc2626;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 6px;
  text-decoration: underline;
}

.btn-clear-active-filters:hover {
  color: #b91c1c;
}

/* =======================================================
   DRAWER DE BUSCA LATERAL (FILTRO DE BUSCA OFICIAL TRACKen)
   Conforme media_1792500988790.png
   ======================================================= */
.filtro-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100010;
  transition: opacity 0.25s ease;
}

.filtro-drawer-overlay.hidden {
  display: none;
}

.filtro-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  background: #ffffff;
  box-shadow: -8px 0 28px rgba(0,0,0,0.18);
  z-index: 100011;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filtro-drawer-panel.hidden {
  display: none;
}

.filtro-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.filtro-drawer-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #334155;
  text-transform: uppercase;
}

.filtro-drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.filtro-drawer-close:hover {
  color: #0f172a;
}

.filtro-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filtro-drawer-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filtro-drawer-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
}

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

.filtro-drawer-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filtro-drawer-input:focus {
  border-color: #73d13d;
  box-shadow: 0 0 0 3px rgba(115, 209, 61, 0.15);
}

.filtro-drawer-icon-inside {
  position: absolute;
  right: 10px;
  color: #94a3b8;
  pointer-events: none;
  width: 14px;
  height: 14px;
}

.filtro-drawer-select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.filtro-drawer-select:focus {
  border-color: #73d13d;
}

.filtro-drawer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filtro-drawer-row .filtro-drawer-input-wrap {
  flex: 1;
}

.filtro-drawer-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.filtro-drawer-chip {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filtro-drawer-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.filtro-drawer-chip.active {
  background: #73d13d;
  color: #ffffff;
  border-color: #62bd2e;
}

.filtro-drawer-footer {
  padding: 16px 22px 22px 22px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-drawer-filtrar {
  width: 100%;
  height: 42px;
  background: #73d13d;
  color: #ffffff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(115, 209, 61, 0.25);
}

.btn-drawer-filtrar:hover {
  background: #65be32;
  transform: translateY(-1px);
}

.btn-drawer-fechar {
  width: 100%;
  height: 40px;
  background: #1e293b;
  color: #ffffff;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-drawer-fechar:hover {
  background: #0f172a;
}

.btn-drawer-limpar {
  background: none;
  border: none;
  color: #64748b;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  text-decoration: underline;
  margin-top: 2px;
}

.btn-drawer-limpar:hover {
  color: #dc2626;
}

/* ===== MODAL VERDE DE SUCESSO NA LEITURA (CHEGADA - 5s) ===== */
.modal-sucesso-verde-box {
  max-width: 490px;
  width: 92%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid #22c55e;
  box-shadow: 0 25px 50px -12px rgba(22, 163, 74, 0.35), 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: modalSucessoIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSucessoIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-timer-bar-wrapper {
  width: 100%;
  height: 4px;
  background: rgba(34, 197, 94, 0.25);
  overflow: hidden;
}

.modal-timer-bar {
  height: 100%;
  background: #16a34a;
  width: 100%;
  transform-origin: left;
}

.modal-timer-bar.animating {
  animation: timerProgress 5s linear forwards;
}

@keyframes timerProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.modal-sucesso-header {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #22c55e 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.sucesso-header-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.sucesso-header-text {
  flex: 1;
  min-width: 0;
}

.sucesso-badge-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.sucesso-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 3px 0 0 0;
  letter-spacing: -0.2px;
}

.modal-sucesso-close-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease;
}

.modal-sucesso-close-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.modal-sucesso-body {
  padding: 18px 20px;
  background: #f8fafc;
}

.sucesso-card-destaque {
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.sucesso-destaque-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sucesso-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sucesso-agente-info {
  flex: 1;
  min-width: 0;
}

.sucesso-label {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sucesso-agente-nome {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sucesso-agente-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sucesso-grid-dados {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.sucesso-dado-item {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}

.sucesso-dado-label {
  font-size: 10px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2px;
}

.sucesso-dado-valor {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.sucesso-just-wrapper {
  margin-top: 12px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 11.5px;
  color: #92400e;
}

.sucesso-just-label {
  font-weight: 700;
  margin-right: 4px;
}

.sucesso-just-texto {
  font-weight: 500;
}

.modal-sucesso-footer {
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sucesso-countdown-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.sucesso-countdown-text strong {
  color: #16a34a;
  font-weight: 800;
  font-size: 13px;
}

.btn-fechar-sucesso-verde {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-fechar-sucesso-verde:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-fechar-sucesso-verde:active {
  transform: translateY(0);
}

/* ===== MODAL ÂMBAR DE CONFIRMAÇÃO DE DUPLICIDADE NA CHEGADA ===== */
.modal-duplicidade-chegada-box {
  max-width: 500px;
  width: 92%;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid #f59e0b;
  box-shadow: 0 25px 50px -12px rgba(217, 119, 6, 0.35), 0 10px 25px rgba(0, 0, 0, 0.18);
  animation: modalSucessoIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-duplicidade-header {
  background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.duplicidade-header-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.duplicidade-header-text {
  flex: 1;
  min-width: 0;
}

.duplicidade-badge-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.duplicidade-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 3px 0 0 0;
  letter-spacing: -0.2px;
}

.modal-duplicidade-close-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease;
}

.modal-duplicidade-close-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.modal-duplicidade-body {
  padding: 18px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.duplicidade-alert-message {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.45;
}

.duplicidade-card-destaque {
  background: #ffffff;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.duplicidade-destaque-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duplicidade-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.duplicidade-agente-info {
  flex: 1;
  min-width: 0;
}

.duplicidade-label {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.duplicidade-agente-nome {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duplicidade-agente-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duplicidade-grid-dados {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.duplicidade-dado-item {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}

.duplicidade-dado-label {
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2px;
}

.duplicidade-dado-valor {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duplicidade-question-box {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  padding: 2px 4px 0;
}

.modal-duplicidade-footer {
  padding: 14px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-duplicidade-cancelar {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-duplicidade-cancelar:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-duplicidade-confirmar {
  background: #d97706;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.28);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-duplicidade-confirmar:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-duplicidade-confirmar:active {
  transform: translateY(0);
}

/* ===== BARRA DE SELEÇÃO DE FILIAL ANTES DA BIPAGEM ===== */
.scanner-filial-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 14px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.scanner-filial-selector-bar.selected {
  background: #f0fdf4;
  border-color: #86efac;
}

.scanner-filial-selector-bar.highlight-error {
  background: #fffbeb;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.scanner-filial-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
  flex-wrap: wrap;
}

.scanner-filial-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.scanner-filial-selector-bar.selected .scanner-filial-icon {
  background: #dcfce7;
  color: #16a34a;
}

.scanner-filial-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.scanner-filial-label .required-star {
  color: #ef4444;
  margin-left: 2px;
}

.scanner-filial-select-wrap {
  flex: 1;
  min-width: 220px;
  max-width: 320px;
}

.scanner-filial-select {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scanner-filial-select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.scanner-filial-selector-bar.selected .scanner-filial-select {
  border-color: #22c55e;
  color: #15803d;
}

.scanner-filial-right {
  display: flex;
  align-items: center;
}

.scanner-filial-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.scanner-filial-status.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.scanner-filial-status.ready {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-filial-chegada {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

/* ===== TELA DE LOGIN E AUTENTICAÇÃO TRACKEN ===== */
body.auth-locked {
  overflow: hidden;
}

body.auth-locked > .sidebar,
body.auth-locked > .main-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.tracken-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: radial-gradient(circle at 20% 20%, #1e293b 0%, #0f172a 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.25s ease;
}

.tracken-auth-overlay.hidden {
  display: none !important;
}

.tracken-auth-bg-decor {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(74, 222, 128, 0.12) 1px, transparent 1px),
    radial-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}

.tracken-auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: authCardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tracken-auth-header {
  background: linear-gradient(135deg, #1a2232 0%, #0f172a 100%);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #22c55e;
}

.tracken-auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tracken-auth-logo .logo-icon svg {
  width: 34px;
  height: 34px;
}

.tracken-auth-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.tracken-auth-logo .logo-main {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.tracken-auth-logo .logo-sub {
  font-size: 9.5px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 1.4px;
}

.tracken-auth-badge {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tracken-auth-intro {
  padding: 24px 28px 10px;
}

.tracken-auth-intro h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}

.tracken-auth-intro p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.tracken-auth-form {
  padding: 14px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tracken-auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.tracken-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tracken-auth-field label {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

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

.tracken-auth-input-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.tracken-auth-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.tracken-auth-input-wrap input:focus {
  background: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.tracken-auth-eye-btn {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tracken-auth-eye-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tracken-auth-eye-btn svg {
  width: 16px;
  height: 16px;
}

.tracken-auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracken-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
}

.tracken-auth-remember input {
  accent-color: #16a34a;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.tracken-auth-submit-btn {
  height: 44px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  margin-top: 4px;
}

.tracken-auth-submit-btn:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
  transform: translateY(-1px);
}

.tracken-auth-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.topbar-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}

.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  padding: 5px 11px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-logout-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.topbar-logout-btn svg {
  width: 13px;
  height: 13px;
}

/* ===== DUPLA AUTENTICAÇÃO (2FA POR E-MAIL) ===== */
.tracken-auth-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.auth-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.auth-step-pill .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-step-pill.active {
  color: #0f172a;
}

.auth-step-pill.active .step-num {
  background: #16a34a;
  color: #ffffff;
}

.auth-step-pill.done {
  color: #16a34a;
}

.auth-step-pill.done .step-num {
  background: #dcfce7;
  color: #15803d;
}

.auth-step-divider {
  width: 26px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 2px;
}

.tracken-2fa-email-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tracken-2fa-email-box label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.tracken-2fa-email-row {
  display: flex;
  gap: 8px;
}

.tracken-2fa-email-row input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  outline: none;
  cursor: not-allowed;
  user-select: none;
}

.btn-2fa-send-email {
  height: 36px;
  padding: 0 12px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-2fa-send-email:hover:not(:disabled) {
  background: #1e293b;
}

.btn-2fa-send-email:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tracken-2fa-dispatch-status {
  font-size: 11.5px;
  line-height: 1.4;
  color: #334155;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.tracken-2fa-dispatch-status.sent {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.tracken-2fa-dispatch-status.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.tracken-2fa-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracken-2fa-timer {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
}

.tracken-otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 2px;
}

.otp-digit-input {
  width: 100%;
  height: 48px;
  text-align: center;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
}

.otp-digit-input:focus {
  background: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  transform: translateY(-1px);
}

.tracken-auth-back-btn {
  height: 36px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tracken-auth-back-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ===== BLOQUEIO APÓS 3 TENTATIVAS E DESBLOQUEIO VIA TELEGRAM ===== */
.tracken-blocked-banner {
  margin: 18px 24px 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
  border: 1.5px solid #fecdd3;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.blocked-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blocked-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blocked-pill {
  display: inline-block;
  align-self: flex-start;
  background: #dc2626;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.blocked-banner-text h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #991b1b;
}

.blocked-banner-text p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #7f1d1d;
}

.tracken-telegram-submit-btn {
  height: 44px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.15s ease;
}

.tracken-telegram-submit-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.telegram-config-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.telegram-config-details summary {
  font-weight: 700;
  color: #0369a1;
  cursor: pointer;
  user-select: none;
}

.telegram-config-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.telegram-mini-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  color: #0f172a;
  background: #ffffff;
}

.btn-save-tg-config {
  align-self: flex-end;
  padding: 5px 12px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-link-reenviar-tg {
  border: none;
  background: transparent;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.otp-digit-input.tg-otp:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

/* ===== GESTÃO DE USUÁRIOS E VÍNCULO DE TELAS LIBERADAS (ADM) ===== */
.topbar-adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #4ade80;
  border: 1px solid #334155;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-adm-btn:hover {
  background: #1e293b;
  border-color: #4ade80;
}

.topbar-adm-btn svg {
  width: 13px;
  height: 13px;
}

.adm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-rule-badge {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.adm-section-desc {
  font-size: 12.5px;
  color: #475569;
  margin: 0 0 16px;
  line-height: 1.5;
}

.adm-new-user-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 22px;
}

.adm-box-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.adm-form-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.adm-screens-selector-wrap {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.adm-screens-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.adm-screens-label {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
}

.adm-screens-quick-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-adm-mini {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-adm-mini:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.adm-screens-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.adm-screen-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.15s ease;
  user-select: none;
}

.adm-screen-check-item:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.adm-screen-check-item input[type="checkbox"] {
  accent-color: #16a34a;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.adm-screen-check-item.checked {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #14532d;
}

.adm-new-user-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.adm-feedback-msg {
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
}

.badge-tela-vinculada {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  margin: 2px 3px 2px 0;
}

.badge-sem-tela {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.badge-perfil-adm {
  background: #0f172a;
  color: #4ade80;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
}

.badge-perfil-operador {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
}

.strong-pass-checklist {
  margin-top: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pass-req-item {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  transition: color 0.15s ease;
}

.pass-req-item.ok {
  color: #15803d;
  font-weight: 700;
}

.badge-pendente-ativacao {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
}






