/* Limpiezas — estilos. Misma familia visual que el channel manager:
   tinta #272528, turquesa #00e8c5, amarillo #fff65b; salida roja, entrada verde, rotación morada. */
:root {
  --ink: #272528; --ink-2: #4a474d; --muted: #6f6d73; --faint: #a4a2a8;
  --line: #e6e6ea; --line-2: #f0f0f3;
  --bg: #f6f6f8; --surface: #fff; --soft: #f7f7f9; --hover: #f2f2f5;
  --brand: #00e8c5; --brand-ink: #00987f; --brand-soft: #e3fbf6;
  --accent: #fff65b; --accent-soft: #fffbd1;
  --sal: #e03131; --sal-soft: #fdecec;
  --ent: #2f9e44; --ent-soft: #e8f6eb;
  --rot: #8b5cf6; --rot-soft: #f1ebfe;
  --urg: #e8590c; --urg-soft: #fff0e6;
  --ok: #1f9d55; --warn: #f08c00; --err: #d93636;
  --airbnb: #ff5a5f; --booking: #1a4fa0; --manual: #7a7a85; --otro: #0ca678;
  --shadow-1: 0 1px 2px rgba(20,18,24,.05), 0 1px 1px rgba(20,18,24,.03);
  --shadow-2: 0 6px 20px -6px rgba(20,18,24,.14), 0 2px 6px -2px rgba(20,18,24,.06);
  --shadow-3: 0 24px 60px -18px rgba(20,18,24,.35);
  --r: 14px; --r-sm: 10px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --side: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f2f1f4; --ink-2: #d6d4da; --muted: #a19fa7; --faint: #6f6d75;
  --line: #36353b; --line-2: #2e2d33;
  --bg: #19181c; --surface: #232227; --soft: #2a292f; --hover: #2f2e35;
  --brand: #00e8c5; --brand-ink: #3cefd4; --brand-soft: #0f3a34;
  --accent: #fff65b; --accent-soft: #3d3a1a;
  --sal: #ef6060; --sal-soft: #3d2022; --ent: #3fb96a; --ent-soft: #1b3423;
  --rot: #a585ff; --rot-soft: #2c2440; --urg: #ff8a3d; --urg-soft: #3d2a1b;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px -8px rgba(0,0,0,.6); --shadow-3: 0 24px 60px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-feature-settings: "cv11", "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.tnum { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
::selection { background: var(--accent); color: #272528; }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px 14px; overflow-y: auto; }
.marca { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.marca-logo { width: 38px; height: 38px; border-radius: 11px; background: #272528; display: grid; place-items: center; position: relative; flex: none; }
.marca-logo svg { width: 22px; height: 22px; }
.marca b { font-family: var(--serif); font-size: 19px; letter-spacing: -.3px; display: block; line-height: 1.1; }
.marca small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-t { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2);
  font-weight: 500; position: relative; transition: background .15s; }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--ink); color: var(--surface); }
:root[data-theme="dark"] .nav a.on { background: var(--accent); color: #272528; }
.nav a.on svg.i { stroke: var(--brand); }
:root[data-theme="dark"] .nav a.on svg.i { stroke: #272528; }
.nav .cnt { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  display: grid; place-items: center; background: var(--sal); color: #fff; }
.nav a.on .cnt { background: var(--brand); color: #272528; }
.side-pie { margin-top: auto; padding-top: 14px; }
.yo { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--soft); cursor: pointer; }
.yo b { display: block; font-size: 13px; } .yo small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); display: flex; align-items: center; gap: 14px; padding: 18px 32px 14px; }
.top h1 { font-family: var(--serif); font-size: 28px; letter-spacing: -.5px; margin: 0; font-weight: 700; line-height: 1.1; }
.top .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.top .acc { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.vista { padding: 6px 32px 48px; max-width: 1320px; width: 100%; animation: entra .25s ease; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.movil-top, .tabbar { display: none; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; box-shadow: var(--shadow-1); }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--ink); color: var(--surface); border-color: var(--ink); }
:root[data-theme="dark"] .btn.pri { background: var(--accent); color: #272528; border-color: var(--accent); }
.btn.brand { background: var(--brand); color: #10201d; border-color: var(--brand); }
.btn.ok { background: var(--ent); color: #fff; border-color: var(--ent); }
.btn.peligro { color: var(--err); }
.btn.fant { background: none; border-color: transparent; box-shadow: none; }
.btn.fant:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 15.5px; border-radius: 14px; }
.btn.ico { width: 38px; padding: 0; } .btn.sm.ico { width: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- tarjetas y elementos ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card.pad { padding: 18px 20px; }
.card h3, .h3 { font-size: 15px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.1px; display: flex; align-items: center; gap: 8px; }
.sec-t { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.sec-t h2 { font-family: var(--serif); font-size: 20px; margin: 0; letter-spacing: -.3px; }
.sec-t .acc { margin-left: auto; display: flex; gap: 8px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gauto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fila { display: flex; align-items: center; gap: 10px; } .fila.wrap { flex-wrap: wrap; } .fila.sep { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.esp { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em; background: var(--soft); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.chip svg.i { width: 13px; height: 13px; stroke-width: 2.4; }
.chip.sal { background: var(--sal-soft); color: var(--sal); } .chip.ent { background: var(--ent-soft); color: var(--ent); }
.chip.rot { background: var(--rot-soft); color: var(--rot); } .chip.urg { background: var(--urg); color: #fff; }
.chip.ok { background: var(--ent-soft); color: var(--ent); } .chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.amar { background: var(--accent); color: #272528; } .chip.lin { background: none; border-color: var(--line); color: var(--muted); font-weight: 600; }
.chip.urg::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: late 1.4s ease-in-out infinite; }
@keyframes late { 50% { opacity: .25; } }

.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff;
  flex: none; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface); }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; } .av.lg { width: 44px; height: 44px; font-size: 15px; }
.av.vacio { background: var(--surface) !important; color: var(--faint); border: 1.5px dashed var(--faint); box-shadow: none; }
.punto { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }

.vacio-g { text-align: center; padding: 48px 20px; color: var(--muted); }
.vacio-g svg.ill { width: 120px; height: 96px; margin: 0 auto 14px; display: block; }
.vacio-g b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; font-family: var(--serif); }

/* ---------- formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.campo small { color: var(--muted); font-size: 12px; }
.inp, select.inp, textarea.inp { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 14px; }
textarea.inp { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
select.inp { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236f6d73' stroke-width='2'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form { display: grid; gap: 14px; } .form .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .tres { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.colores { display: flex; gap: 8px; flex-wrap: wrap; }
.colores button { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); position: relative; }
.colores button.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.stepper button:active { background: var(--hover); }
.stepper b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---------- hoy ---------- */
.saludo { font-family: var(--serif); font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.dias { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.dias::-webkit-scrollbar { display: none; }
.dia { flex: none; width: 58px; padding: 9px 0 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center;
  scroll-snap-align: start; transition: transform .12s, background .15s; position: relative; }
.dia small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dia b { display: block; font-size: 20px; font-family: var(--serif); margin: 1px 0 4px; }
.dia .pts { display: flex; justify-content: center; gap: 3px; height: 6px; }
.dia .pts i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.dia .pts i.r { background: var(--rot); } .dia .pts i.h { background: var(--ent); }
.dia.hoy b { color: var(--brand-ink); }
.dia.on { background: var(--ink); border-color: var(--ink); color: var(--surface); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.dia.on small { color: color-mix(in srgb, var(--surface) 70%, transparent); } .dia.on b { color: var(--surface); }
:root[data-theme="dark"] .dia.on { background: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .dia.on, :root[data-theme="dark"] .dia.on b, :root[data-theme="dark"] .dia.on small { color: #272528; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 10px 0 6px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; box-shadow: var(--shadow-1); }
.kpi small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.1; margin-top: 6px; letter-spacing: -.5px; }
.kpi .bar { height: 4px; background: var(--line-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.kpi .bar i { display: block; height: 100%; background: var(--ent); border-radius: 4px; transition: width .5s; }
.kpi.k-sal b { color: var(--sal); } .kpi.k-ent b { color: var(--ent); } .kpi.k-rot b { color: var(--rot); }
.kpi.k-sin { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

.hoy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.lista-l { display: flex; flex-direction: column; gap: 12px; }

.limp { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .12s; cursor: pointer; }
.limp:hover { box-shadow: var(--shadow-2); }
.limp:active { transform: scale(.995); }
.limp::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--brand)); }
.limp-in { padding: 15px 18px 14px 22px; display: grid; gap: 11px; }
.limp-cab { display: flex; align-items: flex-start; gap: 12px; }
.limp-cab .nom { min-width: 0; flex: 1; }
.limp-cab .nom b { font-size: 16.5px; letter-spacing: -.2px; display: block; }
.limp-cab .nom small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limp .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.limp.hecha { background: color-mix(in srgb, var(--ent-soft) 45%, var(--surface)); }
.limp.hecha .limp-cab .nom b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ent) 50%, transparent); }
.limp.cancelada { opacity: .55; }
.limp.urgente { border-color: color-mix(in srgb, var(--urg) 45%, var(--line)); }

/* tramo horario: sale ———— entra */
.tramo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: var(--soft); border-radius: 12px; padding: 9px 12px; }
.tramo .h { display: flex; flex-direction: column; line-height: 1.15; }
.tramo .h small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tramo .h b { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.tramo .h.s small { color: var(--sal); } .tramo .h.e { text-align: right; } .tramo .h.e small { color: var(--ent); }
.tramo .linea { position: relative; height: 22px; display: flex; align-items: center; }
.tramo .linea::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sal), var(--rot) 50%, var(--ent)); opacity: .55; }
.tramo .linea span { position: relative; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.tramo.libre .linea::before { background: repeating-linear-gradient(90deg, var(--faint) 0 5px, transparent 5px 10px); }
.tramo.urg .linea span { background: var(--urg); color: #fff; border-color: var(--urg); }

.limp-pie { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dato { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.dato svg.i { width: 15px; height: 15px; color: var(--muted); }
.bandera { display: inline-grid; place-items: center; height: 18px; min-width: 24px; padding: 0 4px; border-radius: 5px; background: var(--ink); color: var(--surface);
  font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.progreso { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.progreso .b { width: 60px; height: 5px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progreso .b i { display: block; height: 100%; background: var(--ent); }

.asig { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 12.5px; }
.asig:hover { border-color: var(--ink); }
.asig.vacia { border-style: dashed; color: var(--muted); padding-left: 10px; }

.mov { display: flex; flex-direction: column; }
.mov-i { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.mov-i:last-child { border: 0; }
.mov-i .t { font-variant-numeric: tabular-nums; font-weight: 700; width: 44px; }
.mov-i .n { flex: 1; min-width: 0; } .mov-i .n b { display: block; font-size: 13.5px; } .mov-i .n small { color: var(--muted); font-size: 12px; }
.flecha { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.flecha.s { background: var(--sal-soft); color: var(--sal); } .flecha.e { background: var(--ent-soft); color: var(--ent); }
.flecha svg.i { width: 15px; height: 15px; stroke-width: 2.4; }

/* ---------- calendario ---------- */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-bar .mes { font-family: var(--serif); font-size: 18px; font-weight: 700; min-width: 150px; text-transform: capitalize; }
.cal { --w: 46px; --h: 58px; --nombre: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: auto;
  box-shadow: var(--shadow-1); max-height: calc(100vh - 200px); position: relative; overscroll-behavior: contain; }
.cal-in { display: grid; grid-template-columns: var(--nombre) auto; width: max-content; min-width: 100%; }
.cal-esq { position: sticky; left: 0; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  display: flex; align-items: flex-end; padding: 10px 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-cab { position: sticky; top: 0; z-index: 5; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-cab div { width: var(--w); flex: none; text-align: center; padding: 8px 0 7px; border-left: 1px solid var(--line-2); }
.cal-cab small { display: block; font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.cal-cab b { font-size: 15px; font-variant-numeric: tabular-nums; }
.cal-cab .fin { background: var(--soft); }
.cal-cab .hoy b { background: var(--ink); color: var(--surface); border-radius: 8px; padding: 1px 6px; }
:root[data-theme="dark"] .cal-cab .hoy b { background: var(--accent); color: #272528; }
.cal-cab .m1 { border-left: 2px solid var(--ink); }
.cal-nom { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-2);
  height: var(--h); display: flex; align-items: center; gap: 10px; padding: 0 14px; cursor: pointer; }
.cal-nom b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-nom small { font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-nom > div { min-width: 0; }
.cal-fila { position: relative; height: var(--h); display: flex; border-bottom: 1px solid var(--line-2); }
.cal-fila .c { width: var(--w); flex: none; border-left: 1px solid var(--line-2); }
.cal-fila .c.fin { background: var(--soft); }
.cal-fila .c.hoy { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.cal-fila .c.m1 { border-left: 2px solid color-mix(in srgb, var(--ink) 40%, transparent); }
.est { position: absolute; top: 9px; height: 26px; border-radius: 8px; display: flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 11.5px;
  font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 1; box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transform: skewX(-14deg); transition: filter .15s; }
.est > * { transform: skewX(14deg); }
.est:hover { filter: brightness(1.08); z-index: 2; }
.est.bloq { background: repeating-linear-gradient(-45deg, var(--line) 0 6px, var(--soft) 6px 12px) !important; color: var(--muted); box-shadow: none; }
.est.cort-i { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mk { position: absolute; bottom: 5px; width: 22px; height: 18px; border-radius: 6px; z-index: 3; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 800; color: #fff; cursor: pointer; box-shadow: 0 0 0 2px var(--surface); }
.mk.vacia { background: var(--surface); border: 1.5px dashed var(--sal); color: var(--sal); }
.mk.rot { outline: 2px solid var(--rot); outline-offset: 1px; }
.mk.hecha::after { content: "✓"; position: absolute; right: -6px; top: -7px; width: 13px; height: 13px; border-radius: 50%; background: var(--ent); color: #fff;
  font-size: 8px; display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--surface); }
.leyenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; align-items: center; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- agenda ---------- */
.agenda-dia { margin-bottom: 22px; }
.agenda-dia > h4 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-family: var(--serif); font-size: 17px; }
.agenda-dia > h4 small { font-family: var(--sans); font-size: 12.5px; color: var(--muted); font-weight: 500; text-transform: none; }
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tabla th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.tabla td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr.clic { cursor: pointer; } .tabla tr.clic:hover td { background: var(--hover); }

/* ---------- detalle limpieza ---------- */
.det-cab { display: flex; gap: 14px; align-items: flex-start; }
.det-color { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none; }
.det-color svg.i { width: 26px; height: 26px; }
.bloque { background: var(--soft); border-radius: 14px; padding: 14px 16px; }
.bloque h5 { margin: 0 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.huesped { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.huesped > div { background: var(--surface); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.huesped small { font-size: 11px; color: var(--muted); font-weight: 600; display: block; }
.huesped b { font-size: 16px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.tareas { display: flex; flex-direction: column; gap: 6px; }
.tarea { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; user-select: none; transition: background .15s; font-weight: 500; }
.tarea .caja { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--faint); display: grid; place-items: center; flex: none; transition: all .15s; }
.tarea .caja svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 3; opacity: 0; }
.tarea.si { background: var(--ent-soft); border-color: transparent; color: var(--muted); }
.tarea.si span { text-decoration: line-through; }
.tarea.si .caja { background: var(--ent); border-color: var(--ent); } .tarea.si .caja svg { opacity: 1; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.fotos .f { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line-2) center/cover; cursor: zoom-in; position: relative; }
.fotos .f.mas { display: grid; place-items: center; border: 1.5px dashed var(--faint); background: var(--surface); cursor: pointer; color: var(--muted); }
.fotos .f.mas div { text-align: center; font-size: 12px; font-weight: 600; } .fotos .f.mas svg { margin: 0 auto 4px; width: 22px; height: 22px; }
.cta-fija { position: sticky; bottom: 0; padding: 14px 0 4px; background: linear-gradient(transparent, var(--surface) 30%); margin-top: 6px; }

/* ---------- compras / stock / lavandería ---------- */
.anadir { display: flex; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); flex-wrap: wrap; }
.anadir .inp { border: 0; box-shadow: none; flex: 1; min-width: 180px; font-size: 15px; }
.anadir .inp:focus { box-shadow: none; }
.anadir select.inp { flex: 0 0 auto; width: auto; background-color: var(--soft); border-radius: 10px; min-width: 140px; }
.sugs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.sugs button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sugs button:hover { border-color: var(--ink); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.item:last-child { border-bottom: 0; }
.item .caja { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--faint); flex: none; display: grid; place-items: center; cursor: pointer; }
.item .caja svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.item.si .caja { background: var(--ent); border-color: var(--ent); } .item.si .caja svg { opacity: 1; }
.item.si .txt b { text-decoration: line-through; color: var(--muted); }
.item .txt { flex: 1; min-width: 0; } .item .txt b { font-size: 14.5px; font-weight: 600; }
.item .txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.item.urgente { background: linear-gradient(90deg, var(--urg-soft), transparent 60%); }
.nivel { height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; width: 100%; margin-top: 7px; }
.nivel i { display: block; height: 100%; border-radius: 4px; background: var(--ent); transition: width .3s; }
.nivel.bajo i { background: var(--sal); } .nivel.medio i { background: var(--warn); }
.piezas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pieza { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-1); }
.pieza .ico-p { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 10px; }
.pieza b { font-family: var(--serif); font-size: 28px; display: block; line-height: 1; }
.pieza small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lav-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.lav-btn { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; text-align: left; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.lav-btn:hover { box-shadow: var(--shadow-2); }
.lav-btn .flecha { width: 44px; height: 44px; border-radius: 13px; } .lav-btn .flecha svg.i { width: 22px; height: 22px; }
.lav-btn b { display: block; font-size: 15.5px; } .lav-btn small { color: var(--muted); }
.fila-pieza { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); }

/* ---------- alojamientos y equipo ---------- */
.aloj { padding: 0; overflow: hidden; cursor: pointer; transition: box-shadow .2s; }
.aloj:hover { box-shadow: var(--shadow-2); }
.aloj-cab { height: 74px; position: relative; padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; color: #fff; }
.aloj-cab::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0, rgba(255,255,255,.28), transparent 55%); pointer-events: none; }
.aloj-cab b { font-family: var(--serif); font-size: 20px; letter-spacing: -.3px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.aloj-cuerpo { padding: 12px 16px 14px; display: grid; gap: 10px; }
.aloj-cuerpo .anuncio { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--ent); box-shadow: 0 0 0 3px var(--ent-soft); }
.sync.err i { background: var(--err); box-shadow: 0 0 0 3px var(--sal-soft); } .sync.no i { background: var(--faint); box-shadow: none; }
.persona { display: flex; gap: 14px; align-items: center; padding: 16px; cursor: pointer; }
.persona .info { flex: 1; min-width: 0; } .persona .info b { font-size: 15px; display: block; }
.persona .info small { color: var(--muted); font-size: 12.5px; }
.lineas-ed { display: flex; flex-direction: column; gap: 6px; }
.lineas-ed .l { display: flex; gap: 6px; align-items: center; }
.lineas-ed .l .inp { height: 38px; }
.ical-ayuda { font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 10px 12px; line-height: 1.55; }
.ical-ayuda b { color: var(--ink-2); }
.codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; word-break: break-all; white-space: pre-wrap; }

/* ---------- pagos ---------- */
.pago { padding: 18px 20px; }
.pago .total { font-family: var(--serif); font-size: 32px; letter-spacing: -.5px; line-height: 1; }
.pago .pagado { display: inline-flex; align-items: center; gap: 6px; color: var(--ent); font-weight: 700; font-size: 13px; }
.det-pago { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; max-height: 260px; overflow: auto; }
.det-pago div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }

/* ---------- ventanas ---------- */
.velo { position: fixed; inset: 0; background: rgba(20,18,24,.42); z-index: 80; display: flex; justify-content: flex-end; animation: velo .2s ease;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
@keyframes velo { from { opacity: 0; } }
.hoja { width: min(560px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: hoja .28s cubic-bezier(.2,.8,.2,1); }
@keyframes hoja { from { transform: translateX(40px); opacity: .4; } }
.hoja-cab { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.hoja-cab h2 { margin: 0; font-family: var(--serif); font-size: 21px; letter-spacing: -.3px; flex: 1; min-width: 0; }
.hoja-cuerpo { flex: 1; overflow-y: auto; padding: 20px 22px 26px; display: flex; flex-direction: column; gap: 16px; }
.hoja-pie { padding: 14px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface); }
.agarre { display: none; }
.menu-p { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3);
  padding: 6px; min-width: 220px; max-height: 340px; overflow: auto; animation: entra .15s ease; }
.menu-p button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-weight: 500; text-align: left; }
.menu-p button:hover { background: var(--hover); }
.menu-p button.on { background: var(--soft); font-weight: 700; }
.visor { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: velo .2s; }
.visor img { max-height: 92vh; border-radius: 10px; }
.avisos { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.aviso { background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-3); animation: aviso .3s cubic-bezier(.2,.8,.2,1); display: flex; gap: 8px; align-items: center; }
.aviso.err { background: var(--err); color: #fff; }
@keyframes aviso { from { transform: translateY(14px); opacity: 0; } }

/* ---------- entrada ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-arte { background: #1d1c20; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-arte::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; right: -220px; top: -160px;
  background: radial-gradient(circle, rgba(0,232,197,.55), transparent 62%); filter: blur(10px); }
.login-arte::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; left: -120px; bottom: -160px;
  background: radial-gradient(circle, rgba(255,246,91,.35), transparent 65%); filter: blur(10px); }
.login-arte > * { position: relative; z-index: 1; }
.login-arte h2 { font-family: var(--serif); font-size: 46px; line-height: 1.05; letter-spacing: -1px; margin: 0 0 18px; max-width: 520px; }
.login-arte h2 em { font-style: italic; color: var(--brand); }
.login-arte p { color: rgba(255,255,255,.7); font-size: 16px; max-width: 440px; margin: 0; }
.login-demo { display: grid; gap: 10px; max-width: 420px; margin-top: 36px; }
.login-demo .limp { cursor: default; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(8px); }
.login-demo .limp .nom small, .login-demo .dato { color: rgba(255,255,255,.65); }
.login-demo .tramo { background: rgba(255,255,255,.07); } .login-demo .tramo .linea span { background: #2a292e; border-color: #3a393f; color: #fff; }
.login-demo .limp:nth-child(2) { margin-left: 34px; opacity: .8; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.login-form form { width: min(380px, 100%); display: grid; gap: 16px; }
.login-form h1 { font-family: var(--serif); font-size: 32px; margin: 0; letter-spacing: -.5px; }

/* ---------- móvil ---------- */
@media (max-width: 1100px) { .hoy-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  body { font-size: 15px; }
  .app { display: block; }
  .side, .top { display: none; }
  .movil-top { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
  .movil-top h1 { font-family: var(--serif); font-size: 24px; margin: 0; letter-spacing: -.4px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .vista { padding: 2px 16px calc(96px + var(--safe-b)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 40;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
    border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-3); padding: 6px; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 16px; text-decoration: none; font-size: 10.5px;
    font-weight: 700; color: var(--muted); position: relative; }
  .tabbar a svg.i { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--ink); background: var(--accent); }
  :root[data-theme="dark"] .tabbar a.on { color: #272528; }
  .tabbar .cnt { position: absolute; top: 3px; left: 54%; min-width: 17px; height: 17px; border-radius: 9px; background: var(--sal); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .kpi:first-child { grid-column: 1 / -1; }
  .kpi b { font-size: 26px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .gauto { grid-template-columns: 1fr; }
  .form .dos, .form .tres { grid-template-columns: 1fr 1fr; }
  .velo { align-items: flex-end; }
  .hoja { width: 100%; height: auto; max-height: 94vh; border-radius: 22px 22px 0 0; animation: sube .3s cubic-bezier(.2,.8,.2,1); }
  @keyframes sube { from { transform: translateY(60px); opacity: .5; } }
  .agarre { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
  .hoja-cab { padding: 10px 18px 14px; } .hoja-cuerpo { padding: 16px 18px 22px; }
  .hoja-pie { padding: 12px 18px calc(12px + var(--safe-b)); } .hoja-pie .btn { flex: 1; height: 48px; }
  .cal { --w: 40px; --h: 54px; --nombre: 118px; max-height: calc(100vh - 230px); }
  .cal-nom { padding: 0 10px; } .cal-nom .punto { display: none; }
  .tabla thead { display: none; }
  .tabla, .tabla tbody, .tabla tr, .tabla td { display: block; width: 100%; }
  .tabla tr { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; }
  .tabla td { padding: 0; border: 0; }
  .login { grid-template-columns: 1fr; }
  .login-arte { padding: 32px 24px 28px; min-height: auto; }
  .login-arte h2 { font-size: 32px; } .login-demo { display: none; }
  .avisos { bottom: calc(96px + var(--safe-b)); }
  .huesped { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .huesped b { font-size: 15px; }
  .lav-btns { grid-template-columns: 1fr; }
  .limp-in { padding: 14px 15px 13px 19px; }
  .anadir select.inp { flex: 1; }
  .anadir > .btn { flex: 1 0 100%; }
  .sugs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .sugs::-webkit-scrollbar { display: none; } .sugs button { flex: none; }
  .hoja-pie [data-inc], .hoja-pie [data-compra] { flex: 0 0 48px; padding: 0; }
  .hoja-pie [data-inc] span, .hoja-pie [data-compra] span { display: none; }
  .sec-t { margin: 20px 0 10px; }
  .saludo { margin-bottom: 4px; }
  .cal-bar .mes { min-width: 0; flex: 1; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
