/* Sistema base de Cimcore. Negro, naranja y turquesa sobre gris claro. Pensado primero para teléfono. */
:root {
  color-scheme: light;
  /* Identidad cimcore: naranja, turquesa, negro, blanco y gris. Los hex viven solo en este bloque. */
  --bg: #F5F6F7; --surface: #FFFFFF; --surface-2: #ECEEF0; --border: #DDE0E4;
  --text-1: #111111; --text-2: #4A4F55; --text-3: #5C6168;
  --accent: #FF6A00; --accent-hover: #E85F00; --accent-subtle: #FFEEDF; --on-accent: #FFFFFF;
  --accent-fg: #B84A00;            /* el naranja como texto sobre claro (el de marca no llega a contraste) */
  --on-accent-fill: #111111;       /* texto sobre un relleno naranja */
  --turquesa: #16C7C8; --turquesa-fg: #0B7C7D; --turquesa-bg: #DDF6F6;
  --ink: #111111; --on-ink: #FFFFFF; --on-ink-muted: #A7ADB4;
  --success-bg: #DFEEE6; --success-fg: #1B5C45;
  --warning-bg: #FAEED3; --warning-fg: #6E4A00; --warning-border: #D9B76A;
  --danger-bg: #FAE3E5;  --danger-fg: #A1232F;
  --info-bg: #DFE9F5;    --info-fg: #1F4E8C;
  --oscuro: #0B0B0B; --oscuro-2: #171717;                      /* visor de fotos y editor de marcas */
  --fase-1: #8A949A; --fase-2: #ACA79E; --fase-3: #16A3A4; --fase-4: #C9775A; --fase-5: #4E7DB8; --fase-6: #FF6A00; --fase-7: #7A5C99; --fase-8: #5E8C4A;   /* colores de datos (fases y obras) */
  --dato-azul: #4E7DB8;
  --radius-control: 10px; --radius-card: 16px; --radius-sheet: 24px;
  --shadow-float: 0 8px 24px rgba(17, 17, 17, .12);
  /* Nombres anteriores, ahora apuntan a los tokens */
  --tinta: var(--ink); --apoyo: var(--text-2); --suave: var(--text-3); --fondo: var(--bg); --papel: var(--surface);
  --linea: var(--border); --linea2: var(--surface-2); --acento: var(--accent);
  --verde: var(--success-fg); --verde-s: var(--success-bg); --ambar: var(--warning-fg); --ambar-s: var(--warning-bg); --rojo: var(--danger-fg); --rojo-s: var(--danger-bg);
  --radio: var(--radius-control);
  --letra: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--fondo); color: var(--tinta); font: 16px/1.375 var(--letra); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--acento); outline-offset: 2px; }
.cargando { padding: 40px; color: var(--apoyo); }

/* Marco */
.marco { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.lateral { background: var(--tinta); color: var(--fondo); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 20px; letter-spacing: -.04em; padding: 2px 8px 16px; }
.logo svg { height: 24px; flex: none; }
.empresa-n { font-size: 12px; color: rgba(244, 241, 234, .6); padding: 0 8px 14px; line-height: 1.3; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: rgba(244, 241, 234, .78); font-weight: 520; }
.nav a:hover { background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: var(--on-accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.pie-lateral { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: rgba(244, 241, 234, .7); }
.pie-lateral button { background: none; border: 0; color: var(--on-accent); padding: 0; margin-top: 4px; cursor: pointer; text-decoration: underline; }
.contenido { padding: 26px 30px 60px; min-width: 0; }
.cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 20px; }
.cabeza h1 { font-size: 28px; font-weight: 620; letter-spacing: -.03em; line-height: 1.1; }
.cabeza .sub { color: var(--apoyo); }
.cabeza .acciones { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

/* Botones y campos */
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 8px; border: 1.5px solid var(--linea); background: var(--papel); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.bt:hover { border-color: var(--tinta); }
.bt.p { background: var(--acento); border-color: var(--accent-fg); color: var(--on-accent); }
.bt.p:hover { filter: brightness(1.06); }
.bt.v { background: var(--verde); border-color: var(--verde); color: var(--on-accent); }
.bt.r { color: var(--rojo); }
.bt.chico { min-height: 32px; padding: 0 11px; font-size: 14px; }
.bt:disabled { opacity: .5; cursor: default; }
.campo { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.campo input, .campo select, .campo textarea, .entrada { width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid var(--linea); border-radius: 8px; background: var(--papel); font-weight: 450; font-size: 16px; }
.campo textarea { min-height: 70px; resize: vertical; }
.campo small { font-weight: 450; color: var(--apoyo); }
.fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.error { color: var(--rojo); font-weight: 600; font-size: 14px; }

/* Tarjetas, tablas y estados */
.panel { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); }
.panel > h2 { font-size: 16px; font-weight: 640; padding: 14px 16px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.panel > h2 small { font-weight: 450; color: var(--apoyo); font-size: 14px; }
.indicadores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ind { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); padding: 14px 16px; }
.ind span { color: var(--apoyo); font-size: 14px; display: block; }
.ind b { display: block; font-size: 28px; font-weight: 620; letter-spacing: -.03em; line-height: 1.25; }
.ind small { color: var(--apoyo); font-size: 12px; }
.rejilla { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lista { list-style: none; padding: 0; }
.lista li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--linea2); }
.lista li .q { flex: 1; min-width: 0; }
.lista li b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista li small { color: var(--apoyo); }
.lista .hora { width: 76px; flex: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.vacio { padding: 14px 16px 18px; color: var(--apoyo); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 550; color: var(--apoyo); padding: 8px 12px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--linea2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.n, td.n { text-align: right; }
td a { text-decoration: none; font-weight: 600; }
.tabla { overflow-x: auto; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.e-reservada { color: var(--ambar); } .e-confirmada { color: var(--verde); } .e-llego, .e-en_curso { color: var(--info-fg); }
.e-atendida { color: var(--suave); } .e-no_asistio { color: var(--rojo); } .e-cancelada { color: var(--suave); text-decoration: line-through; }
.mal { color: var(--rojo); font-weight: 600; } .ojo { color: var(--ambar); font-weight: 600; }

/* Agenda */
.barra-agenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.fichas { display: none; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.fichas button, .fichas .ficha-a { border: 1.5px solid var(--linea); background: var(--papel); border-radius: 99px; padding: 7px 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.fichas button[aria-pressed="true"] { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); }
.agenda-z { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.grilla { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); overflow: hidden; }
.grilla-cab, .grilla-cuerpo { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); }
.grilla-cab div { padding: 11px 10px; font-weight: 620; font-size: 14px; border-bottom: 1px solid var(--linea); border-left: 1px solid var(--linea2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grilla-cab div:first-child { border-left: 0; }
.horas { position: relative; }
.horas span { position: absolute; right: 6px; font-size: 12px; color: var(--suave); transform: translateY(-50%); white-space: nowrap; }
.col { position: relative; border-left: 1px solid var(--linea2); cursor: copy; background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--h) - 1px), var(--linea2) calc(var(--h) - 1px) var(--h)); }
.cita { position: absolute; left: 4px; right: 4px; border-radius: 7px; padding: 4px 8px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; border: 0; text-align: left; border-left: 3px solid var(--verde); background: var(--verde-s); color: var(--tinta); }
.cita b { font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cita span { color: var(--apoyo); white-space: nowrap; }
.cita.reservada { background: var(--surface); border: 1.5px dashed var(--ambar); border-left: 3px solid var(--ambar); }
.cita.llego, .cita.en_curso { background: var(--verde); border-left-color: var(--tinta); color: var(--on-accent); } .cita.llego span, .cita.en_curso span { color: rgba(255,255,255,.8); }
.cita.atendida { background: var(--surface-2); border-left-color: var(--suave); color: var(--apoyo); }
.cita.no_asistio { background: var(--rojo-s); border-left-color: var(--rojo); }
.cita.cancelada { opacity: .45; background: var(--surface); border-left-color: var(--suave); text-decoration: line-through; }
.ahora { position: absolute; left: 0; right: 0; border-top: 2px solid var(--rojo); z-index: 2; pointer-events: none; }
.espera li { align-items: flex-start; }

/* Diálogos */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(17, 17, 17, .35); }
dialog::backdrop { background: rgba(17, 17, 17, .5); }
dialog form, .dlg { display: grid; gap: 14px; padding: 22px 22px 20px; }
dialog h3 { font-size: 20px; font-weight: 620; letter-spacing: -.02em; padding-right: 30px; }
.cerrar { position: absolute; top: 12px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--apoyo); padding: 4px 8px; }
.botones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.buscador { position: relative; }
.resultados { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: var(--papel); border-radius: 8px; box-shadow: 0 0 0 1px var(--linea), 0 12px 30px rgba(17, 17, 17, .16); max-height: 240px; overflow: auto; }
.resultados button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--linea2); }
.resultados button:hover, .resultados button:focus { background: var(--fondo); }
.resultados small { color: var(--apoyo); }
.elegido { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--verde-s); font-weight: 600; }
.elegido button { margin-left: auto; }
.detalle dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.detalle dt { color: var(--apoyo); } .detalle dd { font-weight: 550; }
.acciones-estado { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin-bottom: 16px; overflow-x: auto; }
.pestanas a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--apoyo); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.pestanas a[aria-current="page"] { color: var(--tinta); border-color: var(--accent-fg); }
#aviso { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--tinta); color: var(--on-accent); padding: 11px 18px; border-radius: 10px; font-weight: 550; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
#aviso.ver { opacity: 1; }
#aviso.mal { background: var(--rojo); color: var(--on-accent); }

