/* CRM jurídico · Achahui García Abogados
   Estilo sobrio: blanco y negro, mucho aire, números grandes, esquinas redondas, cristal esmerilado.
   Claro por defecto; se oscurece solo si el equipo del usuario está en modo oscuro. */

:root {
  --tinta: #0a0a0a;
  --fondo: #f5f5f7;
  --papel: #ffffff;
  --campo: rgba(0, 0, 0, .045);
  --hover: #f5f5f7;
  --suave: #ececef;
  --linea: rgba(0, 0, 0, .08);
  --linea-fuerte: rgba(0, 0, 0, .16);
  --texto: #1d1d1f;
  --texto-2: #55555a;
  --texto-3: #76767c;
  --acento: #1d1d1f;            /* lo que antes era dorado: ahora es tinta */
  --acento-texto: #ffffff;
  --rojo: #d70015;   --rojo-fondo: #fdecee;
  --ambar: #a35200;  --ambar-fondo: #fff2dc;
  --verde: #1f7a3a;  --verde-fondo: #e5f6ea;
  --azul: #0a63c9;   --azul-fondo: #e6f0fc;
  --gris: #6a6a70;   --gris-fondo: #eeeef1;
  --lado-fondo: rgba(255, 255, 255, .78);
  --cab-fondo: rgba(245, 245, 247, .78);
  --velo: rgba(0, 0, 0, .38);
  --radio: 22px;
  --sombra: 0 1px 2px rgba(0, 0, 0, .04), 0 14px 36px -22px rgba(0, 0, 0, .22);
  --sombra-alta: 0 30px 80px -24px rgba(0, 0, 0, .35);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --serif: var(--sans);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tinta: #000000;
    --fondo: #000000;
    --papel: #161618;
    --campo: rgba(255, 255, 255, .08);
    --hover: #1f1f22;
    --suave: #26262a;
    --linea: rgba(255, 255, 255, .09);
    --linea-fuerte: rgba(255, 255, 255, .2);
    --texto: #f5f5f7;
    --texto-2: #b0b0b6;
    --texto-3: #8e8e95;
    --acento: #f5f5f7;
    --acento-texto: #000000;
    --rojo: #ff6961;   --rojo-fondo: rgba(255, 69, 58, .16);
    --ambar: #ffb340;  --ambar-fondo: rgba(255, 159, 10, .16);
    --verde: #4cd278;  --verde-fondo: rgba(48, 209, 88, .16);
    --azul: #6cb4ff;   --azul-fondo: rgba(10, 132, 255, .2);
    --gris: #a1a1a8;   --gris-fondo: rgba(255, 255, 255, .09);
    --lado-fondo: rgba(18, 18, 20, .78);
    --cab-fondo: rgba(0, 0, 0, .72);
    --velo: rgba(0, 0, 0, .6);
    --sombra: 0 0 0 1px rgba(255, 255, 255, .05);
    --sombra-alta: 0 30px 80px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 14.5px/1.5 var(--sans); letter-spacing: -.011em; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; border-radius: 8px; }

