:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #e3e8ec;
  --text: #17222b;
  --muted: #64748b;
  --primary: #55794f;
  --primary-600: #45663f;
  --primary-50: #eef3ea;
  --side: #33271f;
  --side-text: #e4d8cc;
  --green: #15803d; --green-bg: #e8f6ec;
  --red: #b91c1c; --red-bg: #fdecec;
  --amber: #a16207; --amber-bg: #fdf5df;
  --orange: #c2410c; --orange-bg: #fdeee5;
  --blue: #1d4ed8; --blue-bg: #e8effd;
  --violet: #6d28d9; --violet-bg: #f1eafd;
  --sky: #0369a1; --sky-bg: #e3f3fb;
  --teal: #55794f; --teal-bg: #e1f3f1;
  --yellow: #854d0e; --yellow-bg: #fef9c3;
  --slate: #475569; --slate-bg: #eef1f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; margin-top: 1rem; }
p { margin: 0 0 .75rem; }
code { background: var(--slate-bg); padding: 1px 5px; border-radius: 4px; font-size: .85em; }
img { max-width: 100%; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex-shrink: 0; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand:hover { text-decoration: none; }
.brand .logo { font-size: 28px; }
.brand strong { display: block; font-size: .95rem; line-height: 1.2; }
.brand small { color: var(--side-text); font-size: .75rem; }
nav { padding: 10px 8px; flex: 1; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--side-text); font-size: .92rem; }
nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
nav .ico { width: 22px; text-align: center; }
nav .lbl { flex: 1; }
nav .count { background: #f59e0b; color: #1f1300; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.nav-title { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; color: #b49d88; padding: 14px 10px 4px; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.me { display: flex; gap: 10px; align-items: center; color: #fff; margin-bottom: 10px; }
.me:hover { text-decoration: none; }
.me small { display: block; color: var(--side-text); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; max-width: 170px; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.sidebar .btn.ghost { color: var(--side-text); border-color: rgba(255,255,255,.18); background: transparent; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 1.2rem; margin: 0; }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 4px 8px; }
.content { padding: 24px 28px 48px; max-width: 1280px; width: 100%; }
.content > * + * { margin-top: 18px; }
.backdrop { display: none; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 720px; }
.pad { padding: 16px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-head.pad { margin: 0; border-bottom: 1px solid var(--border); }
.grid { display: grid; gap: 18px; }
.grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.g-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.grid > section > * + *, .grid > aside > * + * { margin-top: 14px; }
.grid > section > .card-head + * { margin-top: 0; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); color: var(--text); }
a.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat-value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.01em; }
.stat-value.sm { font-size: 1.1rem; }
.stat-sub { color: var(--muted); font-size: .8rem; }
.stat-warn { border-left: 4px solid var(--red); }
.stat-warn .stat-value { color: var(--red); }
.stat-ok { border-left: 4px solid var(--green); }