/* Entrada y configuración inicial */
.entrada-p { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.entrada-c { width: min(420px, 100%); background: var(--papel); border-radius: 16px; box-shadow: 0 0 0 1px var(--linea2), 0 24px 60px rgba(17, 17, 17, .12); padding: 30px 26px; display: grid; gap: 16px; }
.entrada-c .logo { color: var(--tinta); padding: 0; }
.entrada-c h1 { font-size: 28px; font-weight: 620; letter-spacing: -.03em; }
.entrada-c p { color: var(--apoyo); }

/* Teléfono */
.nav-movil { display: none; }
@media (max-width: 860px) {
  .marco { grid-template-columns: 1fr; }
  .lateral { display: none; }
  .contenido { padding: 16px 14px 92px; }
  .cabeza h1 { font-size: 20px; }
  .cabeza .acciones { margin-left: 0; width: 100%; }
  .cabeza .acciones .bt { flex: 1; }
  .indicadores { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ind b { font-size: 20px; }
  .rejilla, .agenda-z { grid-template-columns: 1fr; }
  .fichas { display: flex; }
  .grilla-cab, .grilla-cuerpo { grid-template-columns: 48px minmax(0, 1fr); }
  .grilla [data-oculta="1"] { display: none; }
  #aviso { bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* Filas con botones: los botones bajan a una segunda línea en vez de ensanchar la página. */
  .lista li { flex-wrap: wrap; padding: 10px 14px; gap: 8px 10px; }
  .lista li .q { flex: 1 1 150px; }
  .lista .hora { width: 64px; }
  .nav-movil { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--tinta); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .nav-movil a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 12px; color: rgba(244, 241, 234, .7); text-decoration: none; font-weight: 550; }
  .nav-movil a[aria-current="page"] { color: var(--on-accent); }
  .nav-movil svg { width: 22px; height: 22px; }
  .movil-arriba { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .movil-arriba .logo { color: var(--tinta); padding: 0; font-size: 20px; }
  .movil-arriba small { color: var(--apoyo); }

  td, th { padding: 10px 8px; }
  .solo-escritorio { display: none; }
}
@media (min-width: 861px) { .movil-arriba { display: none; } }
/* Conexión y cambios por enviar */
#conexion { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 12px; padding: calc(7px + env(safe-area-inset-top)) 14px 7px; background: var(--verde-s); color: var(--tinta); font-size: 14px; font-weight: 550; text-align: center; }
#conexion.sin { background: var(--ambar-s); color: var(--warning-fg); }
#conexion.mal { background: var(--rojo-s); color: var(--danger-fg); }
#conexion button { background: none; border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 10px; font-weight: 650; cursor: pointer; color: inherit; }
.cola { display: grid; gap: 0; border-top: 1px solid var(--linea); }
.cola-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linea); }
.cola-item b { display: block; font-weight: 620; } .cola-item small { display: block; color: var(--apoyo); font-size: 12px; } .cola-item small.error { color: var(--rojo); }
.nota-cola { color: var(--apoyo); font-size: 14px; }
.pasos { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
/* Obras */
.obras { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.por-enviar { color: var(--ambar); font-weight: 600; }
.obra-av { display: flex; align-items: center; gap: 10px; } .obra-av span:last-child { font-size: 14px; font-weight: 600; }
.avance { flex: 1; height: 7px; border-radius: 4px; background: var(--linea); overflow: hidden; display: block; min-width: 60px; } .avance i { display: block; height: 100%; background: var(--verde); border-radius: 4px; }
.obra-cab { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; align-items: stretch; }
.tomar { display: grid; gap: 8px; align-content: start; }
.bt.grande { min-height: 56px; font-size: 17px; padding: 0 22px; } .bt.grande svg { width: 22px; height: 22px; }
.resumen-avance { border: 0; text-align: left; padding: 14px 16px; display: grid; gap: 10px; font: inherit; color: inherit; cursor: pointer; }
.resumen-avance .obra-av b { font-size: 20px; font-weight: 640; letter-spacing: -.02em; }
.resumen-avance small { color: var(--apoyo); font-size: 12px; }
.etapas-mini { display: flex; flex-wrap: wrap; gap: 6px; } .etapas-mini span { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--fondo); color: var(--apoyo); }
.etapas-mini span.en-curso { background: var(--ambar-s); color: var(--warning-fg); } .etapas-mini span.lista { background: var(--verde-s); color: var(--verde); }
.visitas-obra h2 { display: flex; justify-content: space-between; align-items: center; }
.fichas.visibles { display: flex; }
.linea-fotos { display: grid; gap: 18px; }
.linea-fotos h3 { font-size: 16px; font-weight: 640; margin-bottom: 8px; } .linea-fotos h3 small { color: var(--apoyo); font-weight: 500; }
.cuadricula { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.miniatura { position: relative; border: 0; padding: 0; background: var(--linea2); border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniatura.local { outline: 2.5px dashed var(--ambar); outline-offset: -2.5px; }
.marca-local { position: absolute; left: 6px; bottom: 6px; background: var(--ambar-s); color: var(--warning-fg); font-size: 12px; font-weight: 650; padding: 2px 7px; border-radius: 6px; }
.marca-nota { position: absolute; right: 6px; top: 6px; background: rgba(17, 17, 17, .72); color: var(--on-accent); font-size: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; } .previas img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.rango { display: flex; align-items: center; gap: 12px; } .rango input { flex: 1; accent-color: var(--verde); } .rango output { width: 48px; text-align: right; font-weight: 600; }

/* Visor de fotos */
dialog.visor { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: var(--oscuro); color: var(--on-accent); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
dialog.visor::backdrop { background: var(--oscuro); }
.visor-arriba { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.cerrar-visor { background: none; border: 0; color: var(--on-accent); font-size: 32px; line-height: 1; padding: 4px 10px; cursor: pointer; }
.visor-foto { position: relative; display: grid; place-items: center; min-height: 0; touch-action: pan-y; }
.visor-foto img { max-width: 100%; max-height: 100%; object-fit: contain; }
.visor-ant, .visor-sig { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .35); border: 0; color: var(--on-accent); font-size: 34px; width: 46px; height: 64px; cursor: pointer; }
.visor-ant { left: 0; border-radius: 0 10px 10px 0; } .visor-sig { right: 0; border-radius: 10px 0 0 10px; }
.visor-info { padding: 12px 16px 14px; display: grid; gap: 8px; background: var(--oscuro-2); }
.visor-dato { display: grid; } .visor-dato span { color: rgba(255, 255, 255, .7); font-size: 14px; }
.visor-nota { font-size: 16px; line-height: 1.4; }
.visor-botones { display: flex; flex-wrap: wrap; gap: 8px; } .visor-botones .bt { background: transparent; color: var(--on-accent); border-color: rgba(255, 255, 255, .3); }

/* Calendario del mes */
.calendario { padding: 12px 12px 14px; margin-bottom: 14px; }
.cal-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .cal-cab b { flex: 1; text-align: center; font-size: 17px; font-weight: 640; }
.cal-sem, .cal-grilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-sem span { text-align: center; font-size: 12px; font-weight: 600; color: var(--apoyo); padding: 4px 0; }
.cal-dia { border: 0; background: none; border-radius: 10px; padding: 6px 0 5px; display: grid; justify-items: center; gap: 3px; cursor: pointer; min-height: 52px; font: inherit; color: inherit; }
.cal-dia .n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 560; font-variant-numeric: tabular-nums; }
.cal-dia.hoy .n { color: var(--accent-fg); font-weight: 700; }
.cal-dia.sel .n { background: var(--tinta); color: var(--fondo); }
.puntos { display: flex; gap: 3px; height: 7px; align-items: center; } .puntos i { width: 6px; height: 6px; border-radius: 50%; background: var(--suave); }
.puntos i.verde { background: var(--verde); } .puntos i.ambar { background: var(--ambar); } .puntos i.rojo { background: var(--rojo); } .puntos i.gris { background: var(--suave); }
.puntos em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--apoyo); line-height: 1; }
.dia-lista h2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lista li.toca { cursor: pointer; }

/* Curva S */
.acceso-curva { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; text-decoration: none; }
.acceso-curva b { font-weight: 640; } .acceso-curva small { grid-column: 1; color: var(--apoyo); font-size: 12px; } .acceso-curva span { grid-row: 1 / 3; grid-column: 2; font-size: 28px; color: var(--apoyo); }
.obra-cab { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
.obra-cab .visitas-obra { grid-column: 3; grid-row: 1 / 3; } .obra-cab .acceso-curva { grid-column: 2; }
.curva { padding: 14px 16px 16px; margin-bottom: 14px; }
.curva h2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding: 0 0 8px; }
.leyenda { display: flex; gap: 14px; font-size: 14px; font-weight: 550; color: var(--apoyo); }
.leyenda span::before { content: ""; display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.l-pv::before { background: var(--tinta); } .l-ev::before { background: var(--verde); height: 4px !important; } .l-ac::before { background: var(--acento); }
.grafico-curva svg { width: 100%; height: auto; display: block; }
.g-reja { stroke: var(--linea2); } .g-eje { fill: var(--apoyo); font-size: 12px; font-family: var(--letra); }
.g-bac { stroke: var(--suave); stroke-dasharray: 4 4; }
.g-pv { fill: none; stroke: var(--tinta); stroke-width: 2; stroke-dasharray: 6 4; } .g-ev { fill: none; stroke: var(--verde); stroke-width: 3.5; stroke-linejoin: round; } .g-ac { fill: none; stroke: var(--acento); stroke-width: 2.5; stroke-linejoin: round; }
.g-hoy { stroke: var(--tinta); stroke-width: 1.2; } .g-hoy-t { fill: var(--tinta); font-size: 12px; font-weight: 700; font-family: var(--letra); }
.g-brecha { stroke: var(--rojo); stroke-width: 4; stroke-opacity: .35; }
.g-p-pv { fill: var(--papel); stroke: var(--tinta); stroke-width: 2.5; } .g-p-ev { fill: var(--verde); stroke: var(--papel); stroke-width: 2; } .g-p-ac { fill: var(--acento); stroke: var(--papel); stroke-width: 2; }
.lectura { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--tinta); }
.ind.bien b { color: var(--verde); } .ind.ojo b { color: var(--ambar); } .ind.mal b { color: var(--rojo); }
.estado-c { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--fondo); color: var(--apoyo); white-space: nowrap; }
.estado-c.bien { background: var(--verde-s); color: var(--verde); } .estado-c.ojo { background: var(--ambar-s); color: var(--warning-fg); } .estado-c.mal { background: var(--rojo-s); color: var(--danger-fg); }
td.mal { color: var(--rojo); font-weight: 600; }
.gr-s { color: var(--apoyo); font-size: 14px; }
.usuario-b { display: flex; align-items: center; gap: 9px; background: var(--papel); border: 0; box-shadow: 0 0 0 1px var(--linea); border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; color: inherit; font: inherit; max-width: 62%; min-width: 0; }
.usuario-b .flecha { color: var(--apoyo); font-size: 12px; }
.av-ses { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--acento); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.av-ses.grande { width: 48px; height: 48px; font-size: 17px; }
.sesion-ficha { display: flex; align-items: center; gap: 14px; }
td .sub { display: block; color: var(--apoyo); font-size: 12px; font-weight: 400; margin-top: 2px; }
.etapa-ed { border: 0; border-top: 1px solid var(--linea); padding: 12px 0 0; margin: 0; display: grid; gap: 10px; } .etapa-ed legend { font-weight: 650; padding: 0 6px 0 0; }
.fila.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Respuesta inmediata al toque */
button, a, select, .cita, .lista li.toca { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bt:active, .nav-movil a:active, .cita:active { opacity: .7; }
body.esperando .contenido { opacity: .55; transition: opacity .15s; pointer-events: none; }
body.esperando::before { content: ""; position: fixed; top: env(safe-area-inset-top); left: 0; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--acento), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: barra 0.9s linear infinite; z-index: 60; }
@keyframes barra { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { #aviso { transition: none; } body.esperando::before { animation: none; background: var(--acento); opacity: .6; } }

/* Obras en teléfono: va al final para que gane sobre las reglas generales de arriba. */
@media (max-width: 860px) {
  .obra-cab { grid-template-columns: minmax(0, 1fr); }
  .tomar { grid-template-columns: 1fr auto; }
  .obras { grid-template-columns: minmax(0, 1fr); }
  .cuadricula { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .obra-cab .visitas-obra, .obra-cab .acceso-curva { grid-column: auto; grid-row: auto; }
  .fila.tres { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  
}

/* ───────────── Acceso, registro y arranque guiado (estilo de la app de obras) ───────────── */
.acceso-p { min-height: 100dvh; display: grid; place-items: start center; padding: max(28px, env(safe-area-inset-top)) 22px 32px; background: var(--papel); }
.acceso { width: min(400px, 100%); display: grid; gap: 14px; padding-top: 4vh; }
.simbolo svg { width: 34px; height: 37px; display: block; }
.acceso h1, .guia h1 { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin-top: 8px; }
.lead { color: var(--apoyo); font-size: 16px; }
.cjs { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--papel); }
.cj { display: block; padding: 8px 14px 9px; border-top: 1px solid var(--border); }
.cj:first-child { border-top: 0; }
.cj:focus-within { box-shadow: inset 0 0 0 2px var(--tinta); }
.cj small { display: block; color: var(--apoyo); font-size: 12px; }
.cj input { display: block; width: 100%; border: 0; padding: 2px 0 0; font-size: 16px; background: none; outline: none; }
.cj input::placeholder { color: var(--on-ink-muted); }
.bt.w { width: 100%; }
.bt.n { background: var(--tinta); border-color: var(--tinta); color: var(--on-accent); }
.acceso .bt.p { background: linear-gradient(180deg, var(--accent), var(--accent-hover)); border: 0; border-radius: 10px; }
.o { display: flex; align-items: center; gap: 12px; color: var(--apoyo); font-size: 14px; } .o::before, .o::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
.google-c { min-height: 44px; display: grid; justify-items: center; }
.pie-acceso { text-align: center; color: var(--apoyo); font-size: 14px; margin-top: 6px; } .pie-acceso a { color: var(--tinta); font-weight: 650; }
.enlace { background: none; border: 0; padding: 6px 0; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.guia { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--papel); max-width: 560px; margin: 0 auto; }
.guia-arriba { display: flex; justify-content: space-between; align-items: center; padding: max(14px, env(safe-area-inset-top)) 22px 0; font-size: 14px; font-weight: 650; }
.guia-arriba > span { color: var(--apoyo); }
.guia-c { padding: 14px 22px 24px; display: grid; gap: 14px; align-content: start; }
.guia-pie { position: sticky; bottom: 0; background: var(--papel); }
.guia-barra { height: 5px; background: var(--linea2); } .guia-barra i { display: block; height: 100%; background: var(--tinta); transition: width .25s; }
.guia-bts { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 22px max(18px, env(safe-area-inset-bottom)); }
.guia-bts.col { flex-direction: column; align-items: stretch; text-align: center; }
.tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tipo { display: grid; gap: 2px; text-align: left; padding: 14px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--papel); cursor: pointer; }
.tipo svg { width: 28px; height: 28px; margin-bottom: 6px; color: var(--tinta); }
.tipo b { font-size: 16px; font-weight: 650; } .tipo small { color: var(--apoyo); font-size: 12px; }
.tipo.on { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); background: var(--bg); }
.niveles { display: flex; align-items: center; justify-content: space-between; font-weight: 600; padding: 4px 2px; }
.paso-n { display: flex; align-items: center; gap: 14px; } .paso-n b { min-width: 22px; text-align: center; font-size: 17px; }
.paso-n button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--papel); font-size: 17px; line-height: 1; cursor: pointer; }
.sugerido { padding: 14px; border-radius: 14px; background: var(--bg); display: grid; gap: 8px; }
.sug-filas { display: grid; gap: 7px; }
.sug-f { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 8px; font-size: 12px; }
.sug-b { height: 9px; } .sug-b i { display: block; height: 9px; border-radius: 5px; }
.sugerido > small { color: var(--apoyo); font-size: 12px; }
.alerta-s { color: var(--ambar) !important; background: var(--ambar-s); padding: 6px 8px; border-radius: 8px; }
.encargados .persona { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea2); }
.persona .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); font-weight: 700; flex: none; font-size: 14px; }
.persona .q { flex: 1; min-width: 0; } .persona b { display: block; font-weight: 650; } .persona small { color: var(--apoyo); font-size: 14px; }
.quitar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); font-size: 17px; cursor: pointer; }
.nuevo-enc { display: grid; gap: 10px; } .nuevo-enc .bt { justify-self: start; }
.nota-plano { display: flex; gap: 8px; align-items: center; color: var(--apoyo); font-size: 14px; } .nota-plano svg { width: 18px; height: 18px; flex: none; }
.listo { display: grid; gap: 10px; justify-items: center; text-align: center; padding-top: 8vh; }
.listo .check { width: 64px; height: 64px; border-radius: 50%; background: var(--verde-s); color: var(--verde); display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.vacio .bt { margin-top: 12px; }

/* ───────────── Cronograma ───────────── */
.volver { display: inline-block; color: var(--apoyo); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 8px; font-weight: 650; font-size: 14px; color: var(--apoyo); cursor: pointer; }
.seg button.on { background: var(--papel); color: var(--tinta); box-shadow: 0 1px 4px rgba(17, 17, 17, .15); }
.crono { background: var(--papel); border-radius: 14px; box-shadow: 0 0 0 1px var(--linea2); padding: 2px 16px 8px; }
.fase { border-bottom: 1px solid var(--linea2); padding: 14px 0 8px; } .fase:last-child { border-bottom: 0; }
.fase-c { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.fase-c i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fase-c b { font-size: 16px; font-weight: 650; flex: 1; letter-spacing: -.01em; }
.fase-c small { color: var(--apoyo); font-size: 14px; white-space: nowrap; }
.tareas { list-style: none; padding: 0; }
.tarea { display: flex; align-items: center; gap: 8px; padding: 4px 0; background: var(--papel); position: relative; transition: transform .15s; }
.tarea.arrastrando { z-index: 2; transition: none; box-shadow: 0 10px 28px rgba(17, 17, 17, .22); border-radius: 12px; }
.tarea .manija { color: var(--border); letter-spacing: 1px; font-size: 16px; padding: 12px 6px 12px 2px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.tarea input[type=checkbox] { width: 20px; height: 20px; margin: 0 4px 0 2px; accent-color: var(--tinta); }
.tarea .n { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 8px 0; font-size: 16px; cursor: pointer; }
.tarea .n small { display: block; color: var(--apoyo); font-size: 12px; }
.tarea .n small.costo { color: var(--verde); font-weight: 600; }
.tarea .d { font-weight: 650; font-size: 14px; background: var(--surface-2); border-radius: 8px; padding: 5px 9px; white-space: nowrap; }
.tarea.hecha .n { color: var(--apoyo); } .tarea.hecha .d { background: var(--verde-s); color: var(--verde); }
.tarea.tarde .n small:first-of-type { color: var(--rojo); }
.agregar { border: 0; background: none; color: var(--accent-fg); font-weight: 650; font-size: 14px; padding: 8px 0 4px; cursor: pointer; }
.ayuda-crono { color: var(--apoyo); font-size: 14px; margin-top: 12px; }
.alerta-crono { background: var(--rojo-s); color: var(--rojo); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }
.ayuda-unir { background: var(--ambar-s); color: var(--warning-fg); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }
.barra-unir { position: sticky; bottom: 12px; margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--tinta); color: var(--on-accent); border-radius: 14px; padding: 10px 10px 10px 16px; box-shadow: 0 10px 30px rgba(17, 17, 17, .3); }
.unir-lista { padding-left: 18px; font-size: 14px; } .unir-lista small { color: var(--apoyo); }
.deps-c summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.deps { max-height: 240px; overflow: auto; margin-top: 8px; border: 1px solid var(--linea); border-radius: 10px; padding: 4px 10px; }
.deps fieldset { border: 0; padding: 6px 0; } .deps legend { font-size: 12px; font-weight: 700; color: var(--apoyo); text-transform: uppercase; letter-spacing: .04em; }
.deps label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; } .deps label small { margin-left: auto; color: var(--apoyo); font-size: 12px; white-space: nowrap; }
.acciones-tarea { display: flex; gap: 8px; flex-wrap: wrap; } .acciones-tarea .r { margin-left: auto; }
dialog .paso-n input { width: 70px; text-align: center; }
.gantt { display: grid; grid-template-columns: 240px minmax(0, 1fr); overflow: hidden; }
.g-nombres { border-right: 1px solid var(--linea2); background: var(--papel); }
.g-f { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 14px; font-weight: 700; background: var(--bg); white-space: nowrap; overflow: hidden; }
.g-f i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.g-t { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0 10px 0 18px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.g-lienzo { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-lienzo svg { display: block; }
.g-sem { stroke: var(--surface-2); } .g-mes { font-size: 12px; fill: var(--text-3); font-family: var(--letra); font-weight: 600; }
.g-flecha { fill: none; stroke: var(--ink); stroke-width: 1.1; opacity: .75; } .g-punta { fill: var(--ink); opacity: .75; }
.g-hoy { stroke: var(--accent); stroke-width: 1.5; } .g-hoy-t { font-size: 12px; fill: var(--surface); text-anchor: middle; font-weight: 700; font-family: var(--letra); }
.g-barra { cursor: pointer; }
@media (max-width: 700px) {
  .crono { border-radius: 0; margin: 0 -14px; box-shadow: none; border-top: 1px solid var(--linea2); }
  .gantt { margin: 0 -14px; border-radius: 0; grid-template-columns: 124px minmax(0, 1fr); }
}

/* ───────────── Planos ───────────── */
.planos-obra { grid-column: 1 / -1; }
.planos-fila { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 16px; scroll-snap-type: x mandatory; }
.plano-t { flex: none; width: 150px; text-decoration: none; scroll-snap-align: start; }
.plano-t img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linea); background: var(--surface); display: block; }
.plano-t b { display: block; font-size: 14px; font-weight: 650; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plano-t small { color: var(--apoyo); font-size: 12px; }
.planos-obra .vacio { padding: 0 16px 16px; }
.plano-nuevo { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; }
.plano-nuevo img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linea); background: var(--surface); }
.plano-nuevo input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; font-size: 16px; }
dialog .plano-nuevo { grid-template-columns: 72px 1fr; }
.planos-arranque { display: grid; gap: 10px; } .subir-plano { justify-self: start; cursor: pointer; }
.guia-sub { font-size: 16px; font-weight: 700; margin-top: 6px; }
.vp-c { position: relative; height: 100%; }
.vp { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none; background: var(--surface-2); border-radius: 12px; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.vp-lienzo { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vp-lienzo img { width: 100%; height: 100%; display: block; pointer-events: none; background: var(--surface); }
.vp-capa { position: absolute; inset: 0; }
.vp-marca { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 1px 6px rgba(0, 0, 0, .45); padding: 0; cursor: pointer; color: var(--on-accent); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.vp-marca.grupo { width: 30px; height: 30px; background: var(--tinta); }
.vp-marca.resaltada { outline: 3px solid var(--acento); outline-offset: 3px; }
.vp-dir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.vp-dir::before { content: ""; position: absolute; left: -9px; top: -34px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 24px solid var(--c); opacity: .55; }
.vp-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 6px; }
.vp-zoom button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); font-size: 20px; cursor: pointer; }
.plano-grande { height: max(340px, calc(100dvh - 330px)); }
.filtros-plano { display: grid; gap: 6px; margin-bottom: 10px; }
.ficha-a { text-decoration: none; color: var(--tinta); } .fichas .ficha-a[aria-current="true"] { background: var(--tinta); color: var(--fondo); border-color: var(--tinta); }
dialog.marcar { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); background: var(--papel); }
.marcar-arriba { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; }
.marcar-planos { padding: 0 14px 8px; }
.marcar-plano { padding: 0 10px; min-height: 0; }
.marcar-ayuda { padding: 10px 16px; font-size: 14px; text-align: center; }
.marcar-quitar { justify-self: center; margin-bottom: max(14px, env(safe-area-inset-bottom)); }
.mini-plano { position: relative; display: inline-block; width: 64px; height: 48px; flex: none; }
.mini-plano img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); border-radius: 6px; border: 1px solid var(--linea); }
.mini-plano i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--acento); border: 2px solid var(--surface); box-shadow: 0 0 2px rgba(0,0,0,.6); }
.en-plano { display: flex; align-items: center; gap: 10px; } .en-plano span { flex: 1; color: var(--apoyo); font-size: 14px; }
.fuentes { font-size: 14px; color: var(--apoyo); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.sin-fecha { border: 1px solid var(--ambar); background: var(--ambar-s); border-radius: 10px; padding: 8px 12px 10px; display: grid; gap: 8px; }
.sin-fecha legend { font-weight: 650; font-size: 14px; padding: 0 4px; }
.fecha-foto { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.fecha-foto img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.fecha-foto input { border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: var(--surface); }
.visor-fuente { display: block; opacity: .7; font-size: 12px; margin-top: 2px; }
.visor-plano { display: flex; align-items: center; gap: 10px; color: var(--on-accent); text-decoration: none; font-size: 14px; margin: 6px 0; }

/* ───────────── Marcas sobre la foto ───────────── */
dialog.editor-marcas { background: var(--oscuro); color: var(--on-accent); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.editor-marcas .marcar-arriba .enlace { color: var(--on-accent); }
.me-zona { min-height: 0; min-width: 0; overflow: hidden; display: grid; place-items: center; padding: 6px; }
.me-lienzo { display: block; touch-action: none; cursor: crosshair; border-radius: 4px; }
.me-barra { display: grid; gap: 10px; padding: 10px 14px max(14px, env(safe-area-inset-bottom)); background: var(--oscuro-2); }
.me-herr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.me-herr button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.18); background: none; color: var(--on-accent); cursor: pointer; }
.me-herr b { font-size: 20px; line-height: 1; } .me-herr small { font-size: 12px; opacity: .8; }
.me-herr button[aria-checked="true"] { background: var(--surface); color: var(--tinta); border-color: var(--surface); }
.me-colores { display: flex; gap: 12px; justify-content: center; }
.me-colores button { width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255,255,255,.5); cursor: pointer; }
.me-colores button[aria-checked="true"] { outline: 3px solid var(--surface); outline-offset: 2px; }
.me-acc { display: flex; gap: 8px; justify-content: center; }
.me-acc .bt { background: none; color: var(--on-accent); border-color: rgba(255,255,255,.3); }
.me-acc .bt:disabled { opacity: .35; }
.previas { position: relative; }
.marcar-foto { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
.marca-marcas { position: absolute; left: 6px; bottom: 6px; background: rgba(229,50,45,.92); color: var(--on-accent); border-radius: 6px; font-size: 12px; font-weight: 700; padding: 0 5px; line-height: 18px; }
.me-ayuda { font-size: 12px; opacity: .75; text-align: center; }

/* ───────────── Listas de verificación ───────────── */
.listas-obra { grid-column: 1 / -1; }
.listas-obra .vacio { padding: 0 16px 16px; }
.listas { list-style: none; padding: 0 0 6px; }
.listas a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--linea2); text-decoration: none; }
.listas .q { flex: 1; min-width: 0; } .listas b { display: block; font-weight: 640; } .listas small { color: var(--apoyo); font-size: 12px; }
.lista-av { font-weight: 700; font-size: 14px; background: var(--surface-2); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.lista-av.lista-ok { background: var(--verde-s); color: var(--verde); } .lista-av.lista-mal { background: var(--rojo-s); color: var(--rojo); }
.plantillas { display: grid; gap: 6px; max-height: 280px; overflow: auto; }
.plantilla { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1.5px solid var(--linea); border-radius: 10px; cursor: pointer; }
.plantilla:has(input:checked) { border-color: var(--tinta); background: var(--bg); }
.plantilla input { margin-top: 3px; accent-color: var(--tinta); } .plantilla b { display: block; font-size: 14px; } .plantilla small { color: var(--apoyo); font-size: 12px; }
.barra-lista { height: 6px; border-radius: 3px; background: var(--linea2); overflow: hidden; margin: -8px 0 14px; } .barra-lista i { display: block; height: 100%; background: var(--verde); transition: width .2s; }
.puntos { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: punto; }
.punto { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); padding: 12px 14px; display: grid; gap: 10px; border-left: 4px solid transparent; }
.punto.p-cumple { border-left-color: var(--verde); } .punto.p-no_cumple { border-left-color: var(--rojo); background: var(--danger-bg); } .punto.p-no_aplica { border-left-color: var(--border); }
.punto-t { display: grid; gap: 3px; } .punto-t b { font-weight: 600; font-size: 16px; line-height: 1.35; }
.punto-t b::before { counter-increment: punto; content: counter(punto) ". "; color: var(--apoyo); font-weight: 500; }
.punto-t small { color: var(--apoyo); font-size: 12px; }
.pide-foto { justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--ambar-s); color: var(--warning-fg); }
.pide-foto.con-foto { background: var(--verde-s); color: var(--verde); }
.punto-nota { font-size: 14px; background: var(--bg); border-radius: 8px; padding: 6px 9px; }
.punto-fotos { display: flex; gap: 6px; overflow-x: auto; } .punto-fotos img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; } .punto-fotos img.local { opacity: .6; outline: 2px dashed var(--ambar); }
.punto-acc { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 6px; }
.ep { min-height: 40px; border-radius: 9px; border: 1.5px solid var(--linea); background: var(--papel); font-weight: 650; font-size: 14px; cursor: pointer; padding: 0 8px; white-space: nowrap; }
.ep.foto, .ep.nota { width: 44px; padding: 0; display: grid; place-items: center; } .ep svg { width: 20px; height: 20px; }
.ep.si[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: var(--on-accent); }
.ep.no[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); color: var(--on-accent); }
.ep.na[aria-pressed="true"] { background: var(--text-3); border-color: var(--text-3); color: var(--on-accent); }
.ep:disabled { opacity: .5; cursor: default; }
.punto-edicion { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .punto-edicion label { font-size: 14px; margin-right: auto; }
.nuevo-punto { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-top: 12px; }
.nuevo-punto input[name=texto] { border: 1.5px solid var(--linea); border-radius: 9px; padding: 10px; }
.acciones-lista { display: flex; gap: 8px; margin-top: 14px; } .acciones-lista .r { margin-left: auto; }
.punto-de { font-weight: 600; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.visor-punto { font-size: 14px; margin: 4px 0; opacity: .9; }
@media (max-width: 420px) { .punto-acc { grid-template-columns: 1fr 1fr 1fr; } .ep.foto, .ep.nota { width: auto; } .nuevo-punto { grid-template-columns: 1fr auto; } .nuevo-punto .bt { grid-column: 1 / -1; } }

/* ───────────── Informes para el cliente ───────────── */
.informes-obra { grid-column: 1 / -1; }
.informes { display: grid; padding: 0 0 6px; } .informes .vacio, .informes > .gr-s { padding: 0 16px 14px; }
.informe { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--linea2); }
.informe .q { flex: 1; min-width: 0; } .informe b { display: block; font-weight: 640; font-size: 14px; } .informe small { color: var(--apoyo); font-size: 12px; }
.informe.inactivo { opacity: .55; }
.inf-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 5px; max-height: 220px; overflow: auto; margin-top: 6px; }
.inf-f { padding: 0; border: 0; background: none; position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; }
.inf-f img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.inf-f.fuera img { opacity: .3; filter: grayscale(1); } .inf-f.fuera::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--rojo); }
.casilla { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.enlace-inf { width: 100%; border: 1.5px solid var(--linea); border-radius: 9px; padding: 10px; font-size: 14px; color: var(--apoyo); }
.compartir { display: grid; gap: 8px; } .compartir .bt { text-decoration: none; justify-content: center; }
@media (min-width: 560px) { .compartir { grid-template-columns: 1fr 1fr; } }

/* ───────────── Equipo de la obra ───────────── */
.equipo-obra { grid-column: 1 / -1; }
.equipo { padding: 0 16px 8px; } .equipo .vacio { padding: 0 0 8px; }
.equipo .persona { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--linea2); }
.equipo .persona.pendiente { opacity: .8; }
.roles-inv { border: 0; padding: 0; display: grid; gap: 6px; } .roles-inv legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.aviso-sesion { background: var(--ambar-s); color: var(--warning-fg); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: grid; gap: 8px; justify-items: start; }