/* ---------- entrada ---------- */
.login { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--papel); }
.login-lado {
  position: relative; background: #000; color: #f5f5f7; padding: 56px 64px;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.login-lado::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 520px at 90% -5%, rgba(255, 255, 255, .13), transparent 60%),
              radial-gradient(640px 420px at -5% 105%, rgba(255, 255, 255, .07), transparent 60%);
}
.login-lado > * { position: relative; }
.login-marca { display: flex; align-items: center; gap: 14px; }
.login-frase { font-weight: 700; font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; max-width: 11em; }
.login-frase em { color: #8e8e93; font-style: normal; }
.login-pie { font-size: 12.5px; color: #8e8e93; }
.login-forma { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--papel); }
.login-caja { width: 100%; max-width: 360px; }
.login-caja h2 { font-size: 34px; font-weight: 700; letter-spacing: -.04em; }
.login-caja .sub { color: var(--texto-2); margin: 8px 0 28px; }
.login-caja .btn.primario { height: 50px; font-size: 15px; }
.login-error { min-height: 20px; margin-top: 14px; font-size: 13px; color: var(--rojo); }
.login-nota { margin-top: 20px; font-size: 12.5px; color: var(--texto-3); line-height: 1.55; }

.monograma {
  width: 44px; height: 44px; border-radius: 13px; background: var(--acento); color: var(--acento-texto);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: -.01em; flex: none;
}
.login-lado .monograma { background: #fff; color: #000; }
.firma-nombre { font-size: 17px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.firma-sub { font-size: 12px; color: var(--texto-3); margin-top: 1px; }
.login-lado .firma-nombre { color: #fff; }
.login-lado .firma-sub { color: #8e8e93; }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.lado {
  position: sticky; top: 0; height: 100vh; background: var(--lado-fondo); color: var(--texto);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--linea); display: flex; flex-direction: column; padding: 26px 14px 18px; overflow-y: auto;
}
.lado .marca { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.lado .marca .monograma { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
.menu { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 18px; }
.menu-tit { font-size: 11.5px; font-weight: 600; color: var(--texto-3); padding: 18px 12px 6px; }
.menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none;
  color: var(--texto-2); font-weight: 500; transition: background .18s, color .18s; position: relative;
}
.menu a svg { width: 19px; height: 19px; flex: none; }
.menu a:hover { background: var(--campo); color: var(--texto); }
.menu a[aria-current="page"] { background: var(--acento); color: var(--acento-texto); }
.menu .contador { margin-left: auto; font-size: 11px; background: var(--rojo); color: #fff; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.lado-pie { margin-top: auto; border-top: 1px solid var(--linea); padding: 16px 6px 0; }
.yo { display: flex; align-items: center; gap: 11px; }
.yo .avatar { width: 36px; height: 36px; border-radius: 50%; font-size: 13px; background: var(--suave); color: var(--texto); }
.yo b { display: block; color: var(--texto); font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.yo span { font-size: 12px; color: var(--texto-3); }
.lado-acciones { display: flex; gap: 6px; margin-top: 12px; }
.lado-acciones button {
  flex: 1; background: var(--campo); border: 0; color: var(--texto-2); border-radius: 999px; padding: 7px 10px; font-size: 12.5px; font-weight: 500; transition: background .15s;
}
.lado-acciones button:hover { background: var(--suave); color: var(--texto); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.cab {
  display: flex; align-items: center; gap: 18px; padding: 18px 40px; position: sticky; top: 0; z-index: 20;
  background: var(--cab-fondo); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--linea);
}
.cab h1 { font-size: 24px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.cab .migas { font-size: 12px; color: var(--texto-3); margin-bottom: 2px; }
.cab-espacio { flex: 1; }
.buscador { position: relative; width: 300px; max-width: 34vw; }
.buscador input { padding-left: 40px; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--texto-3); pointer-events: none; }
.resultados {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: var(--papel); border-radius: 18px;
  box-shadow: var(--sombra-alta), 0 0 0 1px var(--linea); padding: 8px; max-height: 60vh; overflow: auto; z-index: 30;
}
.resultados h4 { font-size: 11.5px; font-weight: 600; color: var(--texto-3); padding: 8px 10px 4px; }
.resultados a { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; font-size: 13.5px; }
.resultados a:hover { background: var(--hover); }
.resultados a small { display: block; color: var(--texto-3); font-size: 11.5px; }
.btn-menu { display: none; }

.vista { padding: 36px 40px 80px; max-width: 1360px; width: 100%; }
.entra { animation: entra .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .entra, * { animation: none !important; transition: none !important; } }

/* ---------- piezas ---------- */
.saludo { margin-bottom: 30px; }
.saludo h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.saludo h2 em { color: var(--texto-3); font-style: normal; font-weight: 700; }
.saludo p { color: var(--texto-2); margin-top: 10px; font-size: 16px; letter-spacing: -.016em; }
.fecha-linea { font-size: 13px; font-weight: 600; color: var(--texto-3); margin-bottom: 10px; }
.fecha-linea::first-letter { text-transform: uppercase; }

.rejilla { display: grid; gap: 16px; }
.k5 { grid-template-columns: repeat(5, 1fr); }
.k4 { grid-template-columns: repeat(4, 1fr); }
.k3 { grid-template-columns: repeat(3, 1fr); }
.dos { grid-template-columns: 1.5fr 1fr; align-items: start; }
.dos-iguales { grid-template-columns: 1fr 1fr; align-items: start; }
.sep { margin-top: 16px; }

.tarjeta { background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.tarjeta-cab { display: flex; align-items: center; gap: 12px; padding: 22px 26px 14px; }
.tarjeta-cab h3 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.tarjeta-cab p { font-size: 13px; color: var(--texto-3); margin-top: 1px; }
.tarjeta-cab .esp { flex: 1; }
.tarjeta-cuerpo { padding: 6px 26px 26px; }
.tarjeta-cuerpo.sin-pad { padding: 0 0 6px; }

.kpi { padding: 22px 24px 20px; }
.kpi .rot { font-size: 13px; font-weight: 500; color: var(--texto-2); }
.kpi .num { font-size: 50px; font-weight: 600; letter-spacing: -.05em; line-height: 1.04; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .num small { font-size: 22px; color: var(--texto-3); margin-left: 4px; font-weight: 500; letter-spacing: -.02em; }
.kpi .num.doble { font-size: 30px; line-height: 1.18; letter-spacing: -.035em; }
.kpi .num.chico { font-size: 30px; }
.k5 .kpi .num { font-size: 38px; }
.k5 .kpi { padding-left: 20px; padding-right: 20px; }
.kpi .num.dinero, .area .num.dinero { font-size: 40px; white-space: nowrap; letter-spacing: -.045em; }
.kpi .num.rojo { color: var(--rojo); }
.kpi .pie { font-size: 13px; color: var(--texto-3); }
.kpi.alerta .num { color: var(--rojo); }
.kpi.atento .num { color: var(--ambar); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--gris-fondo); color: var(--gris);
}
.chip.rojo { background: var(--rojo-fondo); color: var(--rojo); }
.chip.ambar { background: var(--ambar-fondo); color: var(--ambar); }
.chip.verde { background: var(--verde-fondo); color: var(--verde); }
.chip.azul { background: var(--azul-fondo); color: var(--azul); }
.chip.oro { background: var(--gris-fondo); color: var(--texto-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0;
  background: var(--campo); color: var(--texto); font-weight: 500; font-size: 14px; transition: background .15s, transform .15s, opacity .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--suave); }
.btn:active { transform: scale(.98); }
.btn.primario, .btn.oro { background: var(--acento); color: var(--acento-texto); }
.btn.primario:hover, .btn.oro:hover { opacity: .86; background: var(--acento); }
.btn.chico { padding: 6px 13px; font-size: 13px; }
.btn.fantasma { background: transparent; color: var(--texto-2); }
.btn.fantasma:hover { background: var(--campo); color: var(--texto); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 15px; height: 15px; }

label.campo { display: block; font-size: 13px; font-weight: 500; color: var(--texto-2); margin-bottom: 16px; }
label.campo > span.ayuda { color: var(--texto-3); font-weight: 400; }
input, select, textarea {
  width: 100%; margin-top: 7px; padding: 12px 14px; border: 0; border-radius: 14px;
  background: var(--campo); color: var(--texto); font: inherit; font-size: 15px; letter-spacing: -.011em; transition: background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--papel); box-shadow: 0 0 0 2px var(--texto); }
.cab input, .cab select { margin-top: 0; padding-top: 10px; padding-bottom: 10px; border-radius: 999px; }
input[type=checkbox] { width: auto; margin: 0; accent-color: var(--texto); }
.fila-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* tablas */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; color: var(--texto-3); font-weight: 500; padding: 12px 20px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
td { padding: 16px 20px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clic { cursor: pointer; transition: background .15s; }
tbody tr.clic:hover { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.envolver > table { min-width: 580px; }
.codigo { white-space: nowrap; }
.titulo-celda { min-width: 190px; }
.titulo-celda b { display: block; font-weight: 600; letter-spacing: -.015em; }
.titulo-celda small { color: var(--texto-3); font-size: 12.5px; }
.envolver { overflow-x: auto; }

/* alertas y listas */
.alertas { list-style: none; margin: 0; padding: 0 0 8px; }
.alertas li { display: flex; gap: 14px; align-items: flex-start; padding: 15px 26px; border-top: 1px solid var(--linea); cursor: pointer; transition: background .15s; }
.alertas li:first-child { border-top: 0; }
.alertas li:hover { background: var(--hover); }
.punto { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--gris); }
.punto.rojo { background: var(--rojo); box-shadow: 0 0 0 4px var(--rojo-fondo); }
.punto.ambar { background: var(--ambar); box-shadow: 0 0 0 4px var(--ambar-fondo); }
.alertas b { font-weight: 600; display: block; letter-spacing: -.015em; }
.alertas small { color: var(--texto-3); font-size: 12.5px; }
.vacio { padding: 40px 26px; text-align: center; color: var(--texto-3); }
.vacio b { display: block; font-size: 20px; color: var(--texto); font-weight: 600; letter-spacing: -.03em; margin-bottom: 3px; }

.proximos { list-style: none; margin: 0; padding: 0 26px 20px; }
.proximos li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--linea); align-items: start; }
.proximos li:first-child { border-top: 0; }
.fechita { text-align: center; line-height: 1; padding-top: 2px; }
.fechita b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.fechita small { font-size: 11px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; letter-spacing: .06em; }
.proximos .t { font-weight: 600; letter-spacing: -.015em; }
.proximos .s { color: var(--texto-3); font-size: 12.5px; }

/* barras */
.barras { display: grid; gap: 14px; }
.barra { display: grid; grid-template-columns: 110px 1fr 34px; gap: 14px; align-items: center; font-size: 13.5px; }
.barra .pista { height: 8px; background: var(--campo); border-radius: 99px; overflow: hidden; }
.barra .pista i { display: block; height: 100%; background: var(--acento); border-radius: 99px; width: var(--w, 0); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.barra b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* etapas */
.etapas { display: flex; gap: 4px; }
.etapas i { width: 14px; height: 4px; border-radius: 2px; background: var(--linea-fuerte); }
.etapas i.hecha { background: var(--texto-3); }
.etapas i.actual { background: var(--texto); }
.paso-lista { display: flex; gap: 6px; align-items: stretch; margin: 6px 0 4px; flex-wrap: nowrap; overflow-x: auto; padding: 4px; background: var(--campo); border-radius: 999px; }
.paso {
  flex: 1 0 auto; min-width: 78px; white-space: nowrap; text-align: center; padding: 9px 14px; font-size: 13px; color: var(--texto-3); border: 0; background: transparent; border-radius: 999px;
  cursor: pointer; transition: background .15s, color .15s;
}
.paso:hover { color: var(--texto); }
.paso.hecha { color: var(--texto-2); }
.paso.actual { background: var(--acento); color: var(--acento-texto); font-weight: 600; }

/* ficha */
.volver { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-2); text-decoration: none; font-size: 14px; margin-bottom: 16px; font-weight: 500; }
.volver:hover { color: var(--texto); }
.ficha-cab { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.ficha-cab h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.04em; line-height: 1.08; }
.ficha-cab .linea { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.codigo { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--texto-3); font-size: 12.5px; font-weight: 500; }
.datos { display: grid; gap: 16px; padding: 4px 26px 26px; }
.datos div { display: grid; gap: 2px; }
.datos dt { font-size: 12.5px; color: var(--texto-3); font-weight: 500; }
.datos dd { margin: 0; }
dl.datos { margin: 0; }

.pestanas { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--linea); overflow-x: auto; overflow-y: hidden; }
.pestanas button { background: none; border: 0; padding: 16px 14px; font-size: 14px; font-weight: 500; color: var(--texto-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas button:hover { color: var(--texto); }
.pestanas button[aria-selected="true"] { color: var(--texto); border-bottom-color: var(--texto); font-weight: 600; }
.pestanas .n { color: var(--texto-3); font-size: 12.5px; margin-left: 4px; }

.linea-tiempo { list-style: none; margin: 0; padding: 20px 26px 8px; position: relative; }
.linea-tiempo li { position: relative; padding: 0 0 24px 30px; }
.linea-tiempo li::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: -8px; width: 1px; background: var(--linea-fuerte); }
.linea-tiempo li:last-child::before { display: none; }
.linea-tiempo li::after { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--papel); border: 2px solid var(--texto-3); }
.linea-tiempo li.etapa::after { background: var(--texto); border-color: var(--texto); }
.linea-tiempo .cuando { font-size: 12.5px; color: var(--texto-3); display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.nueva-nota { padding: 20px 26px; border-bottom: 1px solid var(--linea); background: var(--hover); }
.nueva-nota .fila { display: flex; gap: 10px; align-items: flex-end; }
.nueva-nota textarea { min-height: 64px; margin-top: 0; background: var(--papel); }

/* consultas: tablero */
.columnas { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.columna { background: var(--campo); border-radius: var(--radio); padding: 12px; min-height: 120px; }
.columna h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--texto-2); padding: 6px 6px 12px; }
.columna h4 span { margin-left: auto; background: var(--papel); border-radius: 99px; padding: 0 9px; font-size: 12px; color: var(--texto-2); }
.consulta { background: var(--papel); border-radius: 16px; padding: 14px 15px; margin-bottom: 10px; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: var(--sombra); }
.consulta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .35); }
.consulta b { font-weight: 600; display: block; letter-spacing: -.015em; }
.consulta p { font-size: 12.5px; color: var(--texto-2); margin: 3px 0 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.consulta .pie { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--texto-3); }

/* agenda */
.mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mes .dsem { padding: 12px 10px; font-size: 12px; color: var(--texto-3); font-weight: 600; border-bottom: 1px solid var(--linea); }
.mes .dia { min-width: 0; overflow: hidden; min-height: 112px; padding: 9px; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); cursor: pointer; transition: background .15s; position: relative; }
.mes .dia:nth-child(7n) { border-right: 0; }
.mes .dia:hover { background: var(--hover); }
.mes .dia.otro { background: var(--hover); color: var(--texto-3); }
.mes .dia.hoy .n { background: var(--acento); color: var(--acento-texto); }
.mes .dia.sel { background: var(--suave); }
.mes .dia .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.pill { display: block; font-size: 11.5px; padding: 2px 8px; border-radius: 7px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--gris-fondo); color: var(--texto); font-weight: 500; }
.pill.audiencia { background: var(--rojo-fondo); color: var(--rojo); }
.pill.plazo { background: var(--ambar-fondo); color: var(--ambar); }
.pill.cita { background: var(--azul-fondo); color: var(--azul); }
.pill.tarea { background: var(--verde-fondo); color: var(--verde); }
.pill.hecho { opacity: .5; text-decoration: line-through; }
.mas { font-size: 11.5px; color: var(--texto-3); margin-top: 3px; }
.leyenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--texto-2); flex-wrap: wrap; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.evento { display: flex; gap: 12px; padding: 14px 26px; border-top: 1px solid var(--linea); align-items: flex-start; }
.evento:first-child { border-top: 0; }
.evento input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; }
.evento.hecho .t { text-decoration: line-through; color: var(--texto-3); }

