/* TecModo — estilos principais do frontend */

* {
  box-sizing:border-box
}

body {
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,sans-serif;
  background:#0b1020;
  color:#f8fafc
}

.wrap {
  max-width:520px;
  margin:auto;
  min-height:100vh;
  padding:22px 18px 92px
}

.login {
  display:grid;
  place-content:center;
  min-height:92vh
}

.brand {
  font-size:30px;
  font-weight:800;
  margin-bottom:6px
}

.muted {
  color:#94a3b8
}

.card {
  background:#151d31;
  border:1px solid #27334d;
  border-radius:18px;
  padding:16px;
  margin:12px 0
}

.grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}

.stat b {
  font-size:24px;
  display:block
}

.primary,.btn {
  border:0;
  border-radius:14px;
  padding:14px;
  font-weight:750;
  font-size:15px
}

.primary {
  background:#f8fafc;
  color:#111827;
  width:100%
}

.btn {
  background:#202b45;
  color:#f8fafc
}

.danger {
  background:#4b1f29
}

.field {
  margin:12px 0
}

label {
  display:block;
  font-size:13px;
  color:#aab5ca;
  margin-bottom:6px
}

input,select,textarea {
  width:100%;
  padding:13px;
  border-radius:12px;
  border:1px solid #33415f;
  background:#0f172a;
  color:white;
  font-size:16px
}

textarea {
  min-height:80px
}

.seg {
  display:flex;
  gap:8px
}

.seg button {
  flex:1
}

.seg .on {
  background:#f8fafc;
  color:#111827
}

.nav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#111827;
  border-top:1px solid #27334d;
  display:flex;
  justify-content:center
}

.navin {
  width:min(520px,100%);
  display:grid;
  grid-template-columns:repeat(4,1fr)
}

.nav button {
  background:none;
  color:#94a3b8;
  border:0;
  padding:14px 4px;
  font-size:12px
}

.nav button.on {
  color:white
}

.title {
  font-size:24px;
  font-weight:800
}

.visit {
  padding:13px 0;
  border-bottom:1px solid #28334a
}

.visit:last-child {
  border:0
}

.pill {
  font-size:12px;
  padding:4px 8px;
  border-radius:99px;
  background:#26324c
}

.row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px
}

.toast {
  position:fixed;
  left:50%;
  bottom:80px;
  transform:translateX(-50%);
  background:#f8fafc;
  color:#111827;
  padding:10px 14px;
  border-radius:12px;
  z-index:9;
  max-width:90%
}

.bigplus {
  font-size:18px;
  margin:14px 0
}

.hidden {
  display:none
}

.navin {
  grid-template-columns:repeat(5,1fr)
}

.full {
  width:100%;
  margin:8px 0
}

.datebar {
  display:grid;
  grid-template-columns:48px 1fr 48px;
  gap:8px;
  margin:14px 0
}

.mini {
  padding:8px;
  font-size:24px
}

.visitcard,.action {
  background:#151d31;
  border:1px solid #27334d;
  border-left:6px solid #22c55e;
  border-radius:15px;
  padding:14px;
  margin:10px 0;
  cursor:pointer
}

.visitcard.quebra,.action.quebra {
  border-left-color:#ef4444
}

.visitcard.retorno,.action.retorno {
  border-left-color:#eab308
}

.action.sale {
  border-left-color:#38bdf8
}

.action.point {
  border-left-color:#a78bfa
}

.status {
  font-size:12px;
  font-weight:800;
  padding:5px 9px;
  border-radius:99px
}

.status.executado {
  background:#123c2a;
  color:#86efac
}

.status.quebra {
  background:#491b24;
  color:#fca5a5
}

.status.retorno {
  background:#473a12;
  color:#fde047
}

.green {
  color:#22c55e
}

.red {
  color:#ef4444
}

.yellow {
  color:#eab308
}

.period {
  margin:14px 0
}

