/* Dashboard Início — painel mobilidade */
.mobi-dash {
  --md-blue: #2563eb;
  --md-blue-deep: #1d4ed8;
  --md-ink: #0f172a;
  --md-muted: #64748b;
  --md-border: #e2e8f0;
  --md-card: #ffffff;
  --md-bg: #f1f5f9;
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 4px 48px;
  color: var(--md-ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.mobi-dash * { box-sizing: border-box; }

.mobi-dash-hello {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 55%, #60a5fa 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  margin-bottom: 14px;
}

.mobi-dash-hello h2 {
  margin: 0 0 4px;
  font-size: 1.55rem;
  font-weight: 700;
}

.mobi-dash-hello p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.95rem;
}

.mobi-dash-period {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobi-dash-seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}

.mobi-dash-seg button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.9;
}

.mobi-dash-seg button.active {
  background: #fff;
  color: #0f172a;
  opacity: 1;
}

.mobi-dash-clock {
  font-size: 0.85rem;
  opacity: 0.95;
  white-space: nowrap;
}

.mobi-dash-hist {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b55;
  color: #78350f;
  margin-bottom: 22px;
}

.mobi-dash-hist strong { font-size: 1.05rem; }
.mobi-dash-hist span { display: block; font-size: 0.82rem; opacity: 0.85; }

.mobi-dash-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0 14px;
  color: var(--md-ink);
}

.mobi-dash-journey {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.mobi-dash-journey-card {
  background: var(--md-card);
  border-radius: 14px;
  padding: 14px 12px 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  border-top: 3px solid #94a3b8;
  min-height: 118px;
}

.mobi-dash-journey-card .emoji { font-size: 1.25rem; line-height: 1; }
.mobi-dash-journey-card .val {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
}
.mobi-dash-journey-card .lbl {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--md-muted);
  text-transform: uppercase;
}
.mobi-dash-journey-card .sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.mobi-dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mobi-dash-kpi {
  background: var(--md-card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  position: relative;
  min-height: 128px;
}

.mobi-dash-kpi .title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--md-muted);
  text-transform: uppercase;
  padding-right: 42px;
}

.mobi-dash-kpi .icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.mobi-dash-kpi .val {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 14px 0 10px;
  letter-spacing: -0.03em;
}

.mobi-dash-kpi .foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--md-muted);
}

.mobi-dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.72rem;
}