/* embudo y gráficos */
.embudo { display: grid; gap: 10px; }
.embudo .fila { display: grid; grid-template-columns: 110px 1fr 90px; gap: 14px; align-items: center; font-size: 13.5px; }
.embudo .tubo { height: 32px; background: var(--campo); border-radius: 10px; overflow: hidden; }
.embudo .tubo i { display: block; height: 100%; width: var(--w, 0); background: var(--texto); opacity: .82; border-radius: 10px; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.embudo .fila:last-child .tubo i { background: var(--verde); opacity: 1; }
.embudo .fila b { text-align: right; font-variant-numeric: tabular-nums; }
.grafico svg { width: 100%; height: auto; display: block; }
.grafico text { font-family: var(--sans); font-size: 11.5px; fill: var(--texto-3); }
.grafico .val { fill: var(--texto); font-weight: 600; }
.grafico .eje { stroke: var(--linea-fuerte); stroke-width: 1; }
.grafico .col { fill: var(--suave); }
.grafico .col.actual { fill: var(--acento); }

/* cobros */
.cuotas { list-style: none; margin: 0; padding: 0; }
.cuotas li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 26px; border-top: 1px solid var(--linea); font-size: 13.5px; }
.cuotas .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--linea-fuerte); display: grid; place-items: center; font-size: 11.5px; color: var(--texto-3); }
.cuotas li.pagada .n { background: var(--verde); border-color: var(--verde); color: #fff; }
.cuotas li.mora .n { border-color: var(--rojo); color: var(--rojo); }
.progreso { height: 6px; background: var(--campo); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progreso i { display: block; height: 100%; background: var(--verde); width: var(--w, 0); border-radius: 99px; }

/* capas */
#capas { position: relative; z-index: 100; }
.velo { position: fixed; inset: 0; background: var(--velo); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: entra .2s both; }
.modal { background: var(--papel); border-radius: 28px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: var(--sombra-alta); }
.modal.ancho { max-width: 720px; }
.modal-cab { padding: 28px 30px 6px; }
.modal-cab h3 { font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.modal-cab p { color: var(--texto-2); font-size: 14px; margin-top: 3px; }
.modal-cuerpo { padding: 20px 30px 6px; }
.modal-pie { padding: 16px 30px 28px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.aviso-error { color: var(--rojo); font-size: 13px; margin-right: auto; }
.cajon { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--papel); box-shadow: var(--sombra-alta); overflow-y: auto; animation: cajon .3s cubic-bezier(.2, .7, .2, 1) both; border-radius: 28px 0 0 28px; }
@keyframes cajon { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cajon-cab { padding: 30px 30px 8px; display: flex; gap: 12px; align-items: flex-start; }
.cajon-cab h3 { font-size: 26px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; flex: 1; }
.cajon-cuerpo { padding: 8px 30px 34px; }
.cajon-cuerpo h5 { font-size: 12.5px; color: var(--texto-3); margin: 24px 0 8px; font-weight: 600; }
.acciones-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.avisos { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 120; }
.aviso { background: var(--acento); color: var(--acento-texto); padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .5); animation: entra .25s both; }
.aviso.error { background: var(--rojo); color: #fff; }

.cargando { padding: 110px 0; text-align: center; color: var(--texto-3); font-size: 15px; }
.cargando::after { content: ""; display: block; width: 26px; height: 26px; margin: 18px auto 0; border-radius: 50%; border: 2.5px solid var(--linea-fuerte); border-top-color: var(--texto); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.nota-pie { font-size: 12.5px; color: var(--texto-3); margin-top: 28px; line-height: 1.6; max-width: 70ch; }
.encabezado-vista { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.encabezado-vista .esp { flex: 1; }
.segmento { display: inline-flex; background: var(--campo); border-radius: 999px; padding: 3px; gap: 2px; }
.segmento button { background: none; border: 0; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; color: var(--texto-2); font-weight: 500; }
.segmento button[aria-pressed="true"] { background: var(--papel); color: var(--texto); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); font-weight: 600; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros select, .filtros input { width: auto; margin: 0; padding: 9px 14px; font-size: 14px; border-radius: 999px; }

/* ---------- Resumen general (gerencia) ---------- */
.sec { margin-top: 44px; }
.sec-cab { margin-bottom: 16px; }
.sec-cab h3 { font-size: 28px; font-weight: 700; letter-spacing: -.04em; }
.sec-cab p { color: var(--texto-3); margin-top: 2px; font-size: 14.5px; }

.areas { margin-top: 4px; }
.area { display: block; padding: 22px 24px 20px; text-decoration: none; transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s; }
.area:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .35); }
.area-cab { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 4px; }
.area-rot { font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
.area .num { font-size: 52px; font-weight: 600; letter-spacing: -.05em; line-height: 1.04; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.area .num.doble { font-size: 30px; line-height: 1.18; }
.area .num.chico { font-size: 30px; }
.area .pie { font-size: 13px; color: var(--texto-3); }
.semaforo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--texto-2); white-space: nowrap; }
.semaforo i { width: 8px; height: 8px; border-radius: 50%; background: var(--gris); flex: none; }
.semaforo.verde i { background: var(--verde); box-shadow: 0 0 0 3px var(--verde-fondo); }
.semaforo.ambar i { background: var(--ambar); box-shadow: 0 0 0 3px var(--ambar-fondo); }
.semaforo.rojo i { background: var(--rojo); box-shadow: 0 0 0 3px var(--rojo-fondo); }

.etapas-barra { display: flex; gap: 3px; height: 14px; margin: 4px 0 18px; }
.etapas-barra i { flex-basis: 0; min-width: 8px; border-radius: 99px; background: color-mix(in srgb, var(--texto) calc(100% - var(--tono) * 11%), var(--papel)); }
.etapas-leyenda { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; font-size: 13px; }
.etapas-leyenda li { display: flex; align-items: center; gap: 8px; }
.etapas-leyenda i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--texto) calc(100% - var(--tono) * 11%), var(--papel)); }
.etapas-leyenda span { color: var(--texto-2); }
.etapas-leyenda b { margin-left: auto; font-variant-numeric: tabular-nums; }
.separador { height: 1px; background: var(--linea); margin: 24px 0 18px; }
.mini-tit { font-size: 13px; font-weight: 600; color: var(--texto-3); margin-bottom: 14px; }
.nota-linea { font-size: 12.5px; color: var(--texto-3); margin-top: 14px; line-height: 1.55; }

.cuotas-mora { list-style: none; margin: 0; padding: 0 0 8px; }
.cuotas-mora li { display: flex; align-items: center; gap: 14px; padding: 15px 26px; border-top: 1px solid var(--linea); cursor: pointer; transition: background .15s; }
.cuotas-mora li:first-child { border-top: 0; }
.cuotas-mora li:hover { background: var(--hover); }
.cuotas-mora li > div { flex: 1; min-width: 0; }
.cuotas-mora b { display: block; font-weight: 600; letter-spacing: -.015em; }
.cuotas-mora small { color: var(--texto-3); font-size: 12.5px; }
.cuotas-mora .monto { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cuotas-mora .monto.rojo { color: var(--rojo); }
.cuotas-mora .monto.ambar { color: var(--ambar); }

.equipo-lista { display: grid; }
.persona { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(170px, 1.4fr) repeat(3, 84px) 110px; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--linea); }
.persona:first-child { border-top: 0; }
.persona-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.persona-id b { display: block; font-weight: 600; letter-spacing: -.015em; }
.persona-id small { color: var(--texto-3); font-size: 12.5px; }
.avatar-g { width: 38px; height: 38px; border-radius: 50%; background: var(--suave); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.persona-carga .pista { height: 8px; background: var(--campo); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.persona-carga .pista i { display: block; height: 100%; background: var(--acento); border-radius: 99px; width: var(--w, 0); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.persona-carga small { color: var(--texto-3); font-size: 12.5px; }
.persona-cifra { text-align: center; }
.persona-cifra b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.persona-cifra small { color: var(--texto-3); font-size: 11.5px; line-height: 1.2; display: block; }
.persona-est { text-align: right; }

/* ---------- cuenta de consulta (gerencia): nada que modifique se muestra ---------- */
body.lectura #btn-nuevo,
body.lectura .btn.primario:not(.mantener),
body.lectura .btn.oro,
body.lectura .w,
body.lectura .nueva-nota,
body.lectura .ficha-cab .acciones-fila,
body.lectura .cajon-cuerpo .acciones-fila,
body.lectura .cajon-cuerpo h5:has(+ button),
body.lectura .cajon-cuerpo h5:has(+ .acciones-fila),
body.lectura .cajon-cuerpo h5:has(+ .btn.oro) { display: none !important; }
body.lectura .paso, body.lectura .evento input[type=checkbox] { pointer-events: none; }
body.lectura .datos select, body.lectura .cajon-cuerpo select { pointer-events: none; appearance: none; -webkit-appearance: none; background-image: none; }
body.lectura #login .btn.primario { display: inline-flex !important; }

/* ---------- pantallas chicas ---------- */
@media (max-width: 1180px) {
  .k5 { grid-template-columns: repeat(3, 1fr); }
  .areas { grid-template-columns: 1fr 1fr; }
  .dos { grid-template-columns: 1fr; }
  .persona { grid-template-columns: minmax(160px, 1fr) minmax(130px, 1fr) repeat(3, 70px); }
  .persona-est { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-lado { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .lado { position: fixed; z-index: 60; width: 280px; transform: translateX(-100%); transition: transform .25s; }
  .lado.abierto { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .35); }
  .btn-menu { display: inline-flex; }
  .cab { padding: 14px 18px; gap: 12px; }
  .cab h1 { font-size: 21px; }
  .cab > div:not(.cab-espacio):not(.buscador) { min-width: 0; flex: 1; }
  .cab h1 { overflow: hidden; text-overflow: ellipsis; }
  .cab .btn.primario { padding: 8px 15px; flex: none; }
  .buscador { display: none; }
  .vista { padding: 22px 18px 70px; }
  .k5, .k4, .k3 { grid-template-columns: 1fr 1fr; }
  .dos-iguales { grid-template-columns: 1fr; }
  .fila-campos { grid-template-columns: 1fr; }
  .mes .dia { min-height: 72px; padding: 5px; }
  .pill { font-size: 10px; padding: 1px 4px; }
  th, td { padding-left: 16px; padding-right: 16px; }
  .tarjeta-cab { padding: 20px 20px 12px; }
  .tarjeta-cuerpo { padding: 6px 20px 22px; }
  .persona { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .persona-id, .persona-carga, .persona-est { grid-column: 1 / -1; }
  .sec { margin-top: 36px; }
  .cajon { border-radius: 0; }
}
@media (max-width: 520px) {
  .k5, .k4, .k3 { grid-template-columns: 1fr; }
  .kpi .num, .area .num { font-size: 44px; }
  .modal { border-radius: 24px; }
}

/* ===== Contabilidad por proyecto ===== */
.sub-cab { margin-bottom: 20px; display: grid; gap: 14px; }
.volver { font-size: 13.5px; color: var(--texto-2); text-decoration: none; width: fit-content; font-weight: 500; }
.volver:hover { color: var(--texto); }
.sub-tit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub-tit h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.sub-tit p { color: var(--texto-3); font-size: 14px; margin-top: 4px; }
.sub-tit .esp { flex: 1; }
.acc-linea { display: inline-flex; align-items: center; gap: 14px; flex: none; }
.fila-link:hover td { background: var(--campo); }

/* ===== Asistente IA ===== */
.ia-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ia-cab h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; letter-spacing: -.035em; }
.ia-cab p { color: var(--texto-3); font-size: 14px; margin-top: 2px; }
.ia-chispa { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--marca), #7c5cff); flex: none; box-shadow: 0 6px 22px rgba(124, 92, 255, .35); }
.ia-parrafo { font-size: 15.5px; line-height: 1.65; color: var(--texto); max-width: 78ch; }
.ia-acc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ia-acc li { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.ia-acc li:hover { background: var(--campo); }
.ia-acc li > div { flex: 1; min-width: 0; }
.ia-acc b { display: block; font-size: 14.5px; font-weight: 600; }
.ia-acc small { display: block; color: var(--texto-3); font-size: 12.5px; margin-top: 1px; }
.ia-flecha { color: var(--texto-3); font-size: 13px; white-space: nowrap; }
.ia-chat { display: grid; gap: 12px; }
.ia-msgs { height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; scroll-behavior: smooth; }
.ia-b { max-width: 92%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; animation: ia-sube .35s ease both; }
.ia-b.ia { background: var(--campo); border-bottom-left-radius: 5px; align-self: flex-start; }
.ia-b.yo { background: var(--marca); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.ia-b p { margin: 0 0 6px; }
.ia-b p:last-child { margin-bottom: 0; }
.ia-lista { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 6px; }
.ia-lista li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: rgba(127, 127, 127, .12); }
.ia-lista span { color: var(--texto-2); font-size: 12.5px; }
.ia-ir { display: inline-block; margin-top: 4px; color: var(--marca); font-weight: 600; font-size: 13px; text-decoration: none; }
.ia-ir:hover { text-decoration: underline; }
.ia-puntos { display: inline-flex; gap: 4px; padding: 4px 0; }
.ia-puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--texto-3); animation: ia-punto 1s infinite ease-in-out; }
.ia-puntos i:nth-child(2) { animation-delay: .15s; } .ia-puntos i:nth-child(3) { animation-delay: .3s; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ia-chip { border: 1px solid var(--linea); background: transparent; color: var(--texto-2); padding: 7px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: all .2s; }
.ia-chip:hover { background: var(--campo); color: var(--texto); }
.ia-form { display: flex; gap: 8px; }
.ia-form input { flex: 1; min-width: 0; }
.ia-salida { margin-top: 16px; display: grid; gap: 12px; }
.ia-salida:empty { display: none; }
.ia-int small { display: block; color: var(--texto-3); font-size: 12px; margin-bottom: 6px; }
.ia-partidas { max-height: 260px; overflow-y: auto; }
.ia-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ia-datos > div { background: var(--campo); border-radius: 12px; padding: 12px 14px; }
.ia-datos small { display: block; color: var(--texto-3); font-size: 11.5px; }
.ia-datos b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ia-prob { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.ia-prob .pista { flex: 1; height: 8px; background: var(--campo); border-radius: 99px; overflow: hidden; }
.ia-prob .pista i { display: block; height: 100%; border-radius: 99px; background: var(--marca); }
.ia-prob .pista i.verde { background: var(--verde); } .ia-prob .pista i.rojo { background: var(--rojo); } .ia-prob .pista i.ambar { background: var(--ambar); }
.ia-prob b { font-size: 13px; width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.ia-razon { color: var(--texto-2); font-size: 13px; max-width: 280px; }
.ia-esperado { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; border-top: 1px solid var(--linea); font-size: 14px; color: var(--texto-2); }
.ia-esperado b { font-size: 20px; color: var(--texto); font-weight: 600; }
.ia-score { font-size: 11.5px; font-weight: 700; color: #7c5cff; background: rgba(124, 92, 255, .14); padding: 3px 8px; border-radius: 999px; }
.ia-nota { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(124, 92, 255, .12); margin-bottom: 12px; font-size: 13.5px; }
.ia-nota b { color: #7c5cff; } .ia-nota span { color: var(--texto-2); }
.ia-aviso { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; text-decoration: none; color: inherit; margin-bottom: 16px; background: linear-gradient(120deg, rgba(124, 92, 255, .16), rgba(14, 138, 156, .12)); border: 1px solid rgba(124, 92, 255, .25); transition: transform .2s; }
.ia-aviso:hover { transform: translateY(-1px); }
.ia-aviso > div { flex: 1; min-width: 0; }
.ia-aviso b { display: block; font-size: 14.5px; } .ia-aviso small { display: block; color: var(--texto-2); font-size: 13px; }
.ia-aviso .ia-chispa { width: 38px; height: 38px; font-size: 17px; border-radius: 12px; }
@keyframes ia-sube { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ia-punto { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.1); } }
@media (max-width: 700px) { .ia-datos { grid-template-columns: 1fr; } .ia-flecha { display: none; } }

/* ===== Control de obra por partida ===== */
.ctrl-barra { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.ctrl-barra .pista { flex: 1; height: 8px; background: var(--campo); border-radius: 99px; overflow: hidden; }
.ctrl-barra .pista i { display: block; height: 100%; border-radius: 99px; background: var(--marca); width: 0; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.ctrl-barra .pista i.rojo { background: var(--rojo); } .ctrl-barra .pista i.verde { background: var(--verde); }
.ctrl-barra b { font-size: 12.5px; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.ctrl-total td { border-top: 2px solid var(--linea); background: var(--campo); }
.ctrl-comp { padding: 14px 26px; font-size: 13px; color: var(--texto-2); }
.gt-caja { overflow-x: auto; padding: 4px 26px 22px; }
.gt { position: relative; display: grid; min-width: 760px; row-gap: 6px; background-image: linear-gradient(to right, var(--linea) 1px, transparent 1px); background-size: calc((100% - 180px) / var(--n)) 100%; background-position: 180px 0; background-repeat: repeat-x; }
.gt::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 180px; background: var(--papel); z-index: 0; }
.gt > * { position: relative; z-index: 1; }
.gt-lab { font-size: 12.5px; padding-right: 10px; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--papel); }
.gt-rel { color: var(--texto-3); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.gt-mes { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--texto-2); padding-left: 4px; border-left: 1px solid var(--linea); }
.gt-sem { font-size: 10.5px; color: var(--texto-3); padding-left: 3px; }
.gt-cel { align-self: center; padding: 3px 0; }
.gt-barra { height: 18px; border-radius: 6px; background: rgba(14, 138, 156, .22); overflow: hidden; position: relative; }
.gt-barra i { display: block; height: 100%; background: var(--marca); border-radius: 6px 0 0 6px; opacity: .92; }
.gt-barra.ok { background: rgba(60, 170, 90, .25); } .gt-barra.ok i { background: var(--verde); }
.gt-barra.mal { background: rgba(230, 70, 60, .22); } .gt-barra.mal i { background: var(--rojo); }
.gt-hoy { position: absolute !important; top: 0; bottom: 0; left: calc(180px + (100% - 180px) * var(--hoy)); width: 0; border-left: 2px dashed var(--ambar); z-index: 3 !important; pointer-events: none; }
.gt-hoy span { position: absolute; top: -2px; left: 4px; font-size: 10.5px; font-weight: 700; color: var(--ambar); background: var(--papel); padding: 0 4px; border-radius: 4px; }
.curva-svg .curva-plan { fill: none; stroke: var(--texto-3); stroke-width: 2; stroke-dasharray: 6 5; }
.curva-svg .curva-real { fill: none; stroke: var(--marca); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.curva-svg .curva-hoy { stroke: var(--ambar); stroke-width: 1.5; stroke-dasharray: 4 4; }
.curva-svg .eje-t { fill: var(--texto-3); font-size: 10.5px; }
.ley-plan, .ley-real { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ley-plan { background: var(--texto-3); } .ley-real { background: var(--marca); }
@media (max-width: 700px) { .gt-caja { padding: 4px 14px 18px; } }

/* ===== Subpágina de obra ===== */
.obra-hero { display: grid; gap: 14px; }
.obra-hero-fila { display: grid; grid-template-columns: 320px 1fr auto; gap: 26px; align-items: center; background: var(--papel); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; }
.obra-hero-foto .foto-marca.ancha, .obra-hero-foto .foto-sim.grande { height: 200px; }
.obra-hero-txt h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; margin: 10px 0 6px; }
.obra-hero-txt p { color: var(--texto-2); font-size: 14.5px; }
.obra-hero-fechas { color: var(--texto-3) !important; font-size: 13px !important; margin-top: 4px; }
.obra-hero-anillo { padding-right: 10px; }
@media (max-width: 900px) { .obra-hero-fila { grid-template-columns: 1fr; } .obra-hero-anillo { justify-self: start; } }