.period .on {
  background:#f8fafc;
  color:#111827
}

.chart {
  margin-top:16px;
  color:#c4b5fd
}

.chart svg {
  width:100%;
  height:170px;
  background:linear-gradient(180deg,#19233a,#111827);
  border-radius:12px
}

.chartlabels {
  display:flex;
  justify-content:space-between;
  color:#94a3b8;
  font-size:11px
}

.charttotal {
  text-align:right;
  color:#cbd5e1;
  font-size:12px;
  margin-top:5px
}

.bars {
  margin-top:14px
}

.barrow {
  margin:12px 0
}

.track {
  height:10px;
  background:#26324c;
  border-radius:99px;
  overflow:hidden;
  margin-top:6px
}

.track i {
  display:block;
  height:100%;
  background:#8b5cf6;
  border-radius:99px;
  min-width:2px
}

.track i.executado {
  background:#22c55e
}

.track i.quebra {
  background:#ef4444
}

.track i.retorno {
  background:#eab308
}

.detail {
  font-size:16px
}

.connection {
  position:sticky;
  top:0;
  z-index:8;
  text-align:center;
  padding:6px;
  font-size:11px;
  background:#27334d;
  color:#cbd5e1
}

.connection.online {
  background:#123c2a;
  color:#86efac
}

.connection.offline {
  background:#491b24;
  color:#fca5a5
}

.visithead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer
}

.chev {
  font-size:24px;
  color:#94a3b8
}

.expand {
  border-top:1px solid #2a3650;
  margin-top:12px;
  padding-top:10px;
  animation:expand .18s ease
}

@keyframes expand {
  from {
    opacity:0;
    transform:translateY(-5px)
  }

  to {
    opacity:1;
    transform:none
  }

}

.gallery {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin:10px 0
}

.thumb {
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:10px;
  background:#0f172a;
  cursor:pointer
}

.lightbox {
  position:fixed;
  inset:0;
  background:#050812f2;
  z-index:99;
  display:grid;
  place-items:center;
  padding:20px
}

.lightbox>img {
  max-width:96vw;
  max-height:78vh;
  border-radius:12px
}

.lightbox .close {
  position:absolute;
  right:18px;
  top:18px;
  border:0;
  background:#202b45;
  color:#fff;
  border-radius:99px;
  width:44px;
  height:44px;
  font-size:26px
}

.lightnav {
  position:absolute;
  bottom:24px;
  display:flex;
  align-items:center;
  gap:20px
}

.filters {
  overflow:auto
}

.filters .btn {
  min-width:58px
}

.progress {
  height:12px;
  background:#26324c;
  border-radius:99px;
  overflow:hidden;
  margin:12px 0
}

.progress i {
  display:block;
  height:100%;
  background:#22c55e;
  border-radius:99px
}

.calendar {
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:5px;
  margin:16px 0;
  text-align:center
}

.calendar>div {
  font-size:11px;
  color:#94a3b8
}

.calday {
  min-height:58px;
  border:1px solid #27334d;
  background:#111827;
  color:#cbd5e1;
  border-radius:10px;
  padding:5px
}

.calday.active {
  background:#202b45;
  color:#fff;
  border-color:#64748b
}

.calday b,.calday small {
  display:block
}

.calday small {
  font-size:9px;
  margin-top:5px
}

.toast {
  display:flex;
  align-items:center;
  gap:12px
}

.toast button {
  border:0;
  background:none;
  font-weight:900;
  color:#6d28d9
}

.detail .grid {
  margin-top:14px
}

.choice-row {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:8px
}

.choice-row.three {
  grid-template-columns:repeat(3,1fr)
}

.choice-row .btn.on {
  outline:2px solid currentColor;
  font-weight:800
}

.dynamic-form {
  margin-top:12px
}

.timeline-card {
  cursor:pointer
}

.timeline-card .expand {
  margin-top:10px
}

