/* Reptot · sistema visual
   Paleta del logotipo: el verde es la marca y lo que salió bien, el naranja es lo único
   que pide atención, la pizarra sostiene sin llamar la atención. */

:root {
  --verde:        #1C9455;
  --verde-osc:    #157443;
  --verde-suave:  #E7F4ED;
  --naranja:      #EF7F1F;
  --naranja-osc:  #C9660F;
  --naranja-suave:#FDF0E2;
  --pizarra:      #2D4A5E;
  --pizarra-osc:  #1E3444;
  --pizarra-med:  #5A7385;
  --acero:        #3E7FA5;
  --acero-suave:  #E8F1F7;
  --ladrillo:     #BF4436;
  --ladrillo-suave:#FBEBE9;

  --papel:   #F4F6F8;
  --blanco:  #FFFFFF;
  --linea:   #DDE5EA;
  --linea-f: #EDF1F4;
  --texto:   #22333F;
  --tenue:   #6E8494;
  --gris:    #8FA3B0;

  --r:   10px;
  --r-g: 14px;
  --sombra:    0 1px 2px rgba(30,52,68,.06), 0 2px 8px rgba(30,52,68,.05);
  --sombra-md: 0 2px 4px rgba(30,52,68,.08), 0 8px 24px rgba(30,52,68,.10);
  --sombra-alta: 0 12px 40px rgba(30,52,68,.22);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ───────────── Armazón de la aplicación ───────────── */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.barra {
  background: var(--pizarra);
  color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  height: 56px;
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 1px 0 rgba(0,0,0,.10);
}
.barra .titulo { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.barra .sub { font-size: 12px; color: #A9C0CF; margin-top: -2px; }
.barra .crece { flex: 1; }
.barra button, .barra a.icono {
  background: transparent; border: 0; color: #fff; padding: 8px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px;
}
.barra button:hover, .barra a.icono:hover { background: rgba(255,255,255,.12); }
.barra .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--verde); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

.volver {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; color: #fff;
  padding: 8px 10px 8px 4px; border-radius: 8px; font-size: 14px;
}

.lienzo { flex: 1; padding: 16px 14px 96px; max-width: 720px; margin: 0 auto; width: 100%; }
.lienzo.ancho { max-width: 1180px; }

/* ───────────── Pestañas de abajo ───────────── */

.pestanas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--linea);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.pestanas a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 10px; color: var(--tenue); font-size: 11px; font-weight: 600;
}
.pestanas a svg { width: 22px; height: 22px; }
.pestanas a.activa { color: var(--verde); }
.pestanas .globo {
  position: absolute; transform: translate(14px,-4px);
  background: var(--naranja); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid #fff;
}

/* ───────────── Menú lateral (operador) ───────────── */

