:root {
  --bg: #f6f5f2; --card: #ffffff; --ink: #1c1b19; --muted: #6f6b64; --line: #e4e1db;
  --accent: #1f5f4a; --accent-soft: #e3efe9; --warn: #9a5b00; --warn-soft: #fbf0dc;
  --bad: #a3322b; --bad-soft: #f8e4e2; --chip: #efede8; --shadow: 0 1px 2px rgba(0,0,0,.05);
}
/* tema: "auto" sigue al sistema; "claro" / "oscuro" (preferencia del usuario) lo fuerzan */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="claro"]) { color-scheme: dark;
    --bg: #151514; --card: #1e1e1c; --ink: #ecebe7; --muted: #a29e96; --line: #33322f;
    --accent: #6cc3a0; --accent-soft: #1f3a30; --warn: #e3ad55; --warn-soft: #3a2d17;
    --bad: #ee8b83; --bad-soft: #3d2220; --chip: #2a2a27; --shadow: none; }
}
:root[data-theme="oscuro"] { color-scheme: dark;
  --bg: #151514; --card: #1e1e1c; --ink: #ecebe7; --muted: #a29e96; --line: #33322f;
  --accent: #6cc3a0; --accent-soft: #1f3a30; --warn: #e3ad55; --warn-soft: #3a2d17;
  --bad: #ee8b83; --bad-soft: #3d2220; --chip: #2a2a27; --shadow: none; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
header { position: sticky; top: 0; z-index: 4000; background: var(--bg); border-bottom: 1px solid var(--line); isolation: isolate; }
.barra { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; }
.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px;
            border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 9px 8px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 1px; }
.marca { font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.marca span { color: var(--muted); font-weight: 400; }
nav.menu { display: none; }
nav.menu:not([hidden]) { display: flex; flex-direction: column; gap: 2px; position: absolute; top: calc(100% + 4px); left: 12px;
                         min-width: 220px; max-width: min(360px, calc(100vw - 24px)); background: var(--card);
                         border: 1px solid var(--line); border-radius: 12px; padding: 8px; z-index: 5;
                         box-shadow: 0 10px 28px rgba(0,0,0,.14); }
body.menu-abierto::before { content: ""; position: fixed; inset: 0; background: rgba(20,20,18,.28); z-index: 3990; }
nav.menu a { text-decoration: none; color: var(--muted); padding: 10px 12px; border-radius: 8px; }
nav.menu a.activo { color: var(--ink); background: var(--chip); font-weight: 600; }
select, input, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
                          border-radius: 8px; padding: 6px 8px; }
