/* ---------- Temas ---------- */
:root, [data-theme="oceano"] {
  --brand: #0e8fa3; --brand-600: #0b7587; --brand-50: #e6f5f8; --dark: #1f3a4d; --nav: #2b4a5e;
}
[data-theme="menta"]   { --brand: #1f9d6b; --brand-600: #187d55; --brand-50: #e5f6ee; --dark: #1d3b31; --nav: #2a5446; }
[data-theme="violeta"] { --brand: #6d4fd1; --brand-600: #563ab0; --brand-50: #efeafb; --dark: #2c2352; --nav: #3d3270; }

:root {
  --bg: #f4f8fa; --card: #fff; --line: #dfe8ec; --text: #1c2b33; --muted: #6a7f8a;
  --ok: #1f9d6b; --warn: #e0a100; --bad: #d64545; --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 50, 70, .08);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.err { color: var(--bad); margin: 0; }

/* ---------- Botones / campos ---------- */
.btn { border: 1px solid var(--line); background: #fff; padding: .55rem .95rem; border-radius: 9px; cursor: pointer; font-weight: 600; transition: .15s; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; }
.btn.danger { color: var(--bad); }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea { border: 1px solid var(--line); border-radius: 9px; padding: .55rem .7rem; background: #fff; width: 100%; font-weight: 400; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(135deg, var(--dark), var(--brand)); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); display: grid; gap: .8rem; }
.login-card form { display: grid; gap: .8rem; }
.demo { font-size: .85rem; color: var(--muted); }
.demo ul { padding-left: 1.1rem; margin: .4rem 0 0; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.3rem; color: var(--brand); }
.topbar .brand { color: #fff; }
.brand-mark { font-size: 1.4rem; }

/* ---------- Layout app ---------- */
.topbar { background: var(--dark); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: .6rem 1.2rem; gap: .8rem; }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.who { font-size: .85rem; opacity: .9; white-space: nowrap; }
.themes { display: flex; gap: .35rem; }
.themes button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--c); cursor: pointer; padding: 0; opacity: .75; }
.themes button.on, .themes button:hover { opacity: 1; transform: scale(1.12); }
.nav { background: var(--nav); display: flex; gap: .2rem; padding: 0 1rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { background: none; border: 0; color: #d6e6ee; padding: .9rem 1rem; cursor: pointer; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav button:hover { color: #fff; }
.nav button.on { color: #fff; border-bottom-color: #fff; }
.view { padding: 1.2rem; max-width: 1800px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toolbar .spacer { flex: 1; }
.toolbar select, .toolbar input { width: auto; min-width: 140px; }
.subtabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.subtabs button { background: none; border: 0; padding: .7rem 1rem; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.subtabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.fab { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.8rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 20; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { background: var(--dark); color: #fff; text-align: left; padding: .7rem .9rem; font-size: .85rem; font-weight: 600; white-space: nowrap; }
td { padding: .7rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--brand-50); }
td a, .link { color: var(--brand); cursor: pointer; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); margin-right: .25rem; }
.tag.red { background: #fde4e4; color: var(--bad); }
.badge { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.st-pend { background: #fff2cc; color: #8a6500; } .st-conf { background: #dcf3e8; color: #167a52; }
.st-done { background: #dde8fb; color: #2650a6; } .st-canc { background: #fde4e4; color: var(--bad); } .st-na { background: #e9e9ee; color: #55556a; }
.empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem; }

/* ---------- Agenda ---------- */
.agenda-layout { display: grid; grid-template-columns: 1fr 250px; gap: 1rem; align-items: start; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 72vh; }
.cal-grid { --rh: 60px; display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(120px, 1fr)); min-width: calc(58px + var(--cols) * 120px); }
.cal-head { position: sticky; top: 0; z-index: 3; background: #fff; text-align: center; padding: .55rem .2rem; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: .8rem; color: var(--brand-600); font-weight: 700; }
.cal-head.corner { border-left: 0; }
.cal-head .dn { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; font-size: .9rem; margin-top: 2px; color: var(--text); }
.cal-head.today .dn { background: var(--brand); color: #fff; }
.cal-time { height: var(--rh); font-size: .75rem; color: var(--muted); text-align: right; padding: 2px 8px 0 0; border-top: 1px solid var(--line); }
.cal-col { position: relative; border-left: 1px solid var(--line); height: calc(var(--rows) * var(--rh)); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rh) - 1px), var(--line) calc(var(--rh) - 1px), var(--line) var(--rh)); cursor: pointer; }
.cal-col:hover { background-color: rgba(0,0,0,.012); }
.appt { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 7px; color: #fff; font-size: .78rem; overflow: hidden; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); line-height: 1.25; }
.appt.short { display: flex; gap: .4rem; align-items: center; padding-top: 0; padding-bottom: 0; }
.appt.short b { display: inline; }
.appt span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.short span { display: inline; }
.appt b { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.appt.st-canc-x { opacity: .55; text-decoration: line-through; }
.appt.block { background: repeating-linear-gradient(45deg, #8a97a0, #8a97a0 8px, #7a8791 8px, #7a8791 16px); }
.legend { display: grid; gap: .5rem; }
.legend .row { display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem; border-radius: 999px; color: #fff; font-weight: 600; cursor: pointer; user-select: none; }
.legend .row.off { opacity: .35; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: #fff; border: 0; padding: .45rem .8rem; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--brand); color: #fff; }

/* ---------- Modal / Drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 30, 40, .5); z-index: 50; display: grid; place-items: center; padding: 1rem; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 1.3rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.x { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--dark); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; z-index: 99; box-shadow: var(--shadow); }

/* ---------- Ficha paciente ---------- */
.ficha { display: grid; grid-template-columns: 250px 1fr 320px; gap: 1rem; align-items: start; }
.ficha > *, .stack, .stack > *, .agenda-layout > * { min-width: 0; }
.profile { text-align: center; }
.avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 2rem; font-weight: 800; margin: 0 auto .6rem; border: 4px solid #fff; box-shadow: var(--shadow); }
.side-menu { display: grid; margin-top: 1rem; text-align: left; }
.side-menu button { background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: .75rem .6rem; cursor: pointer; font-weight: 600; color: var(--text); }
.side-menu button.on { background: var(--brand); color: #fff; border-radius: 8px; }
.stack { display: grid; gap: 1rem; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.mini-cards textarea { min-height: 54px; }
.note-item { border-left: 3px solid var(--brand); background: var(--brand-50); padding: .6rem .8rem; border-radius: 0 8px 8px 0; margin-bottom: .6rem; }
.note-item small { color: var(--muted); }

/* Odontograma */
.odo { display: grid; grid-template-columns: repeat(16, minmax(34px, 1fr)); gap: 3px; overflow-x: auto; padding-bottom: .4rem; }
.odo-row-label { font-size: .75rem; font-weight: 700; color: var(--muted); margin: .6rem 0 .2rem; }
.tooth { display: grid; justify-items: center; gap: 2px; cursor: pointer; font-size: .72rem; font-weight: 700; }
.tooth svg { width: 100%; max-width: 38px; height: auto; }
.tooth .shape { fill: #f6ead0; stroke: #bfa66a; stroke-width: 1.5; transition: .15s; }
.tooth:hover .shape { stroke: var(--brand); }
.tooth.caries .shape { fill: #f4a0a0; stroke: var(--bad); }
.tooth.obturado .shape { fill: #9ec3f5; stroke: #2f6fde; }
.tooth.corona .shape { fill: #f6d77a; stroke: #b48500; }
.tooth.endodoncia .shape { fill: #d7b8f2; stroke: #7a3fb8; }
.tooth.ausente { opacity: .3; }
.tooth.ausente .shape { fill: #e8e8e8; stroke-dasharray: 3 3; }
.state-legend { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .75rem; margin: .5rem 0; }
.state-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.3); }

/* ---------- KPI / charts ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; }
.kpi .n { font-size: 1.6rem; font-weight: 800; color: var(--brand-600); }
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 180px; padding-top: .5rem; }
.bar { flex: 1; display: grid; justify-items: center; align-items: end; gap: .3rem; height: 100%; font-size: .72rem; color: var(--muted); }
.bar i { display: block; width: 100%; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 3px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.wa { background: #e7f8ee; border: 1px solid #b8e6cb; border-radius: 12px; padding: .8rem; white-space: pre-wrap; }

/* ---------- Samy · asistente ---------- */
.login-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 4px solid var(--brand-50); box-shadow: var(--shadow); display: block; }
.login-card .brand { justify-content: center; }
.login-card > .muted { text-align: center; margin: 0; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.samy-fab { position: fixed; left: 1.2rem; bottom: 1.2rem; z-index: 20; display: flex; align-items: center; gap: .5rem; padding: .35rem .95rem .35rem .35rem; border-radius: 999px; border: 0; background: #fff; color: var(--dark); font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.samy-fab img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand); }
.samy-panel { position: fixed; left: 1.2rem; bottom: 5.2rem; width: 360px; max-width: calc(100vw - 2rem); height: 520px; max-height: calc(100vh - 7rem); z-index: 40; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; }
.samy-panel[hidden] { display: none; }
.samy-panel header { background: var(--brand); color: #fff; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; }
.samy-panel header img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.samy-panel header div { flex: 1; display: grid; line-height: 1.2; }
.samy-panel header small { opacity: .85; font-size: .72rem; }
.samy-panel header .x { color: #fff; }
.samy-msgs { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; background: var(--bg); }
.smsg { max-width: 88%; padding: .55rem .8rem; border-radius: 14px; font-size: .9rem; line-height: 1.4; }
.smsg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.smsg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.smsg a, .smsg button.lnk { color: var(--brand-600); font-weight: 700; cursor: pointer; background: none; border: 0; padding: 0; text-decoration: underline; }
.smsg ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.samy-chips { display: flex; gap: .4rem; padding: .5rem .7rem; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
.samy-chips button { white-space: nowrap; border: 1px solid var(--brand); color: var(--brand-600); background: var(--brand-50); border-radius: 999px; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.samy-panel form { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (min-width: 1900px) {
  html, body { font-size: 17px; }
  .view { padding: 1.8rem 2.4rem; max-width: 2300px; }
  .cal-grid { --rh: 84px; }
  .samy-panel { width: 440px; height: 620px; font-size: 1.05em; }
  .cal { max-height: 78vh; }
}
@media (max-width: 1180px) {
  .ficha { grid-template-columns: 220px 1fr; }
  .ficha > aside:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .legend { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .ficha { grid-template-columns: 1fr; }
  .mini-cards { grid-template-columns: 1fr; }
  .side-menu { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .side-menu button { border-bottom: 0; }
  .view { padding: .8rem; }
}
@media (max-width: 560px) {
  .samy-panel { left: .5rem; right: .5rem; width: auto; max-width: none; bottom: 4.6rem; height: 70vh; }
  .samy-fab span { display: none; }
  .samy-fab { padding: .3rem; }
  html, body { font-size: 14.5px; }
  .topbar { padding: .5rem .7rem; }
  .who { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar select, .toolbar input { flex: 1 1 130px; min-width: 120px; }
  .modal { padding: 1rem; border-radius: 14px; }
  .odo { grid-template-columns: repeat(16, 40px); }
}
@media print { .topbar, .nav, .fab, .toolbar { display: none !important; } }

/* =====================================================
   LANDING (estilo tarjetas enmascaradas)
   ===================================================== */
html { scroll-padding-top: 64px; scroll-behavior: smooth; }
#landing { background: #fff; font-family: 'Open Sauce One', 'Segoe UI', system-ui, -apple-system, sans-serif; color: #000; -webkit-font-smoothing: antialiased; }
.ld-splash { position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; align-items: flex-end; justify-content: flex-start; transition: opacity .7s; }
.ld-splash.out { opacity: 0; }
.ld-splash span { font-size: 4.5rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 1.5rem; line-height: 1; }
.ld-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; background: rgba(255,255,255,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ld-logo { display: flex; flex-direction: column; text-transform: uppercase; }
.ld-logo b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.ld-logo b + b { margin-top: -2px; }
.ld-logo small { font-size: 8px; font-weight: 500; line-height: 1; margin-top: 6px; text-transform: none; }
.ld-nav-r { display: none; align-items: center; gap: 1.5rem; }
.ld-pill { padding: .75rem 1.5rem; background: #fff; border-radius: 999px; border: 1px solid #000; font-size: .875rem; font-weight: 600; cursor: pointer; transition: .2s; }
.ld-pill:hover { background: #000; color: #fff; }
.ld-urg { font-size: .875rem; font-weight: 600; }
.ld-burger { position: relative; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; }
.ld-burger i { position: absolute; left: 50%; top: 50%; margin: -1px 0 0 -12px; width: 24px; height: 2px; background: #000; border-radius: 2px; transition: all .3s cubic-bezier(.76,0,.24,1); }
.ld-burger i:nth-child(1) { transform: translateY(-8px); } .ld-burger i:nth-child(3) { transform: translateY(8px); }
.ld-burger.open i:nth-child(1) { transform: rotate(45deg); } .ld-burger.open i:nth-child(2) { opacity: 0; transform: scaleX(0); } .ld-burger.open i:nth-child(3) { transform: rotate(-45deg); }
.ld-mob { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.ld-mob.open { pointer-events: auto; }
.ld-mob-bd { position: absolute; inset: 0; background: rgba(0,0,0,.2); backdrop-filter: blur(4px); opacity: 0; transition: opacity .4s; }
.ld-mob.open .ld-mob-bd { opacity: 1; }
.ld-mob-panel { position: absolute; top: 0; right: 0; height: 100%; width: 85%; max-width: 24rem; background: #fff; box-shadow: -10px 0 40px rgba(0,0,0,.25); transform: translateX(100%); transition: transform .5s cubic-bezier(.76,0,.24,1); display: flex; flex-direction: column; justify-content: center; padding: 0 2rem; }
.ld-mob.open .ld-mob-panel { transform: translateX(0); }
.ld-mob nav { display: flex; flex-direction: column; gap: 4px; }
.ld-mob nav a { font-size: 2.25rem; font-weight: 700; color: #000; text-decoration: none; cursor: pointer; opacity: 0; transform: translateX(32px); transition: all .5s cubic-bezier(.76,0,.24,1); }
.ld-mob.open nav a { opacity: 1; transform: none; }
.ld-mob.open nav a:nth-child(1) { transition-delay: .1s; } .ld-mob.open nav a:nth-child(2) { transition-delay: .16s; } .ld-mob.open nav a:nth-child(3) { transition-delay: .22s; } .ld-mob.open nav a:nth-child(4) { transition-delay: .28s; }
.ld-mob-foot { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #e5e5e5; display: grid; gap: .6rem; }
.ld-mob-foot p { margin: 0 0 .4rem; font-size: .875rem; font-weight: 600; }
.ld-black { width: 100%; padding: 1rem 1.5rem; background: #000; color: #fff; border: 1px solid #000; border-radius: 999px; font-size: .875rem; font-weight: 600; cursor: pointer; }
.ld-black.ghost { background: #fff; color: #000; }
.ld-white { padding: .75rem 1.25rem; background: #fff; color: #000; border: 0; border-radius: 999px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform .2s; }
.ld-white:hover { transform: scale(1.05); }

.ld-sec { position: relative; width: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 6px 12px; }
.ld-s1 { height: 100vh; height: 100svh; padding-top: 96px; }
.ld-s2, .ld-s3 { min-height: 100vh; min-height: 100svh; }
.ld-bar, .ld-hero, .ld-c, .ld-card, .ld-tile, .ld-right { border-radius: 12px; overflow: hidden; position: relative; }
.ld-bar { width: 100%; height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ld-bar span { font-size: 1.125rem; font-weight: 700; text-align: center; position: relative; z-index: 1; padding: 0 .5rem; }
.ld-hero { flex: 1; min-height: 0; }
.ld-tl { position: absolute; top: 16px; left: 16px; max-width: 200px; margin: 0; font-size: .75rem; font-weight: 600; line-height: 1rem; z-index: 1; }
.ld-bl { position: absolute; bottom: 20px; left: 12px; z-index: 1; }
.ld-bl span { display: block; font-size: .75rem; font-weight: 600; margin-bottom: 4px; }
.ld-bl h1 { margin: 0; font-size: clamp(3rem, 11vw, 11rem); font-weight: 700; line-height: .79; letter-spacing: -.025em; }
.ld-br { position: absolute; bottom: 24px; right: 16px; color: #fff; font-size: .75rem; font-weight: 600; z-index: 1; cursor: pointer; }

.ld-grid2 { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 6px; }
.ld-c { min-height: 160px; }
.ld-c0 h2, .ld-c0 p, .ld-c1 p, .ld-c2 h2 { position: absolute; z-index: 1; margin: 0; color: #fff; }
.ld-c0 h2 { top: 16px; left: 20px; font-size: 1.5rem; font-weight: 700; }
.ld-c0 p { bottom: 16px; left: 20px; font-size: .75rem; font-weight: 600; }
.ld-c1 { min-height: 200px; }
.ld-c1 p { bottom: 64px; left: 20px; font-size: .75rem; font-weight: 600; line-height: 1rem; }
.ld-c1 .ld-white { position: absolute; bottom: 16px; right: 16px; z-index: 1; }
.ld-c2 h2 { top: 16px; left: 20px; font-size: clamp(3rem, 7vw, 6rem); font-weight: 700; line-height: .9; }
.ld-c3 { min-height: 200px; }
.ld-svcs { position: absolute; inset: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.ld-svc { flex: 1; min-width: calc(50% - 4px); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(255,255,255,.2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: #fff; }
.ld-svc.on { background: rgba(255,255,255,.9); backdrop-filter: blur(12px); color: #000; }
.ld-svc h3 { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.05; }
.ld-svc i { align-self: flex-end; width: 32px; height: 32px; border-radius: 50%; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; font-style: normal; }

.ld-grid3 { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 6px; }
.ld-left { display: flex; flex-direction: column; gap: 6px; }
.ld-card { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.ld-card.stone { background: #fafaf9; flex: 1.2; min-height: 180px; }
.ld-card.zinc { background: #e4e4e7; flex: .8; min-height: 160px; }
.ld-card.row { flex-direction: row; align-items: flex-end; }
.ld-card h2 { margin: 0; font-size: clamp(2.2rem, 6vw, 6.5rem); font-weight: 700; line-height: .95; }
.ld-card p { margin: 0; font-size: .75rem; font-weight: 600; }
.ld-card.row p { margin-bottom: 8px; }
.ld-card h3 { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.5rem; }
.ld-tiles { display: flex; gap: 6px; flex: 1; min-height: 140px; }
.ld-tile { flex: 1; background-size: cover; background-position: center; }
.ld-right { min-height: 350px; background: #cfe9ee; }
.ld-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.ld-ovl { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; gap: 6px; }
.ld-o { flex: 1; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; height: 144px; }
.ld-o.white { background: #fff; color: #000; }
.ld-o.glass { background: rgba(255,255,255,.2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: #fff; }
.ld-o h4 { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.25rem; }
.ld-arrow { align-self: flex-end; width: 36px; height: 36px; border-radius: 50%; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; }
.ld-arrow svg { transform: rotate(-45deg); }
#loginBack { color: var(--brand); font-weight: 600; cursor: pointer; text-align: center; }

@media (min-width: 768px) {
  .ld-nav { padding: .75rem 1.5rem; } .ld-logo b { font-size: 1.5rem; } .ld-logo b + b { margin-top: -3px; } .ld-logo small { font-size: 9px; margin-top: 8px; }
  .ld-nav-r { display: flex; } .ld-burger, .ld-mob { display: none; }
  .ld-splash span { font-size: 8rem; padding: 2.5rem; }
  .ld-sec { gap: 8px; padding: 8px 20px; }
  .ld-s1 { padding-top: 96px; } .ld-s2, .ld-s3 { height: 100vh; height: 100svh; }
  .ld-bar, .ld-hero, .ld-c, .ld-card, .ld-tile, .ld-right { border-radius: 16px; }
  .ld-bar { height: 80px; } .ld-bar span { font-size: 1.875rem; }
  .ld-tl { top: 28px; left: 28px; max-width: 300px; font-size: .875rem; line-height: 1.25rem; }
  .ld-bl { bottom: 32px; left: 16px; } .ld-bl span { font-size: .875rem; margin-bottom: 8px; }
  .ld-br { bottom: 40px; right: 32px; font-size: .875rem; }
  .ld-grid2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr .8fr; gap: 8px; }
  .ld-c, .ld-c1, .ld-c3 { min-height: 0; } .ld-c1 { grid-row: span 2; } .ld-c3 { grid-column: span 2; }
  .ld-c0 h2, .ld-c2 h2 { color: #000; } .ld-c0 p { color: #000; }
  .ld-c0 h2 { top: 24px; left: 28px; font-size: 1.875rem; } .ld-c0 p { bottom: 24px; left: 28px; font-size: .875rem; }
  .ld-c1 p { bottom: 80px; left: 28px; font-size: .875rem; line-height: 1.25rem; } .ld-c1 .ld-white { bottom: 24px; right: 24px; padding: 1.25rem 2rem; font-size: 1.25rem; }
  .ld-c2 h2 { top: 24px; left: 28px; }
  .ld-svcs { gap: 8px; padding: 12px; flex-wrap: nowrap; } .ld-svc { min-width: 0; border-radius: 16px; padding: 20px; } .ld-svc h3 { font-size: 2.25rem; } .ld-svc i { width: 48px; height: 48px; font-size: .875rem; }
  .ld-grid3 { grid-template-columns: 1fr 1fr; gap: 8px; } .ld-left { gap: 8px; } .ld-tiles { gap: 8px; min-height: 0; }
  .ld-card { padding: 28px; } .ld-card.stone, .ld-card.zinc { min-height: 0; } .ld-card p { font-size: .875rem; } .ld-card.row p { margin-bottom: 12px; } .ld-card h3 { font-size: 1.875rem; line-height: 2rem; }
  .ld-card.row .ld-white { padding: 1.25rem 2rem; font-size: 1.25rem; }
  .ld-right { min-height: 0; } .ld-ovl { bottom: 20px; left: 20px; right: 20px; gap: 8px; } .ld-o { padding: 20px; height: 208px; border-radius: 16px; } .ld-o h4 { font-size: 1.5rem; line-height: 1.75rem; } .ld-arrow { width: 48px; height: 48px; }
}
@media (max-width: 767px) { .ld-white { padding: .75rem 1.25rem; } }

/* Samy en la landing y ocultar en login */
body.on-login .samy-fab, body.on-login .samy-panel { display: none; }
body.on-landing .samy-fab { left: auto; right: 1.2rem; }
body.on-landing .samy-panel { left: auto; right: 1.2rem; }
.ld-br { bottom: 92px !important; }
@media (min-width: 768px) { .ld-br { right: 28px !important; } }

/* ---- Legibilidad de textos sobre fotos ---- */
.ld-bar span { background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: .15rem 1rem; color: #0b2530; }
.ld-bl h1, .ld-bl span, .ld-tl { text-shadow: 0 0 22px rgba(255,255,255,.85), 0 0 6px rgba(255,255,255,.6); color: #0b2530; }
.ld-br { background: rgba(8,30,40,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: .55rem 1.1rem; border-radius: 999px; }
.ld-c0 h2, .ld-c0 p, .ld-c2 h2 { color: #0b2530 !important; text-shadow: 0 0 20px rgba(255,255,255,.9), 0 0 6px rgba(255,255,255,.7); }
.ld-c1 p { background: rgba(8,30,40,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: .6rem .9rem; border-radius: 12px; }
.ld-svc { background: rgba(8,30,40,.42); text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.ld-svc.on { background: rgba(255,255,255,.92); text-shadow: none; }
.ld-o.glass { background: rgba(8,30,40,.5); text-shadow: 0 1px 8px rgba(0,0,0,.35); }