/* ───────────── Hoy de una constructora ───────────── */
.hoy-bloque { display: grid; gap: 4px; background: var(--tinta); color: var(--on-accent); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.hoy-bloque b { font-size: 16px; font-weight: 640; }
.hoy-bloque .cuenta { justify-self: start; margin-top: 4px; background: rgba(255,255,255,.14); border-radius: 99px; padding: 2px 10px; font-size: 14px; font-weight: 650; }
.hoy-bloque.libre { background: var(--papel); color: var(--tinta); box-shadow: 0 0 0 1px var(--linea2); } .hoy-bloque.libre span { color: var(--apoyo); font-size: 14px; }
.ind-a { text-decoration: none; color: inherit; } .ind-a:hover { box-shadow: 0 0 0 1.5px var(--tinta); }
.ind.ojo b { color: var(--ambar); } .ind.mal small { color: var(--rojo); font-weight: 600; }
.chip-est { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; white-space: nowrap; border: 1.5px solid transparent; }
.chip-est i { font-style: normal; font-size: 12px; }
.ce-confirmada { background: var(--verde-s); color: var(--verde); }
.ce-reservada { border: 1.5px dashed var(--warning-fg); color: var(--warning-fg); background: repeating-linear-gradient(135deg, var(--warning-bg) 0 6px, var(--warning-bg) 6px 12px); }
.ce-llego, .ce-en_curso { background: var(--info-bg); color: var(--info-fg); } .ce-atendida { background: var(--surface-2); color: var(--text-2); }
.ce-no_asistio, .ce-cancelada { background: var(--rojo-s); color: var(--rojo); }
.visitas-hoy .hora small { color: var(--apoyo); }
.pendientes li { align-items: center; } .pd { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.pd.mal { background: var(--rojo-s); color: var(--rojo); } .pd.ojo { background: var(--ambar-s); color: var(--warning-fg); }
.pendientes a { text-decoration: none; } .ver-mas { display: block; padding: 10px 16px 14px; font-weight: 650; }

/* Contraste (hallazgo #7 de la guía de diseño): etiquetas casi negras sobre el fondo cálido, mínimo 4,5:1. */
.ind > span { color: var(--text-2); font-weight: 560; }
.cabeza .sub { color: var(--text-2); }

/* ───────────── Acceso: estados (hallazgo #3) ───────────── */
.cjs.mal { border-color: var(--rojo); box-shadow: 0 0 0 1px var(--rojo); } .cjs.mal .cj { border-color: var(--rojo); }
.error-campo { color: var(--rojo); font-size: 14px; margin-top: -6px; } .error-campo a { color: var(--rojo); font-weight: 650; }
.error-red { background: var(--rojo-s); color: var(--rojo); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.opciones-acceso { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; font-size: 14px; }
.opciones-acceso .casilla { font-size: 14px; } .opciones-acceso input { width: 18px; height: 18px; accent-color: var(--tinta); }
.olvide { font-weight: 650; color: var(--tinta); }
.bt.cargando { opacity: .85; cursor: progress; }
.giro { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: var(--surface); animation: giro .7s linear infinite; flex: none; }
.bt:not(.p) .giro { border-color: rgba(12,42,43,.25); border-top-color: var(--tinta); }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .giro { animation-duration: 2s; } }
.acceso.con-error .opciones-acceso .olvide { display: none; }

/* ───────────── Obras: galería y lista (hallazgo #8) ───────────── */
.pestanas-obras { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin-bottom: 16px; }
.pestanas-obras button { border: 0; background: none; padding: 10px 14px; font-weight: 650; color: var(--apoyo); border-bottom: 2.5px solid transparent; margin-bottom: -1px; cursor: pointer; }
.pestanas-obras button[aria-selected="true"] { color: var(--tinta); border-color: var(--tinta); }
.obras-g { display: grid; gap: 16px; }
.obras-g.cuadricula { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.obra-g { display: grid; text-decoration: none; color: inherit; background: var(--papel); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--linea2); transition: box-shadow .15s; }
.obra-g:hover { box-shadow: 0 0 0 1.5px var(--tinta), 0 8px 24px rgba(12,42,43,.08); }
.obra-g-portada { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); display: block; }
.obra-g-portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.obra-g-portada .sin-foto { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--apoyo); font-size: 14px; font-weight: 600; }
.obra-g-portada .sin-foto svg { width: 30px; height: 30px; }
.estado-obra { position: absolute; left: 10px; top: 10px; background: var(--surface); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.eo-en_curso { color: var(--verde); } .eo-pausado { color: var(--warning-fg); } .eo-terminado { color: var(--text-2); } .eo-cancelado { color: var(--rojo); }
.obra-g-d { display: grid; gap: 4px; padding: 12px 14px 14px; } .obra-g-d b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; } .obra-g-d small { color: var(--apoyo); font-size: 14px; }
.avisos-obra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.et-obra { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.et-obra.mal { background: var(--rojo-s); color: var(--rojo); } .et-obra.ojo { background: var(--ambar-s); color: var(--warning-fg); }
.obra-g.nueva { border: 2px dashed var(--border); box-shadow: none; background: transparent; place-content: center; justify-items: center; gap: 6px; min-height: 200px; cursor: pointer; font: inherit; color: var(--apoyo); }
.obra-g.nueva span { font-size: 34px; line-height: 1; } .obra-g.nueva:hover { border-color: var(--tinta); color: var(--tinta); }
.obras-g.lista .obra-g, .obras-g.lista .obra-g.nueva { grid-template-columns: 150px 1fr; min-height: 0; }
.obras-g.lista .obra-g-portada { aspect-ratio: auto; min-height: 112px; } .obras-g.lista .obra-g.nueva { grid-template-columns: auto auto; padding: 14px; }
.primera-obra { background: var(--papel); border-radius: 16px; box-shadow: 0 0 0 1px var(--linea2); padding: 28px 24px; display: grid; gap: 10px; max-width: 560px; }
.primera-obra h2 { font-size: 20px; letter-spacing: -.02em; } .primera-obra p { color: var(--apoyo); }
.fila-primera { display: grid; grid-template-columns: 1fr auto; gap: 8px; } .fila-primera input { border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 12px; font-size: 16px; }
@media (max-width: 700px) {
  .solo-pc { display: none !important; }
  .obras-g, .obras-g.cuadricula { grid-template-columns: 1fr; gap: 10px; }
  .obras-g .obra-g, .obras-g .obra-g.nueva { grid-template-columns: 112px 1fr; min-height: 0; }
  .obras-g .obra-g-portada { aspect-ratio: auto; min-height: 104px; }
  .obras-g .obra-g.nueva { grid-template-columns: auto auto; padding: 14px; justify-content: center; }
  .estado-obra { left: 6px; top: 6px; font-size: 12px; padding: 2px 7px; }
  .obra-g-d { padding: 10px 12px; } .obra-g-d b { font-size: 16px; }
  .fila-primera { grid-template-columns: 1fr; }
}

/* ───────────── Detalle de obra con pestañas ───────────── */
.estado-obra.en-linea { position: static; box-shadow: none; background: var(--surface-2); font-size: 12px; padding: 2px 9px; vertical-align: 1px; }
.estado-obra.en-linea.eo-en_curso { background: var(--verde-s); }
.aviso-atraso { background: var(--ambar-s); color: var(--warning-fg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: -6px 0 14px; } .aviso-atraso a { font-weight: 650; color: inherit; }
.pestanas-obra { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--linea); margin: 16px 0 16px; scrollbar-width: none; position: sticky; top: 0; background: var(--fondo); z-index: 3; }
.pestanas-obra::-webkit-scrollbar { display: none; }
.pestanas-obra a { flex: none; text-decoration: none; padding: 11px 14px; font-weight: 650; color: var(--apoyo); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas-obra a[aria-selected="true"] { color: var(--tinta); border-color: var(--tinta); }
.cuenta-tab { display: inline-block; margin-left: 6px; background: var(--ambar-s); color: var(--warning-fg); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.tab-obra { display: grid; gap: 16px; } .tab-obra > .obra-cab { margin: 0; }
.aviso-obra { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--papel); border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--warning-border); padding: 10px 12px 10px 14px; font-weight: 600; }
.cola-subida { background: var(--info-bg); color: var(--info-fg); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; margin-top: 10px; }
.cola-subida.sin { background: var(--ambar-s); color: var(--warning-fg); }
.acciones-bitacora { display: flex; gap: 8px; }
.bitacora section { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); padding: 12px 14px; margin-bottom: 12px; }
.bitacora section h3 { margin: 0 0 8px; }
.entrada { border-left: 3px solid var(--verde); padding: 2px 0 2px 10px; margin-bottom: 10px; display: grid; gap: 2px; }
.entrada.local { border-left-color: var(--warning-border); } .entrada p { font-size: 16px; } .entrada small { color: var(--apoyo); font-size: 12px; }
.enlace.r { color: var(--rojo); }
.actividad { grid-column: 1 / -1; } .actividad .ult-entrada { padding: 0 16px 10px; font-size: 14px; } .recientes { padding: 0 16px 16px; }
.montos { text-align: right; display: grid; } .montos small { color: var(--apoyo); font-size: 12px; }