input[type=checkbox] { width: auto; padding: 0; }
main { max-width: 1240px; margin: 0 auto; padding: 16px 16px 60px; }
h2 { font-size: 18px; margin: 4px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ayuda { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.sub { color: var(--muted); font-size: 12.5px; }
.fila-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.espacio { flex: 1; }

/* pestañas */
.tabs { display: flex; gap: 4px; margin: 0 0 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; color: var(--muted); font: inherit; padding: 9px 12px; cursor: pointer;
       border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tab.activo { color: var(--ink); border-color: var(--ink); font-weight: 600; }
/* pestañas + filtros: los combos tienen ancho fijo para no correrse al elegir */
.fila-tabs { align-items: flex-start; }
.fila-tabs .tabs { flex: 1 1 auto; min-width: 0; }
.fila-tabs .filtros { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; margin-left: auto;
                      flex-wrap: nowrap; max-width: 100%; }
.fila-tabs .filtros #portal { width: 168px; flex: none; }
@media (min-width: 901px) { .fila-tabs .tabs { min-width: max-content; } }
@media (max-width: 900px) {
  .fila-tabs .filtros { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; }
  .fila-tabs .filtros #portal, .fila-tabs .filtros .combo-check { flex: 1 1 160px; width: auto; min-width: 0; }
  .fila-tabs .filtros .switch { flex: 1 1 100%; }
}
@media (max-width: 700px) {
  /* en el celular las pestañas pasan a "chips" en varias filas: todas a la vista, sin deslizar */
  .tabs { flex-wrap: wrap; overflow: visible; border-bottom: 0; gap: 6px; }
  .tab { padding: 6px 11px; border: 1px solid var(--line); border-radius: 18px; font-size: 14px; }
  .tab.activo { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .tab.activo .n { background: rgba(127,127,127,.35); color: inherit; }
}
.tab .n { font-size: 12px; background: var(--chip); border-radius: 10px; padding: 1px 7px; margin-left: 4px; }

/* tarjetas de avisos */
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
        box-shadow: var(--shadow); display: flex; flex-direction: column; }
.foto { height: 170px; background: var(--chip) center/cover no-repeat; position: relative; display: block; }
.foto-link { position: absolute; inset: 0; }
.mini-flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
               border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 22px; line-height: 30px; cursor: pointer;
               opacity: 0; transition: opacity .15s; padding: 0; }
.mini-flecha.izq { left: 8px; } .mini-flecha.der { right: 8px; }
.mini-flecha:hover { background: rgba(0,0,0,.8); }
.card:hover .mini-flecha, .mini-flecha:focus-visible { opacity: 1; }
@media (hover: none) { .mini-flecha { opacity: .85; } }
.mini-cont { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
             padding: 1px 7px; border-radius: 10px; pointer-events: none; }
.foto .portal { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.65); color: #fff;
                font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.foto .cucarda-new { position: absolute; left: 10px; top: 36px; background: #e8ff00; color: #111;
                     font-size: 11px; font-weight: 500; letter-spacing: .01em;
                     padding: 2px 8px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.foto .estado { position: absolute; right: 10px; top: 10px; font-size: 12px; padding: 2px 8px; border-radius: 6px;
                background: var(--accent); color: #fff; }
/* switch Solo nuevos */
label.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
               font-size: 13px; color: var(--ink); white-space: nowrap; }
label.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
label.switch .switch-ui { width: 36px; height: 20px; border-radius: 999px; background: var(--line);
                          position: relative; flex: 0 0 auto; transition: background .15s; }
label.switch .switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
                                 border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.2);
                                 transition: transform .15s; }
label.switch input:checked + .switch-ui { background: #e8ff00; }
label.switch input:checked + .switch-ui::after { transform: translateX(16px); }
label.switch input:disabled + .switch-ui { opacity: .45; }
label.switch .n { color: var(--muted); font-weight: 600; }
.cuerpo { padding: 12px 14px 8px; flex: 1; }
.barrio { font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
          color: var(--accent); margin: 0 0 4px; }
.precio { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 2px; }
.usdm2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.precio-total { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.pct { font-size: 12px; color: var(--accent); font-weight: 600; margin: 0 0 2px; }
.pct.mal { color: var(--muted); }
.linea { margin: 3px 0; }
.dato { margin: 12px 0 0; font-size: 13.5px; }
.dir { margin: 8px 0 0; font-size: 13.5px; }
.titulo-aviso { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.expensas { margin: 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--chip); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.visita { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.nota { background: var(--chip); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; margin-top: 6px; }
.links { font-size: 12.5px; margin-top: 6px; }
.card-meta { display: flex; justify-content: flex-end; padding: 0 14px 2px; color: var(--muted); font-size: 12px; }
.acciones { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 14px; align-items: center; }
.acciones-extra, .par-pulgares { display: inline-flex; gap: 4px; }
.acciones-extra { margin-left: auto; gap: 6px; }

/* botones */
.b { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
     border-radius: 8px; padding: 6px 10px; cursor: pointer; text-decoration: none; display: inline-block; }
.b:hover { border-color: var(--muted); }
.b.si { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.b.no { color: var(--bad); }
.b.primario { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.b[disabled] { opacity: .5; cursor: default; }
.b.ico { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; line-height: 0; }
.b.ico svg { display: block; }
.derecha { margin-left: auto; }

/* formularios */
form.mini { width: 100%; display: grid; gap: 6px; margin-top: 4px; }
form.mini textarea, form.mini input, form.mini select { width: 100%; }
.campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.campo { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.campo input, .campo select, .campo textarea { color: var(--ink); font-size: 14px; width: 100%; }
.campo.ancho { grid-column: 1 / -1; }
.checks { display: flex; gap: 12px; flex-wrap: wrap; color: var(--ink); font-size: 14px; }
.checks label { display: flex; gap: 6px; align-items: center; }

/* paneles y tablas */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
         box-shadow: var(--shadow); margin-bottom: 14px; }
.dos-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .dos-col { grid-template-columns: minmax(0, 1fr); } }
.tabla-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px;
             border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-top { margin-bottom: 8px; }
.cal-mes-tit { font-family: Georgia, "Newsreader", serif; font-size: 22px; font-weight: 650; min-width: 9em; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-dia { min-height: 92px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 8px 6px;
           text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: inherit; font: inherit; }
.cal-hueco { min-height: 0; }
.cal-dia.hoy { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-dia.con { background: var(--accent-soft); }
.cal-dia.sel { outline: 2px solid var(--ink); }
.cal-num { font-weight: 800; font-size: 15px; }
.cal-n { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--accent); color: #102018; border-radius: 10px; padding: 0 6px; }
.cal-dia { position: relative; }
.cal-dia .cal-n { position: absolute; right: 6px; top: 8px; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.cal-chip { font-size: 11px; font-weight: 650; background: var(--card); border-radius: 6px; padding: 2px 6px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-panel { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.cal-panel h3 { text-transform: none; letter-spacing: -.02em; font-size: 18px; color: var(--ink); margin: 0 0 10px; }
.cal-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cal-lista li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal-lista li:last-child { border-bottom: 0; }
.cal-hora { font-weight: 800; font-size: 15px; }
@media (max-width: 700px) {
  .cal-dia { min-height: 64px; padding: 6px; }
  .cal-chip { display: none; }
  .cal-mes-tit { font-size: 18px; min-width: 0; }
}
@media (max-width: 700px) {
  table.t-resp thead { display: none; }
  table.t-resp, table.t-resp tbody, table.t-resp tr, table.t-resp td { display: block; width: 100%; }
  table.t-resp tr[data-u], table.t-resp tr[data-radar] { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 8px; background: var(--card); }
  table.t-resp td { display: flex; justify-content: space-between; gap: 10px; border-bottom: 0; padding: 4px 0; }
  table.t-resp td::before { content: attr(data-th); color: var(--muted); font-size: 12px; flex: none; }
  table.t-resp tr[hidden] { display: none; }
}
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 14px; margin: 10px 0; }
.dato .k { font-size: 12px; color: var(--muted); }
.dato .v { font-size: 15px; font-weight: 600; }
.ficha-foto { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; background: var(--chip); display: block; }
.mapa { height: 300px; border-radius: 10px; overflow: hidden; background: var(--chip); }
.descripcion { white-space: pre-wrap; font-size: 13.5px; max-height: 340px; overflow: auto; }
.eventos { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.eventos li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.eventos li:last-child { border-bottom: 0; }
.radar-card .titulo { font-weight: 600; font-size: 15px; }
.corrida { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; margin-right: 10px; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.punto.parcial { background: var(--warn); } .punto.error, .punto.corriendo { background: var(--bad); }
.vacio { color: var(--muted); padding: 40px 0; text-align: center; }
.aviso-banner { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
         padding: 8px 14px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none;
         z-index: 1000; max-width: 90vw; }
.toast.ver { opacity: 1; }
.toast.error { background: var(--bad); color: #fff; }
@media (max-width: 700px) {
  .barra { gap: 8px; }
  nav.menu:not([hidden]) { left: 10px; right: 10px; min-width: 0; max-width: none; }
  #usuario { margin-left: auto; }
  main { padding: 12px 10px 60px; }
  .panel { padding: 12px; }
}
html, body { overflow-x: hidden; }

/* carrusel de fotos */
.gal { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.gal-principal { display: block; }
.gal-principal img { width: 100%; height: 380px; object-fit: contain; display: block; background: #000; }
@media (max-width: 700px) { .gal-principal img { height: 250px; } }
.gal-flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
              border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 38px; cursor: pointer; }
.gal-flecha:hover { background: rgba(0,0,0,.8); }
.gal-flecha.izq { left: 10px; } .gal-flecha.der { right: 10px; }
.gal-contador { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px;
                padding: 2px 8px; border-radius: 6px; }
.gal-tiras { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.gal-tiras img { width: 76px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .6;
                 flex: 0 0 auto; border: 2px solid transparent; }
.gal-tiras img.activa { opacity: 1; border-color: var(--accent); }
.gal-vacia { height: 120px; display: grid; place-items: center; color: var(--muted); background: var(--chip); border-radius: 10px; }

/* mapa de oportunidades */
.mapa-grande { height: calc(100vh - 230px); min-height: 420px; border-radius: 12px; overflow: hidden; background: var(--chip); }
.pin-m2 { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 7px)); background: var(--c); color: #fff;
          font: 600 12px/1 system-ui, sans-serif; padding: 5px 7px; border-radius: 8px; white-space: nowrap;
          box-shadow: 0 1px 4px rgba(0,0,0,.35); border: 2px solid #fff; cursor: pointer; }
.pin-m2::after { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
                 border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pin-m2.marcado { border-color: #f4c430; }
.pin-m2.marcado::after { border-top-color: #f4c430; }
.leaflet-marker-icon:hover .pin-m2 { filter: brightness(1.15); }
.tip-leaflet { padding: 0; border-radius: 10px; }
.tip-op { width: 230px; font: 12.5px/1.4 system-ui, sans-serif; color: #1c1b19; padding: 8px 10px; white-space: normal; }
.tip-op img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; display: block; }
.tip-pct { color: #1f5f4a; font-weight: 600; }
.tip-sub { color: #6f6b64; font-size: 11.5px; }
.tip-warn { color: #9a5b00; font-size: 11.5px; }
.leyenda { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.leyenda i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); display: inline-block; margin-left: 6px; }
.leyenda i.marc { background: transparent; border: 2px solid #f4c430; }

.ultima { margin-top: 10px; font-size: 13.5px; line-height: 1.6; }
.ultima .chip { margin-left: 4px; }

/* cargando: el mismo indicador en todas las páginas + barrita arriba mientras hay pedidos en curso */
.cargando { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 56px 16px;
            color: var(--muted); font-size: 14px; }
.cargando .giro { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line);
                  border-top-color: var(--accent); animation: giro .8s linear infinite; flex: none; }
@keyframes giro { to { transform: rotate(360deg); } }
#progreso { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); z-index: 2000;
            opacity: 0; transition: opacity .2s; }
body.ocupado #progreso { opacity: 1; animation: progreso 1.4s ease-in-out infinite; }
@keyframes progreso { 0% { left: 0; width: 0; } 50% { left: 20%; width: 50%; } 100% { left: 100%; width: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cargando .giro { animation-duration: 2.4s; }
  body.ocupado #progreso { animation: none; width: 100%; opacity: .6; }
}

.combo-check { position: relative; width: 188px; flex: none; }
.combo-btn { position: relative; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
             border-radius: 8px; padding: 6px 26px 6px 8px; cursor: pointer; width: 100%; text-align: left;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-btn::after { content: ""; position: absolute; right: 10px; top: 50%; width: 0; height: 0;
                    border: 5px solid transparent; border-top-color: var(--muted); margin-top: -2px; pointer-events: none; }
.combo-check.abierto .combo-btn::after { border-top-color: transparent; border-bottom-color: var(--muted); margin-top: -8px; }
.combo-menu { position: absolute; z-index: 800; top: calc(100% + 4px); right: 0; left: auto;
              width: min(340px, calc(100vw - 20px)); max-height: min(70vh, 380px); overflow: auto;
              background: var(--card); border: 1px solid var(--line); border-radius: 10px;
              box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 4px 0; }
.combo-menu label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; cursor: pointer;
                    font-size: 13px; line-height: 1.35; }
.combo-menu label:hover { background: var(--chip); }
.combo-menu input { margin-top: 3px; flex: none; }
.combo-menu .txt { min-width: 0; }
.combo-todos { border-bottom: 1px solid var(--line); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 900px) {
  .combo-menu { left: 0; right: 0; width: auto; }
}

.sesion { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sesion .nombre { color: var(--ink); font-weight: 600; }

.pagina-home { min-height: 100vh; background: #0c1915; color: #f3efe6;
               font-family: "IBM Plex Sans", system-ui, sans-serif; --ink: #f3efe6; --muted: #b7c4bc;
               --card: #15241f; --line: rgba(243,239,230,.12); --accent: #d6ff4a; --bg: #0c1915; }
.pagina-home header.home-top { background: transparent; border-bottom: 0; position: relative; z-index: 4; }
.pagina-home .marca { font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 700; font-size: 20px;
                      letter-spacing: -.02em; }
.pagina-home .marca span { color: rgba(243,239,230,.45); }
.home-halo { position: fixed; inset: -20% -10% auto; height: 70vh; pointer-events: none; z-index: 0;
             background: radial-gradient(ellipse at 20% 0%, #1f5f4a 0%, transparent 55%),
                         radial-gradient(ellipse at 90% 10%, #3a2a08 0%, transparent 42%); opacity: .85; }
.home-barra { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 20px; }
.home-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; padding: 4px;
            background: rgba(255,255,255,.06); border: 1px solid rgba(243,239,230,.08); border-radius: 999px; }
.home-nav a { text-decoration: none; color: rgba(243,239,230,.78); padding: 8px 16px; border-radius: 999px;
              font-size: 13.5px; font-weight: 500; }
.home-nav a:hover { color: #f3efe6; background: rgba(255,255,255,.06); }
.home-nav a.aqui { color: #102018; background: #d6ff4a; font-weight: 600; }
.home-entrar .sub a, .home-entrar .aviso-banner a { color: #1f5f4a; font-weight: 700; }
.home-ciudad { font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
               color: #d6ff4a; border: 1px solid rgba(214,255,74,.35); padding: 4px 8px; border-radius: 999px; }
.pagina-home .home-cta { background: #d6ff4a; color: #102018; border-color: #d6ff4a; font-weight: 800; padding: 8px 16px; }
.pagina-home .home-cta:hover { filter: brightness(1.06); }
.pagina-home main.home { max-width: 1180px; position: relative; z-index: 1; padding: 8px 20px 40px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, 280px) minmax(280px, 340px);
             gap: 28px; align-items: center; padding: 36px 0 20px; }
.home-lugar { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
              color: #d6ff4a; }
.home-copy h1 { font-family: "IBM Plex Serif", Georgia, serif; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.18;
                letter-spacing: -.02em; margin: 0 0 16px; font-weight: 600; color: #f7f3ea; }
.home-lead { font-size: 17px; line-height: 1.55; color: #c5d0c9; margin: 0 0 28px; max-width: 34em; }
.home-cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.home-cifras div { border-top: 1px solid rgba(214,255,74,.35); padding-top: 10px; }
.home-cifras dt { font-size: 18px; font-weight: 700; }
.home-cifras dd { margin: 4px 0 0; color: #9aada4; font-size: 12.5px; }
.home-mazo { position: relative; height: 400px; }
.home-deal { position: absolute; width: 228px; background: #f6f3ec; color: #1c1b19; border-radius: 16px; overflow: hidden;
             box-shadow: 0 18px 40px rgba(0,0,0,.38); }
.home-deal.d1 { left: 4px; top: 0; transform: rotate(-7deg); z-index: 1; }
.home-deal.d2 { left: 42px; top: 118px; transform: rotate(5deg); z-index: 3; }
.home-deal.d3 { left: 0; top: 236px; transform: rotate(-3deg); z-index: 2; }
.home-foto { height: 92px; position: relative; }
.home-foto::after { content: ""; position: absolute; inset: 18px 22px 14px; background:
                    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 10px, transparent 10px 22px),
                    repeating-linear-gradient(180deg, rgba(0,0,0,.12) 0 8px, transparent 8px 20px); opacity: .55; }
.f-palermo { background: linear-gradient(135deg, #2a6b55, #c4a35a); }
.f-crespo { background: linear-gradient(135deg, #3d4a78, #8a6b4a); }
.f-caba { background: linear-gradient(135deg, #5a3a32, #1f5f4a); }
.home-deal-cuerpo { padding: 10px 12px 12px; }
.home-tag { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1f5f4a; }
.home-tipo { margin: 2px 0 6px; font-size: 12.5px; color: #6f6b64; }
.home-m2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.home-m2 span { font-size: 12px; font-weight: 600; color: #6f6b64; }
.home-delta { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: #1f5f4a; }
.home-entrar { position: relative; z-index: 5; width: auto; align-self: center;
               background: #f6f3ec; color: #1c1b19; border-radius: 18px; padding: 20px 20px 18px;
               box-shadow: 0 20px 48px rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.4); }
.home-entrar-k { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
                 color: #1f5f4a; }
.home-entrar h2 { text-transform: none; letter-spacing: -.02em; font-family: "IBM Plex Serif", Georgia, serif;
                  font-size: 26px; color: #1c1b19; margin: 0 0 6px; font-weight: 600; }
.home-entrar .ayuda { color: #6f6b64; }
.home-entrar .oauth-bots { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.home-entrar .google { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
                       width: 100%; padding: 12px 14px; font-weight: 700; margin: 0;
                       background: #102018; color: #f3efe6; border-color: #102018; border-radius: 10px; }
.home-entrar .google:hover { filter: brightness(1.08); }
.home-entrar .google svg { flex: none; }
.home-entrar a.oauth { background: #fff; color: #1c1b19; border: 1px solid #cfc9bc; }
.home-entrar a.oauth:hover { filter: none; background: #fff; border-color: #1c1b19; }
.home-entrar .oauth[hidden] { display: none !important; }
.home-entrar .sub { margin: 0; color: #6f6b64; }
.home-entrar .aviso-banner { background: #fbf0dc; color: #9a5b00; }
.home-barrios { margin: 8px 0 36px; padding: 14px 0; border-top: 1px solid rgba(243,239,230,.1);
                border-bottom: 1px solid rgba(243,239,230,.1); color: #8aa197; font-size: 13px; letter-spacing: .04em;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-mesa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-mesa article { background: rgba(255,255,255,.04); border: 1px solid rgba(243,239,230,.08); border-radius: 16px;
                     padding: 18px 18px 20px; }
.home-mesa h3 { text-transform: none; letter-spacing: -.02em; font-family: "IBM Plex Sans", system-ui, sans-serif;
                font-size: 18px; color: #f3efe6; margin: 12px 0 8px; font-weight: 700; }
.home-mesa p { margin: 0; color: #c9d6cf; font-size: 14.5px; line-height: 1.5; }
.home-ico { height: 72px; border-radius: 12px; position: relative; overflow: hidden; }
.home-ico.lista { background: linear-gradient(#1a332b, #102018); }
.home-ico.lista::before, .home-ico.lista::after { content: ""; position: absolute; left: 12px; right: 12px; height: 8px;
                                                   border-radius: 4px; background: rgba(214,255,74,.55); }
.home-ico.lista::before { top: 18px; width: 70%; }
.home-ico.lista::after { top: 34px; background: rgba(243,239,230,.2); }
.home-ico.mapa { background: #102018; display: grid; }
.home-ico.mapa svg { width: 100%; height: 100%; display: block; }
.home-ico.alerta { background: linear-gradient(#1a332b, #102018); }
.home-ico.alerta::before { content: ""; position: absolute; left: 50%; top: 22px; width: 18px; height: 18px;
                           border: 3px solid #d6ff4a; border-radius: 50%; transform: translateX(-50%); }
.home-ico.alerta::after { content: ""; position: absolute; left: 50%; bottom: 16px; width: 28px; height: 8px;
                          background: #d6ff4a; border-radius: 8px; transform: translateX(-50%); }
.home-ico.equipo { background: linear-gradient(#1a332b, #102018); }
.home-ico.equipo::before, .home-ico.equipo::after { content: ""; position: absolute; top: 22px; width: 22px; height: 22px;
                                                    border-radius: 50%; background: #d6ff4a; }
.home-ico.equipo::before { left: 38%; transform: translateX(-70%); box-shadow: 18px 0 0 #8fbf4a; }
.home-ico.equipo::after { left: 50%; transform: translateX(-50%) translateY(18px); width: 28px; height: 14px;
                          border-radius: 14px 14px 4px 4px; background: rgba(214,255,74,.7);
                          box-shadow: -16px 0 0 rgba(143,191,74,.7), 16px 0 0 rgba(214,255,74,.45); }
.home-pie { position: relative; z-index: 1; text-align: center; color: #6d8078; font-size: 12px; padding: 8px 16px 28px; }
.home-acceso { margin: 36px 0 8px; }
.home-acceso-card { max-width: 560px; background: #f6f3ec; color: #1c1b19; border-radius: 18px; padding: 22px 22px 20px; }
.home-acceso-card h2 { font-family: "IBM Plex Serif", Georgia, serif; font-size: 24px; margin: 0 0 8px; color: #1c1b19;
                       text-transform: none; letter-spacing: -.02em; font-weight: 600; }
.home-acceso-card .oauth-bots { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.home-acceso-card .google { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
                            width: 100%; padding: 12px 14px; font-weight: 700; margin: 0;
                            background: #102018; color: #f3efe6; border-color: #102018; border-radius: 10px; }
.home-acceso-card a.oauth { background: #fff; color: #1c1b19; border: 1px solid #cfc9bc; }
.home-acceso-card a.oauth:hover { background: #fff; border-color: #1c1b19; }
.home-acceso-card .oauth[hidden] { display: none !important; }
.home-acceso-card .ayuda a, .home-acceso-card .aviso-banner a { color: #1f5f4a; font-weight: 700; }
.home-acceso-card .ayuda { color: #6f6b64; }
.home-form { display: grid; gap: 10px; margin-top: 8px; }
.home-form label { display: grid; gap: 4px; font-size: 12.5px; color: #6f6b64; font-weight: 600; }
.home-form input, .home-form textarea { font: inherit; color: #1c1b19; background: #fff; border: 1px solid #e4e1db;
                                        border-radius: 8px; padding: 8px 10px; width: 100%; }
.home-form textarea { resize: vertical; min-height: 110px; }
.home-form-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .home-form-fila { grid-template-columns: 1fr; } }
.home-ok { background: #e3efe9; color: #1f5f4a; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-weight: 650; }
.home-doc { padding-top: 28px; max-width: 820px; }
.home-doc h1 { font-family: "IBM Plex Serif", Georgia, serif; font-size: clamp(28px, 4vw, 42px); line-height: 1.18;
               letter-spacing: -.02em; margin: 0 0 16px; font-weight: 600; }
.home-prosa { display: grid; gap: 14px; color: #c5d0c9; font-size: 16px; line-height: 1.55; margin: 0 0 22px; }
.home-prosa p { margin: 0; }
.home-planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 12px; }
.home-planes article { background: rgba(255,255,255,.04); border: 1px solid rgba(243,239,230,.1); border-radius: 16px;
                       padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.home-planes article.destacado { border-color: rgba(214,255,74,.45); background: rgba(214,255,74,.06); }
.home-planes h2 { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 22px; margin: 0; color: #f3efe6;
                  text-transform: none; letter-spacing: -.02em; font-weight: 700; }
.home-precio { font-size: 18px; font-weight: 800; color: #d6ff4a; margin: 0; }
.home-planes ul { margin: 8px 0 12px; padding: 0 0 0 18px; color: #c5d0c9; font-size: 14px; line-height: 1.5; flex: 1; }
.home-planes .home-cta { align-self: flex-start; text-align: center; }
@media (max-width: 1080px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .home-mazo { grid-column: 1; height: 340px; }
  .home-entrar { grid-column: 2; grid-row: 1 / span 2; }
  .home-mesa { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .home-hero { grid-template-columns: 1fr; gap: 22px; padding-top: 12px; }
  .home-copy { order: 1; }
  .home-entrar { order: 2; grid-column: auto; grid-row: auto; }
  .home-mazo { order: 3; height: 300px; max-width: 280px; margin: 0 auto; grid-column: auto; }
  .home-deal { width: 210px; }
  .home-deal.d1 { left: 0; top: 0; }
  .home-deal.d2 { left: 36px; top: 90px; }
  .home-deal.d3 { left: 8px; top: 180px; }
  .home-mesa, .home-planes { grid-template-columns: 1fr; }
  .home-nav { order: 3; flex: 0 0 100%; margin-left: 0; justify-content: center; }
}

/* Kanban de equipo */
.eq-top { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.eq-top h2 { margin: 0; }
.eq-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 800px) { .eq-grid { grid-template-columns: 1fr; } }
.eq-lista { list-style: none; margin: 0; padding: 0; }
.eq-fila { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.eq-fila:last-child { border-bottom: 0; }
.eq-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.eq-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
          display: grid; place-items: center; font-weight: 800; flex: none; }
.eq-ava-wait { background: var(--warn-soft); color: var(--warn); }
.eq-inv-form { display: flex; gap: 8px; flex-wrap: wrap; }
.eq-inv-form input { flex: 1 1 200px; }
.eq-gear { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
           display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.eq-gear:hover { border-color: var(--ink); }
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: stretch; padding: 4px 2px 16px;
          min-height: calc(100vh - 130px); position: relative; z-index: 0; }
.kan-col { flex: 1 0 260px; max-width: 320px; border-radius: 16px; padding: 10px 10px 12px; min-height: 280px;
           background: color-mix(in srgb, var(--kan-accent, var(--accent)) 12%, var(--chip));
           border-top: 5px solid var(--kan-accent, var(--accent)); }
.kan-color { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
             background: var(--card); cursor: pointer; flex: none; }
.kan-color::-webkit-color-swatch-wrapper { padding: 3px; }
.kan-color::-webkit-color-swatch { border: 0; border-radius: 5px; }
.kan-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.kan-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 10px; padding: 2px 4px; }
.kan-h b { font-size: 15px; }
.kan-h .n { margin-left: auto; background: var(--card); }
.kan-drop { min-height: 160px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kan-col.over { box-shadow: inset 0 0 0 2px var(--kan-accent); }
.kan-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
            box-shadow: var(--shadow); cursor: grab; touch-action: none; position: relative; }
.kan-card:active { cursor: grabbing; }
.kan-card.arrastre { opacity: .35; }
.kan-foto { display: block; height: 110px; background: #cfc9bc center/cover no-repeat; }
.kan-c { padding: 10px 10px 12px; }
.kan-c p { margin: 3px 0 0; }
.kan-precio { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.kan-more { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 8px;
            background: rgba(20,20,18,.55); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.kan-pop { position: absolute; top: 42px; right: 8px; background: var(--card); border: 1px solid var(--line);
           border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.16); padding: 6px; z-index: 8; min-width: 160px; }
.kan-pop button { display: block; width: 100%; text-align: left; }
.eq-dlg { position: fixed; inset: 0; z-index: 4500; background: rgba(20,20,18,.4); display: grid; place-items: center; padding: 16px; }
.eq-dlg[hidden] { display: none !important; }
.eq-dlg-c { background: var(--card); color: var(--ink); border-radius: 16px; padding: 18px; width: min(620px, 100%);
            max-height: min(86vh, 720px); overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.eq-ghost { position: fixed; pointer-events: none; z-index: 5000; width: 240px; border-radius: 12px;
            box-shadow: 0 12px 32px rgba(0,0,0,.25); opacity: .92; overflow: hidden; }
@media (max-width: 700px) {
  .kan-col { flex: 1 0 82%; max-width: none; }
}