.progress { height: 8px; background: var(--slate-bg); border-radius: 99px; overflow: hidden; }
.progress.lg { height: 12px; margin: 8px 0; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #8fb07f); border-radius: 99px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; font-size: .9rem; cursor: pointer; white-space: nowrap; line-height: 1.3; }
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #cbd5dc; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { filter: brightness(.95); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--red); border-color: #f3c4c4; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: .8rem; }
.btn.lg { padding: 12px 20px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.icon { padding: 4px 8px; }
form.inline { display: inline; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.orange { background: var(--orange-bg); color: var(--orange); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.violet { background: var(--violet-bg); color: var(--violet); }
.pill.sky { background: var(--sky-bg); color: var(--sky); }
.pill.teal { background: var(--teal-bg); color: var(--teal); }
.pill.yellow { background: var(--yellow-bg); color: var(--yellow); }
.pill.slate { background: var(--slate-bg); color: var(--slate); }

.alert { padding: 12px 16px; border-radius: 10px; border: 1px solid; font-size: .92rem; }
.alert.ok { background: var(--green-bg); border-color: #b9e3c6; color: #14532d; }
.alert.error { background: var(--red-bg); border-color: #f5c2c2; color: #7f1d1d; }
.alert.warn { background: var(--amber-bg); border-color: #f1dca2; color: #713f12; }
.alert.info { background: var(--blue-bg); border-color: #c7d6fb; color: #1e3a8a; }

/* ---------- Formularios ---------- */
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: .85rem; font-weight: 600; color: #334155; }
input, select, textarea { font: inherit; color: var(--text); padding: 9px 11px; border: 1px solid #cfd8de; border-radius: 8px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(85, 121, 79, .25); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=file] { padding: 7px; background: var(--surface-2); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.inline-field select, .inline-field input { width: auto; }
.actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.actions.left { justify-content: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { display: none; }
.chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: .85rem; background: #fff; }
.chip input:checked + span { background: var(--primary-50); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .88rem; }
.seg input:checked + span { background: var(--primary-50); border-color: var(--primary); color: var(--primary); font-weight: 600; }
details summary { cursor: pointer; font-size: .9rem; color: var(--primary); }
details[open] summary { margin-bottom: 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input:not([type=date]) { max-width: 320px; }
.toolbar select, .toolbar input[type=date] { width: auto; }
.spacer { flex: 1; }
.calc { background: var(--primary-50); color: var(--primary-600); padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.calc:empty { display: none; }

/* ---------- Tablas y listas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f6f8f3; }
.right { text-align: right !important; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .03em; }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.faded { opacity: .6; }
.prewrap { white-space: pre-wrap; word-wrap: break-word; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.gap { gap: 12px; } .gap-sm { gap: 6px; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { text-decoration: none; background: var(--surface-2); }
.list-item strong { display: block; }
.list-item small { color: var(--muted); }
.list-item.col { flex-direction: column; align-items: stretch; gap: 4px; }
.list-item.unread strong::before { content: "● "; color: var(--blue); }
.list.compact .list-item { padding: 7px 2px; font-size: .88rem; }
.empty { color: var(--muted); font-size: .9rem; margin: 6px 0; }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .big-ico { font-size: 44px; margin-bottom: 6px; }
.kv { display: grid; gap: 8px; margin: 12px 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.kv > div > span { color: var(--muted); }
.kv > div > strong { text-align: right; font-weight: 600; }
.kv.tight { gap: 4px; }
.back { display: inline-block; font-size: .88rem; margin-bottom: 4px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-head .muted { margin: 0; max-width: 640px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.tabs a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-size: .86rem; font-weight: 500; }
.tabs a:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.tabs a.active { background: var(--primary); color: #fff; }
.count-sm { opacity: .75; font-size: .78rem; margin-left: 2px; }

/* ---------- Inicio ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-btn { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: .9rem; text-align: center; box-shadow: var(--shadow); }
.quick-btn span { font-size: 26px; }
.quick-btn:hover { border-color: var(--primary); text-decoration: none; background: var(--primary-50); }
.todo h3 { margin-bottom: 6px; }
.todo-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; background: var(--amber-bg); color: #713f12; font-weight: 500; }
.todo-item + .todo-item { margin-top: 8px; }
.todo-item .arrow { margin-left: auto; }
.todo-item:hover { text-decoration: none; filter: brightness(.97); }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding-top: 8px; }
.bar-group { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.bar { width: 40%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar.fact, .legend i.fact { background: #cbd5e1; }
.bar.rec, .legend i.rec { background: var(--primary); }
.bar-group small { color: var(--muted); font-size: .75rem; }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* ---------- Comunicados ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.comunicado { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--slate); border-radius: var(--radius); padding: 16px 18px; color: var(--text); box-shadow: var(--shadow); }
.comunicado:hover { text-decoration: none; border-color: #cbd5dc; }
.comunicado.unread { background: #fbfdff; }
.comunicado.unread h3::before { content: "● "; color: var(--blue); }
.c-ico { font-size: 28px; line-height: 1; padding-top: 2px; }
.c-body { flex: 1; min-width: 0; }
.c-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.c-preview { color: #475569; margin: 4px 0 6px; white-space: pre-line; }
.c-foot { display: flex; gap: 14px; flex-wrap: wrap; }
.c-green { border-left-color: var(--green); } .c-red { border-left-color: var(--red); } .c-amber { border-left-color: #eab308; }
.c-orange { border-left-color: var(--orange); } .c-blue { border-left-color: var(--blue); } .c-violet { border-left-color: var(--violet); }
.c-sky { border-left-color: #0ea5e9; } .c-teal { border-left-color: var(--teal); } .c-yellow { border-left-color: #facc15; }
.comunicado-full { border-top: 5px solid var(--slate); }
.comunicado-full.c-green { border-top-color: var(--green); } .comunicado-full.c-red { border-top-color: var(--red); } .comunicado-full.c-amber { border-top-color: #eab308; }
.comunicado-full.c-orange { border-top-color: var(--orange); } .comunicado-full.c-violet { border-top-color: var(--violet); } .comunicado-full.c-sky { border-top-color: #0ea5e9; }
.comunicado-full.c-teal { border-top-color: var(--teal); } .comunicado-full.c-yellow { border-top-color: #facc15; }
.comunicado-full h2 { font-size: 1.5rem; margin: 6px 0 10px; }
.comunicado-full > * + * { margin-top: 12px; }
.evento { background: var(--primary-50); padding: 8px 12px; border-radius: 8px; display: inline-block; }
.adjunto-img { border-radius: 10px; border: 1px solid var(--border); max-height: 420px; margin-top: 10px; }

/* ---------- Tickets ---------- */
.ticket-title { margin-bottom: 8px; }
.msg { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.msg.original { background: #fff; }
.msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: .9rem; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.msg.from-admin { background: var(--primary-50); border-color: #d5e1cd; margin-left: 32px; }
.msg.from-owner { margin-right: 32px; }
.msg.interno { background: #fffbeb; border-color: #fde68a; border-style: dashed; }
.msg-sistema { text-align: center; font-size: .78rem; color: var(--muted); }
.reply { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 16px; }

/* ---------- Visitas / garita ---------- */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.visit h3 { margin: 0; font-size: 1.1rem; }
.visit > * + * { margin-top: 10px; }
.visit.garita { border-top: 4px solid var(--amber); }
.visit.garita.is-in { border-top-color: var(--green); }
.cedula { font-size: 1rem; font-weight: 600; margin: 2px 0 0; }
.casa-tag { background: var(--side); color: #fff; font-weight: 700; padding: 6px 10px; border-radius: 8px; font-size: .9rem; white-space: nowrap; }
.casa-tag.sm { padding: 2px 8px; font-size: .78rem; border-radius: 6px; }
.codigo { background: var(--slate-bg); border-radius: 8px; padding: 8px 12px; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; }
.codigo strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; letter-spacing: .15em; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.timeline li { padding: 6px 10px; border-left: 3px solid var(--green); background: var(--green-bg); border-radius: 0 6px 6px 0; }
.timeline li + li { margin-top: 4px; }
.timeline li.rechazado { border-left-color: var(--red); background: var(--red-bg); }
.rechazo summary { color: var(--red); font-size: .85rem; }
.search-big { display: flex; gap: 10px; }
.search-big input { font-size: 1.1rem; padding: 12px 16px; }
.pago-card h3 { font-size: 1.4rem; margin: 0; }
.pago-card > * + * { margin-top: 10px; }
.comprobante { max-height: 220px; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- Varios ---------- */
.import-card { position: relative; }
.import-card > * + * { margin-top: 10px; }
.step { position: absolute; top: 14px; right: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; }
.steps { padding-left: 18px; margin: 0; } .steps li + li { margin-top: 6px; }
.danger-zone summary { color: var(--red); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 0%, #e3ead9, transparent 50%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: 0 10px 30px rgba(51, 39, 31, .08); }
.login-card > * + * { margin-top: 18px; }
.login-brand { text-align: center; }
.login-brand h1 { font-size: 1.35rem; margin: 6px 0 0; }
.logo-lg { font-size: 48px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.g-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
  .menu-btn { display: block; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .grid.g2, .grid.g3 { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid.g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .search-big { flex-direction: column; }
  .visit-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.3rem; }
  .msg.from-admin { margin-left: 12px; } .msg.from-owner { margin-right: 12px; }
  .toolbar input:not([type=date]) { max-width: none; }
}

/* ---------- Egresos ---------- */
.bar.egr, .legend i.egr { background: #f87171; }
.bar-pair .bar { width: 30%; }
.progress.over > span { background: var(--red); }
.month-nav { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.cat-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cat-bar { display: grid; grid-template-columns: 210px 1fr 190px; align-items: center; gap: 12px; color: var(--text); font-size: .88rem; padding: 2px 0; }
.cat-bar:hover { text-decoration: none; background: var(--surface-2); }
.cat-track { position: relative; height: 12px; background: var(--slate-bg); border-radius: 99px; }
.cat-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 99px; }
.cat-fill.over { background: var(--red); }
.cat-budget { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #111827; }
.cat-amt { text-align: right; white-space: nowrap; font-weight: 600; }
.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); padding: 11px 14px; }
.table.flujo td, .table.flujo th { padding: 8px 10px; }
.table.flujo td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.flujo .row-in td, .flujo .row-in td:first-child { background: var(--green-bg); }
.flujo .row-out td, .flujo .row-out td:first-child { background: var(--red-bg); }
.flujo .row-res td { border-top: 2px solid var(--text); }
.flujo .row-sec td, .flujo .row-sec td:first-child { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
@media (max-width: 760px) { .cat-bar { grid-template-columns: 1fr; gap: 4px; } .cat-amt { text-align: left; } }
.nuevo-egreso summary { list-style: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nuevo-egreso summary::-webkit-details-marker { display: none; }
.nuevo-egreso[open] summary .btn { background: var(--surface); color: var(--text); border-color: var(--border); }
.egreso-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; align-items: end; }
.egreso-form .span-2 { grid-column: span 2; }
.egreso-form .span-all { grid-column: 1 / -1; }
.egresos-tabla td { vertical-align: middle; }
@media (max-width: 900px) { .egreso-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .egreso-form { grid-template-columns: 1fr; } .egreso-form .span-2 { grid-column: auto; } }

/* ---------- Marca ---------- */
.brand .logo { width: 38px; height: 46px; flex-shrink: 0; }
.brand strong { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; }
.logo-full { width: 100%; max-width: 300px; height: auto; }
.topbar h1 { font-family: Georgia, 'Times New Roman', serif; }

/* ---------- Mapa ---------- */
.mapa-page { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.mapa-card { padding: 12px; }
.mapa-svg { display: block; width: 100%; height: auto; }
.mapa-leyenda ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; font-size: .88rem; }
.mapa-leyenda i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; }
.mapa-mini { padding: 12px 14px; margin-bottom: 14px; }
.mapa-mini[open] summary { margin-bottom: 8px; }
@media (max-width: 900px) { .mapa-page { grid-template-columns: 1fr; } }
@media print { .sidebar, .topbar, .no-print, .backdrop { display: none !important; } .mapa-page { grid-template-columns: 1fr; } .card { box-shadow: none; } }

/* ---------- Avisos rápidos y restricciones ---------- */
.aviso-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.aviso-op input { display: none; }
.aviso-op span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; font-size: .85rem; font-weight: 600; background: #fff; }
.aviso-op b { font-size: 28px; line-height: 1; }
.aviso-op input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.form-grid.tres { grid-template-columns: 2fr 1fr 1fr; }
.visit.es-aviso { border-top-color: #3b82f6; }
.visit.es-aviso h3 { display: flex; align-items: center; gap: 6px; }
.aviso-ico { font-size: 1.4rem; }
.visit.restringida { border-top-color: var(--red); background: #fffafa; }
.alerta-restriccion { background: var(--red-bg); color: #7f1d1d; border: 1px solid #f5c2c2; border-radius: 8px; padding: 8px 10px; font-size: .85rem; }
.restringidas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.casa-restringida { background: var(--red-bg); color: var(--red); border: 1px solid #f5c2c2; border-radius: 10px; padding: 14px; text-align: center; font-weight: 700; font-size: 1.05rem; }
@media (max-width: 560px) { .form-grid.tres { grid-template-columns: 1fr; } .aviso-opciones { grid-template-columns: repeat(2, 1fr); } }

.garita-tabs { margin-bottom: 4px; }
.garita-tabs .tab-morosos:not(.active) { color: var(--red); font-weight: 600; }
.limitantes ul { margin: 6px 0 10px; padding-left: 0; list-style: none; display: grid; gap: 6px; font-weight: 600; }
.casa-restringida { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.casa-restringida strong { font-size: 1.15rem; }

/* ---------- Informe financiero ---------- */
.bars-detalle { height: 220px; }
.bars-detalle .bar-group { position: relative; color: inherit; text-decoration: none; border-radius: 8px; padding-top: 4px; }
.bars-detalle .bar-group:hover, .bars-detalle .bar-group:focus { background: var(--surface-2); text-decoration: none; outline: none; }
.bars-detalle .bar-group:hover .bar, .bars-detalle .bar-group:focus .bar { filter: brightness(1.08); }
.tip { display: none; position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translateX(-50%); z-index: 20; width: 290px;
       background: #1f1712; color: #f3ede6; border-radius: 10px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: .8rem; text-align: left; pointer-events: none; }
.tip.tip-izq { left: auto; right: 0; transform: none; }
.bar-group:hover .tip, .bar-group:focus .tip { display: block; }
.tip-titulo { display: block; font-size: .95rem; margin-bottom: 6px; color: #fff; }
.tip-fila { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.tip-fila span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-total { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }
.tip .text-green { color: #86efac; } .tip .text-red { color: #fca5a5; }
.tip-res { margin-top: 6px; padding-top: 6px; border-top: 2px solid rgba(255,255,255,.35); font-size: .9rem; }
.tip-pie { margin-top: 8px; color: #bba99a; font-size: .74rem; }
.table.flujo th a { color: inherit; }
.grid.align-start { align-items: start; }
.grupo { border-top: 1px solid var(--border); padding: 10px 0; }
.grupo:first-of-type { border-top: 0; }
.grupo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; cursor: default; }
details.grupo > summary.grupo-head { cursor: pointer; color: var(--text); list-style: none; }
details.grupo > summary::-webkit-details-marker { display: none; }
details.grupo > summary.grupo-head::before { content: '▸'; color: var(--muted); margin-right: -4px; }
details.grupo[open] > summary.grupo-head::before { content: '▾'; }
details.grupo > summary.grupo-head > span { flex: 1; }
.grupo-barra { height: 5px; background: var(--slate-bg); border-radius: 99px; margin: 6px 0; overflow: hidden; }
.grupo-barra span { display: block; height: 100%; background: #f87171; }
.table.compacta td { padding: 6px 4px; font-size: .85rem; }
/* ---------- Categorías ---------- */
.cat-nueva { display: grid; grid-template-columns: 1.2fr .5fr 2fr 2fr auto; gap: 12px; align-items: end; }
.cat-lista { display: flex; flex-direction: column; }
.cat-item { padding: 10px 16px; border-top: 1px solid var(--border); }
.cat-editar { display: grid; grid-template-columns: 52px 1fr 1fr auto; gap: 8px; align-items: center; }
.cat-icono { text-align: center; font-size: 1.1rem; padding: 6px; }
.cat-alias { font-size: .82rem; }
.cat-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .cat-nueva { grid-template-columns: 1fr 1fr; } .cat-editar { grid-template-columns: 52px 1fr auto; } .cat-alias { grid-column: 1 / -1; } }
@media (hover: none) { .tip { display: none !important; } }

/* ---------- Garita: vista compacta por casa ---------- */
.garita-barra { display: flex; gap: 8px; flex-wrap: wrap; }
.garita-barra input { flex: 1; min-width: 200px; font-size: 1.05rem; padding: 11px 14px; }
.garita-barra .escanear { background: #33271f; color: #fff; border-color: #33271f; }
.resumen-garita { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-res { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .88rem; color: var(--text); }
.chip-res b { font-size: 1.05rem; }
a.chip-res:hover { text-decoration: none; filter: brightness(.97); }
.chip-res.c-esperan { background: var(--amber-bg); border-color: #f1dca2; }
.chip-res.c-avisos { background: var(--blue-bg); border-color: #c7d6fb; }
.chip-res.c-dentro { background: var(--green-bg); border-color: #b9e3c6; }
.chip-res.c-morosos { background: var(--red-bg); border-color: #f5c2c2; color: var(--red); }
.leyenda-tiles { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.leyenda-tiles i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: -6px; }
.leyenda-tiles i.t-aviso { background: #3b82f6; } .leyenda-tiles i.t-visita { background: #d97706; }
.leyenda-tiles i.t-restringida { background: var(--red); } .leyenda-tiles i.t-dentro { background: var(--green); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 112px; padding: 10px 6px 8px;
        background: var(--surface); border: 2px solid var(--border); border-top-width: 6px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text);
        box-shadow: var(--shadow); transition: transform .08s ease, box-shadow .08s ease; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); outline: none; }
.tile-ico { position: absolute; top: 6px; right: 8px; font-size: 1.1rem; }
.tile-pre { font-size: .62rem; letter-spacing: .12em; color: var(--muted); font-weight: 700; min-height: .8em; }
.tile-casa { font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.tile-nombre { font-size: .76rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-estado { font-size: .7rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.t-aviso { border-color: #bfd3fb; border-top-color: #3b82f6; }
.tile.t-visita { border-color: #f1dca2; border-top-color: #d97706; }
.tile.t-restringida { border-color: #f5c2c2; border-top-color: var(--red); background: #fff7f7; }
.tile.t-restringida .tile-estado { color: var(--red); font-weight: 700; }
.tile.t-dentro { border-color: #b9e3c6; border-top-color: var(--green); background: #f6fcf7; }
.tile.t-dentro .tile-estado { color: var(--green); font-weight: 700; }
/* Ventanas emergentes */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(20, 14, 10, .55); }
dialog.modal > .card { border: 0; box-shadow: none; margin: 0; }
dialog.modal > h3, dialog.modal > p, dialog.modal > form, dialog.modal > video { margin: 16px 20px; }
dialog#escaner > h3 { margin-top: 20px; }
dialog#escaner video { display: block; width: calc(100% - 40px); border-radius: 12px; background: #000; aspect-ratio: 1; object-fit: cover; }
.modal-cerrar { position: sticky; top: 8px; float: right; margin: 8px 8px 0 0; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--slate-bg); font-size: 1rem; cursor: pointer; }
/* Pase QR del propietario */
.pase-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pase { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(51, 39, 31, .15); border: 1px solid var(--border); text-align: center; }
.pase-head { display: flex; align-items: center; gap: 10px; background: #33271f; color: #fff; padding: 14px 18px; text-align: left; }
.pase-head img { width: 32px; height: 40px; filter: brightness(1.6); }
.pase-head strong { display: block; font-family: Georgia, serif; }
.pase-head span { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #d5e1cd; }
.pase-casa { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-top: 14px; }
.pase-qr { width: 78%; max-width: 280px; margin: 6px auto 0; display: block; }
.pase-codigo { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .3em; }
.pase-datos { margin: 12px 20px; display: grid; gap: 4px; text-align: left; }
.pase-datos div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding: 4px 0; font-size: .9rem; }
.pase-datos dt { color: var(--muted); } .pase-datos dd { margin: 0; font-weight: 600; text-align: right; }
.pase-nota { color: var(--muted); font-size: .8rem; margin: 0 20px 18px; }
.pase-acciones > * + * { margin-top: 10px; }
.btn.whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
@media (max-width: 760px) { .pase-wrap { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .tile { min-height: 100px; } .tile-casa { font-size: 1.6rem; } }
dialog.modal { margin: auto !important; }
dialog.modal > .card > .row.between:first-child { padding-right: 40px; }

.restriccion-form { display: grid; grid-template-columns: 2fr 1fr 1.5fr auto; gap: 14px; align-items: end; }
.restriccion-form h3 { margin-bottom: 2px; } .restriccion-form p { margin: 0; }
@media (max-width: 900px) { .restriccion-form { grid-template-columns: 1fr; } }
.filtros-visitas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filtros-visitas .filtros-acciones { grid-column: 1 / -1; }
.tipos-resumen { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.fila-rechazo td { background: #fff7f7; }
@media (max-width: 1000px) { .filtros-visitas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.aviso-op.persona span { border-style: dashed; }
.aviso-op small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.persona-campos > * + * { margin-top: 12px; }

/* ---------- Gráfico de morosidad ---------- */
.mg-barra { display: flex; height: 34px; border-radius: 10px; overflow: hidden; background: var(--slate-bg); margin: 4px 0 14px; }
.mg-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .8rem; transition: filter .1s; }
.mg-seg:hover { filter: brightness(1.12); text-decoration: none; }
.mg-rangos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mg-rango { display: grid; grid-template-columns: 12px 1fr; gap: 2px 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.mg-rango:hover { text-decoration: none; background: var(--surface-2); }
.mg-rango.activo { border-color: var(--primary); background: var(--primary-50); }
.mg-rango i { width: 12px; height: 12px; border-radius: 3px; margin-top: 3px; grid-row: span 3; }
.mg-nombre { font-size: .8rem; color: var(--muted); }
.mg-top { margin-top: 12px; }
@media (max-width: 760px) { .mg-rangos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.reserva-area { margin: 0; } .reserva-fecha { font-size: 1.05rem; margin: 4px 0 12px; }
.monto-grande { font-size: 1.8rem; font-weight: 800; margin: 0; color: var(--primary-600); }
.pago-instr { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.acciones-reserva > * + * { margin-top: 12px; }

.tipo-multa-form { display: grid; grid-template-columns: 52px 2fr 90px 2fr auto; gap: 8px; align-items: center; }
.tipo-multa-form.nuevo { border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 900px) { .tipo-multa-form { grid-template-columns: 52px 1fr 90px auto; } .tipo-multa-form .cat-alias { grid-column: 1 / -1; } }

/* ---------- Informe del mes: tarjetas con detalle ---------- */
.stat-tip { position: relative; }
.stat-tip .tip { top: calc(100% - 6px); bottom: auto; left: 0; transform: none; }
.stat-tip .tip.tip-izq { left: auto; right: 0; }
.stat-tip:hover .tip, .stat-tip:focus .tip { display: block; }
.stats-detalle .stat:hover { border-color: var(--primary); }
:target { scroll-margin-top: 80px; animation: resaltar 1.6s ease; }
@keyframes resaltar { 0% { box-shadow: 0 0 0 4px rgba(85, 121, 79, .45); } 100% { box-shadow: var(--shadow); } }
.estado-resultados .er-sec td { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.estado-resultados .er-total td { border-top: 1px solid var(--text); }
.estado-resultados .er-res td { border-top: 2px solid var(--text); font-size: 1rem; }
.cobranza-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.cob-casa { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 8px; color: #fff; font-size: .8rem; }
.cob-casa:hover { text-decoration: none; filter: brightness(1.1); }
.cob-casa strong { font-size: 1rem; }
.cob-casa small { font-size: .65rem; opacity: .9; }
.cob-pagado { background: #16a34a; } .cob-parcial { background: #f97316; } .cob-pendiente { background: #dc2626; }
.presupuesto-tabla td, .presupuesto-tabla th { padding: 6px 6px; }
.presupuesto-tabla td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.celda-pres input { width: 74px; padding: 5px 6px; text-align: right; font-size: .85rem; }
.celda-pres small { display: block; text-align: right; font-size: .7rem; margin-top: 2px; }
.presupuesto-tabla tfoot td { background: var(--surface-2); }
.tip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.stat-tip .tip { width: 340px; max-width: calc(100vw - 40px); }
.tip-fila > span:last-child, .tip-fila > b { white-space: nowrap; flex-shrink: 0; }
.tip-fila > span:first-child { min-width: 0; }

/* Mensajes de difusión a todas las casas */
.difusion-rapidos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.difusion-rapidos form { margin: 0; }
.difusion-btn { width: 100%; justify-content: flex-start; padding: 14px; font-size: 1rem; white-space: normal; text-align: left; }
.difusion-ico { font-size: 1.5rem; line-height: 1; }
.difusion-lista { list-style: none; margin: 0; padding: 0; }
.difusion-lista li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.difusion-lista li:last-child { border-bottom: 0; }
.difusion-txt { flex: 1; min-width: 0; }

/* ---------- Caja menuda y finanzas al día ---------- */
.m0 { margin: 0; } .mt8 { margin-top: 8px; } .grow { flex: 1; min-width: 0; }
.text-amber { color: var(--amber); }
.caja-foto { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--bg, #f6f1e7); font-size: 1.6rem; flex: none; }
.caja-foto img { width: 100%; height: 100%; object-fit: cover; }
.caja-foto.sm { width: 42px; height: 42px; font-size: 1.1rem; }
.caja-pend { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.caja-pendientes { border-left: 4px solid var(--amber); }
.caja-tabla tr.tachado td:not(:nth-child(4)) { opacity: .55; }
.caja-tabla tr.tachado strong { text-decoration: line-through; }
.caja-tabla .anular summary { list-style: none; cursor: pointer; }
.caja-tabla .anular summary::-webkit-details-marker { display: none; }
.cierre-cuentas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cierre-cuentas > div:not(.op) { display: flex; flex-direction: column; }
.cierre-cuentas strong { font-size: 1.3rem; }
.cierre-cuentas .op { font-size: 1.3rem; color: var(--muted); }
.cierre-final { padding: 6px 14px; border-radius: 10px; background: var(--green-bg); }
.dia-hoy { border-left: 4px solid var(--green); }
.dia-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dia-cols h4 { margin: 0 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.dia-fila { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: .92rem; }
.dia-fila strong { white-space: nowrap; }
@media (max-width: 720px) {
  .dia-cols { grid-template-columns: 1fr; }
  .cierre-cuentas .op { display: none; }
  .cierre-cuentas > div { flex: 1 1 40%; }
}

/* Agenda de la semana e informe diario */
.agenda-nueva { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; }
.agenda-prog { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.agenda-prog .progress { flex: 1; }
.agenda-semana { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 18px; }
.agenda-dia { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.agenda-dia.hoy { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-50); }
.agenda-dia.pasado { background: var(--surface-2); }
.agenda-dia-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.agenda-dia-head h3 { font-size: 1rem; }
.agenda-atrasadas { margin-top: 18px; border-color: #f1dca2; background: var(--amber-bg); }
.tarea { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.agenda-atrasadas .tarea { background: var(--surface); }
.tarea + .tarea { margin-top: 6px; }
.tarea form { margin: 0; }
.tarea-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; }
.tarea-txt small { font-size: .75rem; }
.tarea.hecha .tarea-txt strong { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tarea-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--primary); background: var(--surface); color: #fff; font-weight: 700; cursor: pointer; display: grid; place-items: center; padding: 0; font-size: .8rem; }
.tarea.hecha .tarea-check { background: var(--primary); }
.informe-secc textarea { width: 100%; margin-top: 10px; font-size: 1rem; line-height: 1.5; }
.informe-secc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.informe-secc-head h2 { font-size: 1.1rem; }
.btn.mic { border-radius: 999px; gap: 6px; }
.btn.mic.grabando { background: var(--red); border-color: var(--red); color: #fff; animation: mic-pulso 1.4s infinite; }
@keyframes mic-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, .45); } 50% { box-shadow: 0 0 0 8px rgba(185, 28, 28, 0); } }
.mic-vivo { min-height: 1.2em; margin-top: 6px; font-style: italic; }
.informe-doc { max-width: 820px; }
.informe-doc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; padding-bottom: 14px; border-bottom: 2px solid var(--primary); margin-bottom: 6px; }
.informe-doc-secc { padding: 14px 0; border-bottom: 1px solid var(--border); }
.informe-doc-secc h3 { font-size: 1rem; color: var(--primary-600); }
.informe-doc footer { padding-top: 12px; }
.anulacion-datos { max-height: 260px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: .78rem; white-space: pre-wrap; word-break: break-word; }
.tarea.cancelada { opacity: .6; }
.tarea.cancelada strong { text-decoration: line-through; font-weight: 500; }
.tarea-ticket { color: inherit; border-left: 3px solid var(--blue); }
.tarea-ticket:hover { text-decoration: none; filter: brightness(.98); }
.tarea-ico { width: 22px; text-align: center; }
@media (max-width: 640px) { .agenda-nueva { grid-template-columns: 1fr 1fr; } .agenda-nueva input[name=titulo] { grid-column: 1 / -1; } .agenda-nueva .btn { grid-column: 1 / -1; } }