.month-label {
  text-transform:uppercase;
  letter-spacing:.08em
}

.loading-lite {
  opacity:.7
}

.connection {
  display:none
}

.connection.offline {
  display:block;
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:120;
  background:#7f1d1d;
  color:#fecaca;
  padding:9px;
  text-align:center;
  font-size:12px
}

.wrap.offlinepad {
  padding-top:48px
}

.alert {
  border-left:4px solid #eab308
}

.alert.good {
  border-left-color:#22c55e
}

.team-banner {
  background:#312e81;
  border:1px solid #6366f1;
  border-radius:12px;
  padding:10px 12px;
  margin:8px 0;
  font-size:13px
}

.teamlist button {
  text-align:left
}

.edit-dynamic .field {
  margin:10px 0
}

.swipehint {
  font-size:11px;
  color:#64748b;
  text-align:center
}

.adminbox {
  border-top:1px solid #33415f;
  margin-top:10px;
  padding-top:10px
}

.otp {
  font-size:2rem!important;
  letter-spacing:1rem;
  text-align:center;
  font-weight:800;
  padding-left:1rem!important
}

.center {
  text-align:center
}

.login .card {
  margin-top:18px
}

.login button+button {
  margin-top:10px
}

.login-error {
  margin:10px 0;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(220,38,38,.12);
  font-weight:700;
  text-align:center
}

.login-error.hidden {
  display:none
}

/* V25 — Nova visita em fluxo guiado */
.wizard-progress {
  margin:16px 0 18px
}

.wizard-track {
  height:5px;
  background:#26324c;
  border-radius:99px;
  overflow:hidden
}

.wizard-track i {
  display:block;
  height:100%;
  background:#f8fafc;
  border-radius:99px;
  transition:width .2s ease
}

.wizard-steps {
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:2px;
  margin-top:8px
}

.wizard-steps span {
  text-align:center;
  color:#64748b;
  font-size:11px;
  font-weight:800
}

.wizard-steps span small {
  display:block;
  font-size:8px;
  font-weight:600;
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis
}

.wizard-steps span.active,.wizard-steps span.done {
  color:#f8fafc
}

.wizard-card {
  padding:18px
}

.wizard-question {
  font-size:19px;
  font-weight:800;
  margin-bottom:14px
}

.wizard-choice {
  display:grid;
  grid-template-columns:1fr;
  gap:10px
}

.wizard-choice .btn {
  width:100%;
  text-align:left;
  padding:16px
}

.wizard-choice .btn.on {
  outline:2px solid #f8fafc;
  background:#26324c
}

.wizard-choice.status-picks {
  grid-template-columns:1fr
}

.wizard-choice.services {
  grid-template-columns:1fr
}

.wizard-summaryline {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#0f172a;
  border-radius:12px;
  padding:12px;
  margin-bottom:14px
}

.locked-value {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#0f172a;
  border:1px solid #33415f;
  border-radius:12px;
  padding:13px;
  margin:12px 0;
  color:#aab5ca
}

.locked-value b {
  color:#fff;
  font-size:18px
}

.review-card>div {
  display:grid;
  grid-template-columns:42% 58%;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #27334d
}

.review-card>div:last-child {
  border-bottom:0
}

.review-card span {
  color:#94a3b8
}

.review-card b {
  text-align:right;
  word-break:break-word
}

/* V25 — Nova visita em fluxo guiado */
.wizard-progress {
  margin:16px 0 18px
}

.wizard-track {
  height:5px;
  background:#26324c;
  border-radius:99px;
  overflow:hidden
}

.wizard-track i {
  display:block;
  height:100%;
  background:#f8fafc;
  border-radius:99px;
  transition:width .2s ease
}

.wizard-steps {
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:2px;
  margin-top:8px
}

.wizard-steps span {
  text-align:center;
  color:#64748b;
  font-size:11px;
  font-weight:800
}