/* ───────────── Calendario: conteos, chips con estado y vista por cuadrilla (hallazgo #5) ───────────── */
.solo-tel { display: none; }
.cal-dia .cuenta-dia { font-size: 12px; font-weight: 650; color: var(--text-2); }
.cal-dia .cuenta-dia .solo-tel { display: none; }
.chips-dia { display: grid; gap: 3px; width: 100%; padding: 0 4px; }
.chips-dia em { font-style: normal; font-size: 12px; font-weight: 650; color: var(--apoyo); }
.chip-vis { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; border: 1.5px solid transparent; border-radius: 6px; padding: 2px 5px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-vis i { font-style: normal; font-size: 12px; flex: none; } .chip-vis b { font-weight: 700; flex: none; }
.chip-vis.ce-confirmada { background: var(--verde); color: var(--on-accent); }
.chip-vis.ce-reservada { border: 1.5px dashed var(--warning-fg); color: var(--warning-fg); background: repeating-linear-gradient(135deg, var(--warning-bg) 0 5px, var(--warning-bg) 5px 10px); }
.chip-vis.ce-llego, .chip-vis.ce-en_curso { background: var(--info-fg); color: var(--on-accent); } .chip-vis.ce-atendida { background: var(--surface-2); color: var(--text-2); }
.chip-vis.ce-no_asistio { background: var(--rojo-s); color: var(--rojo); }
.leyenda-est { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (min-width: 701px) {
  .cal-dia { justify-items: stretch; align-content: start; min-height: 112px; padding: 6px 2px; border: 1px solid var(--linea2); border-radius: 8px; }
  .cal-dia .n { width: 28px; height: 28px; margin-left: 4px; }
  .cal-dia .cuenta-dia { padding: 0 6px; }
  .cal-dia:hover { border-color: var(--tinta); }
}
@media (max-width: 700px) {
  .solo-tel, .cal-dia .cuenta-dia .solo-tel { display: inline; } .cal-dia .cuenta-dia .solo-pc { display: none; }
  .cal-dia .cuenta-dia { background: var(--surface-2); border-radius: 99px; padding: 0 7px; line-height: 17px; font-size: 12px; }
}
.cq-tabla { display: grid; overflow-x: auto; }
.cq-fila { display: grid; grid-template-columns: 120px repeat(7, minmax(110px, 1fr)); gap: 4px; border-top: 1px solid var(--linea2); padding: 4px 0; }
.cq-cab { border-top: 0; font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: capitalize; }
.cq-nombre { font-weight: 650; font-size: 14px; padding: 6px 4px; }
.cq-celda { display: grid; gap: 3px; align-content: start; padding: 4px; border-radius: 8px; min-height: 44px; }
.cq-celda.hoy { background: var(--bg); } .cq-celda.sobrecarga { background: var(--ambar-s); box-shadow: inset 0 0 0 1.5px var(--warning-border); }
.cq-horas { font-size: 12px; font-weight: 650; color: var(--apoyo); } .sobrecarga .cq-horas { color: var(--warning-fg); }

/* ───────────── Clientes (hallazgos #6 y #9) ───────────── */
.barra-clientes { display: grid; gap: 10px; margin-bottom: 14px; } .buscar-c { max-width: 460px; }
.clientes-c { display: grid; gap: 16px; align-items: start; }
@media (min-width: 901px) { .clientes-c:has(.ficha-lateral:not([hidden])) { grid-template-columns: minmax(0, 1fr) 340px; } }
.tabla-clientes tr.toca { cursor: pointer; } .tabla-clientes tr.sel td { background: var(--bg); }
.sub-c { display: block; color: var(--apoyo); font-size: 12px; }
.est-c { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.ec-vencido { background: var(--rojo-s); color: var(--rojo); } .ec-saldo { background: var(--ambar-s); color: var(--warning-fg); } .ec-al_dia { background: var(--verde-s); color: var(--verde); }
.saldo-c { display: inline-grid; justify-items: end; gap: 1px; white-space: nowrap; } .saldo-c small { font-size: 12px; } .saldo-c.mal b, .saldo-c.mal small { color: var(--rojo); }
.ficha-lateral { position: sticky; top: 16px; padding: 16px; display: grid; gap: 14px; }
.ficha-cab { display: flex; gap: 12px; align-items: center; } .ficha-cab > div { flex: 1; min-width: 0; } .ficha-cab b { display: block; font-size: 17px; } .ficha-cab small { color: var(--apoyo); }
.ficha-cab .cerrar { position: static; }
.ficha-saldo { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.ficha-sec h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin-bottom: 6px; } .ficha-sec p { font-size: 14px; }
.ficha-obra { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--linea2); text-decoration: none; font-weight: 600; } .ficha-obra small { color: var(--apoyo); font-weight: 500; }
.ficha-acc { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───────────── Cobros por estado y doble moneda ───────────── */
@media (min-width: 1100px) { .indicadores.cinco { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
button.ind { text-align: left; font: inherit; border: 0; cursor: pointer; }
.tabla-cobros .equiv { color: var(--apoyo); font-size: 12px; font-weight: 500; }
.solo-tel-b { display: none; }
@media (max-width: 700px) { .solo-tel-b { display: block; } }
.pestanas-obras { overflow-x: auto; scrollbar-width: none; } .pestanas-obras::-webkit-scrollbar { display: none; } .pestanas-obras button { white-space: nowrap; flex: none; }

/* ───────────── Ajustes con menú lateral ───────────── */
.ajustes-c { display: grid; gap: 18px; align-items: start; }
@media (min-width: 901px) { .ajustes-c { grid-template-columns: 210px minmax(0, 1fr); } }
.menu-ajustes { display: grid; gap: 2px; position: sticky; top: 16px; }
.menu-ajustes a { text-decoration: none; padding: 9px 12px; border-radius: 9px; font-weight: 600; color: var(--text-2); }
.menu-ajustes a:hover { background: var(--surface-2); } .menu-ajustes a[aria-current="page"] { background: var(--tinta); color: var(--on-accent); }
@media (max-width: 900px) {
  .menu-ajustes { display: flex; overflow-x: auto; gap: 4px; position: static; border-bottom: 1px solid var(--linea); scrollbar-width: none; }
  .menu-ajustes a { flex: none; white-space: nowrap; border-radius: 0; border-bottom: 2.5px solid transparent; background: none !important; color: var(--apoyo); }
  .menu-ajustes a[aria-current="page"] { color: var(--tinta); border-color: var(--tinta); }
}
.ajustes-sec { display: grid; gap: 16px; } .form-ajustes { display: grid; gap: 14px; padding: 18px; max-width: 640px; } .form-ajustes > h2 { padding: 0; }
.dias-trabajo { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; } .dias-trabajo legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.dias-trabajo label { display: flex; gap: 5px; align-items: center; font-size: 14px; } .dias-trabajo small { flex-basis: 100%; color: var(--apoyo); }
.desc-rol { display: block; margin-top: 6px; color: var(--text-2); background: var(--bg); border-radius: 8px; padding: 7px 9px; font-size: 14px; font-weight: 500; }
.rol-n { font-weight: 650; } .tasa-actual b { font-size: 20px; } .tasa-actual small { color: var(--apoyo); }

/* ───────────── Cronograma: ruta crítica, tabla con Gantt y marcar hecha ───────────── */
.barra-critica { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.barra-critica > span { display: flex; align-items: center; gap: 8px; } .muestra-critica { width: 22px; height: 8px; border-radius: 4px; background: var(--danger-fg); display: inline-block; }
.barra-critica .bt[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); color: var(--on-accent); }
.hecha-b { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--border); background: var(--papel); color: transparent; font-weight: 800; font-size: 14px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.hecha-b:hover { border-color: var(--verde); color: var(--verde); } .hecha-b.on { background: var(--verde); border-color: var(--verde); color: var(--on-accent); }
.tarea.critica .n { box-shadow: inset 3px 0 0 var(--danger-fg); padding-left: 8px; } .tarea.critica .d { background: var(--rojo-s); color: var(--rojo); }
.g-t.critica { color: var(--rojo); font-weight: 650; }
.g-flecha.cr { stroke: var(--danger-fg); opacity: 1; } .g-punta.cr { fill: var(--danger-fg); opacity: 1; }
.tg { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); overflow: hidden; }
.tg-tabla { overflow-x: auto; border-right: 1px solid var(--linea); }
.tg-fila { display: grid; grid-template-columns: 34px 30px minmax(190px, 260px) 52px 62px 62px 50px 74px 120px; align-items: center; gap: 0; border-bottom: 1px solid var(--linea2); font-size: 14px; white-space: nowrap; }
.tg-fila > span { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; } .tg-fila > .hecha-b { width: 20px; height: 20px; font-size: 12px; margin-left: 4px; }
.tg-cab { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; background: var(--bg); border-bottom: 1px solid var(--linea); }
.tg-fase { background: var(--bg); font-weight: 700; } .tg-fase .tg-n i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tg-fila.critica .tg-num, .tg-holg.cr { color: var(--rojo); font-weight: 700; } .tg-fila.critica { box-shadow: inset 3px 0 0 var(--danger-fg); } .tg-fila.hecha { color: var(--apoyo); }
.tg-num { text-align: right; color: var(--apoyo); }
.tg-n { display: flex; align-items: center; gap: 4px; } .tg-in { width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 4px 5px; font: inherit; color: inherit; min-width: 0; }
.tg-in:hover { border-color: var(--linea); } .tg-in:focus { border-color: var(--tinta); background: var(--surface); outline: none; } .tg-in.num { text-align: right; } .tg-in.mal { border-color: var(--rojo); }
.tg-mas { border: 0; background: none; color: var(--apoyo); cursor: pointer; font-size: 16px; padding: 0 4px; flex: none; }
.tg .g-lienzo { min-width: 0; }
.tg-ayuda { grid-column: 1 / -1; padding: 10px 14px; font-size: 12px; color: var(--apoyo); border-top: 1px solid var(--linea2); }
@media (max-width: 900px) { .tg { grid-template-columns: 1fr; } .tg .g-lienzo { display: none; } .tg-tabla { border-right: 0; } }
.rels { display: grid; gap: 6px; } .rel { display: grid; grid-template-columns: minmax(0, 1fr) 150px 64px 32px; gap: 6px; align-items: center; }
.rel select, .rel input { min-width: 0; } .rel-d { text-align: right; } .cr-txt { color: var(--rojo); font-weight: 600; display: block; margin-top: 6px; }
@media (max-width: 520px) { .rel { grid-template-columns: 1fr 1fr 64px 32px; } .rel select:first-child { grid-column: 1 / -1; } }
.deps-c { border: 1px solid var(--linea); border-radius: 10px; padding: 8px 10px 10px; } .deps-c legend { font-weight: 600; font-size: 14px; padding: 0 4px; } .deps-c legend small { font-weight: 500; color: var(--apoyo); }
/* Ver una página del plano en grande antes de nombrarla */
.mini-zoom { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.mini-zoom img { display: block; } .mini-zoom span { position: absolute; right: 3px; bottom: 3px; background: rgba(12,42,43,.85); color: var(--on-accent); border-radius: 6px; font-size: 12px; line-height: 18px; padding: 0 5px; }
.ver-pagina .pie-pagina { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 10px 16px 0; font-weight: 600; }
.nombre-pagina { border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 10px; font-size: 16px; }
dialog.ver-pagina { grid-template-rows: auto minmax(0, 1fr) auto auto; }

/* Cargar cronograma de obra desde MS Project, Excel o CSV */
.formatos-import { margin: 4px 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.formatos-import .enlace { padding: 0; font-size: 14px; }
.previa-import { margin-top: 10px; }
.previa-import > p { margin: 6px 0; }
.fases-import { list-style: none; margin: 8px 0; padding: 0; max-height: 220px; overflow: auto; border: 1px solid var(--linea); border-radius: 10px; }
.fases-import li { padding: 8px 12px; border-top: 1px solid var(--linea); display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.fases-import li:first-child { border-top: 0; }
.fases-import small { color: var(--suave); white-space: nowrap; }
.aviso-import { background: var(--warning-bg); color: var(--ambar); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.crono-vacio { text-align: center; padding: 28px 12px; }

/* Gantt: zoom (meses, semanas, días), fechas en las barras y relaciones que se arrastran */
.gantt-caja { display: grid; gap: 10px; min-width: 0; }
.g-zoom > .bt.chico { min-width: 38px; min-height: 38px; justify-content: center; font-weight: 700; font-size: 17px; }
.g-zoom { display: flex; align-items: center; justify-content: flex-end; gap: 6px; position: sticky; top: 8px; z-index: 6; justify-self: end; background: var(--papel); border: 1px solid var(--linea);
  border-radius: 12px; padding: 5px; box-shadow: 0 4px 14px rgba(17, 17, 17, .12); }
.g-zoom .seg { margin: 0; }
.g-cab { fill: var(--bg); } .g-mesl { stroke: var(--border); } .g-libre { fill: var(--surface-2); opacity: .75; }
.g-mes { font-size: 12px; fill: var(--text-1); font-weight: 700; }
.g-semt { font-size: 12px; fill: var(--text-2); font-family: var(--letra); font-weight: 600; }
.g-dia { font-size: 12px; fill: var(--text-2); font-family: var(--letra); text-anchor: middle; font-variant-numeric: tabular-nums; } .g-dia.off { fill: var(--text-3); opacity: .6; }
.g-fecha { font-size: 12px; fill: var(--text-2); font-family: var(--letra); font-weight: 550; pointer-events: none; } .g-fecha.cr { fill: var(--danger-fg); } .g-fecha.f { font-weight: 700; fill: var(--text-3); }
.g-asa { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; cursor: crosshair; touch-action: none; opacity: .55; }
.g-asa:hover { opacity: 1; fill: var(--accent); stroke: var(--accent); }
.g-borde { fill: transparent; cursor: ew-resize; touch-action: none; }
.g-rel { fill: none; stroke: transparent; stroke-width: 12; cursor: pointer; pointer-events: stroke; } .g-rel:hover { stroke: rgba(196, 83, 47, .25); }
.g-nueva { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }
@media (pointer: coarse) { .g-asa { r: 6.5px; opacity: .8; } }

/* Cronograma maestro */
.m-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.m-resumen .panel { padding: 12px 14px; display: grid; gap: 2px; } .m-resumen b { font-size: 28px; line-height: 1.1; } .m-resumen span { font-size: 12px; color: var(--suave); }
.m-resumen .panel.mal b { color: var(--rojo); }
.m-leyenda { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; color: var(--suave); margin: 0; }
.m-leyenda span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .m-leyenda i { width: 16px; height: 9px; border-radius: 3px; display: inline-block; }
.l-real { background: var(--success-fg); } .l-esp { background: var(--ink); width: 3px !important; height: 14px !important; border-radius: 0 !important; } .l-mal { border: 1.5px solid var(--danger-fg); background: var(--danger-bg); }
.m-franja { fill: transparent; } .m-franja.par { fill: var(--bg); } .m-obra { cursor: pointer; }
.m-esperado { stroke: var(--ink); stroke-width: 2; } .m-esperado-p { fill: var(--ink); }
.m-n { font-size: 12px; font-weight: 700; text-anchor: middle; fill: var(--text-1); font-family: var(--letra); pointer-events: none; } .m-n.claro { fill: var(--surface); }
.m-o { display: flex; align-items: center; gap: 2px; padding: 0 8px 0 4px; } .m-o.par { background: var(--bg); }
.m-o a { display: grid; min-width: 0; text-decoration: none; color: inherit; line-height: 1.25; } .m-o b, .m-o small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-o b { font-size: 14px; } .m-o small { font-size: 12px; color: var(--suave); } .m-o small.mal { color: var(--rojo); font-weight: 650; }
.m-abrir { border: 0; background: none; width: 26px; height: 32px; cursor: pointer; color: var(--suave); font-size: 14px; flex: none; }
.m-fase { display: flex; align-items: center; padding: 0 8px 0 32px; font-size: 12px; color: var(--apoyo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-tit { display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); border-top: 1px solid var(--border); }
.m-c { display: grid; align-content: center; padding: 0 10px; line-height: 1.2; } .m-c b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .m-c small { font-size: 12px; color: var(--suave); }
@media (max-width: 700px) { .m-resumen b { font-size: 20px; } .m-resumen span { font-size: 12px; } .gantt.maestro { margin: 0 -14px; } .nav-movil a span { font-size: 12px; } }

/* Encuadre en el teléfono: nada se sale de la pantalla hacia los lados y lo de arriba respeta la barra de estado */
@media (max-width: 860px) {
  html, body { overflow-x: clip; max-width: 100%; }
  .contenido { padding-top: max(16px, calc(env(safe-area-inset-top) + 8px)); overflow-x: clip; }
  .cabeza h1 { overflow-wrap: anywhere; }
  .m-resumen { gap: 6px; } .m-resumen .panel { padding: 9px 10px; } .m-resumen b { font-size: 20px; } .m-resumen span { font-size: 12px; line-height: 1.25; }
  .g-zoom { top: calc(env(safe-area-inset-top) + 6px); max-width: 100%; } .g-zoom .seg button { padding-left: 10px; padding-right: 10px; }
  .m-o { padding-left: 0; } .m-abrir { width: 22px; } .m-o b { font-size: 12px; } .m-fase { padding-left: 24px; font-size: 12px; }
  .m-tit { padding: 0 8px; font-size: 12px; } .m-c { padding: 0 8px; }
}

/* «Nueva obra» en fila (lista y teléfono): el + y el texto centrados y a la misma altura */
.obras-g.lista .obra-g.nueva { align-items: center; justify-content: center; gap: 10px; min-height: 64px; }
.obras-g.lista .obra-g.nueva span { font-size: 28px; line-height: 1; margin-top: -3px; }
.obra-g.nueva b { line-height: 1.2; }
@media (max-width: 700px) {
  .obras-g .obra-g.nueva { align-items: center; justify-content: center; gap: 10px; min-height: 64px; }
  .obras-g .obra-g.nueva span { font-size: 28px; line-height: 1; margin-top: -3px; }
}

/* Teléfono con la app instalada: la franja de la hora queda tapada con el color del fondo (lo que se desliza no se ve
   debajo del reloj) y la barra de abajo no deja un hueco grande sobre la línea de inicio. */
@media (max-width: 860px) {
  body::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--fondo, var(--bg)); z-index: 25; pointer-events: none; }
  .nav-movil { padding: 5px 2px max(6px, calc(env(safe-area-inset-bottom) - 14px)); }
  .nav-movil a { font-size: 12px; letter-spacing: -.01em; padding: 5px 0 3px; min-width: 0; } .nav-movil a span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .contenido { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Ajustes › Empresa: datos fijos (solo lectura) y horario; calendario propio de cada obra */
.datos-fijos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 20px; margin: 0; }
.dato-fijo dt { font-size: 12px; font-weight: 650; color: var(--suave); text-transform: uppercase; letter-spacing: .03em; } .dato-fijo dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.nota-fija { color: var(--suave); font-size: 14px; }
.fila-rif { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; border-top: 1px solid var(--linea2); padding-top: 14px; }
.fila > * { min-width: 0; } .fila.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campo input[type=time], .campo input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; }
.campo input[type=time]::-webkit-date-and-time-value { text-align: left; }
.dias-trabajo { display: flex; flex-wrap: wrap; gap: 8px; } .dias-trabajo legend { width: 100%; margin-bottom: 6px; }
.dias-trabajo label { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--linea); border-radius: 10px; padding: 8px 12px; font-size: 16px; font-weight: 550; cursor: pointer; background: var(--papel); }
.dias-trabajo label:has(input:checked) { border-color: var(--tinta); background: var(--success-bg); } .dias-trabajo input { width: 18px; height: 18px; accent-color: var(--tinta); }
.cal-obra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--apoyo); } .cal-obra svg { width: 18px; height: 18px; flex: none; } .cal-obra b { color: var(--tinta); }
.cal-obra > span { flex: 1 1 220px; min-width: 0; }
@media (max-width: 700px) {
  .campo { font-size: 14px; } .campo input, .campo select, .campo textarea { font-size: 16px; min-height: 46px; }
  .form-ajustes h2 { font-size: 20px; } .datos-fijos { grid-template-columns: 1fr 1fr; } .dato-fijo dd { font-size: 16px; }
}
@media (max-width: 700px) { .dias-trabajo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } .dias-trabajo legend { grid-column: 1 / -1; } .dias-trabajo label { padding: 9px 8px; justify-content: center; } }

/* Calendario por cuadrilla en el teléfono: tarjetas, semana en siete puntos y lista día por día */
.cq-movil { display: grid; gap: 12px; } .cq-movil > .cal-cab { background: var(--papel); border-radius: 12px; box-shadow: 0 0 0 1px var(--linea2); padding: 8px; }
.cq-tarjeta { padding: 14px; display: grid; gap: 12px; }
.cq-t-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; } .cq-t-cab b { font-size: 17px; } .cq-t-cab small { display: block; color: var(--suave); font-size: 14px; }
.cq-total { font-size: 14px; font-weight: 650; color: var(--apoyo); }
.cq-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cq-d { display: grid; justify-items: center; gap: 1px; padding: 6px 0; border-radius: 9px; background: var(--bg); font-style: normal; }
.cq-d i { font-style: normal; font-size: 12px; color: var(--suave); font-weight: 650; } .cq-d b { font-size: 16px; } .cq-d em { font-style: normal; font-size: 12px; color: var(--suave); font-weight: 650; }
.cq-d.con { background: var(--success-bg); } .cq-d.con em { color: var(--success-fg); } .cq-d.sobre { background: var(--ambar-s); box-shadow: inset 0 0 0 1.5px var(--warning-border); } .cq-d.sobre em { color: var(--warning-fg); }
.cq-d.hoy b { background: var(--tinta); color: var(--on-accent); border-radius: 99px; min-width: 24px; text-align: center; }
.cq-lista { border-top: 1px solid var(--linea2); } .cq-lista .hora { min-width: 104px; } .cq-lista .hora b { display: block; text-transform: capitalize; font-size: 14px; } .cq-lista .hora small { font-size: 12px; color: var(--suave); }
.cq-nombre small { display: block; font-weight: 450; color: var(--suave); font-size: 12px; }
.tipos-cal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } .tipos-cal button { padding-left: 4px; padding-right: 4px; font-size: 14px; }

/* Cuadrillas asignadas en el cronograma maestro */
.m-asig { cursor: pointer; } .m-asig-t { font-size: 12px; font-weight: 650; fill: var(--surface); font-family: var(--letra); pointer-events: none; }
.m-cq { border: 0; background: var(--bg); text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; } .m-cq:disabled { cursor: default; } .m-cq.choque small { color: var(--rojo); font-weight: 650; }
.m-c small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.h2-accion { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .lista-cq li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cq-lista li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 10px; align-items: start; } .cq-lista li > .chip-est, .cq-lista li > :last-child:not(.q) { grid-column: 2; justify-self: start; } .cq-lista .hora { min-width: 0; }

/* RFI y submittals */
.consultas { display: grid; gap: 14px; } .consultas-sec .lista li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cod-c { color: var(--acento, var(--accent)); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.est-c { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 650; background: var(--success-bg); color: var(--tinta); white-space: nowrap; margin-left: 6px; }
.ec-aprobado { background: var(--success-bg); color: var(--success-fg); } .ec-rechazado { background: var(--danger-bg); color: var(--danger-fg); } .ec-aprobado_con_notas, .ec-abierto { background: var(--warning-bg); color: var(--ambar); } .ec-cerrado { background: var(--surface-2); color: var(--suave); }
.dests, .dests-lista, .resps, .consulta-det { display: grid; gap: 8px; } .dests-f { border: 0; padding: 0; display: grid; gap: 8px; } .dests-f legend { font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.dest-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 6px; } .dest-fila input, .dest-fila select { min-height: 42px; padding: 8px 10px; border: 1.5px solid var(--linea); border-radius: 8px; font-size: 16px; min-width: 0; width: 100%; background: var(--papel); }
.dest { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 1px solid var(--linea2); border-radius: 10px; padding: 10px 12px; } .dest .q { min-width: 0; flex: 1 1 200px; } .dest .q small { display: block; color: var(--suave); font-size: 12px; }
.dest-bts { display: flex; gap: 6px; flex-wrap: wrap; } .dest-nuevo { display: grid; gap: 6px; } .dest-nuevo > .bt { justify-self: start; }
.consulta-det h4 { margin: 10px 0 0; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); } .consulta-t { font-size: 17px; margin: 0; } .consulta-d { white-space: pre-wrap; margin: 0; }
.resp { border-left: 3px solid var(--linea); padding: 2px 0 2px 12px; } .resp p { margin: 3px 0; white-space: pre-wrap; } .sello-c { color: var(--suave); font-size: 12px; display: block; }
.resp-nueva { display: grid; gap: 6px; } .resp-nueva textarea { width: 100%; border: 1.5px solid var(--linea); border-radius: 8px; padding: 9px 12px; font: inherit; }
@media (max-width: 600px) { .dest-fila { grid-template-columns: 1fr; } }

/* Curva S: ingreso ganado y utilidad */
.g-in { fill: none; stroke: var(--dato-azul); stroke-width: 2.4; stroke-dasharray: 7 4; } .g-p-in { fill: var(--dato-azul); stroke: var(--surface); stroke-width: 2; }
.g-util { fill: var(--dato-azul); opacity: .14; stroke: none; } .g-util.neg { fill: var(--danger-fg); opacity: .16; } .g-venta { stroke: var(--dato-azul); }
.l-in::before { background: var(--dato-azul); } .l-ut::before { background: var(--dato-azul); opacity: .3; height: 10px !important; }
.tit-sec { font-size: 17px; margin: 6px 0 10px; display: flex; align-items: baseline; gap: 10px; } .tit-sec small { font-size: 14px; font-weight: 450; color: var(--suave); }
.tabla tr.total td { border-top: 2px solid var(--linea); background: var(--bg); }
.ind small { display: block; line-height: 1.35; }


/* ══════════════ Fase 1 · Base del sistema (móvil primero) ══════════════ */
/* G2/W2 · Tipografía y campos: 16 px en todo lo que se escribe (el iPhone no hace zoom al enfocar). */
body { font-size: 16px; line-height: 22px; }
input, select, textarea { font-size: 16px !important; }
.campo { font-size: 14px; line-height: 20px; gap: 6px; }
.campo input, .campo select, .campo textarea, .entrada, .dest-fila input, .dest-fila select, .fila-primera input { min-height: 48px; border: 1.5px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text-1); }
.cabeza h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.01em; }
.cabeza .sub { font-size: 14px; line-height: 20px; color: var(--text-2); }
.panel h2, .tit-sec { font-size: 20px; line-height: 26px; font-weight: 650; }
.lista li b { font-size: 17px; line-height: 24px; font-weight: 500; }
.lista li small, .gr-s, small { font-size: 14px; line-height: 20px; }
svg text { font-size: 12px; }

