:root {
  --ink: #12232b;
  --ink-2: #44575f;
  --ink-3: #7b8b92;
  --bg: #f3f6f7;
  --card: #ffffff;
  --line: #e2e8ea;
  --brand: #0f3d4c;
  --brand-2: #17607a;
  --accent: #e07a3f;
  --accent-soft: #fdf0e7;
  --pool: #1c8fc7;
  --pool-soft: #e6f4fb;
  --green: #2f9a62;
  --green-soft: #e7f5ec;
  --amber: #d99a1e;
  --amber-soft: #fcf4e2;
  --red: #d2453d;
  --red-soft: #fcebea;
  --violet: #6d5bd0;
  --violet-soft: #efedfb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 40, 50, .06), 0 6px 24px rgba(16, 40, 50, .07);
  --shadow-lg: 0 20px 60px rgba(10, 30, 40, .25);
  --side: 264px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, .serif { font-family: Fraunces, Georgia, serif; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── layout ── */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #0f3d4c 0%, #0b2f3b 100%); color: #d7e6ea;
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: #fff; text-decoration: none; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #f2a65a); display: grid; place-items: center; font-family: Fraunces, serif; font-weight: 700; font-size: 1.15rem; color: #fff; box-shadow: 0 4px 14px rgba(224, 122, 63, .45); }
.brand b { display: block; font-family: Fraunces, serif; font-size: 1.1rem; }
.brand span { font-size: .75rem; color: #9fc0c9; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c3d8de; text-decoration: none; font-weight: 500; font-size: .93rem; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .13); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 8px; }
.nav .badge { margin-left: auto; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: .75rem; color: #9fc0c9; }
.icon-btn { border: 0; background: rgba(255, 255, 255, .08); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.main { min-width: 0; }
.topbar { display: none; }
.content { padding: 28px 32px 60px; max-width: 1320px; margin: 0 auto; }

/* ── hero ── */
.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 210px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow); margin-bottom: 24px; background: #234 center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 32, 42, .88) 0%, rgba(8, 32, 42, .55) 45%, rgba(8, 32, 42, .08) 100%); }
.hero-in { position: relative; padding: 28px 32px; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 2.1rem; }
.hero p { margin: 6px 0 0; color: #dcebef; max-width: 640px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: #f6c7a6; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── botones / formularios ── */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); box-shadow: 0 6px 18px rgba(224, 122, 63, .35); }
.btn.accent:hover { background: #cf6a30; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: #eef3f4; }
.btn.light { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.btn.light:hover { background: rgba(255, 255, 255, .26); }
.btn.green { background: var(--green); }
.btn.danger { background: transparent; color: var(--red); border-color: #f1c9c6; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 9px; }
.btn svg.i { width: 17px; height: 17px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .93rem; font-weight: 400; color: var(--ink); transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(23, 96, 122, .15); }
textarea { resize: vertical; min-height: 84px; }
.grid-f { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-f .full { grid-column: 1 / -1; }
.grid-f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.seg { display: inline-flex; background: #e9eff1; border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font-weight: 600; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ── tarjetas ── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { display: flex; align-items: center; gap: 9px; }
.card-h h2 svg.i { color: var(--brand-2); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt { margin-top: 20px; }
.mt-s { margin-top: 10px; }

.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.kpi .ic svg.i { width: 24px; height: 24px; }
.kpi b { font-size: 1.6rem; font-family: Fraunces, serif; display: block; line-height: 1.1; }
.kpi span { color: var(--ink-3); font-size: .83rem; }
.c-brand { background: #e3eef2; color: var(--brand-2); }
.c-accent { background: var(--accent-soft); color: var(--accent); }
.c-pool { background: var(--pool-soft); color: var(--pool); }
.c-green { background: var(--green-soft); color: var(--green); }
.c-amber { background: var(--amber-soft); color: var(--amber); }
.c-red { background: var(--red-soft); color: var(--red); }
.c-violet { background: var(--violet-soft); color: var(--violet); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--ink-2); background: #eef3f4; padding: 3px 9px; border-radius: 7px; }
.tag svg.i { width: 14px; height: 14px; }

/* listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; }
.li .s { font-size: .82rem; color: var(--ink-3); }
.clickable { cursor: pointer; }
.clickable:hover { background: #f7fafb; }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); }
.empty svg.i { width: 40px; height: 40px; color: #b5c4c9; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; }

/* tiles de inicio */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile { position: relative; border-radius: 16px; overflow: hidden; min-height: 130px; color: #fff; text-decoration: none; display: flex; align-items: flex-end; background: #234 center/cover; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(6, 26, 34, .85) 100%); }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16, 40, 50, .18); }
.tile div { position: relative; padding: 14px; }
.tile b { display: flex; align-items: center; gap: 7px; font-size: .98rem; }
.tile span { font-size: .78rem; color: #d3e3e8; }

/* mapa / street view */
.map-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #dfe7ea; aspect-ratio: 16 / 9; }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.photo-strip figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-strip figure:hover img { transform: scale(1.05); }
.photo-strip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: .7rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.credit { font-size: .7rem; color: var(--ink-3); margin-top: 8px; }

/* tiempo */
.wx-now { display: flex; align-items: center; gap: 18px; }
.wx-now .big { width: 92px; height: 92px; }
.wx-now b { font-size: 3rem; font-family: Fraunces, serif; line-height: 1; }
.wx-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.wx-day { text-align: center; background: #f4f8fa; border-radius: 12px; padding: 10px 4px; }
.wx-day .d { font-size: .75rem; font-weight: 700; color: var(--ink-2); text-transform: capitalize; }
.wx-day svg { width: 40px; height: 40px; margin: 4px auto; display: block; }
.wx-day .tt { font-size: .82rem; font-weight: 600; }
.wx-day .tt span { color: var(--ink-3); font-weight: 400; }
.wx-day .pp { font-size: .7rem; color: var(--pool); }
.wx-score { padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; gap: 12px; margin-top: 14px; font-weight: 600; }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-top: 12px; }
.wx-hours div { flex: none; width: 54px; text-align: center; font-size: .75rem; background: #f4f8fa; border-radius: 10px; padding: 6px 2px; }
.wx-hours svg { width: 26px; height: 26px; display: block; margin: 2px auto; }

/* parámetros piscina */
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.param { border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; overflow: hidden; }
.param::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st, #cfd8db); }
.param .lbl { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.param .val { font-size: 1.55rem; font-family: Fraunces, serif; font-weight: 700; }
.param .val small { font-size: .8rem; font-family: Inter; color: var(--ink-3); font-weight: 500; }
.param .rng { font-size: .72rem; color: var(--ink-3); }
.season { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #1c8fc7, #22b5c9); }
.season.closed { background: linear-gradient(120deg, #51646b, #7b8f96); }
.season b { font-size: 1.25rem; font-family: Fraunces, serif; display: block; }
.season .prog { height: 8px; background: rgba(255, 255, 255, .25); border-radius: 9px; overflow: hidden; margin-top: 8px; }
.season .prog i { display: block; height: 100%; background: #fff; border-radius: 9px; }

/* tabla */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

/* incidencias */
.inc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.inc { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--st, #cfd8db); }
.inc:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16, 40, 50, .14); }
.inc .ph { height: 150px; background: #e9eff1 center/cover; display: grid; place-items: center; color: #9db0b6; }
.inc .ph svg.i { width: 44px; height: 44px; }
.inc .bd { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.inc .bd h3 { font-size: 1rem; }
.inc .ft { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--ink-3); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cat-opt { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px; text-align: center; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cat-opt .e { font-size: 1.4rem; }
.cat-opt.on { border-color: var(--brand-2); background: #e9f3f6; color: var(--brand); }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding-bottom: 16px; }
.tl::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--st, var(--brand-2)); }
.tl .who { font-size: .82rem; color: var(--ink-3); }
.tl .who b { color: var(--ink); }
.tl .txt { margin-top: 4px; white-space: pre-wrap; }
.stepper { display: flex; gap: 0; margin: 4px 0 18px; }
.stepper div { flex: 1; text-align: center; font-size: .75rem; font-weight: 600; color: var(--ink-3); position: relative; padding-top: 22px; }
.stepper div::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #dbe3e6; z-index: 1; }
.stepper div::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: #dbe3e6; }
.stepper div:first-child::after { display: none; }
.stepper div.done { color: var(--ink); }
.stepper div.done::before, .stepper div.done::after { background: var(--green); }

/* adjuntos */
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #e9eff1 center/cover; cursor: zoom-in; border: 1px solid var(--line); position: relative; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; background: #fff; text-decoration: none; color: var(--ink); max-width: 260px; }
.fchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip:hover { border-color: var(--brand-2); }
.fchip svg.i { color: var(--red); width: 18px; height: 18px; }
.drop { display: block; border: 2px dashed #c9d6da; border-radius: 14px; padding: 16px; text-align: center; color: var(--ink-3); cursor: pointer; font-size: .88rem; transition: border .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand-2); background: #f1f7f9; }
.drop svg.i { width: 28px; height: 28px; color: var(--brand-2); display: block; margin: 0 auto 6px; }
.previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.previews .pv { position: relative; }
.previews .pv button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 24, 30, .55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); width: min(680px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(980px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-h h2 { font-size: 1.2rem; font-family: Fraunces, serif; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.x { border: 0; background: #eef3f4; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 200; display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 300; transition: transform .25s, visibility .25s; visibility: hidden; max-width: calc(100vw - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
#toast.err { background: var(--red); }

/* calendario */
.cal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-h h2 { font-family: Fraunces, serif; font-size: 1.4rem; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: #f4f8fa; text-align: center; font-size: .74rem; font-weight: 700; color: var(--ink-3); padding: 8px 0; text-transform: uppercase; }
.cal .day { background: #fff; min-height: 104px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: background .12s; min-width: 0; }
.cal .day:hover { background: #f5fafb; }
.cal .day.out { background: #fafcfc; color: #b3c0c4; }
.cal .day.past { background: #fafcfc; }
.cal .day .n { font-size: .82rem; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .n { background: var(--accent); color: #fff; }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--brand-2); }
.ev { font-size: .72rem; padding: 2px 6px; border-radius: 6px; background: var(--violet-soft); color: var(--violet); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.mine { background: var(--accent-soft); color: #b9541c; }
.dayview { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hour { display: flex; height: 44px; border-bottom: 1px solid var(--line); font-size: .74rem; color: var(--ink-3); }
.hour:last-child { border-bottom: 0; }
.hour span { width: 52px; padding: 3px 8px; flex: none; border-right: 1px solid var(--line); background: #fafcfc; }
.hour i { flex: 1; cursor: pointer; }
.hour i:hover { background: #f1f7f9; }
.dv-ev { position: absolute; left: 58px; right: 8px; border-radius: 9px; padding: 5px 10px; font-size: .8rem; background: var(--violet); color: #fff; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, .15); }
.dv-ev.mine { background: var(--accent); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* actas */
.acta { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border .15s, background .15s; }
.acta:hover { border-color: var(--brand-2); background: #f8fbfc; }
.acta .dt { width: 64px; text-align: center; background: var(--brand); color: #fff; border-radius: 12px; padding: 8px 0; flex: none; }
.acta .dt b { display: block; font-size: 1.4rem; font-family: Fraunces, serif; line-height: 1; }
.acta .dt span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.point { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.point.work { border-color: #f3cdb4; background: linear-gradient(180deg, #fffaf6, #fff 120px); }
.point-h { display: flex; gap: 12px; align-items: flex-start; }
.point-n { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.point.work .point-n { background: var(--accent); }
.budgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.budget { border: 1.5px dashed #d5dfe2; border-radius: 14px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.budget.filled { border-style: solid; border-color: var(--line); }
.budget.sel { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 154, 98, .14); }
.budget .amt { font-family: Fraunces, serif; font-size: 1.35rem; font-weight: 700; }
.budget .lowest { font-size: .7rem; font-weight: 700; color: var(--green); }
.comments { margin-top: 14px; background: #f7fafb; border-radius: 12px; padding: 12px; }
.cmt { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.cmt:last-child { border-bottom: 0; }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 290px); min-height: 420px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #f0f5f6 url("img/pattern.svg"); border-radius: 14px; }
.msg { max-width: min(560px, 82%); align-self: flex-start; display: flex; gap: 9px; }
.msg .av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .78rem; color: #fff; }
.msg .bub { background: #fff; padding: 9px 13px; border-radius: 4px 14px 14px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); min-width: 0; }
.msg .bub .nm { font-size: .76rem; font-weight: 700; margin-bottom: 2px; }
.msg .bub .tx { white-space: pre-wrap; word-wrap: break-word; }
.msg .bub .tm { font-size: .68rem; color: var(--ink-3); text-align: right; margin-top: 3px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bub { background: #dff3ea; border-radius: 14px 4px 14px 14px; }
.msg .files { margin-top: 6px; }
.msg .thumb { width: 180px; height: 130px; }
.day-sep { align-self: center; font-size: .74rem; font-weight: 600; background: #fff; padding: 3px 12px; border-radius: 99px; color: var(--ink-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.composer { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.composer textarea { min-height: 46px; max-height: 140px; border-radius: 14px; }

/* barras / gráficas */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b .pair { display: flex; gap: 2px; align-items: flex-end; width: 100%; justify-content: center; flex: 1; }
.bars .b i { width: 42%; max-width: 16px; border-radius: 4px 4px 0 0; display: block; min-height: 2px; }
.bars .b span { font-size: .68rem; color: var(--ink-3); text-transform: capitalize; }
.hbar { margin-bottom: 11px; }
.hbar .row { justify-content: space-between; font-size: .84rem; margin-bottom: 4px; flex-wrap: nowrap; }
.hbar .track { height: 9px; background: #edf2f4; border-radius: 9px; overflow: hidden; position: relative; }
.hbar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; font-size: .83rem; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend div b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* limpieza */
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wday { background: #f6f9fa; border-radius: 14px; padding: 10px; min-height: 160px; }
.wday h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 8px; display: flex; justify-content: space-between; }
.wday.today { background: #fff6ef; box-shadow: inset 0 0 0 2px #f4c7a8; }
.wtask { background: #fff; border-radius: 10px; padding: 8px 10px; font-size: .8rem; margin-bottom: 7px; border-left: 3px solid var(--c, var(--brand-2)); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.area-card { border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.area-card .top { padding: 16px 18px; color: #fff; display: flex; align-items: center; gap: 12px; }
.area-card .top .e { font-size: 1.6rem; }
.area-card .top b { display: block; font-size: 1.02rem; }
.area-card .top span { font-size: .78rem; opacity: .85; }
.task { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .grow { flex: 1; min-width: 0; font-size: .88rem; }
.task .grow .s { font-size: .75rem; color: var(--ink-3); }

/* jardín/gimnasio */
.need { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: #fff; }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 12px; width: 54px; flex: none; cursor: pointer; background: #fff; padding: 6px 0; font-weight: 700; color: var(--ink-2); }
.vote.on { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.vote svg.i { width: 18px; height: 18px; }
.equip { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.equip:last-child { border-bottom: 0; }
.equip select { width: auto; padding: 5px 8px; font-size: .8rem; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; background: #0f3d4c center/cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.login-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 32, 42, .2) 0%, rgba(8, 32, 42, .9) 100%); }
.login-art > * { position: relative; }
.login-art h1 { font-size: 3rem; margin-top: 10px; }
.login-art p { color: #d3e4e9; max-width: 480px; }
.login-feats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.login-feats span { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); padding: 6px 12px; border-radius: 99px; font-size: .8rem; backdrop-filter: blur(4px); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.login-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { font-family: Fraunces, serif; font-size: 1.8rem; }
.err-box { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: 10px; font-size: .88rem; font-weight: 500; }
.hint { background: #f2f7f8; border-radius: 12px; padding: 12px 14px; font-size: .82rem; color: var(--ink-2); }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--amber-soft); color: #7a5410; margin-bottom: 20px; font-weight: 500; flex-wrap: wrap; }
.spinner { width: 28px; height: 28px; border: 3px solid #d6e1e4; border-top-color: var(--brand-2); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── responsive ── */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .shell.open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--brand); color: #fff; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar b { font-family: Fraunces, serif; font-size: 1.05rem; }
  .content { padding: 16px 16px 60px; }
  .hero { min-height: 170px; border-radius: 18px; }
  .hero-in { padding: 20px; }
  .hero h1 { font-size: 1.6rem; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .budgets { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .wday { min-height: 0; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; padding: 28px; }
  .login-art h1 { font-size: 2.1rem; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .wx-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cal .day { min-height: 64px; padding: 3px; }
  .ev { font-size: .62rem; padding: 1px 3px; }
  .grid-f, .grid-f3 { grid-template-columns: 1fr; }
  .chat { height: calc(100vh - 250px); }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card { padding: 16px; }
  .modal-bg { padding: 0; align-items: end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; }
}