.wizard-steps span small {
  display:block;
  font-size:8px;
  font-weight:600;
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis
}

.wizard-steps span.active,.wizard-steps span.done {
  color:#f8fafc
}

.wizard-card {
  padding:18px
}

.wizard-question {
  font-size:19px;
  font-weight:800;
  margin-bottom:14px
}

.wizard-choice {
  display:grid;
  grid-template-columns:1fr;
  gap:10px
}

.wizard-choice .btn {
  width:100%;
  text-align:left;
  padding:16px
}

.wizard-choice .btn.on {
  outline:2px solid #f8fafc;
  background:#26324c
}

.wizard-summaryline {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#0f172a;
  border-radius:12px;
  padding:12px;
  margin-bottom:14px
}

.locked-value {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#0f172a;
  border:1px solid #33415f;
  border-radius:12px;
  padding:13px;
  margin:12px 0;
  color:#aab5ca
}

.locked-value b {
  color:#fff;
  font-size:18px
}

.review-card>div {
  display:grid;
  grid-template-columns:42% 58%;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #27334d
}

.review-card>div:last-child {
  border-bottom:0
}

.review-card span {
  color:#94a3b8
}

.review-card b {
  text-align:right;
  word-break:break-word
}

/* V26 */
.primary:disabled,.btn:disabled {
  opacity:.55;
  cursor:not-allowed
}

.off-calendar .dayoff {
  background:#7f1d1d;
  border-color:#ef4444;
  color:#fecaca
}

.off-calendar .dayoff small {
  color:#fecaca
}

.off-calendar .offday:not(.dayoff) {
  background:#111827
}

.off-calendar {
  margin-bottom:8px
}

/* V27 */
#uploadProgress {
  margin-top:6px
}

.card label input[type=checkbox] {
  width:auto;
  margin-right:8px
}