.mobi-dash-pill.ok { background: #dcfce7; color: #166534; }
.mobi-dash-pill.blue { background: #dbeafe; color: #1e40af; }
.mobi-dash-pill.orange { background: #ffedd5; color: #9a3412; }

.mobi-dash-stars { color: #f59e0b; letter-spacing: 1px; font-size: 0.9rem; }
.mobi-dash-stars.empty { color: #cbd5e1; }

.mobi-dash-card {
  background: var(--md-card);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid #f1f5f9;
  margin-bottom: 16px;
  overflow: hidden;
}

.mobi-dash-card-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--md-border);
  font-weight: 700;
  font-size: 0.95rem;
}

.mobi-dash-card-h .sub {
  font-weight: 400;
  color: var(--md-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

.mobi-dash-card-b { padding: 14px 16px 18px; }

.mobi-dash-feed {
  max-height: 22.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.mobi-dash-feed-more {
  text-align: center;
  padding: 10px 0 2px;
  color: #94a3b8;
  font-size: 0.8rem;
}
.mobi-dash-feed .mobi-dash-list li:first-child { padding-top: 0; }
.mobi-dash-feed .mobi-dash-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.mobi-dash-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--md-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.mobi-dash-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.mobi-dash-list { list-style: none; margin: 0; padding: 0; }
.mobi-dash-list li {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.mobi-dash-list li:last-child { border-bottom: 0; }

.mobi-dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.mobi-dash-list .meta { flex: 1; min-width: 0; }
.mobi-dash-list .name {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.mobi-dash-list .mobi-dash-msg {
  position: static;
  font-size: 0.8rem;
  color: var(--md-muted);
  margin-top: 2px;
}
.mobi-dash-list .wa {
  font-size: 0.78rem;
  color: #16a34a;
  margin-top: 4px;
}
.mobi-dash-list .when {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}
.mobi-dash-list .quote {
  font-style: italic;
  font-size: 0.8rem;
  color: #475569;
  margin-top: 4px;
}

.mobi-dash-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.mobi-dash-badge.mot { background: #fef08a; color: #854d0e; }
.mobi-dash-badge.pas { background: #bfdbfe; color: #1e3a8a; }

.mobi-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.mobi-dash-table th {
  text-align: left;
  color: var(--md-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 8px 6px;
  border-bottom: 1px solid var(--md-border);
}
.mobi-dash-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.mobi-dash-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
}
.mobi-dash-rank.r1 { background: #fde047; color: #713f12; }
.mobi-dash-rank.r2 { background: #e2e8f0; color: #334155; }
.mobi-dash-rank.r3 { background: #fda4af; color: #9f1239; }

.mobi-dash-turnos li { align-items: center; }
.mobi-dash-turnos .status-on { color: #16a34a; font-weight: 700; font-size: 0.75rem; }
.mobi-dash-turnos .status-off { color: #64748b; font-weight: 700; font-size: 0.75rem; }
.mobi-dash-turnos .right {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}

.mobi-dash-hint {
  font-size: 0.8rem;
  color: var(--md-muted);
  margin: 0 0 10px;
}

.mobi-dash-achrow {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.mobi-dash-progress {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid #a7f3d0;
  color: #065f46;
  position: relative;
  overflow: hidden;
}
.mobi-dash-progress h4 { margin: 0 0 4px; font-size: 1rem; }
.mobi-dash-progress p { margin: 0 0 14px; font-size: 0.88rem; opacity: 0.9; }
.mobi-dash-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.mobi-dash-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #059669);
}
.mobi-dash-bar-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.mobi-dash-ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mobi-dash-ach-item {
  border: 1px solid var(--md-border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.mobi-dash-ach-item .t { font-weight: 700; font-size: 0.9rem; margin: 4px 0; }
.mobi-dash-ach-item .d { font-size: 0.78rem; color: var(--md-muted); margin: 0; }

.mobi-dash-heatmap-wrap { overflow-x: auto; }
.mobi-dash-heatmap {
  display: grid;
  grid-template-columns: 72px repeat(15, minmax(28px, 1fr)) 36px;
  gap: 3px;
  min-width: 640px;
  font-size: 0.7rem;
}
.mobi-dash-heatmap .lab {
  display: flex;
  align-items: center;
  color: var(--md-muted);
  font-weight: 600;
}
.mobi-dash-heatmap .cell {
  aspect-ratio: 1.4;
  border-radius: 4px;
  background: #fff1f2;
  border: 1px solid #ffe4e6;
  min-height: 22px;
}
.mobi-dash-heatmap .hx {
  text-align: center;
  color: var(--md-muted);
  padding-bottom: 4px;
}
.mobi-dash-scale {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  color: var(--md-muted);
  font-size: 0.65rem;
  background: linear-gradient(#fff1f2, #ef4444);
  border-radius: 4px;
  grid-row: 2 / span 6;
}

.mobi-dash-empty {
  text-align: center;
  color: var(--md-muted);
  padding: 18px 8px;
  font-size: 0.85rem;
}

.mobi-dash-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--md-muted);
}

@media (max-width: 1200px) {
  .mobi-dash-journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobi-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobi-dash-cols-3 { grid-template-columns: 1fr; }
  .mobi-dash-achrow { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .mobi-dash-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobi-dash-kpis { grid-template-columns: 1fr; }
  .mobi-dash-ach-grid { grid-template-columns: 1fr; }
  .mobi-dash-hello { padding: 16px; }
}
