:root {
    --bg: #f5f6f8; --card: #fff; --ink: #14181f; --mute: #6b7280; --line: #e5e7eb;
    --brand: #0f4c81; --red: #c62828; --amber: #b26a00; --green: #1b7a43; --wa: #1faa59;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0 0 .4rem; } h2 { font-size: 1.1rem; margin: 0 0 1rem; }
small { display: block; color: var(--mute); }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); } .brand span { font-weight: 400; color: var(--mute); margin-left: .3rem; }
.bar { flex-wrap: wrap; }
.bar nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.2rem 16px 3rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; }
.card.narrow { max-width: 380px; margin: 8vh auto 0; }
.card.table { padding: 0; overflow-x: auto; }
/* min-width:0 deja que las columnas se encojan en vez de desbordar la pantalla */
.grid > *, .grid3 > *, .two > *, .stats > *, .col > *, .duo > * { min-width: 0; }
h1, h2 { overflow-wrap: anywhere; }
input, select, textarea { max-width: 100%; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.col { display: grid; gap: 1rem; }
.lugar-pie { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.hint { margin: -.6rem 0 .9rem; color: var(--mute); font-size: .88rem; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.resumen { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.resumen p { margin: 0; color: var(--mute); }

label { display: block; font-size: .85rem; color: var(--mute); margin-bottom: .8rem; }
input, textarea { display: block; width: 100%; margin-top: .25rem; padding: .6rem .7rem; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

.btn { display: inline-block; padding: .6rem 1rem; font: inherit; font-weight: 600; color: #fff; background: var(--brand); border: 1px solid transparent; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn.sm { padding: .35rem .65rem; font-size: .82rem; }
.btn.wa { background: var(--wa); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link-danger { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; padding: 0; }
.danger { margin-top: 1rem; text-align: right; }
.alert { background: #fdecea; color: var(--red); padding: .6rem .8rem; border-radius: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--mute); border-radius: 12px; padding: .9rem 1rem; color: var(--mute); }
.stat b { display: block; font-size: clamp(1.15rem, 2.6vw, 1.7rem); overflow-wrap: anywhere; line-height: 1.1; color: var(--ink); }
.stat.vencido { border-left-color: var(--red); } .stat.proximo { border-left-color: var(--amber); } .stat.ok { border-left-color: var(--green); }

.toolbar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs a { padding: .4rem .7rem; border-radius: 999px; color: var(--mute); font-size: .88rem; }
.tabs a.on { background: var(--ink); color: #fff; }
.search { display: flex; gap: .5rem; } .search input { margin: 0; min-width: 180px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); background: #fafafa; }
tr:last-child td { border-bottom: 0; }
td.acts { text-align: right; white-space: nowrap; }
td.acts > * { display: inline-block; vertical-align: middle; margin-left: .3rem; }
.sub td { background: #fafafa; padding-top: .5rem; padding-bottom: .5rem; }
.sub td[data-l="Lugar"] { color: var(--mute); }
.empty { text-align: center; color: var(--mute); padding: 2rem; }

.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; vertical-align: middle; }
.pill.vencido { background: #fdecea; color: var(--red); } .pill.proximo { background: #fff4e0; color: var(--amber); }
.pill.ok { background: #e6f5ec; color: var(--green); } .pill.sin { background: #eef0f3; color: var(--mute); }

.hist { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.hist li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }

/* Finanzas y empleados */
.mes { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mes h1 { margin: 0; } .mes div { display: flex; gap: .4rem; flex-wrap: wrap; }
.scroll { overflow-x: auto; }
.mini th, .mini td { padding: .5rem .7rem; }
.mini .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.pos { color: var(--green); } .neg { color: var(--red); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; margin: 1rem 0; }
select { display: block; width: 100%; margin-top: .25rem; padding: .6rem .7rem; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
label.check { display: flex; align-items: center; gap: .5rem; } label.check input { width: auto; margin: 0; }
.off { opacity: .5; }
.pago { display: flex; gap: .4rem; align-items: center; }
.pago input { margin: 0; padding: .35rem .5rem; width: 8.5rem; } .pago input[type=number] { width: 6.5rem; }

/* Cotizaciones y notas de servicio */
.item { display: grid; grid-template-columns: 1fr 5.5rem 8rem 7rem 2rem; gap: .5rem .6rem; align-items: end; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.item label { margin: 0; } .item .desc { grid-column: 1 / -1; }
.item .imp { font-weight: 700; text-align: right; padding-bottom: .6rem; font-variant-numeric: tabular-nums; }
.tot { margin: 1rem 0 0 auto; max-width: 320px; }
.tot div { display: flex; justify-content: space-between; padding: .25rem 0; font-variant-numeric: tabular-nums; }
.tot .total { font-size: 1.25rem; font-weight: 800; border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .5rem; }
.sug { position: relative; }
.sug ul { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: .2rem 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow: auto; }
.sug li { padding: .5rem .7rem; cursor: pointer; color: var(--ink); } .sug li:hover { background: var(--bg); }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }

/* Landing */
.landing { background: #fff; }
.hero { max-width: 760px; margin: 0 auto; padding: 5rem 16px 4rem; text-align: center; }
.eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--mute); margin: 0 auto 1.8rem; max-width: 560px; }
.cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.steps { max-width: 1000px; margin: 0 auto; padding: 1rem 16px 4rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps article { background: var(--bg); border-radius: 14px; padding: 1.4rem; }
.steps b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; }
.steps h3 { margin: .8rem 0 .3rem; } .steps p { margin: 0; color: var(--mute); }
.band { background: var(--ink); color: #fff; text-align: center; padding: 3.5rem 16px; }
.band h2 { font-size: 1.6rem; }
footer { text-align: center; padding: 1.5rem; color: var(--mute); font-size: .85rem; }

@media (max-width: 1000px) {
    .grid3 { grid-template-columns: 1fr; }
    .item { grid-template-columns: 1fr 5rem 7rem 6.5rem 2rem; }
}
@media (max-width: 760px) {
    /* 16px en los campos evita que el iPhone haga zoom al tocarlos */
    input, select, textarea { font-size: 16px; }
    .wrap { padding: 1rem 12px 3rem; } .card { padding: 1rem; }
    .bar { padding: .7rem 12px .4rem; gap: .4rem; }
    .bar nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 1.2rem; padding: .3rem 0 .4rem; -webkit-overflow-scrolling: touch; }
    .toolbar { flex-direction: column; flex-wrap: nowrap; } .toolbar > * { min-width: 0; max-width: 100%; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding-bottom: .2rem; -webkit-overflow-scrolling: touch; }
    .mes div, .acciones { width: 100%; } .acciones .btn, .acciones form, .acciones form .btn { flex: 1 1 auto; text-align: center; }
    .resumen .quick { width: 100%; } .resumen .quick .btn { flex: 1 1 auto; text-align: center; }
    .lugar-pie { align-items: flex-start; } .pago { flex-wrap: wrap; }
    .tot { max-width: none; }
    .sug ul { position: static; }
    iframe { height: 70vh !important; }
    /* Tablas largas (movimientos, nómina, cotizaciones, empleados): cada renglón se vuelve una tarjeta */
    .mini.apila thead { display: none; }
    .mini.apila tr { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
    .mini.apila td, .mini.apila td:first-child { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .2rem 0; border: 0; text-align: right; white-space: normal; }
    .mini.apila td::before { content: attr(data-l); flex-shrink: 0; color: var(--mute); font-size: .8rem; text-align: left; }
    .mini.apila td:first-child { display: block; text-align: left; margin-bottom: .2rem; }
    .mini.apila td.vacio, .mini.apila td:empty { display: none; }
    .mini.apila td[data-l="Registrar pago"] { display: block; text-align: left; margin-top: .5rem; }
    .mini.apila td[data-l="Registrar pago"]::before { display: block; margin-bottom: .3rem; }
    .mini.apila td .pago input { flex: 1 1 7rem; width: auto; }
    .mini.apila tfoot tr { background: #fafafa; border-bottom: 0; }
    .grid, .grid3, .steps, .two { grid-template-columns: 1fr; }
    .item { grid-template-columns: 1fr 1fr; } .item .srv { grid-column: 1 / -1; } .item .imp { text-align: left; }
    .mini thead { display: table-header-group; } .mini tr { display: table-row; padding: 0; }
    .mini td, .mini td:first-child { display: table-cell; padding: .5rem .6rem; border-bottom: 1px solid var(--line); } .mini td::before { content: none; }
    .stats { grid-template-columns: 1fr 1fr; }
    .search { width: 100%; } .search input { flex: 1; min-width: 0; }
    thead { display: none; }
    tr { display: block; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
    td { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border: 0; }
    td::before { content: attr(data-l); color: var(--mute); font-size: .8rem; }
    td:first-child { display: block; } td:first-child::before, .acts::before { content: none; }
    td.acts { display: block; text-align: left; margin-top: .5rem; } td.acts > * { margin: 0 .3rem 0 0; }
    tr.sub { background: #fafafa; padding-left: 1.6rem; } .sub td:first-child { display: none; }
}

/* Marca de WhatsApp enviado */
.wa-ok { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .2rem .1rem .55rem; border-radius: 999px; background: #e6f5ec; color: var(--green); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.wa-ok[hidden], td.acts > .wa-ok[hidden] { display: none; }
td.acts > .wa-ok { display: inline-flex; }
.wa-resp { display: inline-block; width: auto; max-width: 8.2rem; margin: 0; padding: .1rem 1.4rem .1rem .45rem; font: inherit; font-size: .76rem; border: 1px solid var(--line); border-radius: 999px; background-color: #fff; color: var(--mute); cursor: pointer; }
/* Colores por respuesta (selector, pastillas del historial y filtros del panel) */
.r-interesado { color: var(--brand) !important; background-color: #e8f1fa !important; }
.r-agendo { color: var(--green) !important; background-color: #e6f5ec !important; }
.r-no_contesto { color: var(--amber) !important; background-color: #fff4e0 !important; }
.r-no_interesa { color: var(--red) !important; background-color: #fdecea !important; }
.pill.r- { background: #eef0f3; color: var(--mute); }

/* Agendar: desplegable de servicio, pastilla de cita y ventana emergente */
select.agendar { display: inline-block; width: 6.4rem; margin: 0; padding: .25rem 1.1rem .25rem .45rem; font-size: .76rem; background-position: right .3rem center; font-weight: 600; color: var(--brand); border-color: var(--brand); cursor: pointer; }
select.agendar.btn-sel { padding: .6rem 2rem .6rem 1rem; font-size: inherit; }
.cita-pill { display: inline-block; padding: .2rem .6rem; border: 1px solid #b9d3ea; border-radius: 999px; background: #e8f1fa; color: var(--brand); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cita-pill.vencida { background: #fdecea; border-color: #f3b9b4; color: var(--red); }
.agenda { width: min(480px, calc(100vw - 32px)); padding: 1.2rem; border: 0; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.agenda::backdrop { background: rgba(20, 24, 31, .45); }
.agenda-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.agenda-top h2 { margin: 0; }
.agenda-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--mute); cursor: pointer; }
.agenda-pie { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.agenda-extra { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.agenda-extra[hidden] { display: none; }
.agenda label[hidden], .agenda p[hidden] { display: none; }
/* Con agendar, las acciones de un renglón pueden pasar a una segunda línea en vez de desbordar la tabla */
td.acts { white-space: normal; }
td.acts > * { margin-top: .15rem; margin-bottom: .15rem; }
.cita-pill.trabajando { background: #fff4e0; border-color: #f0cf95; color: var(--amber); }

/* Campo de contraseña con botón Ver/Ocultar */
.ver-pass { position: relative; display: block; }
.ver-pass input { padding-right: 4.2rem; }
.ver-pass .link { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); margin-top: .12rem; background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--brand); cursor: pointer; }

/* Ventana de avisos al entrar */
.avisos { width: min(560px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto; }
.avisos h3 { margin: .8rem 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.aviso { padding: .7rem 0; border-top: 1px solid var(--line); }
.aviso p { margin: 0 0 .5rem; } .aviso small { display: inline; }
.aviso-acc { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.aviso-acc .link-danger { margin-left: auto; font-size: .85rem; }

/* Recuadro "En vivo": técnicos trabajando con su cronómetro corriendo */
.en-vivo { margin-bottom: 1rem; padding: .8rem 1rem; }
.en-vivo[hidden] { display: none; }
.rec-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.rec-top h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .45rem; text-transform: uppercase; letter-spacing: .04em; }
.rec { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.rec small { display: inline; margin-left: auto; }
.rec.vivo { background: linear-gradient(90deg, #fdecea, transparent 70%); margin: 0 -1rem; padding: .55rem 1rem; }
.vivo-pill { background: #d93025; color: #fff; display: inline-flex; align-items: center; gap: .35rem; }
.vivo-pill .punto { background: #fff; width: .5rem; height: .5rem; }
.punto { width: .65rem; height: .65rem; border-radius: 50%; background: #d93025; display: inline-block; animation: latido 1.4s ease-out infinite; }
.crono { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 1.1rem; color: #d93025; }

@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, .6); } 70% { box-shadow: 0 0 0 .5rem rgba(217, 48, 37, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0); } }
.en-vivo .nadie { margin: .3rem 0 .4rem; color: var(--mute); font-size: .9rem; }
.borrar-srv[hidden], #en-vivo-borrar[hidden] { display: none; }
#en-vivo-borrar { display: flex; justify-content: flex-end; padding-top: .5rem; border-top: 1px solid var(--line); }
.rec .sel-srv, td.sel-td .sel-srv, .lote input[type=checkbox] { width: 1.05rem; height: 1.05rem; flex: none; margin: 0; cursor: pointer; }
.borrar-srv .btn { background: var(--red); } .borrar-srv .btn:disabled { opacity: .45; cursor: default; }
.nota-venta > p { margin: 0 0 .5rem; }
.nota-error { color: var(--red); font-size: .85rem; }
.nota-venta[hidden], .nota-error[hidden] { display: none; }
.nota-lista { color: var(--green); }
.aviso-acc .link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; margin-left: auto; }
.rec.espera { background: linear-gradient(90deg, #fff6e0, transparent 70%); margin: 0 -1rem; padding: .55rem 1rem; }
.sin-aceptar { background: #f4b400; color: #3d2b00; }
.rec small.atrasado { color: var(--red); font-weight: 600; }
.conceptos { display: grid; gap: .5rem; margin-bottom: .5rem; }
.concepto { display: grid; grid-template-columns: 1fr 4.2rem 6.5rem 1.6rem; gap: .25rem .5rem; align-items: end; padding: .5rem; background: #f7f8fa; border-radius: 8px; }
.concepto label { margin: 0; font-size: .8rem; }
.concepto .c-desc { grid-column: 1 / -1; font-size: .85rem; }
.c-quitar { background: none; border: 0; color: var(--mute); cursor: pointer; padding: 0 0 .55rem; font-size: 1rem; }
.c-quitar:hover { color: var(--red); }
.nota-pie { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; font-size: .9rem; }
.nota-pie label { margin: 0; display: flex; align-items: center; gap: .4rem; font-size: .85rem; } .nota-pie select { width: auto; }
.nota-pie .link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.nota-total { margin-left: auto; } .nota-total strong { font-size: 1.1rem; }
@media (max-width: 480px) { .concepto { grid-template-columns: 1fr 1fr 1.6rem; } .concepto .c-srv { grid-column: 1 / -1; } }

/* ===================================================================
   Versión simple (nov 2026): menú corto, botones grandes, pasos claros
   =================================================================== */
:root { --brand: #0b6f9c; --brand-2: #e7f4fa; --marca: #990100; --amarillo: #f7e225; --radio: 14px; --sombra: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.06); }
body { font-size: 16px; -webkit-tap-highlight-color: transparent; }
.card { border-radius: var(--radio); box-shadow: var(--sombra); }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 10px; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: translateY(1px); }
.btn.sm { min-height: 34px; }
.btn.grande { min-height: 52px; padding: .8rem 1.4rem; font-size: 1.05rem; border-radius: 12px; }
.btn.ancho { width: 100%; }
.btn.ghost { background: #fff; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
:focus-visible { outline: 3px solid #7cc4e4; outline-offset: 2px; }

/* Encabezado */
.bar { position: sticky; top: 0; z-index: 20; flex-wrap: nowrap; padding: .6rem 1.2rem; box-shadow: 0 1px 0 var(--line); border-bottom: 3px solid var(--marca); }
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.menu { display: flex; align-items: center; gap: .2rem; margin-right: auto; margin-left: 1.2rem; }
.menu > a, .menu summary { padding: .5rem .8rem; border-radius: 10px; color: var(--ink); font-weight: 500; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; font-size: .75em; color: var(--mute); }
.menu > a:hover, .menu summary:hover { background: var(--bg); }
.menu > a.on, .menu summary.on { background: var(--brand-2); color: var(--brand); font-weight: 700; }
.mas { position: relative; }
.mas > div { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; padding: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); display: grid; }
.mas > div a { padding: .6rem .8rem; border-radius: 8px; color: var(--ink); } .mas > div a:hover { background: var(--bg); }
.bar-acc { display: flex; align-items: center; gap: .6rem; }
.campana { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; }
.campana b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: .72rem; line-height: 20px; }
.campana[hidden] { display: none; }

/* Barra de abajo en el celular */
.tabbar { display: none; }

/* Chips (opciones rápidas) */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .9rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 42px; padding: .5rem .95rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer; margin: 0; }
.chip:hover { border-color: #b8c4d0; }
.chip.on, label.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-2); color: var(--brand); font-weight: 700; }
label.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
label.chip:has(input:focus-visible) { outline: 3px solid #7cc4e4; outline-offset: 2px; }
.seg { gap: .4rem; }
.paso-t { margin: .2rem 0 .5rem; font-weight: 700; font-size: .95rem; }
.prox-fecha { max-width: 220px; margin: -.3rem 0 .6rem; }
.prox-fecha[hidden] { display: none; }
.prox-txt { margin: 0 0 .6rem; color: var(--green); font-weight: 600; min-height: 1.2em; }
.prox-txt:empty { display: none; }

/* Detalles que no siempre se necesitan */
details.mas-datos { margin: .2rem 0 1rem; border: 1px dashed var(--line); border-radius: 12px; padding: 0 .9rem; }
details.mas-datos > summary { cursor: pointer; padding: .75rem 0; color: var(--brand); font-weight: 600; list-style: none; }
details.mas-datos > summary::-webkit-details-marker { display: none; }
details.mas-datos > summary::before { content: "+ "; }
details.mas-datos[open] > summary::before { content: "− "; }
details.mas-datos[open] { padding-bottom: .3rem; }

/* Ventanas tipo hoja */
.agenda { border-radius: 18px; }
.agenda-pie .btn.grande { flex: 1; }
.hoja { width: min(520px, calc(100vw - 24px)); }
.acciones-grandes { display: grid; gap: .6rem; }
.accion-g { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; width: 100%; padding: .9rem 1rem; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.accion-g:hover { border-color: var(--brand); background: #fbfdff; }
.accion-g .ico-c { grid-row: 1 / 3; }
.accion-g b { font-size: 1.05rem; } .accion-g small { margin: 0; }
.ico-c { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; }
.ico-c .ico { width: 26px; height: 26px; }
.ico-c.rojo { background: #fbe9e9; color: var(--marca); } .ico-c.azul { background: var(--brand-2); color: var(--brand); }
.ico-c.verde { background: #e6f5ec; color: var(--green); } .ico-c.amarillo { background: #fff6cc; color: #8a6d00; }
.buscador { position: relative; display: block; margin: 0 0 .6rem; color: var(--mute); }
.buscador .ico { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); }
.buscador input { margin: 0; padding: .8rem .9rem .8rem 2.7rem; font-size: 1.05rem; border-radius: 12px; }
.resultados { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; max-height: 55vh; overflow: auto; }
.resultados button, .resultados a { display: block; width: 100%; padding: .7rem .9rem; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.resultados button:hover, .resultados a:hover { border-color: var(--brand); }
.resultados small { margin-top: .1rem; }
.lista-mas { display: grid; gap: .3rem; }
.lista-mas a { padding: .85rem 1rem; border-radius: 12px; background: var(--bg); color: var(--ink); font-weight: 500; }
.lista-mas a.salir { color: var(--red); background: #fff; border: 1px solid var(--line); }

/* Confirmación */
.toast { position: fixed; z-index: 60; left: 50%; top: 76px; transform: translateX(-50%); display: flex; align-items: center; gap: .5rem; max-width: calc(100vw - 32px); padding: .75rem 1.1rem; border-radius: 12px; background: #13361f; color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .4s, transform .4s; }
.toast .ico { color: #7be3a4; }
.toast.fuera { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; }

@media (max-width: 760px) {
    body.con-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .bar { padding: .55rem 12px; }
    .bar .menu, .bar .crear-btn { display: none; }
    .bar-acc { margin-left: auto; }
    .tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(16,24,40,.06); }
    .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem 0; border: 0; background: none; font: inherit; font-size: .72rem; font-weight: 600; color: var(--mute); cursor: pointer; }
    .tabbar .ico { width: 24px; height: 24px; }
    .tabbar .on { color: var(--brand); }
    .tabbar .tab-crear { justify-self: center; width: 58px; height: 58px; margin-top: -24px; padding: 0; justify-content: center; border-radius: 50%; background: var(--marca); color: #fff; box-shadow: 0 6px 16px rgba(153,1,0,.35); }
    .tabbar .tab-crear .ico { width: 30px; height: 30px; }
    dialog.hoja { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); max-height: 90vh; }
    .agenda { max-height: 92vh; overflow-y: auto; }
    .chip { font-size: 1rem; }
    .toast { top: 70px; }
}

/* Inicio */
.hola { display: flex; justify-content: space-between; align-items: end; margin: .4rem 0 1rem; }
.hola h1 { font-size: 1.7rem; margin: 0; } .hola p { margin: 0; color: var(--mute); }
.buscador.grande { margin-bottom: 1rem; }
.buscador.grande input { padding: 1rem 1rem 1rem 3rem; font-size: 1.1rem; border-radius: 14px; box-shadow: var(--sombra); }
.buscador.grande > .ico { left: 1rem; width: 1.4em; height: 1.4em; top: 1.65rem; }
.resultados.flota { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 6px); padding: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.resultados.flota[hidden] { display: none; }
.resultados a.nuevo { color: var(--brand); font-weight: 600; border-style: dashed; }
.acciones-inicio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.acciones-inicio .accion-g { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: .25rem; padding: 1.1rem; box-shadow: var(--sombra); }
.acciones-inicio .accion-g .ico-c { grid-row: auto; margin-bottom: .4rem; }
.inicio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.card-top h2 { margin: 0; }
.card-top + .hint { margin: -.2rem 0 .6rem; }
.filas { list-style: none; margin: 0; padding: 0; }
.filas li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.filas li:first-child { border-top: 0; }
.fila-txt { min-width: 0; color: var(--ink); } .fila-txt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-acc { display: flex; align-items: center; gap: .4rem; flex: none; }
.monto { font-variant-numeric: tabular-nums; }
.vacio-bonito { text-align: center; padding: 1rem .5rem; color: var(--mute); } .vacio-bonito p { margin: 0 0 .7rem; }
@media (max-width: 1000px) { .inicio-grid { grid-template-columns: 1fr; } .acciones-inicio { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
    .hola h1 { font-size: 1.45rem; }
    .acciones-inicio .accion-g { padding: .9rem; } .acciones-inicio .accion-g small { display: none; }
    .solo-pc { display: none; }
    .filas li { align-items: flex-start; }
}

/* Cliente: alta y ficha */
.volver { margin: 0 0 .6rem; }
.angosto { max-width: 560px; margin: 0 auto; }
.subtitulo { color: var(--mute); margin: -.2rem 0 1rem; }
.form-grande input, .form-grande textarea, .form-grande select { padding: .8rem .9rem; font-size: 1.02rem; border-radius: 10px; }
.form-grande label { font-size: .9rem; font-weight: 600; color: #374151; }
.alert.suave { background: #fff6e0; color: #7a4b00; margin: -.4rem 0 .8rem; }
.alert[hidden] { display: none; }
.siguiente { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; background: #f0faf4; border-color: #bfe5cc; }
.ficha { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.perfil-top { display: flex; align-items: center; gap: .9rem; margin-bottom: .8rem; }
.perfil-top h1 { margin: 0 0 .2rem; font-size: 1.45rem; line-height: 1.2; }
.avatar { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--marca), #c8322f); color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.datos { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.datos li { display: flex; align-items: center; gap: .6rem; color: var(--ink); } .datos .ico { color: var(--mute); }
.acc-perfil { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.acc-perfil > * { width: 100%; }
.acc-perfil .wa-ok { grid-column: 1 / -1; justify-self: start; width: auto; }
.btn.rojo-marca { background: var(--marca); }
.cita-prox { margin: .9rem 0 0; color: var(--mute); }
.lugar-bloque { padding: .2rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.lugar-nom { margin: 0 0 .3rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; color: var(--mute); }
.fecha-grande { display: flex; flex-direction: column; padding: .9rem 1rem; border-radius: 12px; background: var(--bg); border-left: 5px solid var(--mute); margin-bottom: .4rem; }
.fecha-grande b { font-size: 1.5rem; line-height: 1.2; } .fecha-grande span { color: var(--mute); }
.fecha-grande.vencido { border-left-color: var(--red); background: #fdf2f1; } .fecha-grande.vencido span { color: var(--red); font-weight: 600; }
.fecha-grande.proximo { border-left-color: var(--amber); background: #fff8eb; }
.fecha-grande.ok { border-left-color: var(--green); background: #f0faf4; }
.programar { margin: .8rem 0; }
.hecho-hoy .btn small { display: inline; margin-left: .3rem; font-weight: 400; }
details.mas-datos.chico { margin: .6rem 0 0; border: 0; padding: 0; } details.mas-datos.chico > summary { font-size: .88rem; padding: .3rem 0; color: var(--mute); }
.en-linea { display: flex; gap: .5rem; align-items: center; } .en-linea input { margin: 0; }
details.plegable > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.plegable > summary::-webkit-details-marker { display: none; }
details.plegable > summary h2 { margin: 0; }
details.plegable > summary::after { content: "Editar"; color: var(--brand); font-weight: 600; font-size: .9rem; }
details.plegable[open] > summary::after { content: "Cerrar"; }
@media (max-width: 860px) { .ficha { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .siguiente .chips .btn { flex: 1 1 100%; } }

/* Nota de servicio paso a paso */
.nota-page { max-width: 720px; padding-bottom: 5rem; }
.paso { margin-bottom: 1rem; }
.paso h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.paso-num { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--marca); color: #fff; font-size: .9rem; }
.cli-elegido { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1.5px solid var(--brand); border-radius: 12px; background: var(--brand-2); }
.cli-elegido[hidden], #cli-buscar[hidden], #cli-nuevo[hidden], #lugar-box[hidden], #anticipo-box[hidden], #metodo-box[hidden] { display: none; }
.cli-elegido > div { flex: 1; } .cli-elegido b { display: block; }
.avatar.chico { width: 42px; height: 42px; font-size: .95rem; }
.nuevo-tag { margin: .2rem 0 .7rem; padding: .5rem .7rem; border-radius: 8px; background: #f0faf4; color: var(--green); font-size: .9rem; font-weight: 600; }
.buscador.sug input { margin: 0; }
.frecuentes .chip { min-height: 38px; padding: .4rem .8rem; font-size: .9rem; }
.frecuentes .chip small { display: inline; margin-left: .2rem; color: var(--mute); }
.concepto-f { position: relative; display: grid; grid-template-columns: 1fr 8.2rem 7.5rem 6.5rem; gap: .5rem .7rem; align-items: end; padding: .9rem 2.2rem .9rem .9rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.concepto-f > label, .concepto-f > div { margin: 0; }
.concepto-f span { display: block; font-size: .8rem; color: var(--mute); margin-bottom: .25rem; }
.concepto-f input { margin: 0; background: #fff; }
.cf-desc { grid-column: 1 / -1; } .cf-desc textarea { margin: 0; background: #fff; }
.cf-desc .link { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--brand); cursor: pointer; }
.cf-desc [hidden] { display: none; }
.cf-imp b { display: block; padding: .6rem 0; text-align: right; font-variant-numeric: tabular-nums; }
.cf-quitar { position: absolute; top: .45rem; right: .45rem; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--mute); cursor: pointer; }
.cf-quitar:hover { background: #fdecea; color: var(--red); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.stepper button { width: 2.4rem; border: 0; background: var(--bg); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.stepper input { border: 0; border-radius: 0; text-align: center; padding-left: 0; padding-right: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .peso input::-webkit-inner-spin-button { -webkit-appearance: none; }
.peso { position: relative; } .peso::before { content: "$"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--mute); z-index: 1; }
.peso input { padding-left: 1.5rem; }
.tot { max-width: 340px; }
.chips.seg.grande .chip { flex: 1 1 0; justify-content: center; min-height: 50px; font-size: 1rem; }
#anticipo-box { max-width: 260px; font-weight: 600; color: #374151; } #anticipo-box small { color: var(--amber); font-weight: 600; }
.barra-guardar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 -16px; padding: .8rem 16px calc(.8rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,40,.06); }
.barra-guardar b { font-size: 1.4rem; font-variant-numeric: tabular-nums; } .barra-guardar small { margin: 0; }
.barra-guardar .btn { flex: 0 1 260px; }
@media (max-width: 760px) {
    .concepto-f { grid-template-columns: 1fr 1fr; } .cf-srv { grid-column: 1 / -1; } .cf-imp { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; } .cf-imp span { margin: 0; } .cf-imp b { padding: 0; }
    .barra-guardar { bottom: calc(68px + env(safe-area-inset-bottom)); margin: 0 -12px; padding: .7rem 12px; }
    .barra-guardar .btn { flex: 1 1 auto; }
    .sug ul.flota { position: static; box-shadow: none; }
}

/* Nota guardada */
.doc-hero { margin-bottom: 1rem; }
.doc-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.doc-hero h1 { margin: 0; font-size: 1.5rem; }
.doc-folio { margin: 0 0 .2rem; color: var(--mute); font-weight: 600; font-size: .9rem; }
.doc-total { text-align: right; } .doc-total b { display: block; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; margin-bottom: .25rem; }
.doc-acc { display: flex; flex-wrap: wrap; gap: .6rem; } .doc-acc .btn { flex: 1 1 220px; }
.doc-acc [hidden] { display: none; }
.doc-mas { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.doc-mas .link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
@media (max-width: 760px) { .doc-total { text-align: left; } .doc-acc .btn { flex-basis: 100%; } }

/* Lista de clientes */
.titulo-acc { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .2rem 0 1rem; }
.titulo-acc h1 { margin: 0; }
.stat { transition: border-color .15s, box-shadow .15s; box-shadow: var(--sombra); }
.stat.on { outline: 2px solid var(--brand); outline-offset: -2px; }
details.herramientas { margin-bottom: 1rem; }
details.herramientas > summary { font-size: .92rem; }
body:not(.seleccionando) td.cli .sel { display: none; }
body:not(.seleccionando) td.cli { padding-left: 1rem; }
@media (max-width: 760px) { body:not(.seleccionando) td.cli { padding-left: 0; } .titulo-acc .btn { padding: .55rem .9rem; } }

/* Ajustes finos */
.card-top a { white-space: nowrap; }
.acciones-inicio .accion-g { align-content: start; align-items: start; }
@media (max-width: 760px) {
    .toast { left: 12px; right: 12px; transform: none; max-width: none; }
    .toast.fuera { transform: translateY(-12px); }
    /* Clientes: en el celular bastan las pestañas; cada cliente en una tarjeta corta */
    .stats.filtros { display: none; }
    tr:not(.sub) td[data-l="Lugar"], td[data-l="Último"] { display: none; }
    td.cli strong { font-size: 1.05rem; }
}
.ficha > .col, .ficha .card, .acc-perfil > * { min-width: 0; }
@media (max-width: 760px) {
    .btn { white-space: normal; text-align: center; line-height: 1.25; }
    .acc-perfil .btn { padding-left: .5rem; padding-right: .5rem; }
    .hecho-hoy .btn small { display: block; margin: 0; }
}
section[id], details[id] { scroll-margin-top: 84px; }
@media (max-width: 760px) { .hecho-hoy .btn { flex-wrap: wrap; } .hecho-hoy .btn small { flex-basis: 100%; } }
.toolbar { align-items: center; }
.tabs { align-items: center; } .tabs a { white-space: nowrap; }
.pill { white-space: nowrap; }
td[data-l="Último"], td[data-l="Próximo"] { white-space: nowrap; }

/* ===== Encabezado minimalista (estilo Márkora) ===== */
.bar { border-bottom: 0; box-shadow: none; background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); padding: .75rem 1.6rem; transition: box-shadow .25s ease; z-index: 40; }
.bar.sh { box-shadow: 0 1px 0 rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06); }
.brand { font-weight: 700; letter-spacing: -.01em; }
.menu { gap: .15rem; margin-left: 2rem; }
.menu > a, .menu summary { padding: .45rem .85rem; border-radius: 999px; color: #5b6472; font-weight: 500; transition: color .2s, background .2s; }
.menu > a:hover, .menu summary:hover { background: transparent; color: var(--ink); }
.menu > a.on, .menu summary.on { background: transparent; color: var(--ink); font-weight: 600; }
.menu summary::after { content: " ▾"; font-size: .7em; display: inline-block; transition: transform .25s ease; }
.mas[open] summary { color: var(--ink); }
.mas[open] summary::after { transform: rotate(180deg); }
/* Menú de vidrio */
.vidrio { position: absolute; top: calc(100% + 14px); left: 50%; min-width: 250px; padding: .7rem; display: grid; gap: .1rem;
    background: rgba(240,242,248,.86); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.7); border-radius: 20px; box-shadow: 0 24px 60px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.8);
    transform: translateX(-50%); animation: vidrio-in .22s cubic-bezier(.2,.8,.2,1); }
.mas > .vidrio a { padding: .8rem 1.1rem; border-radius: 12px; color: #1f2a44; font-size: 1.02rem; font-weight: 500; }
.mas > .vidrio a:hover { background: rgba(255,255,255,.75); }
.mas > .vidrio a.salir { color: var(--red); margin-top: .2rem; border-top: 1px solid rgba(15,23,42,.08); border-radius: 0 0 12px 12px; }
@keyframes vidrio-in { from { opacity: 0; transform: translate(-50%, -6px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
/* Fondo borroso mientras el menú está abierto */
.velo { position: fixed; inset: 0; z-index: 35; pointer-events: none; opacity: 0; background: rgba(15,23,42,.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: opacity .25s ease; }
body.menu-abierto .velo { opacity: 1; pointer-events: auto; }
/* Botones del encabezado */
.campana { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; color: #5b6472; }
.campana:hover { background: var(--bg); color: var(--ink); }
.campana b { top: 2px; right: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: .68rem; }
.hamburguesa { display: none; border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); cursor: pointer; place-items: center; }
.crear-btn { border-radius: 999px; padding: .55rem 1.15rem .55rem .95rem; background: var(--ink); min-height: 40px; font-size: .95rem; }
/* Ventanas: el fondo también se ve borroso */
dialog::backdrop { background: rgba(15,23,42,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 760px) {
    .bar { padding: .55rem 14px; }
    .hamburguesa { display: grid; }
    .bar-acc { gap: .2rem; }
}
.menu { flex-wrap: nowrap; } .menu > a, .menu summary { white-space: nowrap; }
.menu summary::after { font-size: .85em; margin-left: .15rem; }
@media (max-width: 1040px) { .menu .largo { display: none; } .menu { margin-left: 1rem; } .menu > a, .menu summary { padding: .45rem .6rem; } }

/* Historial: el texto se encoge, la etiqueta no se sale */
.hist li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.hist li > .pill { flex-shrink: 0; align-self: flex-start; }

/* Botón de WhatsApp solo con ícono */
.btn.wa-ico { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; vertical-align: middle; }
.btn.wa-ico svg { width: 19px; height: 19px; }

/* ---------- Reportes y exportar ---------- */
.titulo-btns { display: flex; gap: .5rem; }
.btn .ico { width: 18px; height: 18px; vertical-align: -3px; }
.rango { margin-bottom: 1rem; }
.rango-fechas { display: flex; align-items: flex-end; gap: .7rem; flex-wrap: wrap; margin-bottom: .9rem; }
.rango-fechas label { flex: 1 1 170px; margin: 0; font-weight: 600; font-size: .9rem; color: var(--mute); }
.rango-fechas input[type=date] { display: block; width: 100%; margin-top: .3rem; min-height: 50px; font-size: 1.05rem; font-weight: 600; color: var(--ink); border-radius: 12px; cursor: pointer; }
.rango-a { padding-bottom: .9rem; color: var(--mute); font-size: 1.2rem; }
.chips.rapidos { margin-bottom: .6rem; }
.chips.rapidos .chip { min-height: 36px; padding: .35rem .85rem; font-size: .9rem; text-decoration: none; }
.rango-txt { margin: 0; color: var(--mute); font-size: .92rem; } .rango-txt b { color: var(--ink); }
.mini-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.2rem 0 1.4rem; }
.mini-stats div { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; color: var(--mute); }
.mini-stats b { color: var(--ink); } .mini-stats small { margin-left: .3rem; color: var(--ink); font-weight: 600; }
.sec-tit { margin: 0 0 .9rem; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.export { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: .5rem .9rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra); }
.export > div { min-width: 0; }
.export b { display: block; font-size: 1.05rem; margin-bottom: .15rem; }
.export small { display: block; color: var(--mute); font-size: .86rem; line-height: 1.35; }
.export > .btn { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
.export-todo { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; grid-template-rows: auto; align-items: center; background: linear-gradient(135deg, #f3f9fd, #fff); border-color: #cfe3f1; }
.export-todo > .btn { grid-column: auto; padding-left: 1.4rem; padding-right: 1.4rem; }
.chips.seg.mini { margin: .6rem 0 0; gap: .3rem; }
.chips.seg.mini .chip { min-height: 32px; padding: .25rem .7rem; font-size: .82rem; text-decoration: none; }
.rep-grid { margin-bottom: 1rem; }
.barras { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.barras li { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .88rem; }
.barras li:first-child { border-top: 0; }
.b-per { color: var(--mute); }
.b-graf { display: grid; gap: 3px; } .b-graf i { display: block; height: 7px; min-width: 2px; border-radius: 4px; }
.b-graf .in { background: var(--green); } .b-graf .ga { background: #e9a0a0; }
.b-num { display: grid; text-align: right; font-variant-numeric: tabular-nums; font-size: .82rem; }
.mini-tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mini-tabla td, .mini-tabla th { padding: .45rem 0; border-top: 1px solid var(--line); text-align: left; }
.mini-tabla td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.mini-tabla .cab th { border-top: 0; padding-top: .8rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); }
.mini-tabla tr.cab:first-child th { padding-top: 0; }
@media (max-width: 1040px) { .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rep-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .export-grid, .rep-grid { grid-template-columns: 1fr; }
  .export-todo { grid-template-columns: auto 1fr; } .export-todo > .btn { grid-column: 1 / -1; }
  .rango-a { display: none; }
  .rango-fechas label { flex-basis: 40%; }
  .chips.rapidos { flex-wrap: nowrap; overflow-x: auto; margin-right: -1rem; padding-right: 1rem; scrollbar-width: none; }
  .chips.rapidos .chip { flex: 0 0 auto; }
}
@media print {
  .bar, .tabbar, .export-grid, .sec-tit, .sec-tit + .hint, .chips, .titulo-acc .btn, .velo, dialog { display: none !important; }
  body { background: #fff; } .card, .stat { box-shadow: none !important; }
  .rep-grid { grid-template-columns: 1fr 1fr; } .barras { max-height: none; }
}
@media (max-width: 640px) { .stats.siempre { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; } .stats.siempre .stat { padding: .7rem .8rem; font-size: .85rem; } }
.rango { padding-top: 1rem; padding-bottom: 1rem; } .rango .rango-fechas { margin-bottom: 0; }
/* Datos extra del reporte: una sola línea con puntos, sin burbujas */
p.mini-stats { display: flex; flex-wrap: wrap; gap: .2rem 0; margin: -.3rem 0 1.2rem; font-size: .88rem; color: var(--mute); }
p.mini-stats span { background: none; border: 0; padding: 0; border-radius: 0; font-size: inherit; }
p.mini-stats span + span::before { content: "·"; margin: 0 .55rem; color: #c3c8d0; }
p.mini-stats b { color: var(--ink); }
@media (max-width: 640px) {
  p.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .8rem; }
  p.mini-stats span + span::before { content: none; }
  .rango-fechas { flex-wrap: nowrap; gap: .5rem; }
  .rango-fechas label { flex: 1 1 0; min-width: 0; }
  .rango-fechas input[type=date] { font-size: .95rem; padding-left: .6rem; padding-right: .4rem; min-height: 46px; }
}

/* Navbar centrada: se alinea con el ancho del contenido en pantallas grandes */
@media (min-width: 761px) {
  .bar { padding-left: max(1.6rem, calc((100% - 1100px) / 2 + 16px)); padding-right: max(1.6rem, calc((100% - 1100px) / 2 + 16px)); }
}

/* Ficha del cliente: cambiar / guardar / quitar fecha en una fila chica */
.fecha-acc { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .9rem; }
.fecha-acc .btn { min-height: 36px; padding: .4rem .8rem; font-size: .88rem; border-radius: 10px; }
.cambiar-fecha { position: relative; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; margin: 0; font-weight: 600; }
.cambiar-fecha .ico { width: 16px; height: 16px; }
.cambiar-fecha input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; min-height: 0; }
.cambiar-fecha.elegida { border-color: var(--brand); color: var(--brand); background: var(--brand-2); }
.guardar-fecha:disabled { opacity: .4; cursor: default; }
.quitar-fecha { color: var(--mute); }

/* Próximo mantenimiento con varios lugares: desplegable chico a la derecha del título */
.lugar-top { align-items: center; margin-bottom: .8rem; }
#lugar-sel { width: auto; max-width: 55%; min-height: 36px; padding: .3rem 2rem .3rem .75rem; font-size: .9rem; font-weight: 600; border-radius: 10px; margin: 0; }
.lugar-bloque[hidden] { display: none !important; }
.lugar-top + .lugar-bloque, .lugar-bloque:not([hidden]) { border-top: 0; padding-top: 0; }
@media (max-width: 640px) { .lugar-top { flex-wrap: wrap; } #lugar-sel { max-width: 100%; width: 100%; } }

/* Agendar: ¿Cuántos? con − y + */
.cant-fila { display: flex; align-items: center; gap: .7rem; margin: -.2rem 0 1rem; }
.cant-fila .paso-t { margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: none; font-size: 1.25rem; line-height: 1; color: var(--ink); cursor: pointer; }
.stepper button:hover { background: var(--brand-2); color: var(--brand); }
.stepper input { width: 42px; min-height: 0; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 0; text-align: center; font-size: 1.05rem; font-weight: 700; -moz-appearance: textfield; appearance: textfield; background: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cant-txt { color: var(--mute); font-size: .92rem; }
.vivo-camino { background: #e3effd; color: #1a5fb4; } .vivo-llego { background: #fff1d6; color: #8a5a00; }
.reabrir-btn { margin-left: .4rem; padding: .1rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.reabrir-btn:hover { border-color: var(--brand); }

/* Reabrir: elegir el paso */
#reabrir { max-width: 380px; }
.lista-pasos { display: grid; gap: .5rem; }
.paso-op { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.paso-op:hover { border-color: var(--brand); background: #fbfdff; }
.paso-op i { width: 12px; height: 12px; border-radius: 50%; background: #9aa3ad; flex: none; }
.op-camino i { background: #1a73e8; } .op-llego i { background: #e08a00; } .op-trabajando i { background: var(--green); }

/* En vivo minimalista */
.en-vivo { padding: .7rem 1rem .4rem; }
.rec-top h2 { font-size: .78rem; font-weight: 600; color: #8a929c; letter-spacing: .06em; }
.rec-top .punto { width: .5rem; height: .5rem; }
.rec, .rec.vivo, .rec.espera { background: none; margin: 0; padding: .55rem 0; font-size: .85rem; color: #3d4450; }
.rec strong { font-weight: 600; color: var(--ink); }
.rec small { color: #9aa3ad; font-size: .78rem; }
.en-vivo .pill { padding: .15rem .55rem; font-size: .72rem; font-weight: 600; border-radius: 999px; }
.vivo-pill { background: #fdecea; color: #c5221f; }
.vivo-pill .punto { background: #d93025; width: .4rem; height: .4rem; }
.sin-aceptar { background: #fdf3d8; color: #8a6400; }
.crono { font-size: .95rem; font-weight: 600; }
.en-vivo .pill { width: 6.6rem; flex: none; justify-content: center; text-align: center; display: inline-flex; align-items: center; gap: .3rem; box-sizing: border-box; }

/* Navbar más pequeña y minimalista */
.bar { padding-top: .5rem; padding-bottom: .5rem; }
.brand { font-size: .95rem; gap: .5rem; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.menu > a, .menu summary { font-size: .88rem; padding: .35rem .7rem; color: #6b7380; }
.menu > a.on, .menu summary.on { color: var(--ink); font-weight: 600; }
.menu summary::after { opacity: .6; }
.campana { width: 34px; height: 34px; }
.campana .ico { width: 18px; height: 18px; }
.campana b { top: 0; right: -2px; min-width: 16px; height: 16px; line-height: 16px; font-size: .62rem; padding: 0 4px; }
.crear-btn { min-height: 32px; padding: .35rem .9rem .35rem .75rem; font-size: .85rem; gap: .3rem; }
.crear-btn .ico { width: 15px; height: 15px; }

/* Títulos de página alineados con el texto de dentro de los recuadros */
main.wrap > h1, main.wrap > .titulo-acc, main.wrap > .mes, main.wrap > .hola, main.wrap > .volver { padding-left: calc(1rem + 1px); padding-right: calc(1rem + 1px); }

/* ===== Estilo minimalista en todas las páginas de la oficina ===== */
.con-tabs h1 { font-size: 1.4rem; letter-spacing: -.01em; }
.con-tabs .card h2, .con-tabs h2 { font-size: .98rem; font-weight: 600; }
.con-tabs .card { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
/* Tablas */
.con-tabs th { background: none; text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 500; color: #9aa3ad; padding-top: .8rem; padding-bottom: .6rem; }
.con-tabs td { padding-top: .6rem; padding-bottom: .6rem; font-size: .86rem; }
.con-tabs td strong { font-weight: 500; }
.con-tabs td small { font-size: .75rem; color: #9aa3ad; }
.con-tabs tbody tr:last-child td { border-bottom: 0; }
.con-tabs .card.table tbody tr:hover td { background: #fafbfc; }
.con-tabs .mini tfoot td { font-weight: 600; }
/* Etiquetas y campos */
.con-tabs label { font-size: .8rem; color: #8a929c; }
.con-tabs input:not([type=checkbox]):not([type=radio]):not([type=file]), .con-tabs select, .con-tabs textarea { padding: .5rem .7rem; font-size: .88rem; border-radius: 10px; border-color: #e3e6ea; }
.con-tabs input:focus, .con-tabs select:focus, .con-tabs textarea:focus { outline: 0; border-color: #b9c0c9; box-shadow: 0 0 0 3px rgba(20,24,31,.06); }
.con-tabs input::placeholder, .con-tabs textarea::placeholder { color: #b3b9c1; }
/* Botones */
.con-tabs .btn { min-height: 36px; padding: .4rem .95rem; font-size: .86rem; font-weight: 600; border-radius: 999px; }
.con-tabs .btn.sm { min-height: 30px; padding: .25rem .7rem; font-size: .8rem; }
.con-tabs .btn.ghost { border-color: #e3e6ea; color: #3d4450; }
.con-tabs .btn.ghost:hover { border-color: #c9ced6; filter: none; }
.con-tabs .btn.grande { min-height: 42px; padding: .55rem 1.1rem; font-size: .92rem; border-radius: 999px; }
.con-tabs .btn.wa-ico { width: 32px; height: 32px; min-height: 32px; padding: 0; }
.con-tabs .btn.wa-ico svg { width: 17px; height: 17px; }
.con-tabs .btn .ico { width: 16px; height: 16px; }
/* Recuadros de totales */
.con-tabs .stats { gap: .6rem; }
.con-tabs .stat, .con-tabs .stat.vencido, .con-tabs .stat.proximo, .con-tabs .stat.ok { border-left: 1px solid var(--line); padding: .75rem .95rem; font-size: .8rem; color: #8a929c; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.con-tabs .stat b { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; margin-bottom: .15rem; }
.con-tabs .stat::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c3c8cf; margin-bottom: .45rem; }
.con-tabs .stat.vencido::before { background: var(--red); } .con-tabs .stat.proximo::before { background: #e8a200; } .con-tabs .stat.ok::before { background: var(--green); }
.con-tabs .stat.ingreso::before, .con-tabs .stat.verde::before { background: var(--green); } .con-tabs .stat.gasto::before, .con-tabs .stat.rojo::before { background: var(--red); }
.con-tabs .stat.on { outline: 0; border-color: var(--ink) !important; }
/* Pestañas y etiquetas */
.con-tabs .tabs a { font-size: .82rem; padding: .32rem .75rem; }
.con-tabs .pill { font-size: .72rem; font-weight: 600; }
.con-tabs .hint { font-size: .82rem; color: #8a929c; }
@media (max-width: 760px) {
    .con-tabs .btn { min-height: 40px; }
    .con-tabs input:not([type=checkbox]):not([type=radio]):not([type=file]), .con-tabs select, .con-tabs textarea { font-size: 16px; }
}

/* Barra de filtros en píldoras (Servicios, Reportes) */
.barra-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 1rem; }
.barra-f form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.f-pill { display: inline-flex; align-items: center; gap: .3rem; height: 36px; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .85rem; color: var(--ink); }
.f-pill input, select.f-pill { width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; font: inherit; color: inherit; box-shadow: none; outline: none; }
select.f-pill { font-size: .85rem; height: 36px; padding: 0 2rem 0 .85rem; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa3ad' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .8rem center; }
.f-pill:hover, .f-pill:focus-within { border-color: #c9ced6; }
.f-pill em { font-style: normal; color: #9aa3ad; }
.f-pill small { color: #8a929c; font-size: .8rem; }
.f-pill input::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; margin-left: .15rem; }
.f-pill button { display: grid; place-items: center; width: 26px; height: 26px; margin-right: -.45rem; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; }
.f-pill button svg { width: 14px; height: 14px; }
@media (max-width: 600px) { .barra-f, .barra-f form { width: 100%; } .f-rango .f-pill { flex: 1; justify-content: center; } }
.rango.barra-f { justify-content: flex-start; padding: 0; background: none; border: 0; box-shadow: none; }
.con-tabs .f-pill input, .con-tabs select.f-pill { padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: .85rem; min-height: 0; width: auto; display: inline-block; }
.con-tabs select.f-pill { padding: 0 2rem 0 .85rem; border: 1px solid var(--line); border-radius: 999px; height: 36px; }
/* Buscador y fecha del cliente más ligeros */
.con-tabs .buscador input { padding: .55rem .8rem .55rem 2.4rem !important; font-size: .9rem; border-radius: 999px; }
.con-tabs .buscador .ico { left: .85rem; width: 16px; height: 16px; }
.con-tabs .buscador.grande input { padding: .7rem 1rem .7rem 2.7rem !important; font-size: .95rem; border-radius: 999px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.con-tabs .buscador.grande > .ico { top: 50%; left: 1rem; width: 18px; height: 18px; }
.con-tabs .fecha-grande { border-left: 0; padding: .75rem .95rem; border-radius: 12px; }
.con-tabs .fecha-grande b { font-size: 1.2rem; font-weight: 600; }
.con-tabs .fecha-grande span { font-size: .82rem; }

/* Totales: punto + texto arriba, número abajo, compactos */
.con-tabs .stat { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; padding: .6rem .85rem; font-size: .76rem; line-height: 1.3; }
.con-tabs .stat::before { order: -1; margin: 0; width: 6px; height: 6px; }
.con-tabs .stat b { order: 1; flex-basis: 100%; margin: .15rem 0 0; font-size: clamp(1rem, 1.7vw, 1.2rem); font-weight: 600; letter-spacing: -.01em; }
/* Totales sin cuadro: solo punto, texto y número */
.con-tabs .stat, .con-tabs .stat.vencido, .con-tabs .stat.proximo, .con-tabs .stat.ok { background: none; border: 0; box-shadow: none; border-radius: 10px; padding: .3rem calc(1rem + 1px); }
.con-tabs a.stat:hover { background: rgba(20,24,31,.04); }
.con-tabs .stat.on { background: rgba(20,24,31,.06); border: 0 !important; }

/* Inicio: accesos rápidos sin cuadro */
.con-tabs .acciones-inicio { gap: .4rem; }
.con-tabs .acciones-inicio .accion-g { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; row-gap: 0; align-items: center; align-content: center; padding: .45rem calc(1rem + 1px); border: 0; background: none; box-shadow: none; border-radius: 12px; }
.con-tabs .acciones-inicio .accion-g:hover { background: rgba(20,24,31,.04); }
.con-tabs .acciones-inicio .accion-g .ico-c { grid-row: 1 / 3; margin: 0; width: 34px; height: 34px; border-radius: 10px; }
.con-tabs .acciones-inicio .accion-g .ico-c .ico { width: 18px; height: 18px; }
.con-tabs .acciones-inicio .accion-g b { font-size: .88rem; font-weight: 600; }
.con-tabs .acciones-inicio .accion-g small { font-size: .76rem; color: #9aa3ad; }
@media (max-width: 760px) { .con-tabs .acciones-inicio .accion-g { padding: .45rem .5rem; } .con-tabs .acciones-inicio .accion-g b { grid-row: 1 / 3; line-height: 1.25; } }

/* Tablas sin caja de fondo (computadora) */
@media (min-width: 761px) {
    .con-tabs .card.table { background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
    .con-tabs .card.table th { border-bottom-color: #e3e6ea; }
    .con-tabs .card.table td { border-bottom-color: #eceef1; }
    .con-tabs .card.table tbody tr:hover td { background: rgba(20,24,31,.03); }
}

/* Secciones plegables sin caja: solo texto */
.con-tabs details.mas-datos { border: 0; border-radius: 0; padding: 0; }
.con-tabs details.mas-datos > summary { padding: .45rem 0; font-size: .85rem; font-weight: 500; }
.con-tabs main.wrap > details.mas-datos { padding: 0 calc(1rem + 1px); }

/* Ficha del cliente: acciones solo ícono y texto */
.con-tabs .acc-perfil .btn { background: none !important; border: 0 !important; box-shadow: none; color: #3d4450; font-weight: 500; justify-content: flex-start; padding-left: 0; padding-right: 0; min-height: 34px; filter: none; }
.con-tabs .acc-perfil .btn:hover { opacity: .75; }
.con-tabs .acc-perfil .btn .ico { width: 17px; height: 17px; }
.con-tabs .acc-perfil .btn.rojo-marca { color: var(--marca); }
.con-tabs .acc-perfil .btn.wa { color: var(--wa); }

/* Citas: solo punto y texto, sin fondo ni borde */
.con-tabs .cita-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem 0; background: none !important; border: 0 !important; font-weight: 500; font-size: .8rem; }
.con-tabs .cita-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.con-tabs .cita-pill:hover { text-decoration: underline; text-underline-offset: 2px; }
.con-tabs .acc-perfil .btn::after { content: "›"; margin-left: .3rem; font-size: 1.15em; line-height: 1; opacity: .55; transition: transform .15s; }
.con-tabs .acc-perfil .btn:hover::after { transform: translateX(2px); opacity: .9; }

/* Reportes: exportar sin caja, solo ícono, texto y enlaces Excel / PDF */
.con-tabs .export-grid { gap: .3rem 1rem; }
.con-tabs .export, .con-tabs .export-todo { grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .1rem .75rem; padding: .7rem calc(1rem + 1px); background: none; border: 0; box-shadow: none; border-radius: 12px; align-items: start; }
.con-tabs .export .ico-c { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; }
.con-tabs .export .ico-c .ico { width: 18px; height: 18px; }
.con-tabs .export b { font-size: .9rem; font-weight: 600; margin: 0; }
.con-tabs .export small { font-size: .78rem; color: #8a929c; }
.con-tabs .export .chips { margin-top: .35rem; gap: .25rem; }
.con-tabs .export .chip { font-size: .74rem; padding: .15rem .55rem; }
.descargas { grid-column: 2; display: flex; gap: 1.1rem; margin-top: .3rem; }
.descargas a { font-size: .84rem; font-weight: 600; color: var(--ink); }
.descargas a::after { content: " ›"; color: #9aa3ad; transition: margin .15s; }
.descargas a:hover::after { margin-left: 2px; }
.descargas a:hover { color: var(--brand); }
.con-tabs .export, .con-tabs .export-todo { align-content: start; }
.con-tabs .export .chips.seg .chip { font-size: .74rem; padding: .12rem .6rem; min-height: 0; border-width: 1px; }
/* Exportar: los enlaces Excel / PDF quedan a la misma altura en cada fila */
.con-tabs .export, .con-tabs .export-todo { grid-template-rows: 1fr auto; align-content: stretch; }
.con-tabs .export .ico-c { grid-row: 1; }
.con-tabs .export .descargas { grid-row: 2; align-self: end; }

/* Textos sueltos de la página alineados con títulos y contenido de recuadros */
.con-tabs main.wrap > .mini-stats, .con-tabs main.wrap > .sec-tit, .con-tabs main.wrap > h2, .con-tabs main.wrap > .hint, .con-tabs main.wrap > p:not([class]) { padding-left: calc(1rem + 1px); padding-right: calc(1rem + 1px); }
.con-tabs main.wrap > .sec-tit, .con-tabs main.wrap > h2 { margin: 1.4rem 0 .15rem; font-size: 1rem; }
.con-tabs main.wrap > .sec-tit + .hint { margin: 0 0 .6rem; }
.con-tabs .mini-stats { margin: .4rem 0 0; font-size: .82rem; }
/* Mismo margen interior en todos los recuadros, y columnas de Exportar alineadas con los recuadros de abajo */
.con-tabs .card:not(.table):not(.en-vivo) { padding-left: 1rem; padding-right: 1rem; }
.con-tabs .export-grid { column-gap: 1rem; }

/* Alineación en todas las páginas: el texto empieza en la misma línea que el título */
@media (min-width: 761px) {
    .con-tabs .card.table th:first-child, .con-tabs .card.table td:first-child { padding-left: calc(1rem + 1px); }
    .con-tabs .card.table th:last-child, .con-tabs .card.table td:last-child { padding-right: calc(1rem + 1px); }
}
.con-tabs .angosto > .volver, .con-tabs .angosto > h1, .con-tabs .angosto > .subtitulo { padding-left: calc(1rem + 1px); padding-right: calc(1rem + 1px); }
.con-tabs .angosto .card { padding-left: 1rem; padding-right: 1rem; }
.con-tabs main.wrap > .res-tec { padding-left: 0; }

/* Recuadros de Inicio y Reportes (Visitas de hoy, Les toca, Últimas notas, Corte…) sin caja */
.con-tabs .inicio-grid > .card { background: none; border: 0; box-shadow: none; border-radius: 0; padding-top: .6rem; padding-bottom: .6rem; }
.con-tabs .card-top { margin-bottom: .3rem; }
.con-tabs .card-top a { font-size: .82rem; font-weight: 500; }
.con-tabs .card-top a::after { content: " ›"; color: #9aa3ad; }
.con-tabs .filas li { padding: .6rem 0; border-top-color: #eceef1; }
.con-tabs .filas .fila-txt b { font-size: .88rem; font-weight: 600; }
.con-tabs .filas small { font-size: .76rem; color: #8a929c; }
.con-tabs .filas .btn.sm.ghost { border: 0; background: none; min-height: 0; padding: .2rem 0; color: var(--ink); font-weight: 600; font-size: .8rem; }
.con-tabs .filas .btn.sm.ghost::after { content: " ›"; color: #9aa3ad; margin-left: .15rem; }

/* En vivo sin caja */
.con-tabs .card.en-vivo { background: none; border: 0; box-shadow: none; border-radius: 0; padding: .3rem calc(1rem + 1px) .2rem; }
.con-tabs .en-vivo .rec { border-top-color: #eceef1; }
.con-tabs .rec-top a { font-size: .82rem; font-weight: 500; }
.con-tabs .en-vivo h2 { font-size: .78rem !important; font-weight: 600; color: #8a929c; letter-spacing: .06em; }

/* Hover en botones de texto con flechita e íconos de WhatsApp */
.con-tabs .filas .btn.sm.ghost, .con-tabs .card-top a, .descargas a, .con-tabs .acc-perfil .btn { transition: color .15s, opacity .15s; }
.con-tabs .filas .btn.sm.ghost::after, .con-tabs .card-top a::after { display: inline-block; transition: transform .15s, color .15s; }
.con-tabs .filas .btn.sm.ghost:hover, .con-tabs .card-top a:hover, .descargas a:hover { color: var(--brand) !important; }
.con-tabs .filas .btn.sm.ghost:hover::after, .con-tabs .card-top a:hover::after { transform: translateX(3px); color: var(--brand); }
.descargas a::after { display: inline-block; transition: transform .15s, color .15s; }
.descargas a:hover::after { transform: translateX(3px); color: var(--brand); margin-left: 0; }
.con-tabs .btn.wa-ico { transition: transform .15s, filter .15s, box-shadow .15s; }
.con-tabs .btn.wa-ico:hover { transform: scale(1.08); filter: brightness(1.05); box-shadow: 0 3px 10px rgba(31,170,89,.35); }

/* Navbar: resaltar al pasar el cursor y la página activa */
.menu > a, .menu summary { transition: color .15s, background .15s; }
.menu > a:hover, .menu summary:hover, .menu details[open] > summary { color: var(--ink) !important; background: rgba(20,24,31,.06) !important; }
.menu > a.on, .menu summary.on { color: var(--ink) !important; background: rgba(20,24,31,.06) !important; font-weight: 600; }
/* Navbar en el rojo de Refriclimas */
.menu > a:hover, .menu summary:hover, .menu details[open] > summary, .menu > a.on, .menu summary.on { color: var(--marca) !important; background: rgba(153,1,0,.07) !important; }

/* Al abrir "Más" se quita el resaltado de la página actual; "Cerrar sesión" más chico */
.menu:has(details[open]) > a.on { color: #6b7380 !important; background: none !important; font-weight: 500; }
.mas > .vidrio a.salir, .lista-mas a.salir { font-size: .8rem; font-weight: 500; }
/* Menú "Más": letras más chicas */
.mas > .vidrio { min-width: 190px; padding: .35rem; }
.mas > .vidrio a { font-size: .86rem; padding: .55rem .85rem; border-radius: 9px; }
.mas > .vidrio a:hover { color: var(--marca); background: rgba(153,1,0,.06); }
.mas > .vidrio a.salir { font-size: .78rem; }

/* Agendar: otro servicio adicional (ej. forro de tubería) */
.agenda-otro { display: block; background: none; border: 0; padding: 0; margin: -.3rem 0 1rem; color: var(--brand); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; }
.agenda-otro:hover { text-decoration: underline; }
.agenda-otro[hidden] { display: none; }
#agenda-otro { margin: -.2rem 0 1rem; }

/* Ficha del cliente: próximo servicio agendado */
.fecha-grande.agendada { position: relative; background: #eef6fb; border-left-color: var(--brand); padding-right: 6rem; }
.fecha-grande.agendada.mas { background: var(--bg); }
.fecha-grande.agendada b { font-size: 1.05rem; }
.prox-abrir { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; }
.prox-abrir:hover { text-decoration: underline; }

/* En vivo: servicio agendado para otro día (el día que toca pasa solo a "Sin aceptar") */
.vivo-prox { background: #eef1f4; color: #5b6573; }
/* Ubicación del técnico en cada paso */
.gps-link { font-size: .78rem; color: #1a5fb4; text-decoration: none; white-space: nowrap; margin-left: .35rem; }
.gps-link:hover { text-decoration: underline; }
.gps-fila { display: block; margin-top: .15rem; }
.gps-fila .gps-link:first-child { margin-left: 0; }