.con-lateral { display: flex; flex: 1; min-height: 0; }
.lateral {
  width: 244px; flex: none; background: var(--pizarra-osc); color: #C6D6E0;
  padding: 10px 0 24px; overflow-y: auto;
}
.lateral .grupo {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: #7A93A6; padding: 18px 18px 7px; font-weight: 700;
}
.lateral a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; font-size: 14px; color: #C6D6E0;
  border-left: 3px solid transparent;
}
.lateral a:hover { background: rgba(255,255,255,.06); color: #fff; }
.lateral a.activa { background: rgba(28,148,85,.16); color: #fff; border-left-color: var(--verde); font-weight: 600; }
.lateral a svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.lateral .nivel {
  margin: 12px 18px 4px; padding: 10px 12px; border-radius: var(--r);
  background: rgba(255,255,255,.06); font-size: 12px; color: #A9C0CF;
}
.lateral .nivel b { color: #fff; display: block; font-size: 13px; }

@media (max-width: 860px) {
  .lateral {
    position: fixed; inset: 56px auto 0 0; z-index: 60; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: var(--sombra-alta);
  }
  .lateral.abierto { transform: none; }
  .velo { position: fixed; inset: 56px 0 0; background: rgba(20,36,48,.45); z-index: 55; }
}
@media (min-width: 861px) { .abrir-menu { display: none !important; } .velo { display: none; } }

/* ───────────── Bloques ───────────── */

.tarjeta {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--r-g); box-shadow: var(--sombra);
  overflow: hidden; margin-bottom: 14px;
}
.tarjeta > .cabecera {
  padding: 13px 16px; border-bottom: 1px solid var(--linea-f);
  display: flex; align-items: center; gap: 10px;
}
.tarjeta > .cabecera h2 { margin: 0; font-size: 14.5px; font-weight: 680; letter-spacing: -.01em; }
.tarjeta > .cabecera .crece { flex: 1; }
.tarjeta > .cuerpo { padding: 16px; }
.tarjeta > .cuerpo.junto { padding: 0; }
.tarjeta > .pie {
  padding: 12px 16px; background: #FAFBFC; border-top: 1px solid var(--linea-f);
  font-size: 13px; color: var(--tenue);
}

.titulo-seccion {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--tenue); margin: 22px 2px 9px;
}
.titulo-seccion:first-child { margin-top: 4px; }

h1.pantalla { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 3px; }
p.entrada { color: var(--tenue); margin: 0 0 18px; font-size: 14px; }

/* ───────────── Listas ───────────── */

.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { border-bottom: 1px solid var(--linea-f); }
.lista > li:last-child { border-bottom: 0; }
.fila {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; background: transparent; border: 0; text-align: left;
}
button.fila:hover, a.fila:hover { background: #FAFBFC; }
.fila .principal { flex: 1; min-width: 0; }
.fila .principal .t { font-weight: 620; font-size: 14.5px; }
.fila .principal .s { color: var(--tenue); font-size: 13px; margin-top: 1px; }
.fila .derecha { text-align: right; flex: none; }
.fila .derecha .t { font-weight: 650; font-variant-numeric: tabular-nums; }
.fila .derecha .s { color: var(--tenue); font-size: 12px; }
.fila .flecha { color: var(--gris); flex: none; }

.avatar-lista {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--acero-suave); color: var(--acero);
}
.avatar-lista.v { background: var(--verde-suave); color: var(--verde-osc); }
.avatar-lista.n { background: var(--naranja-suave); color: var(--naranja-osc); }

/* ───────────── Estados del pedido ───────────── */

.estado {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  padding: 3px 9px 3px 7px; border-radius: 20px; white-space: nowrap;
}
.estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.estado.sin-asignar  { background: var(--naranja-suave); color: var(--naranja-osc); }
.estado.aceptado     { background: var(--acero-suave);   color: var(--acero); }
.estado.en-restaurante { background: var(--acero-suave); color: var(--acero); }
.estado.en-camino    { background: var(--acero-suave);   color: var(--acero); }
.estado.entregado    { background: var(--verde-suave);   color: var(--verde-osc); }
.estado.fallido      { background: var(--ladrillo-suave);color: var(--ladrillo); }
.estado.devuelto     { background: var(--ladrillo-suave);color: var(--ladrillo); }
.estado.cancelado    { background: #EFF2F4; color: var(--tenue); }

/* ───────────── Señal degradada ───────────── */

.estimado {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 650;
  color: var(--naranja-osc); background: var(--naranja-suave);
  padding: 2px 7px; border-radius: 5px;
}
.estimado svg { width: 12px; height: 12px; }

.nota-degrada {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--naranja-suave); border: 1px solid #F6DCC0;
  border-radius: var(--r); padding: 11px 13px; font-size: 13px; color: #7A4B14;
  margin-bottom: 14px;
}
.nota-degrada svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--naranja-osc); }
.nota-degrada b { color: #5E3A10; }

.aviso-rojo {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ladrillo-suave); border: 1px solid #F1CFCA;
  border-radius: var(--r); padding: 11px 13px; font-size: 13px; color: #7E2C21;
  margin-bottom: 14px;
}
.aviso-rojo svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--ladrillo); }

.nota-neutra {
  background: #EFF3F6; border: 1px solid var(--linea);
  border-radius: var(--r); padding: 11px 13px; font-size: 13px; color: var(--pizarra);
  margin-bottom: 14px;
}

/* ───────────── Formulario ───────────── */