/* G3 · Áreas táctiles: 44 px como mínimo, 48 px en el botón principal, filas de 56 px. */
.bt { min-height: 44px; padding: 0 16px; border-radius: var(--radius-control); border: 1.5px solid var(--border); font-size: 16px; }
.bt.p { min-height: 48px; background: var(--accent); border-color: var(--accent-fg); color: var(--on-accent); }
.bt.p:hover { background: var(--accent-hover); border-color: var(--accent-hover); filter: none; }
.bt.p.peligro { background: var(--danger-fg); border-color: var(--danger-fg); }
.bt.chico { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 14px; }
.enlace { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; font-size: 16px; }
p .enlace, small .enlace, li .enlace { min-height: 0; display: inline; padding: 0; }
.seg { border-radius: 12px; padding: 4px; background: var(--surface-2); }
.seg button { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 9px; font-size: 14px; }
.lista li { min-height: 56px; }
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; width: 44px !important; height: 44px !important; min-height: 0 !important; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 10px; background: transparent; position: relative; flex: none; cursor: pointer; }
input[type=checkbox]::before, input[type=radio]::before { content: ""; position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; box-sizing: border-box; border: 2px solid var(--text-3); border-radius: 7px; background: var(--surface); }
input[type=radio]::before { border-radius: 50%; }
input[type=checkbox]:checked::before { background: var(--ink); border-color: var(--ink); }
input[type=checkbox]:checked::after { content: ""; position: absolute; left: 18px; top: 13px; width: 7px; height: 13px; border: solid var(--on-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
input[type=radio]:checked::before { border: 7px solid var(--ink); }
.check { min-height: 44px; gap: 4px; font-size: 16px; }
.dias-trabajo label { padding: 0 10px 0 0; min-height: 44px; gap: 0; border-radius: var(--radius-control); }
.mas-b { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); cursor: pointer; flex: none; }
.mas-b svg { width: 22px; height: 22px; }
.entrada { position: relative; } .entrada .mas-b { position: absolute; top: 2px; right: 2px; } .entrada > p { padding-right: 44px; }

/* G4 · Superficies: tarjetas planas con borde; la sombra queda para hojas, avisos y menús. */
.panel, .obra-g, .ind, .cq-movil > .cal-cab, .dest { border-radius: var(--radius-card); box-shadow: none; border: 1px solid var(--border); }
.g-zoom { box-shadow: var(--shadow-float); border-color: var(--border); }

/* G6/W3 · Hoja inferior */
dialog.hoja { position: fixed; inset: auto 0 var(--teclado, 0px) 0; margin: 0; width: 100%; max-width: 640px; margin-inline: auto; max-height: calc(var(--alto-visible, 100dvh) - 20px); padding: 0; border: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-float); overflow: hidden; transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
dialog.hoja[open] { display: flex; animation: hoja-sube .24s cubic-bezier(.2, .8, .2, 1); }
dialog.hoja::backdrop { background: rgba(17, 17, 17, .45); }
@keyframes hoja-sube { from { transform: translateY(40%); opacity: .6; } }
dialog.hoja > form { display: flex; flex-direction: column; gap: 0; padding: 0; min-height: 0; width: 100%; max-height: inherit; }
.hoja-cab { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 8px 6px 20px; touch-action: none; flex: none; }
.hoja-asa { position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 99px; background: var(--border); }
.hoja-cab h3 { flex: 1; min-width: 0; font-size: 20px; line-height: 26px; font-weight: 650; letter-spacing: -.01em; padding: 0; }
.hoja-cab .cerrar { position: static; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; color: var(--text-2); padding: 0; cursor: pointer; flex: none; }
.hoja-cab .cerrar svg { width: 24px; height: 24px; }
.hoja-cuerpo { display: grid; gap: 16px; align-content: start; padding: 8px 20px 20px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto; }
.hoja-cuerpo > div, .hoja-cuerpo > fieldset { min-width: 0; }
.hoja-pie { flex: none; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); display: grid; gap: 8px; }
.hoja-pie .bt.p { width: 100%; font-size: 17px; }
dialog.hoja:not(:has(.hoja-pie)) .hoja-cuerpo { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.confirmar-t { font-size: 16px; color: var(--text-2); margin: 0; }
.filas-hoja { display: grid; gap: 0; }
.fila-hoja { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 4px; border: 0; border-top: 1px solid var(--surface-2); background: none; width: 100%; text-align: left; font: inherit; font-size: 17px; font-weight: 500; color: var(--text-1); text-decoration: none; cursor: pointer; }
.fila-hoja:first-child { border-top: 0; }
.fila-hoja > svg { width: 24px; height: 24px; flex: none; color: var(--text-2); } .fila-hoja > svg:last-child { width: 20px; height: 20px; color: var(--text-3); }
.fila-hoja > span { flex: 1; min-width: 0; display: grid; } .fila-hoja small { font-size: 14px; color: var(--text-2); font-weight: 400; }
.fila-hoja.peligro, .fila-hoja.peligro > svg { color: var(--danger-fg); }
.sesion-ficha { display: flex; align-items: center; gap: 14px; padding: 4px 4px 14px; } .sesion-ficha p { display: grid; margin: 0; min-width: 0; } .sesion-ficha b { font-size: 17px; }
.sesion-ficha .gr-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* W1/P6 · Barra inferior: 5 pestañas, ícono de 24 px, etiqueta de 12 px y pastilla en la activa */
.marco { grid-template-columns: minmax(0, 1fr); }
.lateral { display: none; }
.movil-arriba { display: flex !important; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 44px; }
.movil-arriba .logo { color: var(--ink); padding: 0; font-size: 20px; }
.usuario-b { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--border); box-shadow: none; background: var(--surface); display: grid; place-items: center; max-width: none; }
.usuario-b .av-ses { width: 36px; height: 36px; font-size: 14px; background: var(--surface); color: var(--accent-fg); }
.av-ses.grande { background: var(--accent-subtle); color: var(--accent-fg); }
.nav-movil { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); padding: 0 4px env(safe-area-inset-bottom); height: calc(56px + env(safe-area-inset-bottom)); }
.nav-movil a, .nav-movil button { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; height: 56px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; color: var(--on-ink-muted); text-decoration: none; cursor: pointer; }
.nav-movil a span, .nav-movil button span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-ic { display: grid; place-items: center; width: 56px; height: 32px; border-radius: 99px; font-style: normal; transition: background .15s; }
.nav-movil svg { width: 24px; height: 24px; }
.nav-movil [aria-current="page"] { color: var(--on-ink); }
.nav-movil [aria-current="page"] .nav-ic { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px var(--accent); }
.nav-movil [aria-current="page"] svg { stroke-width: 2.2; }
.contenido { padding: max(16px, calc(env(safe-area-inset-top) + 8px)) 16px calc(56px + 88px + env(safe-area-inset-bottom)); }
#aviso { bottom: calc(72px + env(safe-area-inset-bottom)); border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: 16px; max-width: calc(100vw - 32px); width: max-content; box-shadow: var(--shadow-float); display: flex; align-items: center; gap: 14px; }
#aviso.con-accion { pointer-events: auto; }
#aviso button { border: 0; background: none; color: var(--on-ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; cursor: pointer; }
#aviso.mal { background: var(--danger-fg); color: var(--on-accent); }

/* G8 · Lo que se desliza hacia los lados avisa con un degradado en el borde derecho */
.scroll-hint { -webkit-mask-image: linear-gradient(90deg, black calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, black calc(100% - 24px), transparent); }

/* G10 · Íconos dentro de avisos y estados */
.aviso-atraso { display: flex; align-items: flex-start; gap: 8px; } .aviso-atraso > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.vacio > svg { width: 28px; height: 28px; color: var(--text-3); display: block; margin-bottom: 6px; }

/* G11 · Respuesta al tocar y movimiento */
.bt, .fila-hoja, .lista li.toca, .nav-movil a, .nav-movil button, .seg button, .obra-g, .mas-b, .usuario-b, .cal-dia { transition: transform .08s, background-color .08s, filter .08s; }
.bt:active, .seg button:active, .mas-b:active, .usuario-b:active, .obra-g:active { transform: scale(.98); filter: brightness(.96); }
.fila-hoja:active, .lista li.toca:active { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* G12 · Esqueleto de carga */
.esqueleto { display: grid; gap: 12px; padding-top: 8px; }
.esqueleto i { display: block; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--bg) 45%, var(--surface-2) 65%); background-size: 300% 100%; animation: brillo 1.2s linear infinite; }
.e-t { height: 34px; width: 62%; } .e-s { height: 18px; width: 40%; } .e-c { height: 132px; border-radius: 16px !important; } .e-f { height: 56px; }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* La app solo se usa en el teléfono */
.solo-telefono { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 40px 24px; text-align: center; max-width: 560px; margin: 0 auto; }
.solo-telefono .logo { color: var(--ink); font-size: 28px; padding: 0; } .solo-telefono h1 { font-size: 28px; line-height: 34px; font-weight: 700; }
.solo-telefono ol { text-align: left; display: grid; gap: 8px; padding-left: 22px; margin: 0; color: var(--text-2); } .solo-telefono p { margin: 0; color: var(--text-2); }
.qr-solo { width: 200px; height: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px; } .qr-solo svg { width: 100%; height: 100%; display: block; }

/* G3 · Resto de objetivos táctiles a 44 px */
.fichas button, .fichas .ficha-a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 14px; }
.volver, .olvide, .agregar, .cabeza .sub a { min-height: 44px; display: inline-flex; align-items: center; }
.agregar { padding: 0; font-size: 16px; }
.volver { margin-bottom: 0; }
.hecha-b { width: 44px; height: 44px; border: 0 !important; background: none !important; position: relative; border-radius: 50%; }
.hecha-b::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid var(--text-3); background: var(--surface); }
.hecha-b.on::before { background: var(--success-fg); border-color: var(--success-fg); }
.hecha-b { color: transparent; z-index: 0; font-size: 14px; } .hecha-b.on { color: var(--on-accent); } .hecha-b::before { z-index: -1; }
.tg-fila > .hecha-b { width: 44px; height: 44px; margin-left: 0; }
.ep { min-height: 44px; min-width: 44px; border-radius: var(--radius-control); }
.menu-ajustes a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; }
.paso-n button { width: 44px; height: 44px; }
.m-abrir { width: 44px !important; height: 44px; margin-left: -8px; margin-right: -10px; }
.m-o a { min-height: 44px; align-content: center; } .m-cq { min-height: 44px; }
.vp-marca { width: 44px; height: 44px; border: 14px solid transparent; background-clip: padding-box; box-shadow: none; outline: 3px solid var(--surface); outline-offset: -14px; }
.vp-marca.grupo { width: 48px; height: 48px; border-width: 9px; outline-offset: -9px; }
.vp-marca.resaltada { outline: 3px solid var(--accent); outline-offset: -11px; }
.tabla-clientes td a, .lista li a.nombre, .pend a { min-height: 44px; display: inline-flex; align-items: center; }
.g-zoom > .bt.chico { min-width: 44px; }
.tg-in { min-height: 44px; } .tg-mas { min-width: 44px; min-height: 44px; }
.lista li .q > a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
td a { display: inline-flex; align-items: center; min-height: 44px; }
.pestanas-obras button, .pestanas-obra a { min-height: 44px; display: inline-flex; align-items: center; }
.vp-zoom button { width: 44px; height: 44px; }
.g-zoom .bt.chico, .g-zoom > button { min-width: 44px; width: 44px; padding: 0; }
.g-zoom > .bt.chico { min-width: 44px; min-height: 44px; }
.m-tit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

/* Período de prueba: aviso de los últimos días y pantalla de cuenta vencida o suspendida */
.aviso-prueba { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: var(--warning-bg, var(--accent-subtle)); color: var(--tinta); font-size: 14px; font-weight: 600; }
.aviso-prueba a { color: inherit; text-decoration: underline; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.aviso-prueba + .contenido { padding-top: 16px; }
.acceso.bloqueada { text-align: center; justify-items: center; } .acceso.bloqueada .bt { width: 100%; justify-content: center; }
.marco:has(> .aviso-prueba) { grid-template-rows: auto minmax(0, 1fr); }

/* ───────────── Escritorio · Fase 1: marco de oficina (≥ 1024 px, solo con body.esc) ─────────────
   Mismos colores y tipografía del teléfono; aquí solo cambian la estructura y la densidad. */
.hoja-pie .cancelar, .saltar { display: none; }
table, .ind b, .obra-av b, .kpi, .cambiador-pct { font-variant-numeric: tabular-nums; }
/* Acceso a dos columnas en computadora */
.acceso-p.acceso-esc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; padding: 0; align-items: stretch; }
.acceso-esc > form, .acceso-esc > .acceso { align-self: center; justify-self: center; padding: 32px; }
.acceso-lado { background: var(--ink); color: var(--on-ink-muted); display: grid; align-content: center; gap: 14px; padding: 64px; font-size: 17px; line-height: 26px; }
.acceso-lado .logo { color: var(--on-ink); font-size: 24px; padding: 0; } .acceso-frase { color: var(--on-ink); font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -.02em; max-width: 12ch; }
@media (min-width: 1024px) {
  body.esc { --sidebar-w: 248px; --topbar-h: 56px; --panel-w: 420px; --space-page: 24px; }
  body.esc .marco-esc { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-rows: none; min-height: 100vh; }
  body.esc .marco-esc.lat-min { --sidebar-w: 64px; }
  body.esc .saltar { display: block; position: fixed; left: 12px; top: -60px; z-index: 60; background: var(--surface); color: var(--text-1); padding: 10px 14px; border-radius: 10px; border: 2px solid var(--accent); font-weight: 600; }
  body.esc .saltar:focus { top: 12px; }
  /* Barra lateral */
  body.esc .lateral { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); background: var(--ink); color: var(--on-ink-muted); padding: 16px 12px 12px; overflow: hidden; font-size: 14px; line-height: 20px; }
  body.esc .lat-marca { display: grid; gap: 0; padding: 4px 8px 14px; } body.esc .lat-marca .logo { color: var(--on-ink); font-size: 18px; padding: 0; }
  body.esc .lat-marca small { font-size: 12px; line-height: 16px; color: var(--on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.esc .lat-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -12px; padding: 0 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
  body.esc .lat-empresa { display: grid; gap: 2px; }
  body.esc .lat-it { position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 8px; border-radius: 8px; color: var(--on-ink-muted); font-weight: 500; text-decoration: none; white-space: nowrap; }
  body.esc .lat-it > span { overflow: hidden; text-overflow: ellipsis; }
  body.esc .lat-it:hover { background: rgba(255, 255, 255, .06); color: var(--on-ink); }
  body.esc .lat-it[aria-current="page"] { background: rgba(255, 255, 255, .10); color: var(--on-ink); }
  body.esc .lat-it[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); border-radius: 2px; }
  body.esc .lat-ic { width: 18px; height: 18px; flex: none; display: grid; place-items: center; } body.esc .lat-ic svg { width: 18px; height: 18px; }
  body.esc .lat-punto::after { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; opacity: .55; }
  body.esc .lat-obra { display: grid; gap: 2px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }
  body.esc .lat-obra:empty { display: none; }
  body.esc .lat-cambiar { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px; margin-bottom: 4px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .07); color: var(--on-ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; width: 100%; }
  body.esc .lat-cambiar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } body.esc .lat-cambiar:hover { background: rgba(255, 255, 255, .12); }
  .lat-estado { width: 8px; height: 8px; border-radius: 50%; background: var(--success-fg); flex: none; } .lat-estado.eo-pausado { background: var(--warning-border, #D9B76A); } .lat-estado.eo-terminado, .lat-estado.eo-cancelado { background: var(--text-3); }
  body.esc .lat-estado.eo-en_curso { background: #5FBF95; } .lat-flecha { font-style: normal; font-size: 12px; opacity: .8; }
  body.esc .lat-grupo { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--on-ink-muted); opacity: .8; padding: 12px 8px 4px; }
  body.esc button.lat-grupo { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; min-height: 0; font-family: inherit; cursor: pointer; text-align: left; border-radius: 8px; margin-top: 4px; padding: 8px 8px 6px; }
  body.esc button.lat-grupo:hover { opacity: 1; background: rgba(255,255,255,.05); } body.esc button.lat-grupo:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; opacity: 1; }
  body.esc .lat-chev { font-style: normal; font-size: 11px; transition: transform .15s; } body.esc button.lat-grupo[aria-expanded="false"] .lat-chev { transform: rotate(-90deg); }
  body.esc .lat-sec, body.esc .lat-items { display: grid; gap: 2px; } body.esc .lat-items[hidden] { display: none; } body.esc .lat-min .lat-items[hidden] { display: grid; }
  body.esc .lat-aire { flex: 1; min-height: 12px; }
  body.esc .lat-plegar { align-self: flex-end; width: 32px; height: 32px; margin-top: 6px; border: 0; border-radius: 8px; background: none; color: var(--on-ink-muted); cursor: pointer; display: grid; place-items: center; transform: rotate(180deg); }
  body.esc .lat-plegar:hover { background: rgba(255, 255, 255, .08); color: var(--on-ink); } body.esc .lat-plegar svg { width: 18px; height: 18px; }
  body.esc .lat-min .lat-plegar { transform: none; align-self: center; }
  body.esc .lat-min .lat-it > span, body.esc .lat-min .lat-grupo, body.esc .lat-min .lat-marca small, body.esc .lat-min .lat-cambiar > span, body.esc .lat-min .lat-flecha, body.esc .lat-min .lat-marca .logo > :not(svg) { display: none; }
  body.esc .lat-min .lat-it, body.esc .lat-min .lat-cambiar { justify-content: center; padding: 0; } body.esc .lat-min .lat-marca { justify-items: center; padding-inline: 0; }
  /* Barra superior */
  body.esc .esc-der { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
  body.esc .esc-barra { position: sticky; top: 0; z-index: 15; height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 var(--space-page); background: var(--bg); border-bottom: 1px solid var(--border); font-size: 14px; }
  body.esc .migas { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
  body.esc .migas a { color: var(--text-2); text-decoration: none; } body.esc .migas a:hover { color: var(--text-1); text-decoration: underline; } body.esc .migas b { color: var(--text-1); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
  body.esc .chip-tasa { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-1); white-space: nowrap; text-decoration: none; font-variant-numeric: tabular-nums; }
  body.esc .chip-tasa.aviso { background: var(--warning-bg); color: var(--warning-fg); border-color: var(--warning-border, #D9B76A); }
  body.esc .esc-ic, body.esc .esc-av { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; cursor: pointer; }
  body.esc .esc-av { border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-1); font-size: 12px; }
  /* Contenido: márgenes y anchos máximos por tipo de página */
  body.esc .contenido { flex: 1; padding: 24px var(--space-page) 48px; outline: none; }
  body.esc .contenido[data-pagina="tablero"] > * { max-width: 1200px; margin-inline: auto; }
  body.esc .contenido[data-pagina="form"] > * { max-width: 960px; }
  body.esc .movil-arriba, body.esc .nav-movil, body.esc .pestanas-obra { display: none !important; }
  body.esc .cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
  body.esc .cabeza .acciones { display: flex; gap: 8px; flex: none; }
  body.esc .aviso-prueba { padding: 8px var(--space-page); }
  body.esc .obras { grid-template-columns: repeat(auto-fill, minmax(280px, 360px)); }
  /* Resumen de obra: avance a la izquierda, accesos y visitas a la derecha */
  body.esc .obra-cab { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  body.esc .obra-cab .resumen-avance { grid-column: span 7; grid-row: 1; } body.esc .obra-cab .visitas-obra { grid-column: span 5; grid-row: 1 / 3; }
  body.esc .obra-cab .acceso-curva { grid-column: span 7; grid-row: 2; } body.esc .obra-cab .acceso-crono { grid-column: span 4; } body.esc .obra-cab .acceso-crono + .acceso-curva { grid-column: span 3; }
  /* Un solo terracota por vista: los demás botones principales pasan a secundarios */
  body.esc .bt.p.sec { background: var(--surface); border-color: var(--border); color: var(--text-1); }
  body.esc .bt.p.sec:hover { background: var(--surface-2); border-color: var(--border); }
  /* Panel lateral derecho en lugar de la hoja inferior */
  body.esc dialog.hoja { inset: 0 0 0 auto; width: var(--panel-w); max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border-radius: 0; border-left: 1px solid var(--border); box-shadow: -8px 0 24px rgba(17, 17, 17, .12); }
  body.esc dialog.hoja[open] { animation: panel-entra .2s cubic-bezier(.2, .8, .2, 1); }
  body.esc dialog.hoja::backdrop { background: rgba(17, 17, 17, .08); }
  body.esc .hoja-asa { display: none; } body.esc .hoja-cab { padding: 16px 12px 8px 24px; touch-action: auto; } body.esc .hoja-cuerpo { padding: 8px 24px 24px; }
  body.esc .hoja-pie { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px; }
  body.esc .hoja-pie .cancelar { display: inline-flex; } body.esc .hoja-pie .bt.p { width: auto; font-size: 14px; }
  /* Confirmaciones y menús cortos: cuadro centrado */
  body.esc dialog.hoja:has(.confirmar-t), body.esc dialog.hoja:has(> form > .hoja-cuerpo > .filas-hoja), body.esc dialog.hoja:has(.atajos) { inset: 0; margin: auto; width: 440px; height: fit-content; max-height: 80vh; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-float, 0 8px 24px rgba(17, 17, 17, .12)); animation-name: cuadro-entra; }
  body.esc dialog.hoja:has(.confirmar-t)::backdrop, body.esc dialog.hoja:has(> form > .hoja-cuerpo > .filas-hoja)::backdrop { background: rgba(17, 17, 17, .35); }
  body.esc .fila-hoja { min-height: 40px; font-size: 14px; } body.esc .fila-hoja > svg { width: 18px; height: 18px; }
  .atajos { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; margin: 0; } .atajos dd { margin: 0; }
  .atajos kbd { font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; background: var(--bg); white-space: nowrap; }
  /* Cambiador de obra */
  dialog.cambiador { position: fixed; inset: 96px auto auto calc(var(--sidebar-w, 248px) + 8px); margin: 0; width: 360px; max-height: 70vh; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-float, 0 8px 24px rgba(17, 17, 17, .12)); }
  dialog.cambiador[open] { display: flex; flex-direction: column; gap: 8px; } dialog.cambiador::backdrop { background: transparent; }
  .cambiador-lista { display: grid; gap: 2px; overflow-y: auto; min-height: 0; } .cambiador .lat-grupo { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); padding: 8px 8px 2px; opacity: 1; }
  .cambiador-it { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--text-1); text-align: left; cursor: pointer; width: 100%; }
  .cambiador-it:hover, .cambiador-it:focus-visible { background: var(--surface-2); } .cambiador-it > span:nth-child(2) { flex: 1; min-width: 0; display: grid; } .cambiador-it small { color: var(--text-2); font-size: 12px; }
  .cambiador-it b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cambiador-pct { color: var(--text-2); font-size: 12px; font-weight: 600; }
  .cambiador-nueva { padding: 8px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text-1); text-decoration: none; }
  .soltar-capa { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(17, 17, 17, .55); pointer-events: none; }
  .soltar-capa p { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 18px 24px; border-radius: 16px; border: 2px dashed var(--accent); font-size: 17px; font-weight: 600; } .soltar-capa svg { width: 22px; height: 22px; }
}
@media (min-width: 1440px) { body.esc { --panel-w: 480px; --space-page: 32px; } }
/* Densidad de oficina: solo con ratón */
@media (min-width: 1024px) and (pointer: fine) {
  body.esc .bt, body.esc .bt.p, body.esc .bt.chico, body.esc .bt.grande { min-height: 36px; min-width: 0; padding: 0 14px; font-size: 14px; font-weight: 600; width: auto; max-width: 320px; }
  body.esc .bt.chico { min-height: 32px; padding: 0 10px; }
  body.esc .vacio .bt, body.esc [data-empty-state] .bt { max-width: none; }
  body.esc th, body.esc td { font-size: 14px; line-height: 20px; }
  body.esc .seg button, body.esc .pestanas-obras button { min-height: 32px; }
}
@keyframes panel-entra { from { transform: translateX(40px); opacity: .6; } }
@keyframes cuadro-entra { from { transform: scale(.97); opacity: .6; } }