/* V27.9 — seletor de horário em roletas verticais */
.tec-time-input{cursor:pointer;background:#0f172a}
.tec-time-backdrop{position:fixed;inset:0;z-index:9999;background:rgba(2,6,23,.78);display:flex;align-items:center;justify-content:center;padding:18px;box-sizing:border-box}
.tec-time-dialog{width:min(360px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:#111827;border:1px solid #334155;border-radius:20px;padding:18px;box-sizing:border-box;box-shadow:0 24px 70px rgba(0,0,0,.45)}
.tec-time-title{text-align:center;font-weight:700;font-size:17px;margin-bottom:12px}
.tec-time-wheels{height:240px;display:grid;grid-template-columns:1fr 30px 1fr;position:relative;overflow:hidden;margin:4px 0 8px}
.tec-wheel-wrap{min-width:0;position:relative;z-index:2}
.tec-wheel-label{text-align:center;color:#94a3b8;font-size:12px;height:24px;line-height:24px}
.tec-wheel{height:216px;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-width:none;padding:84px 0;box-sizing:border-box;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 28%,#000 72%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 28%,#000 72%,transparent 100%)}
.tec-wheel::-webkit-scrollbar{display:none}
.tec-wheel-item{display:block;width:100%;height:48px;min-height:48px;padding:0;margin:0;border:0;background:transparent;color:#64748b;font:600 22px/48px system-ui,-apple-system,sans-serif;text-align:center;scroll-snap-align:center;transition:font-size .12s,color .12s,opacity .12s;opacity:.65}
.tec-wheel-item.selected{color:#f8fafc;font-size:30px;font-weight:800;opacity:1}
.tec-time-colon{height:216px;margin-top:24px;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:800;z-index:3;pointer-events:none}
.tec-wheel-focus{position:absolute;left:0;right:0;top:108px;height:48px;border-top:1px solid #334155;border-bottom:1px solid #334155;background:rgba(15,23,42,.42);border-radius:10px;pointer-events:none;z-index:1}
.tec-time-selected{display:flex;align-items:center;justify-content:center;gap:5px;color:#94a3b8;font-size:14px;margin-top:2px}
.tec-time-selected span,.tec-time-selected b{color:#cbd5e1}
.tec-time-actions{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:18px}
.tec-time-actions .btn,.tec-time-actions .primary{width:auto;min-width:118px;margin:0;flex:0 1 140px}
@media(max-width:360px){.tec-time-dialog{padding:14px}.tec-time-actions{gap:8px}.tec-time-actions .btn,.tec-time-actions .primary{min-width:0;flex:1}}

/* V29 — Supervisão, conciliação e administração */
.subnav{display:flex;gap:8px;overflow-x:auto;margin:0 0 14px;padding-bottom:2px;scrollbar-width:none}
.subnav::-webkit-scrollbar{display:none}
.subnav .btn{white-space:nowrap;flex:0 0 auto}
.follow-dot{border:1px solid currentColor;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:800;background:transparent;white-space:nowrap}
.following{color:#4ade80;background:rgba(34,197,94,.08)}
.not-following{color:#f87171;background:rgba(239,68,68,.08)}
.tech-card{display:block;width:100%}
.tech-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}
.tech-metrics span{display:flex;flex-direction:column;gap:3px;min-width:0;background:#0f172a;border:1px solid #26324c;border-radius:11px;padding:9px}
.tech-metrics small{color:#94a3b8;font-size:10px;line-height:1.2}
.tech-metrics b{font-size:15px;overflow:hidden;text-overflow:ellipsis}
.mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sheet-sample{margin:12px 0 16px}
.table-scroll{overflow:auto;margin-top:8px;border:1px solid #26324c;border-radius:10px;max-height:300px}
.table-scroll table{border-collapse:collapse;min-width:100%;font-size:12px}
.table-scroll th,.table-scroll td{padding:8px 10px;border-bottom:1px solid #26324c;text-align:left;white-space:nowrap}
.table-scroll th{position:sticky;top:0;background:#111827;z-index:1}
.import-card,.user-row{display:block;width:100%;text-align:left;color:inherit}
.import-card small{display:block;margin-top:8px;color:#94a3b8}
.reconcile-row{border-left:3px solid #64748b}
.reconcile-row.confirmado{border-left-color:#22c55e}
.reconcile-row.divergente{border-left-color:#f59e0b}
.reconcile-row.somente_planilha{border-left-color:#38bdf8}
.reconcile-row.somente_manual{border-left-color:#a78bfa}
.reconcile-row.invalido{border-left-color:#ef4444}
.warntext{color:#fbbf24}
.small-title{font-size:16px;margin:18px 0 8px}
.compact{width:auto;padding-left:12px;padding-right:12px}
.baixa-review-warning{background:rgba(245,158,11,.08);border:1px solid rgba(245,158,11,.45);border-radius:10px;padding-left:10px!important;padding-right:10px!important}
.baixa-review-warning span,.baixa-review-warning b{color:#fbbf24!important}
.supervisor-stats,.reconcile-stats{align-items:stretch}

@media (max-width:560px){
  .tech-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mapping-grid{grid-template-columns:1fr}
  .follow-dot{font-size:10px;padding:6px 8px}
}
/* TecModo técnico: checklist offline sem interferir nas demais telas. */
.tec-check-list{display:grid;gap:10px;margin:10px 0}
.tec-check{display:flex;align-items:flex-start;gap:12px;padding:11px 12px;background:rgba(255,255,255,.045);border:1px solid rgba(160,180,210,.18);border-radius:12px;line-height:1.4;cursor:pointer}
.tec-check input{flex:0 0 auto;width:20px;height:20px;margin:1px 0;accent-color:#2bbfae}
.tec-check span{flex:1;min-width:0;overflow-wrap:normal;word-break:normal}
#tecOfflineStatus{margin:12px 0 18px;text-align:center;font-size:.86rem}
