:root, [data-theme="dark"] {
  --bg: #111214;
  --bg2: #17181b;
  --card: #1e1f23;
  --line: #2c2d32;
  --text: #ece6da;
  --muted: #9b958a;
  --green: #2f4a3c;      /* verde oscuro opaco */
  --green-l: #3d5e4c;
  --green-t: #8fb59f;    /* texto verde legible */
  --vino: #6e2130;
  --vino-l: #8a2c3e;
  --vino-t: #cf7d8c;
  --beige: #cdbb97;
  --beige-l: #e8dcc4;
  --blue: #3b5f86;
  --blue-l: #6f9bc9;
  --red-t: #ef8f8f;
  --amber-t: #d9b66a;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --radius: 10px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #fbfaf7;
  --bg2: #ffffff;
  --card: #f4efe6;
  --line: #e4dccd;
  --text: #1c1b19;
  --muted: #6e685d;
  --green: #2f4a3c;
  --green-l: #3d5e4c;
  --green-t: #2f5a43;
  --vino: #6e2130;
  --vino-l: #8a2c3e;
  --vino-t: #7a2434;
  --beige: #b9a477;
  --beige-l: #efe6d4;
  --blue: #3b5f86;
  --blue-l: #2f5a8a;
  --red-t: #a62b2b;
  --amber-t: #8a6414;
  --shadow: 0 8px 30px rgba(40,30,10,.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
  transition: background .2s, color .2s;
}
a { color: var(--text); text-decoration-color: var(--beige); text-underline-offset: 3px; }
a.btn, .site-nav a, .nav-item { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--vino); color: #f3ece0; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .3px; }
.login-card h1 { font-size: 20px; margin: 24px 0 4px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.demo-banner { background: color-mix(in srgb, var(--beige) 14%, transparent); border: 1px solid color-mix(in srgb, var(--beige) 45%, transparent); color: var(--amber-t); padding: 8px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 16px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 0 8px 20px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--card); color: var(--text); box-shadow: inset 3px 0 0 var(--vino-l); }
.nav-item .soon { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; border-radius: 99px; }
.nav-sep { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding: 16px 10px 6px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.me { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #f3ece0; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.me small { display: block; color: var(--muted); }
.main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.mobile-top { display: none; }

/* ---------- Controles ---------- */
.btn { border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.btn:hover { border-color: #3a4150; }
.btn.primary { background: var(--green); border-color: var(--green); color: #f3ece0; }
.btn.primary:hover { background: var(--green-l); }
.btn.vino { background: var(--vino); border-color: var(--vino); color: #f3ece0; }
.btn.vino:hover { background: var(--vino-l); }
.btn.beige { background: var(--beige); border-color: var(--beige); color: #1c1b19; }
.btn.danger { color: var(--red-t); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; outline: none; }
.input:focus { border-color: var(--blue-l); }
textarea.input { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.err { color: var(--red-t); font-size: 13px; min-height: 18px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; padding: 7px 10px; }
.toolbar .search { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 7px 12px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { font-size: 24px; display: block; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.kpi.red b { color: var(--vino-t); }
.kpi.green b { color: var(--green-t); }
.kpi { border-top: 3px solid var(--line); }
.kpi.red { border-top-color: var(--vino); }
.kpi.green { border-top-color: var(--green); }
.kpi.beige { border-top-color: var(--beige); }

/* ---------- Tarjetas de pendientes ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.card:hover { border-color: #3a4150; }
.card h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; }
.card .last { color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pill { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pill.alta { color: var(--vino-t); border-color: color-mix(in srgb, var(--vino) 60%, transparent); }
.pill.media { color: var(--amber-t); border-color: color-mix(in srgb, var(--beige) 60%, transparent); }
.pill.baja { color: var(--muted); }
.st { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.st.pendiente { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--text); }
.st.en_proceso { background: color-mix(in srgb, var(--blue) 25%, transparent); color: var(--blue-l); }
.st.bloqueado { background: color-mix(in srgb, var(--vino) 25%, transparent); color: var(--vino-t); }
.st.terminado { background: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green-t); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.venc { color: var(--vino-t); }
.tag { font-size: 11px; color: var(--muted); background: var(--card); padding: 1px 7px; border-radius: 4px; }

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--bg2); position: sticky; top: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg2); }
tr:last-child td { border-bottom: 0; }

/* ---------- Modal / panel ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; justify-content: flex-end; z-index: 50; }
.overlay.center { justify-content: center; align-items: center; padding: 20px; }
.drawer { width: min(620px, 100%); height: 100%; background: var(--bg2); border-left: 1px solid var(--line); overflow-y: auto; padding: 24px; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.drawer-head, .modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.drawer-head h2, .modal-head h2 { margin: 0; font-size: 18px; }
.x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.section h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .6px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv span:nth-child(odd) { color: var(--muted); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.ev { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ev .h { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ev .kind { font-weight: 600; }
.ev .kind.plan { color: var(--blue-l); }
.ev .kind.reporte { color: var(--green-t); }
.ev .kind.comentario { color: var(--muted); }
.ev p { margin: 0; white-space: pre-wrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { width: 92px; height: 92px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; background: var(--card); display: grid; place-items: center; cursor: pointer; position: relative; font-size: 11px; color: var(--muted); text-align: center; padding: 4px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb .d { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); font-size: 10px; padding: 2px; color: #eee; }
.drop { border: 1px dashed #3a4150; border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; }
.drop:hover { border-color: var(--green-l); color: var(--text); }

/* ---------- Informe ---------- */
.emp-block { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.emp-block h3 { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; font-size: 15px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 60px; }
.box h5 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.box p { margin: 0; white-space: pre-wrap; font-size: 13.5px; }
.ok { color: var(--green-t); } .no { color: var(--vino-t); }
.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 99; box-shadow: var(--shadow); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: -260px; width: 240px; z-index: 40; transition: left .2s; }
  .side.open { left: 0; }
  .mobile-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 30; }
  .main { padding: 18px 16px 60px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols2 { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
}

/* ---------- Tema ---------- */
.theme-btn { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.theme-btn:hover { color: var(--text); }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--green); }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- Sitio público ---------- */
.site { min-height: 100vh; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 14px 24px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 110px 0 90px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .kicker { color: var(--beige); text-transform: uppercase; letter-spacing: 2.5px; font-size: 12px; font-weight: 600; }
.hero h1 { font-size: clamp(36px, 6vw, 68px); line-height: 1.04; margin: 14px 0 20px; letter-spacing: -1.5px; max-width: 900px; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--vino-t); }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 0 32px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .lines { position: absolute; right: -40px; top: 40px; width: 460px; height: 460px; opacity: .5; pointer-events: none; }
.sec { padding: 80px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 34px; flex-wrap: wrap; }
.sec-head h2 { font-size: 32px; margin: 6px 0 0; letter-spacing: -.5px; }
.sec-head .kicker { color: var(--beige); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 600; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--bg2); padding: 26px 22px; }
.service .n { color: var(--vino-t); font-weight: 700; font-size: 13px; }
.service h3 { margin: 10px 0 8px; font-size: 17px; }
.service p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.stat b { font-size: 34px; display: block; color: var(--text); letter-spacing: -.5px; }
.stat span { color: var(--muted); }
.portfolio { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg2); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard .img { aspect-ratio: 4/3; background: var(--card); position: relative; overflow: hidden; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.pcard .body { padding: 16px 18px 18px; }
.pcard h3 { margin: 0 0 6px; font-size: 17px; }
.pcard .meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: none; padding: 6px 14px; border-radius: 99px; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; }
.about p { color: var(--muted); font-size: 16px; line-height: 1.7; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact .item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact .item small { color: var(--muted); display: block; margin-bottom: 4px; }
.site-foot { padding: 30px 0; color: var(--muted); font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; }
.modal.wide { width: min(900px, 100%); }
.hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 14px; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .services, .stats { grid-template-columns: 1fr 1fr; }
  .about, .contact { grid-template-columns: 1fr; }
  .hero { padding: 70px 0 60px; }
  .hero .lines { display: none; }
}

/* =================================================================
   DISEÑO v2 (aprobado nov 2026) · estilo Apple, beige muy suave
   Vino = contornos y "pendiente / por pagar" · Verde = seleccionado · Azul marino = botón principal
   En modo noche vino, verde y azul marino son EXACTAMENTE los mismos colores.
   ================================================================= */
:root, [data-theme="light"] {
  --bg: #FAF8F4; --bg2: #F6F3EE; --card: #F6F3EE; --sel: #F1EDE6; --line: rgba(60,50,35,.09);
  --text: #1D1D1F; --muted: #6E6E73; --fill: rgba(118,118,128,.12); --track: #ECE6DB; --rail: rgba(255,255,255,.55);
  --navy: #2C3A52; --verde: #2F5B45; --vinoC: #6A2F3B;
  --green: #2F5B45; --green-l: #2F5B45; --green-t: #2F5B45; --vino: #6A2F3B; --vino-l: #6A2F3B; --vino-t: #6A2F3B;
  --blue: #2C3A52; --blue-l: #2C3A52; --beige: #B9A477; --red-t: #6A2F3B; --amber-t: #8a6414;
  --shadow: 0 10px 30px rgba(40,30,10,.08); --radius: 12px; color-scheme: light;
}
[data-theme="dark"] {
  --bg: #1C1C1E; --bg2: #212123; --card: #212123; --sel: #262628; --line: rgba(255,255,255,.07);
  --text: #F5F5F7; --muted: #98989D; --fill: rgba(118,118,128,.24); --track: #2E2E31; --rail: rgba(44,44,46,.72);
  --navy: #2C3A52; --verde: #2F5B45; --vinoC: #6A2F3B;
  --green: #2F5B45; --green-l: #2F5B45; --green-t: #2F5B45; --vino: #6A2F3B; --vino-l: #6A2F3B; --vino-t: #6A2F3B;
  --blue: #2C3A52; --blue-l: #2C3A52; --beige: #B9A477; --red-t: #6A2F3B; color-scheme: dark;
}
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; }
.app { grid-template-columns: 76px 1fr; }
.side { background: var(--rail); padding: 22px 0; align-items: center; gap: 6px; backdrop-filter: blur(20px); }
.side .brand { padding: 0 0 22px; }
.nav-item { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 10px; color: var(--text); }
.nav-item span { display: none; }
.nav-item:hover { background: var(--sel); }
.nav-item.active { background: var(--sel); color: var(--verde); box-shadow: none; }
.nav-item svg { width: 20px; height: 20px; stroke-width: 1.7; }
.side-foot { border-top: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.side-foot .me { flex-direction: column; padding: 0; }
.side-foot .me > div:last-child { display: none; }
.avatar { width: 34px; height: 34px; background: var(--navy); color: #fff; }
.switch { width: 51px; height: 31px; border-radius: 99px; border: 0; padding: 2px; cursor: pointer; background: rgba(120,120,128,.24); display: flex; justify-content: flex-start; transition: background .2s; }
.switch[aria-checked="true"] { background: var(--verde); justify-content: flex-end; }
.switch span { width: 27px; height: 27px; border-radius: 99px; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); }
.main { padding: 40px 48px 56px; max-width: 1336px; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.025em; }
.page-head p { font-size: 13px; }
.btn { border: 0; background: var(--fill); color: var(--text); border-radius: 9px; padding: 8px 16px; font-weight: 500; }
.btn:hover { border-color: transparent; filter: brightness(.97); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy); filter: brightness(1.08); }
.btn.vino { background: var(--vinoC); color: #fff; }
.btn.danger { color: var(--vinoC); }
.input, select.input, textarea.input { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.input:focus { border-color: var(--navy); }
.seg { border: 1.5px solid var(--vinoC); border-radius: 10px; padding: 3px; gap: 4px; background: var(--bg); overflow: visible; flex-wrap: wrap; }
.seg button { border-radius: 7px; padding: 6px 16px; font-size: 13px; color: var(--text); font-weight: 500; }
.seg button.on { background: var(--sel); color: var(--verde); font-weight: 700; }
.kpi { background: var(--card); border: 0; border-top: 0 !important; border-radius: 12px; padding: 16px 18px; }
.kpi b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.kpi.red b { color: var(--vinoC); } .kpi.green b { color: var(--verde); }
.card, .emp-block, .ev, .box, .pcard, .modal, .drawer { background: var(--card); border: 0; }
.card:hover { border-color: transparent; background: var(--sel); }
.table-wrap { border: 0; background: var(--card); border-radius: 12px; }
th { background: var(--card); }
th, td { border-bottom: 1px solid var(--line); }
.pill { border-width: 1.5px; }
.pill.alta { color: var(--text); border-color: var(--vinoC); }
.st.pendiente, .st.bloqueado { background: transparent; border: 1.5px solid var(--vinoC); color: var(--text); }
.st.terminado { background: transparent; border: 1.5px solid var(--verde); color: var(--text); }
.st.en_proceso { background: transparent; border: 1.5px solid var(--navy); color: var(--text); }
.venc, .no { color: var(--vinoC); } .ok { color: var(--verde); }
.empty { border: 0; background: var(--card); border-radius: 12px; }
.drop { border: 1.5px dashed rgba(110,110,115,.35); }
.overlay { background: rgba(20,20,20,.35); backdrop-filter: blur(4px); }
.modal, .drawer { border-radius: 14px; }
.logo-d { display: block; }
/* Finanzas v2 */
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { background: var(--card); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { margin: 0; font-size: 15px; font-weight: 600; }
.wk { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 8px; background: var(--sel); border-top: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
.fact { border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; padding: 6px 4px; min-height: 32px; }
.fact i { width: 7px; height: 7px; border-radius: 99px; background: currentColor; display: inline-block; }
.fact.si { color: var(--verde); } .fact.no { color: var(--vinoC); }
.porpagar { color: var(--vinoC); font-weight: 500; }
.link { text-align: left; color: var(--text); text-decoration: underline; text-decoration-color: rgba(127,127,127,.35); text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 500; }
.bar { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; } .bar > div { height: 6px; border-radius: 99px; background: var(--navy); }
.cmp th.grp { text-align: center; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.cmp td.n, .cmp th.n { text-align: right; font-variant-numeric: tabular-nums; }
.cmp .mas { color: var(--vinoC); font-weight: 500; } .cmp .falta { color: var(--verde); font-weight: 500; }
.cmp tr.tot td { font-weight: 700; } .cmp tr.mas td { color: var(--vinoC); font-weight: 700; border-bottom: 0; }
.errbox { box-shadow: inset 3px 0 0 var(--vinoC); }
.mini td { padding: 9px 0; font-size: 13.5px; } .mini tr.err td { color: var(--vinoC); }
.slot { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 300px; }
.slot .ph { width: 120px; height: 68px; border-radius: 8px; background: #4A4740 center/cover; flex: none; }
.star { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 99px; border: 0; background: rgba(250,248,244,.9); cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.star.on { color: var(--verde); }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; } .main { padding: 18px 16px 60px; }
  .fin-grid { grid-template-columns: 1fr; }
  .side { align-items: stretch; padding: 20px 14px; width: 240px; }
  .nav-item { width: 100%; justify-content: flex-start; padding: 0 12px; gap: 12px; } .nav-item span { display: inline; }
}

/* =================== Sitio público v2 (solo día, animado tipo Apple) =================== */
.s2 { background: #FAF8F4; color: #1D1D1F; overflow-x: clip; font-size: 15px; }
.s2 .in { max-width: 1180px; margin: 0 auto; padding: 0 28px; box-sizing: border-box; width: 100%; }
.s2 .k { font-size: 15px; font-weight: 600; color: #6A2F3B; }
.s2 h2 { margin: 0; font-size: clamp(38px, 5vw, 64px); font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
.s2-top { position: sticky; top: 0; z-index: 30; background: rgba(250,248,244,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(60,50,35,.09); }
.s2-top .in { display: flex; align-items: center; gap: 28px; padding: 14px 28px; flex-wrap: wrap; }
.s2-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; } .s2-brand span { font-size: 9px; font-weight: 500; letter-spacing: .42em; color: #2C3A52; }
.s2-top nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; flex-wrap: wrap; } .s2-top nav a { color: #1D1D1F; text-decoration: none; }
.s2-btn { font: inherit; font-size: 15px; font-weight: 500; padding: 11px 22px; border-radius: 99px; border: 0; background: #2C3A52; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.s2-btn.sm { font-size: 13.5px; padding: 7px 16px; } .s2-btn.white { background: #fff; color: #1D1D1F; } .s2-btn.glass { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(10px); }
.s2-hero { padding: 14px 14px 0; }
.s2-hero .frame { position: relative; height: min(860px, 88vh); border-radius: 24px; overflow: hidden; background: #4A4740; transform-origin: center top; }
.s2-hero .ph, .s2 .drift, .s2 .lift { position: absolute; inset: 0; background: #4A4740 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.4); }
.s2 .lift { position: relative; width: 100%; height: 100%; background-color: #EEE9DF; color: #6E6E73; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.s2-hero .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0,.55) 100%); }
.s2-hero .txt { position: absolute; left: 0; right: 0; bottom: 0; max-width: 1180px; margin: 0 auto; padding: 0 28px 72px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; color: #fff; }
.s2-hero .txt > span { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85); }
.s2-hero h1 { margin: 0; font-size: clamp(44px, 7vw, 88px); line-height: 1; font-weight: 700; letter-spacing: -.045em; max-width: 900px; }
.s2-hero p { margin: 0; font-size: 21px; line-height: 1.5; color: rgba(255,255,255,.85); max-width: 640px; }
.s2-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.s2-story { height: 1500px; margin-top: 120px; }
.s2-story .pin { position: sticky; top: 61px; height: 760px; max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; justify-content: center; gap: 44px; }
.s2-story .pin > div { display: flex; flex-direction: column; gap: 10px; }
.s2-story .w { font-size: clamp(54px, 8vw, 96px); font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.s2-story .s { font-size: 19px; color: #6E6E73; max-width: 520px; }
.s2-proj { margin-top: 40px; }
.s2-proj .pin { position: sticky; top: 61px; height: 840px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 34px; }
.s2-proj .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.s2-proj .head > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.s2-proj .right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.s2 .seg { background: #FAF8F4; border-color: #6A2F3B; } .s2 .seg button { color: #1D1D1F; } .s2 .seg button.on { background: #F1EDE6; color: #2F5B45; }
.s2-proj .prog { width: 160px; height: 3px; border-radius: 99px; background: rgba(60,50,35,.09); overflow: hidden; } .s2-proj .bar2 { height: 3px; width: 100%; background: #2F5B45; transform-origin: left center; }
.s2-proj .track { display: flex; gap: 32px; width: max-content; padding: 0 max(28px, calc((100vw - 1124px) / 2)); }
.card2 { flex: 0 0 auto; width: min(980px, 76vw); text-decoration: none; color: #1D1D1F; display: flex; flex-direction: column; gap: 22px; }
.card2 .cover { position: relative; aspect-ratio: 16/9; border-radius: 28px; overflow: hidden; }
.card2:hover .lift { transform: scale(1.08); }
.card2 .tag { position: absolute; top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: rgba(250,248,244,.86); backdrop-filter: blur(12px); }
.card2 .tag i { width: 7px; height: 7px; border-radius: 99px; display: inline-block; }
.card2 .cap { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 6px; flex-wrap: wrap; }
.card2 .l { display: flex; gap: 22px; align-items: baseline; } .card2 .num { font-size: 15px; font-weight: 600; color: #6A2F3B; }
.card2 h3 { margin: 0 0 6px; font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; } .card2 .l span:not(.num) { font-size: 17px; color: #6E6E73; }
.card2 .more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; }
.s2-stage { height: 3200px; margin-top: 60px; }
.s2-stage .pin { position: sticky; top: 61px; height: 840px; overflow: hidden; }
.s2-stage .zoom { position: absolute; inset: 0; background: #4A4740; overflow: hidden; }
.s2-stage .drift { inset: -6%; }
.s2-stage .scrim2 { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 100%); }
.s2-stage .lay { position: relative; height: 100%; padding: 56px 28px 40px; display: flex; flex-direction: column; justify-content: space-between; }
.s2-stage .tow { display: flex; flex-direction: column; gap: 10px; } .s2-stage .tow h2 { font-size: clamp(42px, 6vw, 72px); max-width: 760px; }
.s2-stage .svs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.s2-stage .sv { background: rgba(250,248,244,.86); backdrop-filter: saturate(160%) blur(22px); -webkit-backdrop-filter: saturate(160%) blur(22px); border-radius: 22px; padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 196px; }
.s2-stage .sv span { font-size: 13px; font-weight: 600; color: #6A2F3B; } .s2-stage .sv h3 { margin: 0; font-size: 21px; } .s2-stage .sv p { margin: 0; font-size: 15px; line-height: 1.55; color: #6E6E73; }
.s2-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 56px; align-items: center; padding-top: 140px !important; padding-bottom: 40px; }
.s2-about .biglogo { height: 220px; max-width: 100%; }
.s2-about .rv { display: flex; flex-direction: column; gap: 18px; } .s2-about p { margin: 0; font-size: 21px; line-height: 1.6; color: #6E6E73; }
.s2-contact { background: #F6F3EE; border-radius: 28px; padding: 72px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.s2-contact p { margin: 0; font-size: 19px; color: #6E6E73; } .s2-contact .mail { font-size: 19px; font-weight: 500; color: #1D1D1F; text-decoration: none; margin-top: 6px; }
.s2-foot { border-top: 1px solid rgba(60,50,35,.09); } .s2-foot .in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 28px; font-size: 13px; color: #6E6E73; } .s2-foot a { color: #6E6E73; }
@keyframes s2up { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes s2fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes s2lit { from { color: rgba(29,29,31,.16); } to { color: #1D1D1F; } }
@keyframes s2shrink { from { transform: scale(1); } to { transform: scale(.94); } }
@keyframes s2slide { from { transform: translateX(0); } to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes s2bar { from { transform: scaleX(.08); } to { transform: scaleX(1); } }
@keyframes s2act { from { opacity: .35; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes s2zoom { from { clip-path: inset(30% 32% 12% 32% round 28px); } to { clip-path: inset(0 0 0 0 round 0px); } }
@keyframes s2drift { from { transform: translateY(50px) scale(1.12); } to { transform: translateY(-50px) scale(1); } }
@keyframes s2tow { from { color: #1D1D1F; } to { color: #FFFFFF; } }
@keyframes s2sx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes s2sy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.s2 .load { animation: s2up 1s cubic-bezier(.2,.7,.2,1) both; } .s2 .d1 { animation-delay: .12s; } .s2 .d2 { animation-delay: .24s; } .s2 .d3 { animation-delay: .36s; }
@supports (animation-timeline: view()) {
  .s2 .rv { animation: s2up linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
  .s2 .grow { animation: s2shrink linear both; animation-timeline: view(); animation-range: exit 0% exit 60%; }
  .s2-story { view-timeline: --story block; }
  .s2-story .w { animation: s2lit linear both; animation-timeline: --story; } .s2-story .s { animation: s2fade linear both; animation-timeline: --story; }
  .s2-story .w1, .s2-story .s1 { animation-range: contain 0% contain 25%; } .s2-story .w2, .s2-story .s2 { animation-range: contain 25% contain 50%; } .s2-story .w3, .s2-story .s3 { animation-range: contain 50% contain 75%; }
  .s2-proj { view-timeline: --pin block; }
  .s2-proj .track { animation: s2slide linear both; animation-timeline: --pin; animation-range: contain 8% contain 92%; }
  .s2-proj .bar2 { animation: s2bar linear both; animation-timeline: --pin; animation-range: contain 8% contain 92%; }
  .card2.act { animation-name: s2act; animation-timing-function: linear; animation-fill-mode: both; animation-timeline: --pin; }
  .s2-stage { view-timeline: --srv block; }
  .s2-stage .zoom { animation: s2zoom linear both; animation-timeline: --srv; animation-range: contain 0% contain 32%; }
  .s2-stage .drift { animation: s2drift linear both; animation-timeline: --srv; animation-range: contain 0% contain 100%; }
  .s2-stage .scrim2 { animation: s2fade linear both; animation-timeline: --srv; animation-range: contain 18% contain 32%; }
  .s2-stage .tow { animation: s2tow linear both; animation-timeline: --srv; animation-range: contain 14% contain 28%; }
  .s2-stage .sv { animation: s2up linear both; animation-timeline: --srv; }
  .s2-stage .sv1 { animation-range: contain 36% contain 48%; } .s2-stage .sv2 { animation-range: contain 48% contain 60%; } .s2-stage .sv3 { animation-range: contain 60% contain 72%; } .s2-stage .sv4 { animation-range: contain 72% contain 84%; }
  .s2 .bm { transform-box: fill-box; transform-origin: left center; animation: s2sx linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  .s2 .cl { transform-box: fill-box; transform-origin: center top; animation: s2sy linear both; animation-timeline: view(); animation-range: entry 35% cover 50%; }
  .s2 .lt { animation: s2fade linear both; animation-timeline: view(); animation-range: entry 45% cover 55%; }
}
@supports not (animation-timeline: view()) {
  .s2-story, .s2-proj, .s2-stage { height: auto; } .s2-story .pin, .s2-proj .pin, .s2-stage .pin { position: relative; top: 0; height: auto; padding-top: 60px; padding-bottom: 60px; }
  .s2-proj .track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; } .card2 { scroll-snap-align: center; } .s2-stage .pin { min-height: 840px; }
}
@media (prefers-reduced-motion: reduce) { .s2 * { animation: none !important; transition: none !important; } }
@media (max-width: 860px) { .s2-top nav { display: none; } .card2 h3 { font-size: 28px; } .s2-contact { padding: 48px 24px; } }
