:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #111111;
  --muted: #6E6E6E;
  --primary: #111111;
  --primary-dark: #000000;
  --income: #2E6B44;
  --income-bg: #EDF3EF;
  --expense: #B3261E;
  --expense-bg: #F9ECEA;
  --border: #E3E3E3;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0 0 12px 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 18px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; color: var(--primary-dark); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.topbar-title { display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); display: inline-block; }
.topbar h1 { margin: 0; }

#app {
  padding: 16px;
  padding-bottom: 88px;
  max-width: 640px;
  margin: 0 auto;
}

.view.hidden { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.checkbox-row input { width: auto; }

input[type="text"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="password"],
select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.opt { font-weight: 400; color: var(--muted); }

.form-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.form-actions > * { min-width: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}
.btn-primary:active { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.hidden { display: none !important; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
}
.filters select, .filters input { width: auto; margin-top: 0; flex: 1; min-width: 130px; }

.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.summary-card .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.summary-card .value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.summary-card.income .value { color: var(--income); }
.summary-card.expense .value { color: var(--expense); }

.list { display: flex; flex-direction: column; gap: 8px; }

.mov-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.mov-item .meta { flex: 1; min-width: 0; }
.mov-item .cat { font-weight: 600; font-size: 14px; }
.mov-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov-item .amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.mov-item .amount.income { color: var(--income); }
.mov-item .amount.expense { color: var(--expense); }
.mov-item .actions { display: flex; gap: 6px; }
.mov-item .icon-btn {
  background: var(--bg);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
}
.badge-fijo {
  display: inline-block;
  font-size: 10px;
  background: var(--bg);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
}

.hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.tag { display: flex; align-items: center; gap: 6px; }
.chip.tag button { background: none; color: var(--muted); font-size: 13px; padding: 0; }

.proy-section { margin-bottom: 18px; }
.proy-section h3 { margin-bottom: 8px; }
table.proy-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table.proy-table th, table.proy-table td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
table.proy-table th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
table.proy-table tr:last-child td { border-bottom: none; }
table.proy-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.proy-table td.income { color: var(--income); font-weight: 600; }
table.proy-table td.expense { color: var(--expense); font-weight: 600; }
table.proy-table tr.total td { font-weight: 700; background: var(--bg); }

.mini-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mini-form input, .mini-form select { margin-top: 0; }

#categorias-editor .cat-group { margin-bottom: 14px; }
#categorias-editor .cat-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 0 0 6px; }
#categorias-editor .cat-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#categorias-editor .add-cat { display: flex; gap: 6px; }
#categorias-editor .add-cat input { margin-top: 0; }
#categorias-editor .add-cat button { padding: 8px 12px; border-radius: 8px; background: var(--bg); color: var(--primary); font-weight: 600; font-size: 13px; }

.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.nav-btn {
  flex: 1;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.nav-btn.active { color: var(--primary); }
.nav-btn.hidden { display: none !important; }
.nav-icon { font-size: 18px; line-height: 1; }

.toast {
  z-index: 70 !important;
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 20;
  transition: opacity 0.2s ease;
}
.toast.hidden { opacity: 0; pointer-events: none; }

.empty-state { text-align: center; color: var(--muted); padding: 24px 10px; font-size: 14px; }

@media (min-width: 700px) {
  .bottomnav { max-width: 640px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
}

/* ---------- Sesión / cuentas / caja chica ---------- */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sesion-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.overlay-full {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay-full.hidden { display: none; }

.overlay-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.overlay-card h2 { margin-bottom: 6px; }
.overlay-card p.hint { margin-bottom: 18px; }

#login-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#obra-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pin-input {
  width: 100%;
  text-align: center;
  font-size: 30px;
  letter-spacing: 14px;
  padding: 12px 0 12px 14px;
  margin: 14px 0;
}

/* Botón de emergencia: siempre visible, por encima de cualquier pantalla,
   incluidas las de login y selector de obra (z-index más alto que .overlay-full). */
#btn-reset-sesion {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 999;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.65;
  box-shadow: var(--shadow);
}
#btn-reset-sesion:active { opacity: 1; }


/* ---------- Obras (solo Rudy) ---------- */
.obras-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.check-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.check-inline input { width: auto; margin: 0; }
.obra-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; }
.obra-item:active { background: var(--bg); }
.obra-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.obra-item .meta { flex: 1; min-width: 0; }
.obra-item .cat { font-weight: 600; }
.obra-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.obra-item .amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.obra-item .amount.income { color: var(--income); }
.obra-item .amount.expense { color: var(--expense); }
.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.progress-fill.income { background: var(--income); }
.progress-fill.expense { background: var(--expense); }

/* Tablas de utilidades */
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th, .tabla td { padding: 6px 8px; border-bottom: 1px solid rgba(127,127,127,.25); text-align: left; white-space: nowrap; }
.tabla th { font-weight: 700; font-size: 12px; opacity: .8; }

/* Registrar: elegir tipo de gasto */
.modo-titulo { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin: 0 0 8px; }
.modo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modo-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px;
  border: 1.5px solid var(--border, #ddd); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.modo-btn b { font-size: 15px; }
.modo-btn span { font-size: 11px; color: var(--muted); }
.modo-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.modo-btn.active span { color: #D9D9D9; }
.modo-ingresos { display: flex; gap: 8px; margin: 8px 0 14px; }
.modo-btn.sm { flex: 1; flex-direction: row; justify-content: center; padding: 8px; font-size: 13px; }
.cat-rubro { border: 1px solid var(--border, #ddd); border-radius: 10px; margin-bottom: 8px; padding: 0 10px; }
.cat-rubro summary { padding: 10px 0; font-weight: 600; cursor: pointer; }
.cat-rubro .cat-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cat-seccion { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Ticket: foto y reparto en varias partidas */
#ticket-tools { display: flex; gap: 8px; margin: 0 0 14px; }
#ticket-tools.hidden { display: none; }
.foto-btn { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; margin: 0; }
#ticket-tools .btn-ghost { flex: 1; font-size: 13px; }
.linea { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.linea select, .linea input { margin: 0; font-size: 14px; padding: 8px; }
.linea .linea-desc { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.linea .linea-pie { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.linea .linea-pie select { flex: 1; min-width: 0; }
.linea .linea-pie input { flex: 0 0 120px; width: 120px; }
.linea .linea-x { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 0 6px; cursor: pointer; }
.linea .linea-art { width: 100%; box-sizing: border-box; }
.resta-obra { font-size: 13px; font-weight: 600; color: var(--expense); background: rgba(200,60,60,.07); border-radius: 8px; padding: 8px 10px; margin: -6px 0 14px; }
.reparto-suma { font-size: 14px; font-weight: 600; margin: 4px 0 14px; }
.reparto-suma.ok { color: var(--income); }
.reparto-suma.mal { color: var(--expense); }
.badge-desglose { background: var(--expense-bg); color: var(--expense); font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-left: 6px; }

/* Logo y pantalla de inicio */
.brand-logo-btn { background: none; border: 0; padding: 0; cursor: pointer; display: flex; }
.brand-logo { width: 30px; height: 30px; display: block; object-fit: contain; }
.login-logo { width: 220px; max-width: 80%; height: auto; display: block; margin: 0 auto 18px; }
.obra-logo { width: 44px; height: 44px; display: block; margin: 0 auto 12px; }
/* Franja del logo (formas apiladas) como acento a la derecha de las pantallas de entrada. */
.overlay-full { overflow: hidden; }
.overlay-card { position: relative; z-index: 1; }
.overlay-franja { position: absolute; top: 0; right: 0; height: 100%; width: auto; pointer-events: none; user-select: none; }
@media (max-width: 720px) { .overlay-franja { height: 46%; top: auto; bottom: 0; opacity: .14; } }
.inicio-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.inicio-hero img { width: 52px; height: 52px; object-fit: contain; }
.inicio-hero h2 { margin: 0 0 2px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 14px; min-height: 112px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.tile:active { transform: scale(0.98); }
.tile .tile-ic { font-size: 26px; line-height: 1; }
.tile b { font-size: 15px; }
.tile span.sub { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tile.principal { grid-column: 1 / -1; background: var(--primary); border-color: var(--primary); color: #fff; min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
.tile.principal span.sub { color: #D9D9D9; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
/* Inicio con tres accesos grandes: uno por renglón en celular, tres en fila en pantallas anchas. */
.tiles.tres { grid-template-columns: 1fr; gap: 12px; }
.tiles.tres .tile { flex-direction: row; align-items: center; gap: 16px; min-height: 96px; padding: 20px 18px; }
.tiles.tres .tile .tile-ic { font-size: 34px; width: 44px; text-align: center; }
.tiles.tres .tile b { font-size: 18px; }
.tiles.tres .tile span.sub { font-size: 13px; }
@media (min-width: 720px) { .tiles.tres { grid-template-columns: repeat(3, 1fr); } .tiles.tres .tile { flex-direction: column; align-items: flex-start; min-height: 150px; } }
.nav-btn { font-size: 10.5px; }
/* Inicio con cuatro accesos (CEO): dos por renglón en pantallas anchas. */
@media (min-width: 720px) { .tiles.tres.cuatro { grid-template-columns: repeat(2, 1fr); } .tiles.tres.cuatro .tile { min-height: 120px; } }


/* Marca: isotipo + nombre de la empresa en el encabezado */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; color: var(--muted); }

/* Finanzas por obra: tablas compactas que se deslizan de lado en el celular */
.fin-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
table.fin-t th, table.fin-t td { padding: 8px 7px; font-size: 12.5px; white-space: nowrap; }
table.fin-t td:first-child { white-space: normal; min-width: 120px; }
table.fin-t input { min-width: 90px; padding: 6px 8px; font-size: 14px; }
table.fin-t tfoot td { border-top: 1px solid var(--border); background: var(--bg); }

/* ---------- Minimalista (oct 2026): iconos de línea, barra de 4, Inicio con resumen ---------- */
.ico { display: block; flex-shrink: 0; }
[data-ico] { display: inline-flex; }
.topbar { padding: 10px 16px; border-bottom: 1px solid var(--border); box-shadow: none; }
.brand-text h1 { font-size: 15px; font-weight: 600; }
.sesion-pill { font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; }

.bottomnav { box-shadow: none; }
.nav-btn { gap: 4px; padding: 9px 4px 8px; font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.nav-btn .ico { stroke-width: 1.5; }
.nav-btn.active { color: var(--text); font-weight: 600; }
.nav-btn.active .ico { stroke-width: 2; }

.inicio-saludo { font-size: 24px; font-weight: 600; margin: 8px 0 16px; letter-spacing: -.02em; }
.inicio-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.dato { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; background: var(--surface); border: 0; padding: 14px 14px 13px; text-align: left; cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.dato:active { background: #F6F6F6; }
.dato-l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dato-v { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dato-v.income { color: var(--income); } .dato-v.expense { color: var(--expense); }
.dato-s { font-size: 12px; color: var(--muted); }
.accesos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.acceso { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 4px 12px; background: none; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer; text-align: center; line-height: 1.2; }
.acceso:active { background: #F6F6F6; transform: scale(.98); }
.acceso .ico { stroke-width: 1.4; }

.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet.hidden { display: none; }
.sheet-fondo { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 16px 16px 0 0; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); max-height: 85dvh; overflow-y: auto; animation: subir .18s ease-out; }
@keyframes subir { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 700px) { .sheet-panel { max-width: 640px; left: 50%; transform: translateX(-50%); animation: none; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.sheet-h b { font-size: 14px; font-weight: 600; }
.sheet-x { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; }
.sheet-lista { display: grid; grid-template-columns: 1fr; }
.sheet-it { display: flex; align-items: center; gap: 14px; padding: 13px 10px; background: none; border: 0; border-radius: 10px; font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; }
.sheet-it:active { background: #F3F3F3; }
.sheet-it .ico { color: var(--muted); stroke-width: 1.5; }
.sheet-it.salir { color: var(--muted); border-top: 1px solid var(--border); border-radius: 0; margin-top: 4px; }
@media (min-width: 560px) { .sheet-lista { grid-template-columns: 1fr 1fr; } .sheet-it.salir { grid-column: 1 / -1; } }
body.app-lista #btn-reset-sesion { display: none; }
.inicio-resumen .dato { padding: 12px 10px 11px; }
@media (max-width: 400px) { .dato-v { font-size: 16.5px; } .dato-l { font-size: 10.5px; } }
.pend-pill { background: #FFF4E0; color: #8A5300; border: 1px solid #F0C27A; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.pend-pill[hidden] { display: none; }
.fecha-tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fecha-tres input { padding-left: 6px; padding-right: 4px; }
.toast { pointer-events: none; }
.login-empresa { margin: -4px 0 14px; display: flex; flex-direction: column; gap: 2px; }
.login-empresa b { font-size: 17px; }
.login-empresa span { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.login-pie { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; font-family: inherit; }
.emp-logo-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.emp-logo-row img { max-height: 48px; max-width: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: #fff; }
img[data-marca-logo][hidden] { display: none !important; }
.guia { margin-bottom: 18px; }
.guia h3 { margin-bottom: 2px; }
.guia-paso { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 4px; background: none; border: 0; border-top: 1px solid var(--border); font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; }
.guia-paso.hecho { color: var(--muted); text-decoration: line-through; }
.guia-check { width: 22px; height: 22px; border: 1.5px solid var(--text); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.guia-paso.hecho .guia-check { background: var(--text); color: #fff; }
.overlay-franja[hidden] { display: none !important; }

/* Obras: avance físico vs programado vs financiero */
.av-mini { margin-top: 8px; }
.av-fila { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.av-etq { flex: 0 0 82px; font-size: 12px; color: var(--muted); }
.av-barra { flex: 1 1 auto; margin-top: 0; }
.av-val { flex: 0 0 38px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.progress-fill.av-fis { background: var(--primary); }
.progress-fill.av-prog { background: #A8A8A8; }
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.av-chip { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #F2F2F2; color: var(--text); }
.av-chip.av-expense { background: var(--expense-bg); color: var(--expense); }
.av-chip.av-income { background: var(--income-bg); color: var(--income); }
.av-card { margin-bottom: 16px; }
.curva-s { width: 100%; height: auto; margin-top: 12px; display: block; }
.curva-s .cs-grid { stroke: var(--border); stroke-width: 1; }
.curva-s .cs-lbl { font-size: 9px; fill: var(--muted); }
.curva-s .cs-hoy { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.curva-s polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.curva-s .cs-prog { stroke: #A8A8A8; stroke-dasharray: 5 4; }
.curva-s .cs-fis { stroke: var(--primary); }
.curva-s .cs-fin { stroke: var(--income); }
.cs-leyenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.cs-k { display: inline-block; width: 14px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 4px; }
.cs-k-prog { border-top: 2px dashed #A8A8A8; }
.cs-k-fis { border-color: var(--primary); }
.cs-k-fin { border-color: var(--income); }

/* Estimaciones por conceptos */
.ec-tools { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.ec-tools input, .ec-tools select { flex: 1 1 160px; margin: 0; }
.ec-g { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-top: 10px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.ec-n1 { background: #595959; color: #fff; }
.ec-n2 { background: #808080; color: #fff; margin-left: 6px; }
.ec-n3 { background: #E3E3E3; color: #111; margin-left: 12px; }
.ec-gt { font-weight: 500; font-size: 12px; opacity: .9; }
.ec-c { border-bottom: 1px solid var(--border); padding: 10px 2px; font-size: 13px; }
.ec-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.ec-top b { color: var(--text); }
.ec-d { margin: 4px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; font-size: 12.5px; }
.ec-d.open { display: block; }
.ec-nums { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ec-nums label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.ec-nums input { width: 96px; margin: 0; padding: 6px 8px; text-align: right; }
.ec-nums .btn-ghost { padding: 6px 10px; font-size: 12px; }
.ec-imp { color: var(--muted); font-size: 12px; margin-top: 4px; }
table.ec-res { width: 100%; max-width: 460px; margin-left: auto; }
table.ec-res td { white-space: normal; }
table.ec-res td.num { text-align: right; white-space: nowrap; }
table.ec-res .pg-n { min-width: 150px; }
tr.ec-saldo td { background: #FFC000; }
.ct-g { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; margin-top: 10px; border-radius: 8px; }
.ct-g select { width: auto; flex: 0 0 auto; margin: 0; padding: 4px 6px; }
.ct-g input { width: auto; flex: 1 1 100px; margin: 0; padding: 6px 8px; }
.ct-g .btn-ghost, .ct-g .icon-btn { width: auto; padding: 4px 8px; font-size: 12px; color: inherit; background: transparent; }
.ct-c { border-bottom: 1px solid var(--border); padding: 8px 0; }
.ct-l1 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.1fr) 30px; gap: 6px; align-items: center; }
.ct-l1 input { width: 100%; min-width: 0; margin: 0; padding: 6px 7px; font-size: 13px; }
.ct-l1 .icon-btn { width: 30px; padding: 0; }
#fin-form .ct-c textarea { margin: 6px 0 2px; font-size: 12.5px; padding: 6px 8px; }
.ct-imp { font-size: 12px; color: var(--muted); text-align: right; }
#fin-form textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); }
table.ec-res .pg-row td { padding: 4px 3px; }
table.ec-res .pg-n { width: 100%; min-width: 0; margin: 0; padding: 7px 8px; font-size: 14px; }
table.ec-res .pg-m { width: 112px; min-width: 0; margin: 0; padding: 7px 8px; font-size: 14px; text-align: right; }
table.ec-res .pg-row td:first-child { width: 100%; }
#ec-list .ec-nums input { width: 96px; }
.ec-tools input, .ec-tools select { padding: 9px 10px; font-size: 15px; }

/* Captura de estimación en pantalla completa (celular) */
body.ecx-abierto { overflow: hidden; }
.ecx { position: fixed; inset: 0; z-index: 60; background: #F4F4F4; display: flex; flex-direction: column; }
.ecx-h { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: #111; color: #fff; }
.ecx-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; flex: 0 0 auto; }
.ecx-ht { display: flex; flex-direction: column; min-width: 0; }
.ecx-ht b { font-size: 17px; }
.ecx-ht small { font-size: 12.5px; opacity: .8; }
.ecx-ht small span { color: inherit; }
.ecx-tabs { display: flex; background: #111; padding: 0 12px 8px; gap: 6px; }
.ecx-tabs button { flex: 1; border: 0; border-radius: 10px; padding: 9px; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.1); color: #fff; }
.ecx-tabs button.on { background: #fff; color: #111; }
.ecx-b { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 10px 16px; }
.ecx-tools { position: sticky; top: -10px; z-index: 2; background: #F4F4F4; padding: 2px 0 8px; margin-top: -2px; }
.ecx-tools input { margin: 0 0 8px; }
.ecx-fil { display: flex; gap: 6px; overflow-x: auto; }
.ecx-fil button { flex: 0 0 auto; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; color: var(--text); }
.ecx-fil button.on { background: #111; color: #fff; border-color: #111; }
.ecx-blk { background: #fff; border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.ecx-blk > summary { list-style: none; padding: 13px 14px 11px; cursor: pointer; }
.ecx-blk > summary::-webkit-details-marker { display: none; }
.ecx-blk[open] > summary { border-bottom: 1px solid var(--border); background: #FAFAFA; }
.ecx-bt { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 15px; }
.ecx-bt span:first-child::before { content: "▸ "; color: var(--muted); }
.ecx-blk[open] .ecx-bt span:first-child::before { content: "▾ "; }
.ecx-bs { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.ecx-bs b { color: #8A5300; }
.ecx-bar { position: relative; height: 6px; background: #E9E9E9; border-radius: 4px; margin-top: 7px; overflow: hidden; }
.ecx-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.ecx-bar i.act { background: var(--income); }
.ecx-bar i.ant { background: #9E9E9E; z-index: 1; }
.ecx-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 10px 14px 4px; color: #555; background: #F7F7F7; border-top: 1px solid var(--border); }
.ecx-c { padding: 12px 14px; border-top: 1px solid #EFEFEF; }
.ecx-c.movido { background: #FFFBEA; }
.ecx-c1 { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ecx-c1 b { color: var(--text); }
.ecx-c.completo .ecx-c1 b::after { content: " ✓"; color: var(--income); }
.ecx-d { font-size: 14px; line-height: 1.35; margin: 4px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ecx-d.open { display: block; }
.ecx-q { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ecx-q button { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-size: 24px; line-height: 1; color: var(--text); }
.ecx-q button:active { background: #EEE; }
.ecx .ecx-q input { width: 96px; flex: 0 1 110px; margin: 0; height: 46px; text-align: center; font-size: 19px; font-weight: 700; padding: 0 6px; }
.ecx-de { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ecx-chips { display: flex; gap: 6px; margin-top: 8px; }
.ecx-chips button { flex: 1; border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--text); }
.ecx-chips button.on { background: #111; color: #fff; border-color: #111; }
.ecx-imp { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.ecx-imp b { color: var(--text); }
.ecx-ro { font-size: 13.5px; margin-top: 8px; }
.ecx-warn { color: var(--expense); font-weight: 600; }
.ecx-card { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ecx-card h4 { margin: 0 0 8px; font-size: 15px; }
.ecx-card h4 small { font-weight: 400; color: var(--muted); }
.ecx-card label { display: block; font-size: 13px; color: var(--muted); }
.ecx-card textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: 15px; border: 1px solid var(--border); border-radius: 10px; }
table.ecx-t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ecx-t td { padding: 7px 0; border-bottom: 1px solid #F0F0F0; }
table.ecx-t td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ecx-t tr.b td { font-weight: 700; }
table.ecx-t tr.saldo td { background: #FFC000; font-weight: 800; font-size: 16px; padding: 10px 8px; border: 0; }
.ecx-pgr { display: grid; grid-template-columns: minmax(0, 1fr) 118px 36px; gap: 6px; align-items: center; margin-bottom: 8px; }
.ecx-pgr input { margin: 0; padding: 10px; font-size: 15px; }
.ecx-pgr .pg-m { text-align: right; }
.ecx-pgr.ro { grid-template-columns: 1fr auto; font-size: 14px; }
.ecx-acc { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.ecx-acc button { width: 100%; }
.ecx-fc { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ecx-fc input { margin: 0; }
.ecx-f { display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.ecx-f > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ecx-f small { font-size: 11.5px; color: var(--muted); }
.ecx-f b { font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ecx-f > div:nth-child(2) b { background: #FFC000; padding: 1px 6px; border-radius: 6px; align-self: flex-start; }
.ecx-f .btn-primary { flex: 0 0 auto; width: auto; padding: 12px 18px; }
.obra-est { margin-top: 10px; width: 100%; }
.progress-fill.av-est { background: #C98A00; }

/* ---------- Pagos fijos (checklist mensual) ---------- */
.pf-mes { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pf-mes b { font-size: 16px; text-transform: capitalize; }
.pf-mes .btn-ghost { font-size: 22px; padding: 4px 14px; line-height: 1; }
.pf-resumen { margin-bottom: 16px; }
.pf-res-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.pf-barra { height: 8px; background: #EFEFEF; border-radius: 99px; overflow: hidden; }
.pf-barra span { display: block; height: 100%; background: var(--income); border-radius: 99px; transition: width .3s; }
.pf-res-cifras { display: flex; gap: 8px; margin-top: 12px; }
.pf-res-cifras > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-res-cifras b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-res-cifras b.income { color: var(--income); } .pf-res-cifras b.expense { color: var(--expense); }
.pf-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.pf-lista { display: flex; flex-direction: column; gap: 8px; }
.pf-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.pf-item.vencido { border-color: #E9B8B4; background: var(--expense-bg); }
.pf-item.pagado { opacity: .78; }
.pf-item.pagado .pf-desc { text-decoration: line-through; text-decoration-color: var(--muted); }
.pf-check { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; border: 2px solid #BDBDBD; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; color: #fff; }
.pf-check.on { background: var(--income); border-color: var(--income); }
.pf-check.on svg { stroke: #fff; }
.pf-check.on svg rect { stroke: none; }
.pf-meta { flex: 1 1 0; min-width: 0; cursor: pointer; }
.pf-desc { font-weight: 600; font-size: 14.5px; }
.pf-sub { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.pf-monto { font-weight: 700; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-tag { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; }
.pf-tag.vencido { background: var(--expense); color: #fff; }
.pf-tag.hoy { background: #111; color: #fff; }
.pf-tag.pronto { background: #F1EDE4; color: #6B5A2E; }
.pf-form { flex: 1 1 100%; border-top: 1px solid var(--border); padding-top: 12px; }
.pf-form-grid { display: flex; flex-wrap: wrap; gap: 0 10px; }
.pf-form-grid label { flex: 1 1 45%; min-width: 130px; }
.pf-form-btns { display: flex; gap: 10px; }
.pf-listo { display: flex; align-items: center; gap: 10px; color: var(--income); font-weight: 600; }
.pf-tag.raya { background: #EEF0F3; color: #4A5568; font-weight: 500; }

/* Caja chica por usuario */
.cc-abrir { display: flex; flex-wrap: wrap; gap: 0 10px; }
.cc-abrir label { flex: 1 1 30%; min-width: 150px; }
.cc-acc { white-space: nowrap; }
.cc-acc .btn-ghost { padding: 6px 10px; font-size: 12.5px; margin: 2px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cc-lista { display: flex; flex-direction: column; gap: 8px; }
.cc-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.cc-item.alerta { border-color: #E9B8B4; background: var(--expense-bg); }
.cc-item.cerrada { opacity: .65; }
.cc-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cc-obra { font-weight: 600; font-size: 14.5px; }
.cc-rep { font-size: 11px; font-weight: 700; color: var(--expense); }
.cc-saldo { font-weight: 700; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-saldo.income, .cc-sub .income { color: var(--income); } .cc-saldo.expense, .cc-sub .expense { color: var(--expense); }
.cc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cc-item .cc-acc { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-item .cc-acc .btn-ghost { margin: 0; flex: 0 0 auto; width: auto; }

/* Deducibles: checklist al registrar un gasto */
.ded-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin: 0 0 14px; }
.ded-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ded-estado { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.ded-estado.ok { background: var(--income-bg); color: var(--income); }
.ded-estado.falta { background: var(--expense-bg); color: var(--expense); }
.ded-checks { display: flex; flex-direction: column; gap: 8px; }
.ded-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 400; margin: 0; flex-direction: row; color: var(--text); }
.ded-check input { width: auto; margin-top: 3px; }
.ded-check .ico { width: 18px; text-align: center; font-weight: 700; }
.ded-check.ok .ico { color: var(--income); }
.ded-check.mal .ico { color: var(--expense); }
.badge-ded { display: inline-block; font-size: 10px; background: var(--income-bg); color: var(--income); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }

/* Resumen de movimientos: desglose por ámbito, obra, tipo de gasto y partida */
.rd-card { margin-bottom: 12px; }
.rd-card summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.rd-card summary::-webkit-details-marker { display: none; }
.rd-card summary::after { content: "▾"; color: var(--muted); }
.rd-card[open] summary::after { content: "▴"; }
.rd-tabla { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.rd-tabla th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; padding: 4px 4px; }
.rd-tabla td { padding: 6px 4px; border-top: 1px solid rgba(128,128,128,.15); vertical-align: top; }
.rd-tabla td.n, .rd-tabla th.n { text-align: right; white-space: nowrap; }
.rd-tabla tr.rd-obra td:first-child { font-weight: 700; cursor: pointer; }
.rd-tabla tr.rd-sub td { font-size: 12px; color: var(--muted); border-top: none; padding-top: 0; }
.rd-tabla tr.rd-total td { font-weight: 700; border-top: 2px solid rgba(128,128,128,.3); }
.rd-barra { height: 4px; background: var(--expense); border-radius: 2px; opacity: .55; margin-top: 3px; }
.rd-nota { font-size: 12px; color: var(--muted); margin-top: 6px; }
#resumen-mes .summary-card:nth-child(3) { grid-column: span 2; }

/* Registrar simplificado: 4 opciones claras y lo opcional dentro de "Más detalles" */
.modo-grid.modo-grid-2 { grid-template-columns: repeat(2, 1fr); }
.modo-grid-2 .modo-btn { align-items: flex-start; text-align: left; padding: 12px 12px; }
.modo-grid-2 .modo-btn span { font-size: 11.5px; line-height: 1.25; }
.modo-ingresos { justify-content: flex-end; }
.modo-ingresos .modo-btn.sm { flex: 0 0 auto; padding: 6px 12px; }
.mas-detalles { border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; margin: 4px 0 14px; }
.mas-detalles > summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; list-style: none; }
.mas-detalles > summary::-webkit-details-marker { display: none; }
.mas-detalles > summary::before { content: "▸ "; color: var(--muted); }
.mas-detalles[open] > summary::before { content: "▾ "; }
.mas-detalles[open] { padding-bottom: 4px; }
.sheet-grupo { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 10px 2px; }

/* Registros desplegables (Movimientos y detalle de obra) */
.reg { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.reg.abierto { border-color: var(--primary); }
.reg-cab { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.reg-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.reg-cat { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.reg-nota { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.reg-tg { white-space: nowrap; }
.reg-tg::before { content: "· "; }
.chip-reg { flex: 0 0 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #EEE; color: #333; }
.chip-reg.obra { background: #E7F0FA; color: #1B4F8A; }
.chip-reg.arq { background: #EFE8F8; color: #5A2D91; }
.chip-reg.oficina { background: #F1EFE8; color: #5F5A45; }
.chip-reg.personal { background: #E8F4EC; color: #23683C; }
.reg-cab .amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.reg-cab .amount.income { color: var(--income); }
.reg-cab .amount.expense { color: var(--expense); }
.reg-flecha { color: var(--muted); font-size: 12px; transition: transform .15s; }
.reg.abierto .reg-flecha { transform: rotate(180deg); }
.reg-det { padding: 4px 12px 12px; border-top: 1px solid var(--border); }
.reg-fila { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(128,128,128,.12); font-size: 13px; }
.reg-fila span { color: var(--muted); flex: 0 0 auto; }
.reg-fila b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.reg-acc { display: flex; gap: 8px; margin-top: 10px; }
.reg-acc .btn-ghost { flex: 1; text-align: center; }
.reg-dia { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 4px 2px; }
.reg-grupo { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; background: var(--surface); }
.reg-grupo > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 12px; cursor: pointer; font-weight: 700; list-style: none; }
.reg-grupo > summary::-webkit-details-marker { display: none; }
.reg-grupo > summary .amount { font-size: 14px; color: var(--expense); white-space: nowrap; }
.reg-grupo[open] > summary { border-bottom: 1px solid var(--border); }
.reg-grupo > .list { padding: 4px 8px 10px; }

/* Renglón de nota: gasto + IVA = total en la misma celda */
.linea .linea-importe { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 6px; background: rgba(128,128,128,.06); border-radius: 8px; padding: 8px; flex-wrap: wrap; }
.linea .linea-importe label { flex: 1 1 80px; min-width: 0; font-size: 11px; color: var(--muted); margin: 0; }
.linea .linea-importe input { width: 100%; box-sizing: border-box; }
.linea .linea-importe .op { padding-bottom: 9px; color: var(--muted); font-weight: 700; }
.linea .linea-total { flex: 0 0 auto; display: flex; flex-direction: column; font-size: 11px; color: var(--muted); padding-bottom: 6px; }
.linea .linea-total b { font-size: 15px; color: var(--text); white-space: nowrap; }
.linea .linea-iva16 { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.reg-monto { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.reg-iva { font-size: 11px; color: var(--muted); white-space: nowrap; }
.reg-total { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 12px; margin-top: 10px; }
.reg-total > div { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.reg-total span { color: var(--muted); }
.reg-total .t { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; font-size: 15px; }
.reg-total .t span { color: var(--text); font-weight: 700; }
.rd-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 4px; }
.rd-tit { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.rd-tit .expense { color: var(--expense); } .rd-tit .income { color: var(--income); }
.resumen-personal { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; padding: 9px 12px; }
.resumen-personal b { color: var(--text); font-size: 12px; }

/* COPACAJA */
.cc-meta, .cc-obra { margin-bottom: 12px; }
.cc-linea { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(128,128,128,.12); }
.cc-linea span { color: var(--muted); }
.cc-linea.t { border-bottom: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-size: 15px; }
.cc-linea.t span { color: var(--text); font-weight: 700; }
.cc-linea b.expense, .rd-tit .expense { color: var(--expense); } .cc-linea b.income { color: var(--income); }
.cc-barra { height: 10px; background: rgba(128,128,128,.18); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.cc-barra span { display: block; height: 100%; background: var(--income); border-radius: 6px; }

/* =====================================================================================
   TEMA 2026 — color de marca por empresa (--accent), Inicio más vivo y diseño de escritorio
   ===================================================================================== */
:root {
  --accent: #2563EB;
  --on-accent: #FFFFFF;
  --accent-dark: color-mix(in srgb, var(--accent) 80%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-soft2: color-mix(in srgb, var(--accent) 18%, #fff);
  --primary: var(--accent);
  --primary-dark: var(--accent-dark);
  --bg: #F4F6FA;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E6EE;
  --income: #15803D;
  --income-bg: #EAF6EE;
  --expense: #B91C1C;
  --expense-bg: #FCEDEC;
  --c-verde: #15803D; --c-rojo: #B91C1C; --c-ambar: #B45309; --c-violeta: #7C3AED; --c-cian: #0E7490;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .06);
}
.card, .reg, .mov-item, .summary-card, .reg-grupo, .reg-total { box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: inset 0 -3px 0 -1px var(--accent-soft2); }
.brand-text h1 { color: var(--accent); }
.btn-primary { color: var(--on-accent); }
.btn-ghost { color: var(--accent-dark); background: var(--surface); }
.btn-ghost:active { background: var(--accent-soft); }
.chip.active, .modo-btn.active { color: var(--on-accent); }
.modo-btn.active span { color: color-mix(in srgb, var(--on-accent) 78%, transparent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft2); border-color: var(--accent); }
a { color: var(--accent-dark); }
.view > h2:not(.inicio-saludo) { display: flex; align-items: center; gap: 10px; }
.view > h2:not(.inicio-saludo)::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--accent); flex: 0 0 auto; }
.nav-btn.active { color: var(--accent); }
.bottomnav { background: var(--surface); }
.summary-card { border-left: 4px solid var(--accent-soft2); }
.summary-card.income { border-left-color: var(--income); background: linear-gradient(90deg, var(--income-bg), var(--surface) 55%); }
.summary-card.expense { border-left-color: var(--expense); background: linear-gradient(90deg, var(--expense-bg), var(--surface) 55%); }
.cc-barra span { background: linear-gradient(90deg, var(--accent), var(--income)); }
.sheet-grupo { color: var(--accent-dark); }
.sheet-it .ico { color: var(--accent); }
.reg.abierto { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mas-detalles > summary { color: var(--accent-dark); }

/* Inicio */
.inicio-saludo { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 16px; padding: 22px 20px; border-radius: 18px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #0B1020)); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent); }
.saludo-t { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.saludo-s { font-size: 13px; font-weight: 500; opacity: .85; text-transform: capitalize; }
.inicio-resumen { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: none; border: 0; border-radius: 0; overflow: visible; }
.dato { --k: var(--accent); border: 1px solid var(--border); border-top: 3px solid var(--k); border-radius: 14px; padding: 12px 14px 13px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.dato.k-verde { --k: var(--c-verde); } .dato.k-rojo { --k: var(--c-rojo); } .dato.k-ambar { --k: var(--c-ambar); } .dato.k-violeta { --k: var(--c-violeta); }
.dato:active { background: color-mix(in srgb, var(--k) 7%, #fff); }
.dato-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 6px; color: var(--k); background: color-mix(in srgb, var(--k) 12%, #fff); }
.accesos { gap: 10px; }
.acceso { --k: var(--accent); background: var(--surface); border-color: var(--border); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); font-weight: 600; padding: 16px 6px 13px; }
.acceso:nth-child(2) { --k: var(--c-violeta); } .acceso:nth-child(3) { --k: var(--c-ambar); } .acceso:nth-child(4) { --k: var(--c-cian); }
.acceso-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--k); background: color-mix(in srgb, var(--k) 13%, #fff); font-style: normal; }
.acceso:active { background: color-mix(in srgb, var(--k) 7%, #fff); }

/* Selector de color de marca */
.emp-colores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.emp-color { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.emp-color.on { box-shadow: 0 0 0 3px var(--text); }
.emp-color-libre { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; cursor: pointer; }
.emp-color-libre input { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; margin: 0; }

.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.cc-grid .cc-obra { margin-bottom: 0; }

/* Tableta */
@media (min-width: 700px) {
  #app { max-width: 880px; }
  .bottomnav { max-width: 880px; }
  .sheet-panel { max-width: 720px; }
}

/* Escritorio: menú lateral y contenido a todo lo ancho */
@media (min-width: 1024px) {
  .topbar { padding: 12px 28px; }
  .bottomnav { top: 0; bottom: 0; left: 0; right: auto; width: 232px; max-width: none; transform: none; border-radius: 0; flex-direction: column; justify-content: flex-start;
    gap: 4px; padding: 84px 14px 20px; border-top: 0; border-right: 1px solid var(--border); z-index: 9; }
  .nav-btn { flex: 0 0 auto; width: 100%; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; font-size: 14.5px; border-radius: 10px; }
  .nav-btn:hover { background: var(--accent-soft); }
  .nav-btn.active { background: var(--accent-soft); color: var(--accent-dark); }
  #app { max-width: none; margin: 0 0 0 232px; padding: 28px 40px 56px; }
  #app > .view { max-width: 1320px; margin: 0 auto; }
  .saludo-t { font-size: 30px; }
  .inicio-saludo { padding: 30px 32px; }
  .inicio-resumen { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
  .dato { padding: 16px 18px 17px; } .dato-v { font-size: 24px; } .dato-l { font-size: 12px; }
  .accesos { gap: 14px; } .acceso { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 18px 20px; font-size: 15px; text-align: left; }
  .summary-cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
  .summary-card { padding: 16px 18px; } .summary-card .value { font-size: 22px; }
  #form-movimiento { max-width: 880px; }
  #view-ajustes:not(.hidden) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #view-ajustes > h2, #view-ajustes > p { grid-column: 1 / -1; }
  #view-ajustes > .card { margin: 0; }
  #obras-contenido > .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; align-items: start; }
  .pf-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; align-items: start; }
  .sheet-panel { left: 232px; right: auto; bottom: auto; top: 70px; transform: none; width: 520px; max-width: 520px; border-radius: 16px; margin-left: 16px; box-shadow: 0 20px 50px rgba(15, 23, 42, .18); }
  .reg-cab { padding: 13px 16px; } .reg-cat { font-size: 15px; } .reg-sub { font-size: 13px; }
}
/* Celular: con número impar de datos, el primero (COPACAJA) ocupa todo el ancho para no dejar huecos */
@media (max-width: 699px) {
  .inicio-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inicio-resumen .dato:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Tema neutro (misma distribución, colores sobrios) ----------
   Grises y grafito en toda la interfaz; el color queda solo para dinero (verde entra, rojo sale) y avisos. */
:root {
  --accent: #1F2937;
  --bg: #F5F5F4;
  --text: #1C1917;
  --muted: #6B6B6B;
  --border: #E4E4E2;
  --income: #2E6B44;
  --income-bg: #EEF3EF;
  --expense: #A8322B;
  --expense-bg: #F8EEEC;
  --c-verde: #2E6B44; --c-rojo: #A8322B; --c-ambar: #8A6A2F; --c-violeta: #57534E; --c-cian: #57534E;
}
.topbar { box-shadow: none; }
.brand-text h1 { color: var(--text); }
.inicio-saludo { background: var(--accent); box-shadow: none; }
.dato { border-top: 1px solid var(--border); }
.dato-ic { color: color-mix(in srgb, var(--k) 70%, #44403C); background: color-mix(in srgb, var(--k) 8%, #F1F1EF); }
.dato.k-marca .dato-ic, .acceso-ic { color: #44403C; background: #EFEFED; }
.acceso, .acceso:nth-child(2), .acceso:nth-child(3), .acceso:nth-child(4) { --k: #44403C; }
.summary-card, .summary-card.income, .summary-card.expense { background: var(--surface); border-left: 1px solid var(--border); }
.cc-barra span { background: var(--accent); }
.sheet-it .ico { color: var(--muted); }
.sheet-grupo { color: var(--muted); }
.reg.abierto { box-shadow: none; }
.chip-reg.obra { background: #ECEEF1; color: #334155; }
.chip-reg.arq { background: #EEECEF; color: #4A4458; }
.chip-reg.oficina { background: #EFEEEA; color: #57534E; }
.chip-reg.personal { background: #ECF0ED; color: #3F5A49; }
.nav-btn.active, .nav-btn:hover { color: var(--text); }
@media (min-width: 1024px) { .nav-btn.active, .nav-btn:hover { background: #EDEDEB; color: var(--text); } }
.view > h2:not(.inicio-saludo)::before { background: var(--text); }
.reg-fila.fuerte { font-size: 14px; } .reg-fila.fuerte span { color: var(--text); font-weight: 700; } .reg-fila.fuerte b { font-weight: 800; }
.reg-raya .reg-sub { flex-wrap: wrap; row-gap: 4px; }

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

/* =====================================================================================
   TEMA url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22900%22 height=%22900%22 viewBox=%22-450 -450 900 900%22%3E%3Cg fill=%22none%22 stroke=%22%23D3CEC2%22 stroke-width=%221.4%22 transform=%22rotate(18)%22%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(1.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(1.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(2.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(2.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(3.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(3.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3C/g%3E%3C/svg%3E")ORNO — formas orgánicas y colores neutros (piedra, arena, grafito cálido).
   El motivo son curvas de nivel: contornos paralelos. El color de marca (--accent) solo
   entra en la piedra principal de Inicio, el botón principal y el menú activo.
   ===================================================================================== */
:root {
  --accent: #2B2A27;
  --bg: #E9E6DF;
  --surface: #F6F4EF;
  --text: #2B2A27;
  --muted: #6B675F;
  --border: #DDD8CD;
  --arena: #DDD8CD;
  --income: #4E6152; --income-bg: #E4E8E0;
  --expense: #8C4A3F; --expense-bg: #F0E4DF;
  --radius: 26px;
  --f-t: "Bricolage Grotesque", system-ui, sans-serif;
  --shadow: none;
}
html, body { font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22900%22 height=%22900%22 viewBox=%22-450 -450 900 900%22%3E%3Cg fill=%22none%22 stroke=%22%23D3CEC2%22 stroke-width=%221.4%22 transform=%22rotate(18)%22%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(1.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(1.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(2.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(2.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(3.2)%22 vector-effect=%22non-scaling-stroke%22/%3E%3Cpath d=%22M 0,-100 C 62,-112 122,-58 110,4 C 99,72 48,112 -12,100 C -82,88 -122,38 -106,-22 C -94,-76 -52,-94 0,-100 Z%22 transform=%22scale(3.7)%22 vector-effect=%22non-scaling-stroke%22/%3E%3C/g%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right -330px top -380px; background-attachment: fixed; }
h1, h2, h3, .saludo-t, .dato-v, .summary-card .value, .reg-cab .amount, .rd-tit, .cc-linea.t b, .brand-text h1 { font-family: var(--f-t); letter-spacing: -.01em; }
h3 { color: var(--text); }
.view > h2:not(.inicio-saludo) { font-size: 26px; font-weight: 600; }
.view > h2:not(.inicio-saludo)::before { display: none; }

/* Superficies: sin bordes ni sombras, esquinas amplias */
.card, .reg, .mov-item, .summary-card, .reg-grupo, .reg-total, .mas-detalles, .pf-item, .rd-card { border: 0; box-shadow: none; background: var(--surface); }
.card { border-radius: 30px; padding: 20px; }
.reg, .mov-item, .pf-item, .reg-total { border-radius: 24px; }
.reg-grupo, .mas-detalles { border-radius: 24px; }
.reg.abierto { box-shadow: 0 0 0 1.5px var(--text); }
.reg-det { border-top: 1px solid var(--border); }
.reg-dia { letter-spacing: .04em; }
.summary-card, .summary-card.income, .summary-card.expense { border: 0; border-radius: 30px 26px 32px 28px; padding: 16px 20px; background: var(--surface); }
.summary-cards .summary-card:nth-child(even) { border-radius: 26px 32px 28px 30px; }
.chip-reg, .chip-reg.obra, .chip-reg.arq, .chip-reg.oficina, .chip-reg.personal { background: var(--arena); color: var(--text); }
.chip-reg.personal { background: var(--income-bg); }
.badge-fijo, .badge-desglose { border-radius: 999px; }

/* Controles */
.btn-primary, .btn-ghost, .chip { border-radius: 999px; }
.btn-primary { background: var(--accent); color: var(--on-accent); padding: 13px 22px; }
.btn-ghost { background: transparent; border: 1.5px solid var(--arena); color: var(--text); }
.btn-ghost:active { background: var(--arena); }
input, select, textarea { border-radius: 14px; background: #FBFAF7; border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--arena); border-color: var(--text); }
.modo-btn { border-radius: 24px; border-color: transparent; background: var(--surface); }
.modo-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filters.card { border-radius: 26px; }
.resta-obra { border-radius: 16px; }
.linea { border-radius: 20px; }
.linea .linea-importe { border-radius: 14px; }
.overlay-card { border-radius: 36px; }
.sheet-panel { border-radius: 32px 32px 0 0; background: var(--surface); }
.sheet-it { border-radius: 18px; }
.rd-barra { background: var(--text); opacity: .35; }
.cc-barra { background: var(--arena); } .cc-barra span { background: var(--text); }

/* Encabezado */
.topbar { background: var(--bg); border-bottom: 0; box-shadow: none; }
.brand-text h1 { color: var(--text); font-weight: 700; font-size: 17px; }

/* Menú inferior: píldora flotante */
.bottomnav { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; gap: 2px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: 0 8px 24px rgba(43, 42, 39, .14); }
.nav-btn { border-radius: 999px; padding: 7px 4px 6px; color: var(--muted); }
.nav-btn.active { background: var(--accent); color: var(--on-accent); }
#app { padding-bottom: 104px; }

/* Inicio */
.inicio-saludo { background: none; box-shadow: none; color: var(--text); padding: 6px 4px 0; margin: 0 0 16px; border-radius: 0; flex-direction: column-reverse; gap: 2px; }
.saludo-t { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.saludo-s { color: var(--muted); opacity: 1; font-size: 13px; text-transform: none; }
.saludo-s::first-letter { text-transform: uppercase; }
.inicio-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.dato, .dato.k-verde, .dato.k-rojo, .dato.k-ambar, .dato.k-violeta { border: 0; box-shadow: none; background: var(--surface); padding: 20px 22px; border-radius: 52% 48% 46% 54% / 48% 56% 44% 52%; justify-content: center; min-height: 112px; }
.dato:nth-child(3) { border-radius: 46% 54% 55% 45% / 54% 44% 56% 46%; }
.dato:nth-child(4) { border-radius: 55% 45% 48% 52% / 46% 52% 48% 54%; background: var(--arena); }
.dato:nth-child(5) { border-radius: 48% 52% 44% 56% / 52% 48% 54% 46%; background: var(--arena); }
.dato-ic { display: none; }
.dato-l { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.dato-v { font-size: 23px; font-weight: 600; }
.dato-v.income { color: var(--income); } .dato-v.expense { color: var(--text); }
.dato:active { background: var(--arena); }
/* Piedra principal: saldo general con el avance de la meta */
.dato.hero { grid-column: 1 / -1; background: var(--accent); color: var(--on-accent); border-radius: 56% 44% 48% 52% / 46% 54% 46% 54%; padding: 34px 42px; min-height: 0; }
.dato.hero .dato-l, .dato.hero .dato-s { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.dato.hero .dato-v, .dato.hero .dato-v.income, .dato.hero .dato-v.expense { color: var(--on-accent); font-size: 42px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.dato.hero:active { background: var(--accent); opacity: .92; }
.dato-meta { display: block; width: 100%; max-width: 300px; height: 8px; border-radius: 999px; margin: 12px 0 6px; background: color-mix(in srgb, var(--on-accent) 22%, transparent); overflow: hidden; }
.dato-meta i { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--on-accent) 78%, var(--accent)); }
.acceso, .acceso:nth-child(2), .acceso:nth-child(3), .acceso:nth-child(4) { border: 0; box-shadow: none; background: var(--surface); border-radius: 28px; }
.acceso-ic { border-radius: 46% 54% 52% 48% / 55% 46% 54% 45%; background: var(--arena); color: var(--text); }
.emp-color.on { box-shadow: 0 0 0 3px var(--text); }

@media (max-width: 699px) {
  .inicio-resumen .dato:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 700px) {
  .bottomnav { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); max-width: none; transform: translateX(-50%); border-radius: 999px; }
}
@media (min-width: 1024px) {
  .topbar { padding: 14px 28px 8px 276px; }
  .topbar-title { position: fixed; left: 44px; top: 44px; z-index: 12; }
  .bottomnav { left: 20px; right: auto; top: 20px; bottom: 20px; width: 220px; transform: none; padding: 104px 12px 20px; gap: 4px; border-radius: 44px 40px 48px 42px; background: var(--surface); box-shadow: none; border: 0; z-index: 11; }
  .nav-btn { padding: 0 18px; min-height: 46px; border-radius: 999px; color: var(--text); }
  .nav-btn:hover { background: var(--arena); color: var(--text); }
  .nav-btn.active, .nav-btn.active:hover { background: var(--accent); color: var(--on-accent); }
  #app { margin: 0 0 0 256px; padding: 12px 36px 56px 20px; }
  .saludo-t { font-size: 40px; }
  .inicio-resumen { grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
  .dato { min-height: 126px; padding: 26px 30px; }
  .dato-v { font-size: 28px; }
  .dato.hero { grid-column: 1; grid-row: 1 / span 2; padding: 44px 52px; border-radius: 58% 42% 47% 53% / 46% 52% 48% 54%; }
  .dato.hero .dato-v { font-size: 58px; }
  .dato-meta { height: 10px; margin: 18px 0 8px; }
  .acceso { border-radius: 30px; }
  .sheet-panel { left: 256px; top: 30px; border-radius: 32px; }
}
@media (min-width: 1024px) {
  .topbar { position: static; background: none; justify-content: flex-end; padding: 16px 36px 0 276px; }
}
input[type="search"] { padding: 11px 16px; border: 1px solid var(--border); border-radius: 999px; font: inherit; width: 100%; box-sizing: border-box; }
.dato-s2 { opacity: .8; }

/* Estimación simplificada: porcentajes a la vista; la cantidad exacta se abre al tocarla */
.ecx-cant { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 10px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--arena, #EEE); font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.ecx-cant i { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.ecx-q.plegado { display: none; }
.ecx-chips button { border-radius: 999px; background: var(--surface); }
.ecx-chips button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ecx-f { background: var(--surface); }
.ecx-f > div:nth-child(2) b { background: var(--arena, #EEE); }

/* Rastreo de caja chica (CEO) */
.cc-rastro{margin-top:12px;border-top:1px solid var(--border);padding-top:10px}
.ccr-tipos{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.ccr-fila{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--border)}
.ccr-fila:last-child{border-bottom:0}
.ccr-info b{display:block;font-size:14px}
.ccr-info small,.ccr-num small{display:block;color:var(--muted);font-size:12px}
.ccr-num{text-align:right;font-weight:700;white-space:nowrap}
.ccr-acc{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ccr-acc .btn-ghost,.ccr-acc select{padding:6px 10px;font-size:12.5px;width:auto;margin:0}
.ccr-ini{color:var(--muted)}
.cc-acc{white-space:normal}

.pf-h small{font-weight:500;color:var(--muted);font-size:12.5px;margin-left:6px}

/* Hojas de confirmar/pedir: siempre encima de la entrada, la estimación y cualquier ventana */
#confirmar-hoja, #pedir-hoja { z-index: 80; }
#ia-body .mov-item .sub { white-space: normal; }

/* Selector de obra: quién entró y cómo salir */
.obra-salir { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--borde, rgba(0,0,0,.08)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.obra-salir span { font-size: 13px; opacity: .7; }
.obra-salir .btn-ghost { width: 100%; }
/* Accesos secundarios del Inicio (p. ej. Notas): debajo de los 4 grandes, con menos peso visual. */
.accesos-sec { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acceso-sec { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px dashed var(--border); border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.acceso-sec small { font-weight: 400; color: var(--muted); font-size: 12px; }
.acceso-sec .ico { stroke-width: 1.5; color: var(--muted); }
.acceso-sec:active { background: #F2F1EE; }
@media (max-width: 420px) { .acceso-sec small { display: none; } }

/* Caja chica: semanas, registros tarde y abonos */
.ccr-sem{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:14px 0 2px;padding:6px 10px;border-radius:10px;background:var(--arena,#DDD8CD);font-size:13px}
.ccr-sem span{color:var(--muted)}
.ccr-tarde{display:inline-block;margin-top:3px;padding:2px 8px;border-radius:999px;background:var(--expense-bg,#F3E3DF);color:var(--expense,#8C4A3F);font-size:11.5px;font-weight:700}
.ccr-fila.es-tarde{background:linear-gradient(90deg,rgba(140,74,63,.06),transparent)}
.ccr-aviso{margin:6px 0 4px;padding:8px 10px;border-radius:10px;background:var(--expense-bg,#F3E3DF);color:var(--expense,#8C4A3F);font-size:13px;font-weight:600}
.check-line{display:flex!important;align-items:flex-start;gap:8px;font-weight:500}
.check-line input{width:auto!important;margin-top:3px}
.cc-prest{margin-top:6px;padding:8px 10px;border-radius:10px;background:var(--arena,#DDD8CD);font-size:12.5px;line-height:1.45}

.cc-gas{margin-top:10px;padding:8px 10px;border-radius:12px;background:var(--arena,#DDD8CD)}
.cc-gas .muted{color:var(--muted);font-size:12.5px}

/* Forma de pago en el registro */
.pago-modo{margin:4px 0 14px}
.pago-tit{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px}
.pago-ops{display:flex;flex-wrap:wrap;gap:6px}
.pago-op{position:relative;margin:0!important;display:inline-flex!important}
.pago-op input{position:absolute;opacity:0;pointer-events:none;width:1px!important;height:1px}
.pago-op span{display:inline-block;padding:8px 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);font-size:13.5px;font-weight:600;cursor:pointer;min-height:36px;line-height:20px}
.pago-op input:checked+span{background:var(--accent);color:var(--on-accent,#fff);border-color:var(--accent)}
.pago-op input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
#f-pago-otro{margin-top:8px}

/* ---------- Espacio de trabajo (workspace.js): ficha, tablero, cronograma, documentos, directorio ---------- */
.ws-hoja-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 0; }
.ws-hoja-top h3 { margin: 0; font-size: 17px; }
.ws-hoja-body { padding: 6px 10px 10px; }
.ws-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.ws-form input, .ws-form select, .ws-form textarea { width: 100%; margin-top: 4px; }
.ws-2 { display: flex; gap: 10px; } .ws-2 > label { flex: 1 1 0; }
.ws-err { color: var(--crit, #8C4A3F); min-height: 1em; }
.ws-hr { border: 0; border-top: 1px solid var(--line, #D3CEC2); margin: 16px 0 8px; }

.ws-ficha { margin: 0 0 14px; }
.ws-portada { position: relative; border-radius: var(--radius, 14px); overflow: hidden; aspect-ratio: 16 / 6; background: var(--sunk, #E1DDD3); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.ws-portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-portada.vacia { aspect-ratio: auto; min-height: 64px; border: 1px dashed var(--line, #D3CEC2); }
.ws-portada-btn { position: absolute; right: 10px; bottom: 10px; background: rgba(246, 244, 239, .92); border: 1px solid var(--line, #D3CEC2); padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.ws-portada.vacia .ws-portada-btn { position: static; margin-left: 12px; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.ws-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface, #F6F4EF); border: 1px solid var(--line, #D3CEC2); }
.ws-chip-btn { padding: 4px 12px; font-size: 12px; }
.ws-mini { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; object-fit: cover; background: var(--sunk, #E1DDD3); }
.ws-mini-vacia { display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-d); font-weight: 700; color: var(--muted); }
.ws-portada-inicio { border-radius: var(--radius, 14px); overflow: hidden; aspect-ratio: 16 / 5; margin-bottom: 14px; background: var(--sunk, #E1DDD3); }
.ws-portada-inicio img, .ws-portada-prev { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-portada-prev { width: 120px; height: 48px; border-radius: 10px; }

.ws-segs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sunk, #E1DDD3); margin: 8px 0 12px; }
.ws-seg { border: 0; background: none; padding: 6px 14px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.ws-seg.on { background: var(--surface, #F6F4EF); color: var(--fg, #2B2A27); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.ws-tablero { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.ws-col { flex: 0 0 250px; scroll-snap-align: start; background: var(--sunk, #E1DDD3); border-radius: var(--radius, 14px); padding: 10px; min-height: 120px; }
.ws-col.sobre { outline: 2px dashed var(--accent); }
.ws-col-t { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.ws-col-t span { color: var(--muted); font-weight: 400; }
.ws-col-vacia { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 0; }
.ws-card { background: var(--surface, #F6F4EF); border-radius: 12px; padding: 8px; margin-bottom: 8px; cursor: pointer; border: 1px solid var(--line-soft, #DDD8CD); }
.ws-card.arrastrando { opacity: .5; }
.ws-card-img { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--sunk, #E1DDD3); display: flex; align-items: center; justify-content: center; font-family: var(--f-d); font-size: 28px; color: var(--muted); margin-bottom: 8px; }
.ws-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ws-clave { position: absolute; left: 6px; top: 6px; font-size: 10px; letter-spacing: .04em; background: var(--accent); color: var(--on-accent, #fff); padding: 2px 7px; border-radius: 999px; font-family: var(--f); }
.ws-card-t { font-weight: 600; font-size: 14px; line-height: 1.25; }
.ws-card-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ws-mover { width: 100%; margin: 8px 0 0; font-size: 12px; padding: 4px 8px; }
@media (min-width: 900px) { .ws-col { flex: 1 1 0; min-width: 170px; } }

.ws-crono { --crono-n: 34%; position: relative; border: 1px solid var(--line, #D3CEC2); border-radius: var(--radius, 14px); padding: 26px 10px 10px; background: var(--surface, #F6F4EF); overflow: hidden; }
.ws-crono-meses { position: absolute; top: 6px; left: calc(10px + var(--crono-n)); right: 10px; height: 16px; }
.ws-crono-meses span { position: absolute; font-size: 11px; color: var(--muted); white-space: nowrap; border-left: 1px solid var(--line, #D3CEC2); padding-left: 3px; }
.ws-crono-fila { display: flex; align-items: center; width: 100%; background: none; border: 0; border-top: 1px solid var(--line-soft, #DDD8CD); border-radius: 0; padding: 7px 0; font: inherit; text-align: left; cursor: pointer; }
.ws-crono-n { flex: 0 0 var(--crono-n); font-size: 12px; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-crono-pista { position: relative; flex: 1; height: 14px; }
.ws-crono-pista i { position: absolute; top: 0; height: 14px; border-radius: 7px; background: var(--accent); }
.ws-crono-pista i.atras { background: var(--crit, #8C4A3F); }
.ws-crono-hoy { position: absolute; top: 22px; bottom: 6px; width: 0; border-left: 2px dashed var(--warn, #7A6330); pointer-events: none; margin-left: 10px; }
.ws-crono-hoy span { position: absolute; bottom: -4px; left: 4px; font-size: 10px; color: var(--warn, #7A6330); }
@media (min-width: 700px) { .ws-crono { --crono-n: 26%; } }

.ws-doc { align-items: center; }
.ws-doc-ic { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--sunk, #E1DDD3); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted); margin-right: 10px; }
.ws-prev { border: 1px solid var(--line, #D3CEC2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: var(--surface, #F6F4EF); }
.ws-prev ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.ws-portada img[hidden], .ws-mini[hidden], .ws-portada-prev[hidden], .ws-card-img img[hidden], .ws-portada-inicio img[hidden] { display: none; }
.ws-form label { display: block !important; }
.ws-form label > input, .ws-form label > select, .ws-form label > textarea { display: block; width: 100%; margin-top: 4px; }
.ws-form textarea { font-family: inherit; }
.ws-tarea { align-items: center; cursor: pointer; }
.ws-tarea.hecha .cat { text-decoration: line-through; color: var(--muted); }
.ws-tarea.atrasada .sub { color: var(--crit, #8C4A3F); }
.ws-check { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line, #D3CEC2); background: none; margin-right: 10px; padding: 0; cursor: pointer; position: relative; }
.ws-check[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.ws-check[aria-pressed="true"]::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-accent, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ws-prio { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line, #D3CEC2); color: var(--muted); white-space: nowrap; }
.ws-prio.alta { border-color: var(--crit, #8C4A3F); color: var(--crit, #8C4A3F); }
.ws-hechas summary { cursor: pointer; font-size: 13px; color: var(--muted); margin: 8px 0; }
.ws-tar-obra { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ws-dir-q { width: 100%; margin: 0 0 8px; }
.ws-dir-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ws-dir-nums b { color: var(--fg, #2B2A27); font-weight: 600; }
.ws-cot { border: 1px solid var(--line, #D3CEC2); border-radius: var(--radius, 14px); padding: 12px 14px; margin: 0 0 16px; background: var(--surface, #F6F4EF); }
.ws-cot-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ws-cot-top h3 { margin: 0; font-size: 16px; }
.ws-cot-item.toca { border-left: 3px solid var(--warn, #7A6330); }
.ws-cot-toca { color: var(--warn, #7A6330); font-weight: 600; }
.ws-cot-acc { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ws-cot-acc .btn-ghost, .ws-cot-acc .btn-primary { padding: 6px 10px; font-size: 12px; text-decoration: none; }
a.ws-cot-item { text-decoration: none; color: inherit; }
.ws-cot-sep { height: 1px; background: var(--line, #D3CEC2); margin: 14px 0 10px; }
.ws-cot-item { flex-wrap: wrap; }
.ws-cot-item > .meta { flex: 1 1 100%; min-width: 0; }
.ws-cot-acc { width: 100%; justify-content: flex-start !important; margin-top: 8px; }
.ws-cot-top .btn-ghost { white-space: nowrap; padding: 6px 12px; font-size: 13px; }
.ws-encurso { margin: 4px 0 16px; }
.ws-encurso h3 { font-size: 15px; margin: 0 0 8px; }
.ws-encurso-g { margin-bottom: 10px; }
.ws-encurso-g h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ws-encurso-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ws-ec { text-align: left; border: 1px solid var(--line, #D3CEC2); background: var(--surface, #F6F4EF); border-radius: 14px; padding: 8px; font: inherit; cursor: pointer; color: inherit; display: flex; gap: 8px; align-items: center; }
.ws-ec .ws-mini { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
.ws-ec b { display: block; font-size: 13px; line-height: 1.2; }
.ws-ec small { display: block; font-size: 11px; color: var(--muted); }
.ws-ec > span { min-width: 0; flex: 1; }
.ws-ec-bar { display: block; height: 4px; border-radius: 2px; background: var(--line, #D3CEC2); margin-top: 5px; overflow: hidden; }
.ws-ec-bar > i { display: block; height: 100%; background: var(--accent); }
.ws-encurso > details > summary { cursor: pointer; font-size: 15px; font-weight: 600; padding: 8px 0; }
.ws-encurso > details[open] > summary { margin-bottom: 6px; }
.ws-cot-sum { cursor: pointer; font-weight: 600; font-size: 15px; padding: 4px 0; }
.ws-cot > details[open] > .ws-cot-sum { margin-bottom: 10px; }

/* ¿Gana o pierde? (Obras → detalle) */
.gan-card .gan-big{display:grid;gap:2px;margin:4px 0 12px}
.gan-card .gan-big span{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.gan-card .gan-big b{font-size:28px;line-height:1.1}
.gan-card .gan-big small{color:var(--muted, #6b6b6b);font-size:12.5px}
.av-chip.av-menos { background: #f6ecd9; color: #8a5a12; }

/* Focos rojos (Inicio y detalle de obra) */
.focos-det { margin: 14px 0 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; }
.focos-det > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.focos-det > summary::-webkit-details-marker { display: none; }
.focos-det > summary::after { content: "▾"; margin-left: auto; opacity: .6; }
.focos-det[open] > summary::after { content: "▴"; }
.focos-lista { display: grid; gap: 8px; margin-top: 12px; }
.foco { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: var(--bg); border: 1px solid var(--border); border-left: 5px solid var(--c-ambar, #c98a1b); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; }
.foco.rojo { border-left-color: var(--expense, #c0392b); }
.foco i { flex: 0 0 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--c-ambar, #c98a1b); }
.foco.rojo i { background: var(--expense, #c0392b); }
.foco span { display: grid; gap: 2px; min-width: 0; }
.foco b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.foco small { color: var(--muted, #6b6b6b); font-size: 13px; line-height: 1.35; }
.foco[data-ir=""] { cursor: default; }
.focos-obra { border-left: 5px solid var(--expense, #c0392b); }
.pp-subir { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0 4px; }
.pp-subir label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.pp-subir input[type="number"] { width: 76px; margin: 0; }

/* Aviso de la obra de ejemplo: botones parejos en dos columnas */
.guia.ejemplo .form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.guia.ejemplo .form-actions > * { flex: 1 1 calc(50% - 8px); min-width: 0; border-radius: 14px !important; padding: 11px 12px; font-size: 14px; line-height: 1.2; text-align: center; white-space: normal; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.guia.ejemplo .form-actions > #ej-ver { flex-basis: 100%; }

/* Personalizar inicio (por usuario) */
.inicio-personalizar { display: block; margin: 18px 0 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 8px; }
.sheet-panel.pers { padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); }
.pers h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 6px; }
.pers h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pers .hint { margin: 6px 0; }
.pers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; }
.pers-it { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 14.5px; cursor: pointer; }
.pers-it input { width: 20px; height: 20px; flex: none; }
.pers-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pers-acc { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.pers-acc b { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--border); font-size: 11.5px; display: grid; place-items: center; }
.pers-acc.on { border-color: var(--accent, #111); }
.pers-acc.on b { background: var(--accent, #111); border-color: var(--accent, #111); color: #fff; }
.pers .form-actions { margin-top: 16px; }