.campo { margin-bottom: 14px; }
.campo > label {
  display: block; font-size: 12.5px; font-weight: 650; color: var(--pizarra);
  margin-bottom: 6px;
}
.campo .ayuda { font-size: 12px; color: var(--tenue); margin-top: 5px; }
input[type=text], input[type=tel], input[type=password], input[type=number],
input[type=search], input[type=date], select, textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--linea); border-radius: var(--r);
  background: var(--blanco); font-size: 15.5px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--acero); box-shadow: 0 0 0 3px rgba(62,127,165,.14);
}
input::placeholder { color: #A9BAC5; }
input.grande { font-size: 19px; padding: 13px 14px; font-variant-numeric: tabular-nums; }
textarea { resize: vertical; min-height: 76px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E8494' stroke-width='2.5' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 430px) { .dupla { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r); border: 1px solid transparent;
  font-size: 15px; font-weight: 650; background: var(--verde); color: #fff;
  transition: background .12s, transform .06s;
}
.btn:hover { background: var(--verde-osc); }
.btn:active { transform: translateY(1px); }
.btn.bloque { width: 100%; }
.btn.grande { padding: 15px 20px; font-size: 16.5px; }
.btn.claro { background: var(--blanco); color: var(--pizarra); border-color: var(--linea); }
.btn.claro:hover { background: #F7F9FA; }
.btn.pizarra { background: var(--pizarra); }
.btn.pizarra:hover { background: var(--pizarra-osc); }
.btn.naranja { background: var(--naranja); }
.btn.naranja:hover { background: var(--naranja-osc); }
.btn.peligro { background: var(--blanco); color: var(--ladrillo); border-color: #EBC7C2; }
.btn.peligro:hover { background: var(--ladrillo-suave); }
.btn.chico { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.acciones { display: flex; gap: 10px; }
.acciones .btn { flex: 1; }

/* ───────────── Cifras ───────────── */

.cifra { font-variant-numeric: tabular-nums; }
.cifra-grande { font-size: 30px; font-weight: 720; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.cifra-enorme { font-size: 46px; font-weight: 760; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.05; }

.rejilla-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cifra-caja {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-g);
  padding: 14px 15px; box-shadow: var(--sombra);
}
.cifra-caja .et { font-size: 12px; color: var(--tenue); font-weight: 600; }
.cifra-caja .va { font-size: 24px; font-weight: 720; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cifra-caja .pie { font-size: 11.5px; color: var(--tenue); margin-top: 3px; }
.cifra-caja.verde .va { color: var(--verde-osc); }
.cifra-caja.naranja .va { color: var(--naranja-osc); }
.cifra-caja.rojo .va { color: var(--ladrillo); }

.renglon-dinero {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--linea-f); font-size: 14.5px;
}
.renglon-dinero:last-child { border-bottom: 0; }
.renglon-dinero .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.renglon-dinero.total { border-top: 2px solid var(--pizarra); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 16px; }
.renglon-dinero.total .v { font-size: 20px; font-weight: 730; }

/* ───────────── Tabla ───────────── */

.tabla-envuelta { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
table.tabla th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--tenue); font-weight: 700; padding: 10px 14px;
  border-bottom: 1px solid var(--linea); background: #FAFBFC; white-space: nowrap;
}
table.tabla td { padding: 11px 14px; border-bottom: 1px solid var(--linea-f); vertical-align: middle; }
table.tabla tr:last-child td { border-bottom: 0; }
table.tabla td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.tabla tbody tr:hover { background: #FAFBFC; }

/* ───────────── Línea de tiempo ───────────── */

.linea-tiempo { list-style: none; margin: 0; padding: 4px 0 0 0; }
.linea-tiempo li { display: flex; gap: 13px; padding-bottom: 18px; position: relative; }
.linea-tiempo li:not(:last-child)::before {
  content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--linea);
}
.linea-tiempo .punto {
  width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px;
  background: var(--blanco); border: 3px solid var(--acero); position: relative; z-index: 1;
}
.linea-tiempo .punto.v { border-color: var(--verde); }
.linea-tiempo .punto.n { border-color: var(--naranja); }
.linea-tiempo .punto.r { border-color: var(--ladrillo); }
.linea-tiempo .punto.gris { border-color: var(--linea); }
.linea-tiempo .qq { flex: 1; min-width: 0; }
.linea-tiempo .qq .t { font-weight: 620; font-size: 14px; }
.linea-tiempo .qq .s { color: var(--tenue); font-size: 12.5px; margin-top: 1px; }
.linea-tiempo .hora { font-size: 12px; color: var(--tenue); font-variant-numeric: tabular-nums; flex: none; }

/* ───────────── Cosas sueltas ───────────── */

.etiquetas { display: flex; flex-wrap: wrap; gap: 7px; }
.etiqueta {
  font-size: 12px; font-weight: 620; padding: 4px 10px; border-radius: 20px;
  background: #EFF3F6; color: var(--pizarra); border: 1px solid var(--linea);
}
.etiqueta.v { background: var(--verde-suave); color: var(--verde-osc); border-color: #C4E4D3; }
.etiqueta.a { background: var(--acero-suave); color: var(--acero); border-color: #CBE0EC; }
.etiqueta.n { background: var(--naranja-suave); color: var(--naranja-osc); border-color: #F6DCC0; }
.etiqueta.r { background: var(--ladrillo-suave); color: var(--ladrillo); border-color: #F1CFCA; }

.filtros { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.filtros button {
  flex: none; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--linea);
  background: var(--blanco); font-size: 13.5px; font-weight: 600; color: var(--pizarra);
}
.filtros button.activo { background: var(--pizarra); color: #fff; border-color: var(--pizarra); }

.interruptor { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; pointer-events: none; }
.interruptor .via {
  width: 50px; height: 30px; border-radius: 15px; background: #C7D3DB;
  position: relative; transition: background .16s; flex: none;
}
.interruptor .via::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .16s;
}
.interruptor input:checked + .via { background: var(--verde); }
.interruptor input:checked + .via::after { transform: translateX(20px); }

.separa { height: 1px; background: var(--linea-f); margin: 14px 0; }
.tenue { color: var(--tenue); }
.chico { font-size: 12.5px; }
.centro { text-align: center; }
.mono { font-family: var(--mono); font-size: 13px; }
.nada { padding: 34px 16px; text-align: center; color: var(--tenue); font-size: 14px; }
.nada svg { width: 34px; height: 34px; color: #C3D0D8; margin-bottom: 8px; }

/* ───────────── Marco de teléfono (repartidor) ───────────── */

.escenario-tel {
  min-height: 100vh; background: #22333F;
  display: flex; align-items: center; justify-content: center; padding: 22px 14px;
}
.telefono {
  width: 100%; max-width: 392px; height: min(844px, calc(100vh - 44px));
  background: var(--papel); border-radius: 34px; overflow: hidden;
  box-shadow: var(--sombra-alta), 0 0 0 9px #16232D, 0 0 0 11px #33454F;
  display: flex; flex-direction: column; position: relative;
}
.telefono .estatus {
  height: 30px; background: var(--pizarra); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; font-size: 11.5px; font-weight: 600; flex: none;
}
.telefono .lienzo { padding: 14px 14px 82px; max-width: none; overflow-y: auto; flex: 1; }
.telefono .pestanas { position: absolute; }
@media (max-width: 460px) {
  .escenario-tel { padding: 0; }
  .telefono { max-width: none; height: 100vh; border-radius: 0; box-shadow: none; }
}

/* ───────────── Portada de acceso ───────────── */

.acceso {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 26px 18px;
  background: linear-gradient(170deg, #2D4A5E 0%, #1E3444 62%, #16262F 100%);
}
.acceso .caja {
  width: 100%; max-width: 396px; background: var(--blanco);
  border-radius: 18px; box-shadow: var(--sombra-alta); padding: 28px 26px 24px;
}
.acceso .marca { text-align: center; margin-bottom: 22px; }
.acceso .marca .nombre {
  font-size: 27px; font-weight: 760; letter-spacing: -.035em; color: var(--pizarra);
}
.acceso .marca .nombre span { color: var(--verde); }
.acceso .marca .rol {
  font-size: 12.5px; color: var(--tenue); margin-top: 3px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
}
.acceso .pie-acceso { margin-top: 20px; text-align: center; font-size: 13px; color: #94AAB8; }
.acceso .pie-acceso a { color: #CFDDE6; font-weight: 600; border-bottom: 1px solid rgba(207,221,230,.4); }

.error-acceso {
  background: var(--ladrillo-suave); border: 1px solid #F1CFCA; color: #7E2C21;
  border-radius: var(--r); padding: 10px 12px; font-size: 13px; margin-bottom: 14px;
}

/* ───────────── Hoja emergente ───────────── */

.hoja-velo {
  position: fixed; inset: 0; background: rgba(20,36,48,.5); z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
}
.hoja {
  background: var(--blanco); width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0; padding: 8px 0 max(16px, env(safe-area-inset-bottom));
  max-height: 86vh; overflow-y: auto; box-shadow: var(--sombra-alta);
  animation: sube .2s ease;
}
@keyframes sube { from { transform: translateY(22px); opacity: .6; } }
.hoja .asa { width: 38px; height: 4px; border-radius: 2px; background: var(--linea); margin: 6px auto 12px; }
.hoja .cabecera { padding: 0 18px 12px; border-bottom: 1px solid var(--linea-f); }
.hoja .cabecera h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.hoja .cabecera p { margin: 3px 0 0; font-size: 13.5px; color: var(--tenue); }
.hoja .cuerpo { padding: 14px 18px; }
@media (min-width: 560px) {
  .hoja-velo { align-items: center; }
  .hoja { border-radius: 18px; }
}

/* ───────────── Aviso flotante ───────────── */

.brindis {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: var(--pizarra-osc); color: #fff; padding: 11px 18px;
  border-radius: 24px; font-size: 14px; font-weight: 600; z-index: 90;
  box-shadow: var(--sombra-alta); animation: sube .18s ease;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
}
.brindis svg { width: 17px; height: 17px; color: #6BD79C; flex: none; }

[hidden] { display: none !important; }

/* ───────────── Conmutador de vistas ───────────── */

.conmutador {
  position: sticky; top: 0; z-index: 80;
  background: #16262F; color: #fff;
  display: flex; align-items: center; gap: 14px;
  padding: 0 12px; height: 42px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.conmutador .marca {
  font-size: 15px; font-weight: 760; letter-spacing: -.03em; color: #fff;
  display: flex; align-items: center; gap: 7px; flex: none;
}
.conmutador .marca .punto {
  width: 8px; height: 8px; border-radius: 50%; background: var(--verde);
}
.conmutador nav {
  display: flex; gap: 3px; overflow-x: auto; flex: 1;
  scrollbar-width: none; -ms-overflow-style: none;
}
.conmutador nav::-webkit-scrollbar { display: none; }
.conmutador nav a {
  flex: none; padding: 5px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 620; color: #93AAB8; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.conmutador nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.conmutador nav a.activa { background: rgba(255,255,255,.14); color: #fff; }
.conmutador nav a .cir {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7;
}
.conmutador nav a.activa .cir { opacity: 1; }
.conmutador nav a[data-v="reptot"].activa .cir     { background: var(--naranja); }
.conmutador nav a[data-v="central"].activa .cir    { background: var(--verde); }
.conmutador nav a[data-v="restaurante"].activa .cir{ background: var(--acero); }
.conmutador nav a[data-v="repartidor"].activa .cir { background: #E8C33C; }
.conmutador .fin { flex: none; font-size: 11.5px; color: #6D8494; padding-right: 4px; }
@media (max-width: 620px) { .conmutador .fin { display: none; } }

/* con el conmutador arriba, la barra de la app pega debajo */
.conmutador ~ .app .barra,
.conmutador ~ * .barra { top: 42px; }
.conmutador ~ .con-lateral .lateral,
.conmutador ~ .app .lateral { top: 98px; }
@media (max-width: 860px) { .conmutador ~ .app .lateral { inset: 98px auto 0 0; } .conmutador ~ .app .velo { top: 98px; } }
.conmutador ~ .escenario-tel { min-height: calc(100vh - 42px); }
.conmutador ~ .escenario-tel .telefono { height: min(844px, calc(100vh - 86px)); }
.conmutador ~ .acceso { min-height: calc(100vh - 42px); }

/* ───────────── Portada ───────────── */

.portada {
  min-height: calc(100vh - 42px); padding: 44px 20px 60px;
  background: linear-gradient(170deg, #2D4A5E 0%, #1E3444 60%, #16262F 100%);
  color: #fff;
}
.portada .centro-portada { max-width: 940px; margin: 0 auto; }
.portada h1 { font-size: 34px; font-weight: 780; letter-spacing: -.035em; margin: 0 0 8px; }
.portada h1 span { color: #4FCB86; }
.portada p.lead { font-size: 16px; color: #A9C0CF; margin: 0 0 34px; max-width: 560px; line-height: 1.55; }
.portada .rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 15px; }
.portada .puerta {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px; padding: 20px; display: block; transition: background .14s, transform .14s;
}
.portada .puerta:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }
.portada .puerta .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 13px;
}
.portada .puerta .ico svg { width: 21px; height: 21px; color: #fff; }
.portada .puerta h2 { font-size: 17px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.015em; }
.portada .puerta p { font-size: 13.5px; color: #9DB4C3; margin: 0; line-height: 1.5; }
.portada .puerta .quien { font-size: 11.5px; color: #6D8494; margin-top: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; }

/* ───────────── Barras de reporte ───────────── */

.barras { display: flex; flex-direction: column; gap: 11px; }
.barra-dato .et { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.barra-dato .et .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.barra-dato .via { height: 9px; border-radius: 5px; background: #EDF1F4; overflow: hidden; }
.barra-dato .via i { display: block; height: 100%; border-radius: 5px; background: var(--acero); }
.barra-dato.v .via i { background: var(--verde); }
.barra-dato.n .via i { background: var(--naranja); }
.barra-dato.r .via i { background: var(--ladrillo); }

.columnas { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 8px; }
.columnas .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.columnas .col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--acero); min-height: 3px; }
.columnas .col.hoy i { background: var(--verde); }
.columnas .col small { font-size: 10.5px; color: var(--tenue); font-weight: 600; }
.leyenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; font-size: 12.5px; color: var(--tenue); }
.leyenda span { display: flex; align-items: center; gap: 6px; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; display: block; }

.rosquilla { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rosquilla .grafico { width: 128px; height: 128px; border-radius: 50%; flex: none; position: relative; }
.rosquilla .grafico::after {
  content: ""; position: absolute; inset: 26px; border-radius: 50%; background: var(--blanco);
}
.rosquilla .centro-txt {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; text-align: center;
}
.rosquilla .centro-txt b { font-size: 21px; font-weight: 730; display: block; letter-spacing: -.02em; }
.rosquilla .centro-txt small { font-size: 11px; color: var(--tenue); }

@media (min-width: 861px) {
  .lateral { position: sticky; top: 98px; height: calc(100vh - 98px); }
}

/* ═════════════ En pantalla grande, la navegación se va al costado ═════════════
   Es la misma marcación: en el celular son pestañas abajo, donde llega el pulgar;
   en el escritorio son un riel a la izquierda, que es donde se busca un menú. */

@media (min-width: 900px) {
  .app.con-pestanas {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .app.con-pestanas > .barra { grid-column: 1 / -1; }

  .app.con-pestanas > .pestanas {
    grid-column: 1; grid-row: 2;
    position: sticky; top: 98px; align-self: start;
    max-height: calc(100vh - 98px); overflow-y: auto;
    left: auto; right: auto; bottom: auto;
    flex-direction: column; gap: 2px;
    background: var(--blanco);
    border-top: 0; border-right: 1px solid var(--linea);
    backdrop-filter: none;
    padding: 14px 12px 24px;
    min-height: calc(100vh - 98px);
  }
  .app.con-pestanas > .pestanas a {
    flex: none; flex-direction: row; align-items: center; gap: 11px;
    padding: 10px 13px; border-radius: 9px;
    font-size: 14.5px; font-weight: 600; color: var(--pizarra);
    position: relative;
  }
  .app.con-pestanas > .pestanas a:hover { background: #F2F6F8; }
  .app.con-pestanas > .pestanas a.activa { background: var(--verde-suave); color: var(--verde-osc); font-weight: 680; }
  .app.con-pestanas > .pestanas a svg { width: 19px; height: 19px; flex: none; }
  .app.con-pestanas > .pestanas .globo {
    position: static; transform: none; margin-left: auto; order: 1;
    border: 0; height: 19px; min-width: 19px; border-radius: 10px; font-size: 11px;
  }

  .app.con-pestanas > .lienzo {
    grid-column: 2; grid-row: 2;
    padding: 22px 26px 48px;
    max-width: 880px; margin: 0;
  }
  .app.con-pestanas > .lienzo.ancho { max-width: 1180px; }
}

/* En pantalla muy ancha el contenido se centra en su columna en vez de pegarse */
@media (min-width: 1340px) {
  .app.con-pestanas > .lienzo { margin: 0 auto; }
}

/* En pantalla grande, una barra de 130 px de ancho ya no lee como barra */
.columnas .col i { max-width: 62px; }
@media (max-width: 560px) { .columnas .col i { max-width: none; } }