/* Visitas por cerrar: mismo estado en Inicio, la obra, el calendario y el cliente */
.chip-est.ce-por_cerrar { background: var(--warning-bg); color: var(--warning-fg); }
.pendientes li.por-cerrar { flex-wrap: wrap; } .pc-bts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───────────── Escritorio · Fase 3: tabla de datos, paleta ⌘K y atajos ───────────── */
.tabla-datos { padding: 0; overflow: hidden; display: grid; min-width: 0; }
.td-barra { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.td-barra.masiva { background: var(--accent-subtle); } .td-aire { flex: 1; }
.td-vistas { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.td-vistas [role=tab], .td-mas { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.td-vistas [role=tab] small { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; } .td-vistas [role=tab]:hover, .td-mas:hover { background: var(--surface-2); }
.td-vistas [role=tab][aria-selected=true] { background: var(--surface-2); color: var(--text-1); font-weight: 600; } .td-quitar { margin-left: 6px; color: var(--text-3); }
.td-buscar.entrada { width: 220px; min-height: 32px; height: 32px; padding: 0 10px; font-size: 14px; }
.td-rollo { overflow-x: auto; min-width: 0; }
.td-tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 20px; }
.td-tabla th { position: sticky; top: 0; z-index: 1; height: 36px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.td-orden { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); cursor: pointer; }
.td-orden:hover { color: var(--text-1); } .td-orden i { font-style: normal; }
.td-tabla td { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--border); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.td-tabla.compacta td { height: 32px; } .td-tabla tbody tr:last-child td { border-bottom: 0; }
.td-tabla th.n, .td-tabla td.n { text-align: right; font-variant-numeric: tabular-nums; }
.td-tabla tbody tr[data-k] { cursor: pointer; } .td-tabla tbody tr[data-k]:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.td-tabla tbody tr.sel td { background: var(--accent-subtle); } .td-tabla tbody tr.abierta td { background: var(--surface-2); }
.td-tabla tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.td-tabla td:nth-child(2), .td-tabla th:nth-child(2) { position: sticky; left: 0; background: var(--surface); }
.td-casilla { width: 40px; padding: 0 0 0 12px !important; } .td-casilla label { display: grid; place-items: center; width: 24px; height: 24px; cursor: pointer; }
.td-tabla .saldo-c { display: inline-grid; justify-items: end; line-height: 16px; } .td-tabla .equiv { font-size: 12px; color: var(--text-3); }
.td-tabla .mal { color: var(--danger-fg); } .td-tel { display: inline-flex; gap: 10px; } .td-wa { font-size: 12px; color: var(--text-2); }
.td-vacia td { height: auto; padding: 32px 16px; text-align: center; white-space: normal; max-width: none; }
.td-pie { display: flex; gap: 20px; align-items: center; min-height: 40px; padding: 0 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.td-pie b { color: var(--text-1); font-weight: 600; } .td-cols { display: grid; gap: 12px; }
@media (min-width: 1024px) {
  body.esc .lat-buscar { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 10px; margin-bottom: 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .07); color: var(--on-ink-muted); font: inherit; cursor: pointer; }
  body.esc .lat-buscar:hover { background: rgba(255, 255, 255, .12); color: var(--on-ink); } body.esc .lat-buscar kbd { font: inherit; font-size: 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 5px; padding: 0 5px; line-height: 18px; }
  body.esc .lat-min .lat-buscar span, body.esc .lat-min .lat-buscar kbd { display: none; } body.esc .lat-min .lat-buscar::before { content: "⌕"; margin: auto; }
  dialog.paleta { position: fixed; inset: 20vh 0 auto 0; margin: 0 auto; width: 640px; max-width: 92vw; max-height: 60vh; padding: 8px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-float, 0 8px 24px rgba(17, 17, 17, .12)); }
  dialog.paleta[open] { display: flex; flex-direction: column; gap: 6px; } dialog.paleta::backdrop { background: rgba(17, 17, 17, .35); }
  dialog.paleta > .entrada { min-height: 48px; height: 48px; font-size: 16px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
  .paleta-lista { overflow-y: auto; min-height: 0; display: grid; gap: 1px; padding: 0 4px 4px; }
  .paleta-grupo { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); padding: 10px 8px 4px; }
  .paleta-it { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 4px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--text-1); text-align: left; cursor: pointer; width: 100%; }
  .paleta-it > span { display: flex; gap: 10px; align-items: baseline; min-width: 0; } .paleta-it b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .paleta-it small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .paleta-it[aria-selected=true], .paleta-it:hover { background: var(--surface-2); } .paleta-it kbd { font: inherit; font-size: 12px; color: var(--text-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; white-space: nowrap; }
  body.esc .clientes-c:has(.ficha-lateral:not([hidden])) { grid-template-columns: minmax(0, 1fr) 380px; }
  body.esc dialog.hoja:has(.td-cols) { inset: 0; margin: auto; width: 360px; height: fit-content; max-height: 80vh; border-radius: 16px; border: 1px solid var(--border); }
  /* Ajustes: el contenido no pasa de 720 px */
  body.esc .ajustes-c > :not(.menu-ajustes) { max-width: 720px; }
}
.td-tabla td a, .td-tabla td .est-c, .td-tabla td .chip-est { min-height: 0; } .td-tabla td a { display: inline; }
/* Con ratón, casillas y opciones del tamaño de oficina (16 px), nativas */
@media (min-width: 1024px) and (pointer: fine) {
  body.esc input[type=checkbox], body.esc input[type=radio] { -webkit-appearance: auto; appearance: auto; width: 16px !important; height: 16px !important; min-width: 16px; position: static; margin: 0; accent-color: var(--ink); cursor: pointer; }
  body.esc input[type=checkbox]::before, body.esc input[type=checkbox]::after, body.esc input[type=radio]::before, body.esc input[type=radio]::after { content: none; }
  body.esc label.check { gap: 8px; min-height: 32px; }
  body.esc .td-buscar.entrada { width: 200px; min-height: 32px !important; height: 32px; padding: 0 10px !important; font-size: 14px !important; }
}

/* ───────────── Escritorio · Fase 4: Inicio, portafolio, resumen de obra y cronograma ───────────── */
.tg-pct { display: flex; align-items: center; gap: 2px; } .tg-pct i { font-style: normal; color: var(--text-3); font-size: 12px; } .tg-div { display: none; }
@media (min-width: 1024px) {
  body.esc .inicio-esc { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 16px; align-items: start; }
  body.esc .inicio-lado { display: grid; gap: 16px; min-width: 0; } body.esc .inicio-lado > section, body.esc .inicio-esc > section { min-width: 0; overflow: hidden; }
  body.esc .inicio-lado .q { min-width: 0; } body.esc .inicio-lado .q b, body.esc .inicio-lado .q small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.esc .bandeja { padding-bottom: 8px; } body.esc .bandeja-g > summary { cursor: pointer; padding: 10px 18px 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); list-style-position: inside; }
  body.esc .bandeja .lista li, body.esc .inicio-lado .lista li { min-height: 44px; padding-block: 6px; align-items: center; }
  body.esc .bandeja .lista li .q b { font-size: 14px; font-weight: 600; } body.esc .bandeja .lista li .q small { font-size: 12px; }
  body.esc .bandeja .q { min-width: 0; } body.esc .bandeja .q b, body.esc .bandeja .q small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.esc .bandeja .pc-bts { flex-wrap: nowrap; flex: none; }
  body.esc .caja-tasa, body.esc .caja-cobrar { display: grid; gap: 6px; padding-bottom: 16px; } body.esc .caja-tasa > :not(h2), body.esc .caja-cobrar > :not(h2) { margin-inline: 18px; justify-self: start; }
  body.esc .kpi { font-size: 32px; line-height: 36px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .ver-mas-t { font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; } .ver-mas-t:hover { color: var(--text-1); }
  body.esc .panel h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  /* Resumen de obra */
  body.esc .resumen-esc { display: grid; gap: 16px; } body.esc .kpis-esc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  body.esc .kpi-c { text-decoration: none; color: inherit; display: grid; gap: 4px; align-content: start; } body.esc .kpi-c b { white-space: nowrap; color: var(--text-1); font-size: 28px; line-height: 36px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  body.esc .kpi-c.mal b { color: var(--danger-fg); } body.esc .kpi-c small { font-size: 13px; color: var(--text-2); }
  body.esc .curva-mini { padding-bottom: 12px; } body.esc .curva-mini .grafico-curva { padding: 0 18px; } body.esc .curva-mini svg { width: 100%; height: auto; max-height: 300px; }
  body.esc .tab-obra:has(.curva-mini) .obra-cab .acceso-curva:not(.acceso-crono) { display: none; }
  body.esc .tab-obra:has(.curva-mini) .obra-cab .acceso-crono { grid-column: span 7; }
  /* Obras */
  body.esc .obras-g { grid-template-columns: repeat(auto-fill, minmax(260px, 360px)); } body.esc .obras-g .obra-g { max-width: 360px; }
  .td-av { display: inline-flex; align-items: center; gap: 8px; } .td-av .avance { width: 64px; }
  /* Cronograma: tabla con divisor arrastrable y filas de 32 px */
  body.esc .tg { grid-template-columns: var(--tg-w, min(800px, 70%)) 6px minmax(0, 1fr); } body.esc .tg > .tg-ayuda { grid-column: 1 / -1; }
  body.esc .tg-div { display: block; cursor: col-resize; background: var(--border); } body.esc .tg-div:hover { background: var(--accent); }
  body.esc .tg-tabla { border-right: 0; }
  body.esc .tg-fila { grid-template-columns: 34px 30px minmax(240px, 1fr) 60px 66px 66px 64px 86px 138px; font-size: 14px; }
  body.esc .tg-fila .tg-in { min-height: 0; height: 26px; padding: 0 6px; font-size: 14px; } body.esc .tg-fila > .hecha-b { width: 20px; height: 20px; min-height: 0; margin-left: 4px; }
  body.esc .tg-fila .tg-mas { min-height: 0; min-width: 0; width: 24px; height: 24px; } body.esc .tg-pct .tg-in { width: 40px; padding: 0 3px; text-align: right; } body.esc .tg-fila input[aria-label^="Duración"] { padding: 0 3px; }
}

/* ───────────── Escritorio · Fase 5: bitácora revisada, fotos, RFI en tabla y punch ───────────── */
.revisada { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--success-fg); } .revisada.no { color: var(--warning-fg); } .revisada .enlace { font-size: 13px; }
.est-c.ec-p-abierto { background: var(--warning-bg); color: var(--warning-fg); } .est-c.ec-p-listo { background: var(--info-bg); color: var(--info-fg); } .est-c.ec-p-cerrado { background: var(--success-bg); color: var(--success-fg); }
@media (min-width: 1024px) {
  body.esc .acciones-tab { display: flex; align-items: center; gap: 8px; } body.esc .acciones-tab > p { flex: 1; margin: 0; }
  body.esc .linea-fotos.bitacora { max-width: 760px; } body.esc .entrada { display: grid; gap: 6px; border-radius: 10px; }
  body.esc .entrada:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; } body.esc .entrada .revisar-b { justify-self: start; }
  body.esc .fotos-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  body.esc .galeria-dias { display: grid; gap: 20px; } body.esc .galeria-dias h3 { position: sticky; top: var(--topbar-h); z-index: 2; background: var(--bg); padding: 8px 0; font-size: 16px; }
  body.esc .galeria-dias .cuadricula { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  body.esc .galeria-dias.tam-s .cuadricula { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } body.esc .galeria-dias.tam-l .cuadricula { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ───────────── Escritorio · Fase 6: presupuesto por partidas y valuaciones ───────────── */
.td-in { width: 96px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-1); }
.td-in:hover:not(:disabled) { border-color: var(--border); background: var(--surface); } .td-in:focus { border-color: var(--accent-fg); background: var(--surface); outline: none; } .td-in:disabled { color: var(--text-3); }
.presu-grupo td { background: var(--surface-2); height: 36px; } .presu-total td { height: 40px; border-top: 2px solid var(--ink); padding: 0 12px; white-space: nowrap; } .presu-total td.n { text-align: right; font-variant-numeric: tabular-nums; }
.presu .presu-n { font-size: 14px; font-weight: 500; min-height: 0; text-align: left; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.est-c.ec-v-borrador { background: var(--surface-2); color: var(--text-2); } .est-c.ec-v-enviada { background: var(--info-bg); color: var(--info-fg); } .est-c.ec-v-aprobada { background: var(--success-bg); color: var(--success-fg); } .est-c.ec-v-anulada { background: var(--danger-bg); color: var(--danger-fg); }
.val-lineas { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.val-fila { display: grid; grid-template-columns: minmax(0, 1fr) 84px 78px 110px 112px; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 14px; }
.val-fila:first-child { border-top: 0; } .val-fila > span:first-child { display: grid; min-width: 0; } .val-fila b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .val-fila small { color: var(--text-3); font-size: 12px; }
.val-fila .n { text-align: right; font-variant-numeric: tabular-nums; } .val-fila .td-in { width: 100%; border-color: var(--border); background: var(--surface); }
.val-cab { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); } .val-cab span:not(:first-child) { text-align: right; }
.val-resumen { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; } .val-resumen b { color: var(--text-1); }
.val-total { margin-left: auto; font-size: 17px; } .val-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1024px) { body.esc dialog.hoja.ancha { width: min(760px, 96vw); } }

/* Módulos opcionales, Compras y Órdenes de cambio (solo escritorio) */
@media (min-width: 1024px) {
  body.esc .kpis-esc.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.esc .consultas > .kpis-esc { margin-bottom: 16px; }
  body.esc .kpi-c.aviso b { color: var(--warning-fg); }
  body.esc .acc-fila { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; } body.esc .enlace.chico { font-size: 13px; min-height: 0; }
  body.esc .modulos { padding: 20px 22px; display: grid; gap: 4px; max-width: 720px; } body.esc .modulos h2 { padding: 0; }
  body.esc .mod-fila { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 14px 0; border-top: 1px solid var(--linea); } body.esc .mod-fila:first-of-type { margin-top: 10px; }
  body.esc .mod-fila p { margin: 2px 0 0; } body.esc .mod-fila b { font-size: 15px; }
  body.esc .conmuta { flex: none; width: 44px; height: 26px; min-height: 0; border-radius: 99px; border: 0; padding: 0; background: var(--linea); position: relative; cursor: pointer; transition: background .15s; }
  body.esc .conmuta::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
  body.esc .conmuta[aria-checked="true"] { background: var(--tinta); } body.esc .conmuta[aria-checked="true"]::after { transform: translateX(18px); }
  body.esc .conmuta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  body.esc .mod-tope { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; } body.esc .mod-tope input { width: 110px; height: 32px; min-height: 0; }
  body.esc .segmento { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; } body.esc .segmento button { border: 0; background: none; min-height: 0; height: 28px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
  body.esc .segmento button[aria-pressed="true"] { background: var(--surface, #fff); color: var(--text-1); box-shadow: 0 1px 2px rgba(11,38,39,.12); }
  body.esc .td-tabla .corta { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
  body.esc .presu-c thead th:nth-child(n+3):nth-child(-n+5), body.esc .presu-c tr[data-k] td:nth-child(n+3):nth-child(-n+5) { display: none; }
  body.esc .nota-tope { background: var(--warning-bg); color: var(--warning-fg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0; }
}
.est-c.ec-g-cotizado { background: var(--surface-2); color: var(--text-2); } .est-c.ec-g-espera { background: var(--warning-bg); color: var(--warning-fg); } .est-c.ec-g-aprobado, .est-c.ec-g-pedido { background: var(--info-bg); color: var(--info-fg); }
.est-c.ec-g-recibido, .est-c.ec-g-pagado { background: var(--success-bg); color: var(--success-fg); } .est-c.ec-g-anulado { background: var(--surface-2); color: var(--text-3, var(--text-2)); text-decoration: line-through; }
.est-c.ec-k-propuesto { background: var(--warning-bg); color: var(--warning-fg); } .est-c.ec-k-aprobado { background: var(--success-bg); color: var(--success-fg); } .est-c.ec-k-rechazado { background: var(--danger-bg, var(--surface-2)); color: var(--danger-fg); }

/* Cronograma maestro: lo que se puede pulsar para editar */
.m-barra, .m-sem, .m-fila-c { cursor: pointer; } .m-barra:hover rect { filter: brightness(.93); } .m-sem:hover rect { stroke: var(--text-1); stroke-width: 1.5; } .m-fila-c:hover { fill: var(--surface-2); }
.lista-sem { display: grid; gap: 4px; } .lista-sem a { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; border: 1px solid var(--linea); }
.lista-sem a:hover { background: var(--surface-2); } .lista-sem span { color: var(--text-2); font-size: 14px; } .lista-sem i { font-style: normal; color: var(--text-3); }

/* Casilla para arrastrar archivos y lista de archivos de un RFI o submittal */
.zona-arch { display: grid; justify-items: center; gap: 4px; padding: 18px 14px; border: 1.5px dashed var(--linea2, var(--border)); border-radius: 12px; background: var(--surface-2); color: var(--text-2); text-align: center; cursor: pointer; transition: background .12s, border-color .12s; }
.zona-arch svg { width: 22px; height: 22px; } .zona-arch b { color: var(--text-1); font-weight: 600; font-size: 15px; } .zona-arch small { font-size: 13px; }
.zona-arch:hover, .zona-arch:focus-visible { border-color: var(--accent-fg); outline: none; } .zona-arch.encima { border-color: var(--accent-fg); border-style: solid; background: var(--accent-bg, #FAEAE2); } .zona-arch.ocupada { opacity: .55; pointer-events: none; }
.arch-lista { display: grid; gap: 6px; margin-bottom: 8px; } .arch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; background: var(--surface); }
.arch a { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; } .arch a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.arch a b { flex: none; font-size: 11px; letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); } .arch small { color: var(--text-3); white-space: nowrap; }

/* Modelo 3D de estructura (solo escritorio) */
@media (min-width: 1024px) {
  body.esc .m3-marco { display: grid; grid-template-columns: 256px minmax(0, 1fr) 290px; gap: 12px; height: calc(100vh - 335px); min-height: 460px; }
  body.esc .m3-izq, body.esc .m3-der { box-sizing: border-box; min-width: 0; overflow-x: hidden; } body.esc .m3-izq > div, body.esc .m3-der > div { min-width: 0; }
  body.esc .m3-izq, body.esc .m3-der { background: var(--surface); border: 1px solid var(--linea); border-radius: 14px; padding: 14px; display: grid; gap: 14px; align-content: start; overflow: auto; }
  body.esc .m3 h3 { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; font-weight: 600; }
  body.esc .m3-herr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; } body.esc .m3-herr button, body.esc .m3-niv button { display: flex; align-items: center; gap: 7px; min-height: 0; height: 36px; padding: 0 9px; border: 1px solid var(--linea); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-1); cursor: pointer; }
  body.esc .m3-herr button:first-child { grid-column: 1 / -1; } body.esc .m3-herr kbd { margin-left: auto; font: 500 11px var(--letra); color: var(--text-3); border: 1px solid var(--linea); border-radius: 5px; padding: 0 5px; }
  body.esc .m3-herr button[aria-pressed="true"] { background: var(--tinta); color: var(--on-accent); border-color: var(--tinta); } body.esc .m3-herr button[aria-pressed="true"] kbd { color: inherit; opacity: .7; border-color: currentColor; }
  body.esc .m3-c { width: 13px; height: 13px; border-radius: 3px; flex: none; } .m3-col { background: #9AA5AA; } .m3-viga { background: var(--accent-fg); } .m3-pared { background: #C9B48A; } .m3-losa { background: #B9C4C6; } .m3-zap { background: #5E6B6C; }
  body.esc .m3-niv { display: grid; gap: 4px; } body.esc .m3-niv button { justify-content: space-between; font-weight: 500; } body.esc .m3-niv small { color: var(--text-3); } body.esc .m3-niv button[aria-pressed="true"] { border-color: var(--accent-fg); background: var(--accent-bg, #FAEAE2); font-weight: 600; }
  body.esc .m3-herr button { padding: 0 7px; gap: 5px; font-size: 13px; } body.esc .m3-herr kbd { padding: 0 4px; }
  body.esc .m3-niv .m3-suelo { border-style: dashed; } body.esc .m3-herr button { min-width: 0; overflow: hidden; } body.esc .m3-herr button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.esc .m3-dato { margin: 0 0 4px; font-size: 13px; color: var(--text-2); line-height: 18px; } body.esc .m3-izq .bt.chico { margin-top: 4px; }
  body.esc .m3-lienzo { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--linea); background: #eef0f2; min-width: 0; }
  body.esc .m3-lona { display: block; width: 100%; height: 100%; outline: none; touch-action: none; } body.esc .m3-lona:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
  body.esc .m3-carga { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
  body.esc .m3-pista { position: absolute; left: 12px; bottom: 12px; right: 12px; max-width: max-content; background: rgba(17, 17, 17, .9); color: #F3EFE6; border-radius: 10px; padding: 7px 12px; font-size: 13px; pointer-events: none; } body.esc .m3-pista:empty { display: none; }
  body.esc .m3-sel { position: absolute; right: 12px; top: 12px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--linea); border-radius: 10px; padding: 9px 12px; font-size: 13px; box-shadow: 0 6px 20px rgba(17, 17, 17, .16); } body.esc .m3-sel[hidden] { display: none; } body.esc .m3-sel span { color: var(--text-2); } body.esc .m3-sel .enlace { min-height: 0; justify-self: start; font-size: 13px; }
  body.esc .m3-comp table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; margin-bottom: 14px; } body.esc .m3-comp th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); text-align: left; padding: 4px 0; border-bottom: 1px solid var(--linea); font-weight: 600; }
  body.esc .m3-comp td { padding: 6px 0; border-bottom: 1px solid var(--linea); } body.esc .m3-comp .n { text-align: right; white-space: nowrap; padding-left: 8px; } body.esc .m3-comp tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--tinta); }
  body.esc .m3-nota { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 19px; color: var(--text-2); margin: 0; }
  body.esc .m3-elige select { height: 36px; min-height: 0; max-width: 260px; font-weight: 600; } body.esc .m3-estado { min-width: 84px; }
}

/* Botón de moneda (dólares o bolívares) */
.segmento.seg-moneda { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; justify-self: start; }
.segmento.seg-moneda button { border: 0; background: none; min-height: 0; height: 30px; min-width: 44px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 650; color: var(--text-2); cursor: pointer; }
.segmento.seg-moneda button[aria-pressed="true"] { background: var(--surface, #fff); color: var(--text-1); box-shadow: 0 1px 2px rgba(11,38,39,.12); } .segmento.seg-moneda button:disabled { opacity: .45; cursor: default; }

/* Gantt: edición rápida junto a cada actividad (solo escritorio) */
@media (min-width: 1024px) {
  body.esc .g-rapido .g-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) 46px 58px; align-items: center; gap: 6px; padding: 0 10px 0 8px; box-sizing: border-box; border-bottom: 1px solid transparent; }
  body.esc .g-rapido.con-resp .g-r { grid-template-columns: 22px minmax(0, 1fr) 46px 58px 140px; }
  body.esc .g-rapido .g-r:hover { background: var(--surface-2); } body.esc .g-rapido .g-cabr:hover { background: none; }
  body.esc .g-rapido .g-cabr { align-items: end; padding-bottom: 7px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; } body.esc .g-cabr .n { text-align: right; padding-right: 6px; }
  body.esc .g-rapido .g-t { padding: 0; height: 100%; min-height: 0; } body.esc .g-rapido .g-r.hecha .g-t { color: var(--text-3); text-decoration: line-through; }
  body.esc .g-rapido .hecha-b { width: 20px; height: 20px; min-height: 0; min-width: 0; padding: 0; font-size: 12px; } body.esc .g-rapido .hecha-b::before { inset: 1px; }
  body.esc .g-in, body.esc .g-sel { height: 26px; min-height: 0; border: 1px solid var(--linea); border-radius: 7px; background: var(--surface); font: inherit; font-size: 13.5px; color: var(--text-1); padding: 0 6px; min-width: 0; width: 100%; box-sizing: border-box; }
  body.esc .g-in { text-align: right; font-variant-numeric: tabular-nums; } body.esc .g-in:hover, body.esc .g-sel:hover { border-color: var(--text-3); } body.esc .g-in:focus, body.esc .g-sel:focus { border-color: var(--tinta); outline: 2px solid var(--accent-bg, #FAEAE2); }
  body.esc .g-pct { display: flex; align-items: center; gap: 3px; } body.esc .g-pct i { font-style: normal; font-size: 12px; color: var(--text-3); } body.esc .g-sel { padding: 0 4px; } body.esc .g-sel.vacio { color: var(--text-3); }
}

/* Programa de obra: vista densa (solo escritorio), vista previa de impresión e impresión */
@media (min-width: 1024px) {
  body.esc .pg-barra { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } body.esc .pg-barra .g-zoom { margin: 0; position: static; box-shadow: none; }
  body.esc .pg-marco { align-items: start; } body.esc .pg-tabla { border-right: 2px solid var(--border); background: var(--surface); min-width: 0; overflow: hidden; }
  body.esc .pg-fila { display: grid; grid-template-columns: var(--cols); align-items: center; box-sizing: border-box; border-bottom: 1px solid var(--surface-2); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
  body.esc .pg-fila > span { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } body.esc .pg-fila > span.n { text-align: right; } body.esc .pg-fila .cod { color: var(--text-3); font-size: 12px; }
  body.esc .pg-fila:hover, body.esc .pg-fila:focus-visible { background: var(--surface-2); outline: none; } body.esc .pg-fila.critica .nom { color: var(--danger-fg); font-weight: 600; }
  body.esc .pg-cab { background: var(--surface-2); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); font-weight: 600; cursor: default; align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--border); } body.esc .pg-cab:hover { background: var(--surface-2); }
  body.esc .pg-fase { background: color-mix(in srgb, var(--c) 14%, var(--surface)); font-weight: 700; cursor: default; border-bottom-color: transparent; } body.esc .pg-fase:hover { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
  body.esc .pg-fase i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 8px; } body.esc .pg-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
}
.pg-res { fill: var(--tinta); } .g-fecha.pg-f { font-weight: 700; fill: var(--text-1); }
.prev-imp { width: min(1500px, 96vw); height: 94vh; max-width: none; max-height: none; padding: 0; border: 0; border-radius: 16px; background: var(--bg); color: var(--text-1); overflow: hidden; } .prev-imp[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); } .prev-imp::backdrop { background: rgba(17, 17, 17, .55); }
.prev-cab { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--linea); } .prev-cab h3 { margin: 0; font-size: 18px; }
.prev-cuerpo { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; } .prev-op { background: var(--surface); border-right: 1px solid var(--linea); padding: 14px 16px; display: grid; gap: 14px; align-content: start; overflow: auto; }
.prev-op h4 { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); } .prev-op select { width: 100%; height: 36px; min-height: 0; } .prev-op .check { min-height: 30px; font-size: 14px; }
.prev-op .segmento { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; } .prev-op .segmento button { border: 0; background: none; min-height: 0; height: 30px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.prev-op .segmento button[aria-pressed="true"] { background: var(--surface); color: var(--text-1); box-shadow: 0 1px 2px rgba(11,38,39,.14); }
.prev-zona { overflow: auto; padding: 22px; } .prev-hojas { display: grid; gap: 22px; justify-items: center; } .prev-hoja { width: min(100%, 1150px); background: #fff; box-shadow: 0 4px 22px rgba(17, 17, 17, .18); } .prev-hoja svg { display: block; width: 100%; height: 100%; }
#impresion { display: none; }
@media print { body > *:not(#impresion) { display: none !important; } html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important; }
  #impresion { display: block; } #impresion svg { display: block; width: 100vw; height: 100vh; page-break-after: always; break-after: page; } #impresion svg:last-child { page-break-after: auto; break-after: auto; } }

/* Programa: fila de resumen de toda la obra; ficha con código junto al nombre */
@media (min-width: 1024px) { body.esc .pg-fila.pg-obra, body.esc .pg-fila.pg-obra:hover { background: color-mix(in srgb, var(--c) 22%, var(--surface)); font-size: 13.5px; } }
.fila.cod-nom { grid-template-columns: 110px minmax(0, 1fr); }

/* Carga de partidas: de dónde viene el archivo */
.origen-import { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; } .origen-import small { display: block; color: var(--text-2); font-size: 13px; line-height: 18px; margin-top: 2px; }

/* Carga de partidas: modo (agregar o reemplazar), alerta de partidas que ya existen y partidas sin cantidad */
.modo-import { border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 6px; } .modo-import legend { font-weight: 650; font-size: 14px; padding: 0 4px; }
.opcion-r { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 4px 0; cursor: pointer; } .opcion-r input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--tinta); }
.opcion-r span { display: grid; gap: 1px; } .opcion-r small { color: var(--text-2); font-size: 13px; line-height: 18px; font-weight: 400; }
.alerta-solape { border: 1.5px solid var(--warning-fg); background: var(--warning-bg); border-radius: 12px; padding: 12px; margin: 10px 0; display: grid; gap: 6px; } .alerta-solape > b { color: var(--warning-fg); font-size: 15.5px; } .alerta-solape > p { margin: 0; font-size: 14px; }
.acciones-solape { display: grid; gap: 2px; background: var(--surface); border-radius: 10px; padding: 6px 10px; }
.lista-solape { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; } .lista-solape li { background: var(--surface); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.lista-solape li > div { display: flex; gap: 8px; align-items: baseline; min-width: 0; } .lista-solape li > div b { flex: none; font-size: 13px; } .lista-solape li > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lista-solape small { color: var(--text-2); font-size: 13px; line-height: 18px; } .lista-solape small b { color: var(--text-1); } .lista-solape em { font-style: normal; color: var(--warning-fg); } .lista-solape select { min-height: 40px; height: 40px; font-size: 14px; width: 100%; }
.check.sin-cant { align-items: flex-start; margin: 8px 0; } .check.sin-cant span { display: grid; gap: 1px; } .check.sin-cant small { color: var(--text-2); font-size: 13px; font-weight: 400; }

.acceso-presu { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; } .acceso-presu > div { display: grid; gap: 2px; min-width: 0; } .acceso-presu b { font-weight: 640; } .acceso-presu small { color: var(--apoyo); font-size: 12px; }
@media (min-width: 861px) { .obra-cab .acceso-presu { grid-column: 2; } .obra-cab:has(.acceso-presu) .visitas-obra { grid-row: 1 / 4; } }

/* ───────────── Teléfono: tarjetas, presupuesto resumido, por aprobar, próximas dos semanas y modelo 3D para ver ───────────── */
.tarj-vistas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 10px; padding: 2px; } .tarj-vistas::-webkit-scrollbar { display: none; }
.tarj-vistas button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--linea); background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.tarj-vistas button small { font-size: 12px; color: var(--text-3); } .tarj-vistas button[aria-selected="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--on-accent); } .tarj-vistas button[aria-selected="true"] small { color: inherit; opacity: .75; }
.tarj-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .tarj { background: var(--surface); border: 1px solid var(--linea); border-radius: 16px; padding: 14px; display: grid; gap: 6px; min-width: 0; }
.tarj-cab { display: flex; align-items: center; gap: 8px; min-width: 0; } .tarj-cab .sp { flex: 1; } .tarj-cab .cod-c { font-size: 12.5px; color: var(--text-2); letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .tarj-cab .est-c { margin: 0; flex: none; }
.tarj-tit { font: inherit; font-size: 16.5px; line-height: 22px; font-weight: 640; text-align: left; border: 0; background: none; padding: 0; color: var(--text-1); min-height: 0; overflow-wrap: anywhere; } button.tarj-tit { cursor: pointer; }
.tarj-det { margin: 0; display: grid; gap: 2px; } .tarj-det > div { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; font-size: 14px; line-height: 20px; min-width: 0; } .tarj-det dt { color: var(--text-3); flex: none; } .tarj-det dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.tarj-det .saldo-c { display: grid; justify-items: end; } .tarj-acc { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; } .tarj-acc .acc-fila { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.tarj-acc .bt { flex: 1; min-height: 46px; justify-content: center; } .tarj-acc .enlace { min-height: 44px; padding: 0 8px; } .tarj-acc .gr-s { align-self: center; }
.apr-monto { font-size: 24px; line-height: 30px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; } .apr-monto.mal { color: var(--danger-fg); }
.nota-pc { border: 1.5px dashed var(--accent); background: var(--accent-bg, #FAEAE2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; margin-top: 4px; } .nota-pc b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; } .nota-pc small { font-size: 13.5px; line-height: 19px; color: var(--text-2); }
.mon { width: 20px; height: 15px; border: 2px solid var(--accent); border-radius: 3px; position: relative; flex: none; display: inline-block; } .mon::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -6px; height: 2px; background: var(--accent); }
body:not(.esc) .kpis-esc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; } body:not(.esc) .kpis-esc.kpis-3 > :last-child, body:not(.esc) .kpis-esc > :nth-child(3):last-child { grid-column: 1 / -1; }
body:not(.esc) .kpi-c { background: var(--surface); border: 1px solid var(--linea); border-radius: 14px; padding: 12px; display: grid; gap: 2px; align-content: start; min-width: 0; } body:not(.esc) .kpi-c span { font-size: 12.5px; color: var(--text-2); }
body:not(.esc) .kpi-c b { font-size: clamp(15px, 4.6vw, 19px); line-height: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } body:not(.esc) .kpi-c small { font-size: 12px; color: var(--text-3); line-height: 16px; } body:not(.esc) .kpi-c.aviso b { color: var(--warning-fg); }
body:not(.esc) .acciones-tab { display: grid; gap: 10px; margin-bottom: 12px; } body:not(.esc) .acciones-tab > p { margin: 0; } body:not(.esc) .acciones-tab .bt { justify-content: center; min-height: 46px; }
.presu-m { display: grid; gap: 12px; } .presu-etapas { padding: 6px 14px 10px; } .presu-etapas h2 { padding: 8px 0 2px; } .presu-et { border-top: 1px solid var(--linea); } .presu-et:first-of-type { border-top: 0; }
.presu-et summary { list-style: none; display: grid; gap: 4px; padding: 12px 0; cursor: pointer; } .presu-et summary::-webkit-details-marker { display: none; } .fila-pe { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; } .fila-pe b:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.presu-et summary small { color: var(--text-2); font-size: 13px; } .presu-ps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; } .presu-ps li { display: grid; gap: 1px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.presu-ps li span { font-size: 14.5px; line-height: 20px; overflow-wrap: anywhere; } .presu-ps .cod-c { margin-right: 6px; color: var(--text-3); font-size: 12px; } .presu-ps li > small { color: var(--text-2); font-size: 13px; }
.aviso-apr { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; border-color: var(--warning-fg); background: var(--warning-bg); margin-bottom: 12px; } .aviso-apr b { color: var(--warning-fg); } .aviso-apr small { grid-column: 1; font-size: 13px; color: var(--text-2); } .aviso-apr span { grid-row: 1 / 3; grid-column: 2; font-size: 26px; color: var(--warning-fg); }
.cuenta-r { background: var(--danger-bg, #F8DCDD); color: var(--danger-fg); border-radius: 99px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 13px; padding: 0 8px; }
.mas-pc { border: 1.5px dashed var(--accent); border-radius: 14px; padding: 12px 14px; margin: 8px 0; display: grid; gap: 6px; } .mas-pc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .mas-pc li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 15px; color: var(--text-2); }
.mas-pc em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent-fg); background: var(--accent-bg, #FAEAE2); border-radius: 99px; padding: 2px 9px; flex: none; } .mas-pc small { color: var(--text-2); font-size: 13px; }
.tarea { flex-wrap: wrap; } .t-rapidas { flex-basis: 100%; display: flex; gap: 8px; padding: 0 0 8px 40px; } .t-rapidas .bt { flex: 1; min-height: 44px; justify-content: center; } .bt.t { background: var(--tinta); border-color: var(--tinta); color: var(--on-accent); }
.proximas { display: grid; gap: 12px; } .px-dia h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 4px 2px 6px; font-weight: 700; } .px-dia h3 b { color: var(--accent-fg); }
.px-dia ul { list-style: none; margin: 0; padding: 4px 14px; } .px-it { border-top: 1px solid var(--linea); border-left: 4px solid var(--verde, #1F5C58); margin-left: -14px; padding-left: 10px; } .px-it:first-child { border-top: 0; } .px-it.critica { border-left-color: var(--danger-fg); }
.px-it button { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 0; font: inherit; min-height: 44px; color: inherit; } .px-it b { font-size: 16px; line-height: 21px; font-weight: 640; } .px-it small { color: var(--text-2); font-size: 13px; line-height: 18px; }
.bt.ancho { width: 100%; justify-content: center; min-height: 48px; }
.m3-movil .m3-marco { display: grid; gap: 12px; } .m3-movil .m3-lienzo { position: relative; height: 340px; border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); background: #eef0f2; } .m3-movil .m3-lona { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.m3-movil .m3-pista, .m3-movil .m3-sel[hidden] { display: none; } .m3-movil .m3-sel { position: absolute; left: 10px; top: 10px; right: 10px; background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 13px; display: grid; gap: 2px; box-shadow: 0 6px 20px rgba(11,38,39,.16); }
.m3-movil .m3-der { background: var(--surface); border: 1px solid var(--linea); border-radius: 16px; padding: 14px; } .m3-movil h3 { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.m3-movil .m3-comp table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 12px; } .m3-movil .m3-comp th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); text-align: left; padding: 4px 0; border-bottom: 1px solid var(--linea); }
.m3-movil .m3-comp td { padding: 7px 0; border-bottom: 1px solid var(--linea); } .m3-movil .m3-comp .n { text-align: right; white-space: nowrap; padding-left: 8px; } .m3-movil .m3-comp tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--tinta); }
.m3-movil .m3-nota { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 19px; color: var(--text-2); margin: 0; } .m3-movil .m3-elige select { min-height: 44px; width: 100%; } .m3-movil .m3-estado { display: none; }
.m3-movil .segmento { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; } .m3-movil .segmento button { flex: 1; border: 0; background: none; min-height: 40px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--text-2); }
/* En el teléfono nada empuja el ancho de la pantalla: las columnas de estas rejillas pueden encogerse. */
body:not(.esc) .consultas, body:not(.esc) .tab-obra { grid-template-columns: minmax(0, 1fr); } body:not(.esc) .consultas > *, body:not(.esc) .tab-obra > * { min-width: 0; }
body:not(.esc) .kpis-esc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Cabecera de la obra en el teléfono, compacta: título más corto, atraso en una línea y botones de foto más bajos */
@media (max-width: 860px) {
  body:not(.esc) .aviso-atraso.compacto { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; padding: 0 12px; min-height: 40px; text-decoration: none; font-size: 14px; line-height: 18px; }
  body:not(.esc) .aviso-atraso.compacto > svg { margin: 0; } body:not(.esc) .aviso-atraso.compacto span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } body:not(.esc) .aviso-atraso.compacto b { flex: none; font-weight: 650; }
  body:not(.esc) .tomar { gap: 8px; } body:not(.esc) .tomar .bt.grande { min-height: 48px; font-size: 16px; } body:not(.esc) .tomar .bt { min-height: 48px; } body:not(.esc) .tomar[hidden] { display: none; }
  body:not(.esc) .pestanas-obra { margin: 10px 0 12px; }
}

/* ───────────── Inicio que prioriza (franja, bandeja por urgencia o por obra, primeros pasos) ───────────── */
.bt.fantasma { background: transparent; border-color: transparent; color: var(--text-2); }
.bt.fantasma:hover { background: var(--surface-2); }
.ob-c { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.cabeza .sub .mal { color: var(--danger-fg); font-weight: 650; }
.in-seg button { min-height: 44px; white-space: nowrap; }
.in-franja { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.in-cifra { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text-1); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-width: 0; }
.in-cifra .l { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.in-cifra .l em { font-style: normal; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.in-cifra b { font-size: 24px; line-height: 30px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.in-cifra small { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.in-cifra.mal { border-color: #E9B9BE; background: #FFF8F8; } .in-cifra.mal b { color: var(--danger-fg); }
.in-cifra[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); }
.in-bandeja { display: grid; gap: 14px; min-width: 0; } .in-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.in-panel { padding: 4px 16px 10px; }
.in-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 10px 0 2px; }
.in-cab h2 { margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.in-cab small { color: var(--text-2); font-size: 13px; }
.in-n { font-size: 12px; font-weight: 700; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 0 8px; line-height: 20px; font-variant-numeric: tabular-nums; }
.in-sec { padding: 12px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); }
.in-sec b { color: var(--text-1); } .in-sec.mal b { color: var(--danger-fg); }
.in-lista { list-style: none; margin: 0; padding: 0; }
.in-urgente { background: #FFF8F8; border: 1px solid #EFC9CD; border-radius: 12px; padding: 2px 12px; margin-bottom: 4px; }
.in-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--border); }
.in-lista > .in-fila:first-child { border-top: 0; } .in-lista:not(.in-urgente) { border-top: 1px solid var(--border); } .in-sec + .in-lista:not(.in-urgente) { border-top: 1px solid var(--border); }
.in-fila:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.in-edad { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.in-edad.mal { color: var(--danger-fg); } .in-edad.ojo { color: var(--warning-fg); }
.in-q { min-width: 0; display: grid; gap: 1px; } .in-q b { font-weight: 600; font-size: 15px; } .in-q small { font-size: 13px; color: var(--text-2); }
.in-q small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.in-q .ob { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.in-acc { display: flex; gap: 4px; align-items: center; flex: none; }
.in-rutina > summary { cursor: pointer; display: flex; align-items: center; gap: 4px; min-height: 44px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); list-style: none; border-top: 1px solid var(--border); margin-top: 6px; }
.in-rutina > summary::-webkit-details-marker { display: none; } .in-rutina > summary b { color: var(--text-1); }
.in-rutina > summary em { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-2); } .in-rutina[open] > summary em { visibility: hidden; }
.in-grupo + .in-grupo { border-top: 1px solid var(--border); }
.in-obra-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0 8px; } .in-obra-cab .sp { flex: 1; }
.in-obra-cab .nm, .in-obras .nm { display: inline-flex; align-items: center; gap: 8px; min-width: 0; } .in-obra-cab .nm b { font-size: 15px; font-weight: 650; }
.in-obra-cab small { color: var(--text-2); font-size: 13px; }
.in-salud { font-size: 12px; font-weight: 650; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.in-salud.mal { background: var(--danger-bg); color: var(--danger-fg); } .in-salud.bien { background: var(--success-bg); color: var(--success-fg); }
.in-lista.sangria { padding-left: 18px; }
.in-hoy, .in-obras, .in-pasos { padding-bottom: 8px; }
.in-agenda, .in-obras ul, .in-pasos ul { list-style: none; margin: 0; padding: 0 16px; }
.in-agenda li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.in-agenda li:first-child, .in-obras li:first-child { border-top: 0; }
.in-agenda .hora { font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; } .in-agenda li > div { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.in-agenda b { font-weight: 600; overflow-wrap: anywhere; } .in-agenda small { color: var(--text-2); font-size: 13px; }
.in-obras li { border-top: 1px solid var(--border); }
.in-obras a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 10px 0; min-height: 44px; text-decoration: none; color: inherit; }
.in-obras a b { font-weight: 600; overflow-wrap: anywhere; } .in-obras a small { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
.in-lado { display: grid; gap: 14px; min-width: 0; align-content: start; margin-top: 14px; } .in-lado.sin-obras .in-obras { display: none; } .in-lado:empty, .in-lado.sin-obras:not(:has(.in-hoy)) { display: none; }
.in-hoy .ver-mas-t, .in-obras .ver-mas-t { min-height: 44px; display: inline-flex; align-items: center; }
.in-pasos h2 small { font-variant-numeric: tabular-nums; }
.in-progreso { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 0 16px 6px; overflow: hidden; } .in-progreso i { display: block; height: 100%; background: var(--success-fg); border-radius: 99px; }
.in-pasos li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-top: 1px solid var(--border); }
.in-pasos li:first-child { border-top: 0; } .in-pasos li.ok { color: var(--text-2); } .in-pasos li.ok > span:first-child { color: var(--success-fg); font-weight: 800; } .in-pasos li small { font-size: 13px; color: var(--success-fg); font-weight: 600; }
.in-ocultar { margin: 0 16px; font-size: 13px; color: var(--text-2); }
.fab { position: fixed; right: 16px; bottom: calc(56px + 14px + env(safe-area-inset-bottom)); z-index: 19; display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px; border: 0; border-radius: 28px; background: var(--accent); color: var(--on-accent, #fff); font: inherit; font-weight: 650; font-size: 16px; cursor: pointer; box-shadow: 0 6px 18px rgba(17, 17, 17, .28); }
.fab svg { width: 22px; height: 22px; }
.reg-ops { display: grid; gap: 10px; } .reg-ops .bt { justify-content: flex-start; gap: 10px; }
.rev-bit { display: grid; gap: 10px; } .rev-nav { display: flex; align-items: center; gap: 10px; } .rev-nav span { font-weight: 600; font-variant-numeric: tabular-nums; }
.rev-texto { white-space: pre-wrap; font-size: 16px; line-height: 1.5; margin: 0; } .rev-acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; }
@media (min-width: 700px) { body:not(.esc) .in-franja { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  body.esc .in-seg button { min-height: 30px; padding: 0 12px; font-size: 13px; } body.esc .in-seg { height: 36px; align-items: stretch; border: 1px solid var(--border); }
  body.esc .in-franja { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: 12px; margin-bottom: 16px; }
  body.esc .in-cifra { padding: 12px 16px; } body.esc .in-cifra b { font-size: 26px; line-height: 32px; } body.esc .in-cifra small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  body.esc .in-cifra:hover { border-color: var(--text-3); } body.esc .in-cifra:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  body.esc .inicio-esc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
  body.esc .inicio-esc:has(> .in-lado.sin-obras:not(:has(.in-hoy))), body.esc .inicio-esc:has(> .in-lado:empty) { grid-template-columns: minmax(0, 1fr); }
  body.esc .in-lado { margin-top: 0; gap: 16px; } body.esc .in-bandeja, body.esc .in-col { gap: 16px; } body.esc .in-hoy .ver-mas-t, body.esc .in-obras .ver-mas-t { min-height: 32px; }
  body.esc .in-panel { padding: 6px 18px 10px; } body.esc .in-cab h2 { font-size: 16px; }
  body.esc .in-fila { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; min-height: 52px; padding: 6px 0; }
  body.esc .in-edad { grid-column: auto; } body.esc .in-q b { font-size: 14px; } body.esc .in-q small { display: block; } body.esc .in-q b, body.esc .in-q small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.esc .in-fila .bt.chico, body.esc .in-obra-cab .bt.chico, body.esc .in-pasos .bt.chico { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
  body.esc .in-rutina > summary { min-height: 36px; } body.esc .in-agenda, body.esc .in-obras ul, body.esc .in-pasos ul { padding: 0 18px; } body.esc .in-progreso { margin-inline: 18px; } body.esc .in-ocultar { margin-inline: 18px; }
  body.esc .in-pasos li { min-height: 44px; } body.esc .in-obras a { min-height: 0; }
}
@media (min-width: 1024px) and (max-width: 1339px) { body.esc .inicio-esc { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (min-width: 1024px) and (max-width: 1099px) { body.esc .inicio-esc { grid-template-columns: minmax(0, 1fr); } }
/* Áreas de clic del escritorio que quedaban por debajo de 32 px: grupos de la barra lateral, moneda y selector de Inicio. */
@media (min-width: 1024px) {
  body.esc button.lat-grupo { min-height: 32px; padding-block: 6px; } body.esc .lat-chev { font-size: 12px; }
  body.esc .seg-moneda button { min-height: 32px; }
  body.esc .in-seg { height: 40px; } body.esc .in-seg button { min-height: 32px; }
}

/* ───────────── Propuestas: estados, avisos y el marco de las hojas carta ───────────── */
.est-c.ep-borrador { background: var(--surface-2); color: var(--text-2); } .est-c.ep-enviada { background: var(--info-bg, #DFE9F5); color: var(--info-fg, #1F4E8C); }
.est-c.ep-aceptada { background: var(--success-bg); color: var(--success-fg); } .est-c.ep-rechazada, .est-c.ep-vencida { background: var(--danger-bg); color: var(--danger-fg); } .est-c.ep-cancelada { background: var(--surface-2); color: var(--text-3); }
.cabeza .sub .est-c { margin-left: 0; }
.aviso-prop { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; }
.aviso-prop.ok { background: var(--success-bg); border-color: transparent; color: var(--success-fg); font-weight: 600; } .aviso-prop.no { background: var(--danger-bg); border-color: transparent; color: var(--danger-fg); font-weight: 600; }
.pp-marco { background: var(--surface-2); border-radius: 16px; padding: 18px 0; overflow: hidden; margin-bottom: 14px; } .pp-esc { transform-origin: top center; width: 816px; margin: 0 auto; }
.pp-marco .pp-hoja { box-shadow: 0 2px 14px rgba(17, 17, 17, .14); }
@media (max-width: 860px) { .pp-marco { padding: 0; border-radius: 10px; background: none; } .pp-esc { transform-origin: top left; margin: 0; } .pp-marco .pp-doc { gap: 10px; } }

/* ───────────── Fase 2 del reporte: asistente de Nueva obra como ventana, «Sin cliente» y empresa editable ───────────── */
.guia-der { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; justify-content: flex-end; } .guia-luego { font-size: 15px; color: var(--text-2); }
.guia-arriba .cerrar { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--text-1); }
.sin-cliente { font-size: inherit; min-height: 0; padding: 0; color: var(--accent-fg); } body:not(.esc) .sin-cliente { min-height: 44px; }
.hist-empresa summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 44px; display: flex; align-items: center; } .hist-empresa ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; } .hist-empresa small { color: var(--text-2); }
.bt:disabled { opacity: .5; cursor: not-allowed; }
dialog.guia-modal { position: fixed; inset: 0; margin: auto; transform: none; width: 960px; height: 640px; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text-1); overflow: hidden; box-shadow: 0 24px 60px rgba(17, 17, 17, .3); }
dialog.guia-modal[open] { display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; }
dialog.guia-modal::backdrop { background: rgba(17, 17, 17, .45); }
.gm-pasos { background: var(--bg); border-right: 1px solid var(--border); padding: 22px 16px; display: grid; gap: 16px; align-content: start; } .gm-pasos > b { font-size: 16px; }
.gm-pasos ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .gm-pasos li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.gm-pasos li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); flex: none; }
.gm-pasos li.actual { background: var(--surface); color: var(--text-1); font-weight: 600; box-shadow: 0 0 0 1px var(--border); } .gm-pasos li.actual span { background: var(--ink); color: var(--on-ink); } .gm-pasos li.hecho span { background: var(--success-bg); color: var(--success-fg); }
.guia.en-modal { min-height: 0; height: 100%; max-width: none; margin: 0; overflow: hidden; background: var(--surface); } .guia.en-modal .guia-c { overflow-y: auto; padding: 4px 24px 18px; }
.guia.en-modal .guia-arriba { padding: 12px 12px 0 24px; } .guia.en-modal .guia-arriba .cerrar { width: 40px; height: 40px; } .guia.en-modal h1 { font-size: 22px; margin-top: 0; }
.guia.en-modal .guia-pie { background: var(--surface); position: static; } .guia.en-modal .guia-bts { padding: 12px 24px 16px; } .guia.en-modal .guia-luego { font-size: 14px; }
.gm-previa { background: var(--bg); border-left: 1px solid var(--border); padding: 22px 18px; overflow-y: auto; display: grid; gap: 14px; align-content: start; font-size: 14px; } .gm-previa h2 { font-size: 15px; margin: 0; }
.gm-previa .sugerido { margin: 0; } .gm-resumen { margin: 0; display: grid; gap: 2px; } .gm-resumen dt { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); margin-top: 8px; } .gm-resumen dd { margin: 0; overflow-wrap: anywhere; }

/* ───────────── Identidad cimcore ───────────── */
.bt.p:not(.peligro), body.esc .bt.p:not(.peligro), .fab, .av-ses { color: var(--on-accent-fill); }
.logo { font-weight: 800; letter-spacing: -.04em; gap: 7px; } .logo svg { height: 26px; width: 26px; }
.simbolo svg { width: 38px; height: 38px; }
/* El turquesa de la marca es el color del avance. */
.avance i, .in-progreso i { background: var(--turquesa); }
.acceso-frase { max-width: 14ch; } .acceso-frase span { color: var(--turquesa); }

/* ───────────── Manual de marca cimcore, aplicado ─────────────
   Naranja = acción y «estás aquí»: botón principal con texto blanco en negrita, ítem activo del menú relleno en naranja
   y pestaña activa en naranja. Turquesa = avance. El logotipo va proporcional al texto que lo rodea. */
:root { --on-accent-fill: #FFFFFF; }
.bt.p:not(.peligro), body.esc .bt.p:not(.peligro), .fab { font-weight: 800; }
.av-ses { color: #FFFFFF; font-weight: 800; }
/* Logotipo */
.logo { font-size: 26px; gap: 9px; } .logo svg { height: 32px; width: 32px; }
.movil-arriba .logo { font-size: 28px; } .movil-arriba .logo svg { height: 34px; width: 34px; }
.entrada-c .logo, .solo-telefono .logo { font-size: 34px; } .entrada-c .logo svg, .solo-telefono .logo svg { height: 42px; width: 42px; }
.acceso-lado .logo { font-size: 34px; } .acceso-lado .logo svg { height: 42px; width: 42px; }
.simbolo svg { width: 48px; height: 48px; }
/* Barra inferior del teléfono: la pestaña activa en naranja */
.nav-movil [aria-current="page"] { color: var(--accent); }
.nav-movil [aria-current="page"] .nav-ic { background: var(--accent); box-shadow: none; color: #FFFFFF; }
/* Pestañas: la activa con línea naranja */
.pestanas-obra a[aria-selected="true"], .pestanas-obras button[aria-selected="true"] { color: var(--text-1); border-color: var(--accent); }
@media (min-width: 1024px) {
  body.esc .lat-marca .logo { font-size: 24px; } body.esc .lat-marca .logo svg { height: 30px; width: 30px; }
  /* Barra lateral: el ítem activo relleno en naranja */
  body.esc .lat-it[aria-current="page"] { background: var(--accent); color: #FFFFFF; font-weight: 700; }
  body.esc .lat-it[aria-current="page"]::before { display: none; }
  body.esc .lat-it[aria-current="page"] .lat-punto::after { opacity: 1; }
  body.esc .lat-min .lat-marca .logo svg { height: 30px; width: 30px; }
}

/* ───────────── Contraste y uso del acento (reporte del rebrand) ─────────────
   El texto blanco en negrita va sobre un naranja más oscuro (4,8 a 1); el naranja de marca queda para el logotipo,
   las líneas, los iconos y los gráficos. Un solo relleno de acento por pantalla: el menú marca «estás aquí» sin relleno. */
:root { --accent-fill: #C24E00; --accent-fill-hover: #A84300; --turquesa-fg: #0A6F70; --border-strong: #80868E; }
.bt.p:not(.peligro):not(.sec), body.esc .bt.p:not(.peligro):not(.sec), .fab { background: var(--accent-fill); border-color: var(--accent-fill); color: #FFFFFF; }
.bt.p:not(.peligro):not(.sec):hover, body.esc .bt.p:not(.peligro):not(.sec):hover, .fab:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.acceso .bt.p { background: linear-gradient(180deg, var(--accent-fill), var(--accent-fill-hover)); }
.bt.p.sec, body.esc .bt.p.sec { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-1); font-weight: 600; }
/* Campos y botones secundarios: borde que se distingue del fondo */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea { border-color: var(--border-strong); }
.bt:not(.p):not(.v):not(.r):not(.n):not(.fantasma):not(.peligro) { border-color: var(--border-strong); }
:is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Barra inferior y menú lateral: «estás aquí» sin relleno naranja */
.nav-movil [aria-current="page"] { color: #FFFFFF; }
.nav-movil [aria-current="page"] .nav-ic { background: var(--accent-subtle); color: var(--accent-fg); box-shadow: none; }
.av-ses, .usuario-b .av-ses { background: var(--accent-subtle); color: var(--text-1); font-weight: 800; }
/* Botón flotante: deja libre el final de la pantalla y se reduce a un círculo al bajar */
body:not(.esc) main.contenido:has(.fab) { padding-bottom: calc(56px + 24px + 80px + env(safe-area-inset-bottom)); }
.fab { transition: padding .18s ease, width .18s ease; } .fab.mini { width: 56px; padding: 0; justify-content: center; gap: 0; } .fab.mini span { display: none; }
/* Avance: botones de 5 % a cada lado de la barra */
.rango-b { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-1); font: inherit; font-weight: 600; font-size: 20px; line-height: 1; cursor: pointer; }
/* Pestañas de la obra en el teléfono: la orilla derecha se desvanece para avisar que hay más */
body:not(.esc) .pestanas-obra { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 28px; }
@media (max-width: 600px) { .fila.dos.una-movil { grid-template-columns: 1fr; align-items: start; } }
@media (min-width: 1024px) {
  body.esc .lat-it[aria-current="page"] { background: rgba(255, 255, 255, .08); color: #FFFFFF; box-shadow: inset 3px 0 0 var(--accent); }
  body.esc .lat-min .lat-marca .logo { font-size: 0; gap: 0; } body.esc .lat-min .lat-marca .logo svg { height: 28px; width: 28px; }
}

/* Primeros pasos: bloques que se tocan enteros, sin viñetas ni botón; el paso completado queda en verde claro */
.in-pasos ul { display: grid; gap: 8px; padding-bottom: 8px; } .in-pasos li, body.esc .in-pasos li { display: block; min-height: 0; border-top: 0; }
.in-paso { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-1); font-weight: 600; text-decoration: none; }
a.in-paso:hover { background: var(--surface-2); border-color: var(--border-strong); } a.in-paso:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.in-paso i { font-style: normal; font-size: 22px; line-height: 1; color: var(--text-3); }
.in-pasos li.ok .in-paso { background: var(--success-bg, #E3F3EA); border-color: transparent; color: var(--success-fg); } .in-pasos li.ok .in-paso small { font-size: 13px; font-weight: 700; color: var(--success-fg); white-space: nowrap; }
body.esc .in-paso { min-height: 44px; }
