/* Privada Orquídeas — hoja única, sin build. Móvil primero. */
:root {
  --plum: #4a1d52;
  --plum-2: #6b2c74;
  --orchid: #b8326f;
  --orchid-soft: #f7e3ec;
  --leaf: #2f6b4f;
  --leaf-soft: #e1efe7;
  --red: #a8322d;
  --red-soft: #f8e1df;
  --amber: #8a5a00;
  --amber-soft: #fbefd5;
  --ink: #261c29;
  --ink-2: #5a4d5e;
  --line: #e6dde3;
  --bg: #fbf7f2;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(38, 28, 41, .06), 0 6px 20px rgba(38, 28, 41, .06);
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --fs: 1.0625rem;
}
html[data-text="grande"] { --fs: 1.25rem; }
html[data-text="enorme"] { --fs: 1.45rem; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: var(--fs); line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--plum-2); text-underline-offset: 3px; }
a:hover { color: var(--orchid); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--plum); margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { font-size: 1.15em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orchid); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--plum); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .875em; }

/* ── Botones y formularios ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .6em 1.15em; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; background: var(--plum); color: #fff; transition: background .15s, transform .15s; }
.btn:hover { background: var(--plum-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--orchid { background: var(--orchid); }
.btn--orchid:hover { background: #9c2a5e; }
.btn--ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn--ghost:hover { background: var(--plum); color: #fff; }
.btn--light { background: #fff; color: var(--plum); }
.btn--light:hover { background: var(--orchid-soft); color: var(--plum); }
.btn--leaf { background: var(--leaf); }
.btn--leaf:hover { background: #245740; }
.btn--danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; }
.btn--sm { min-height: 38px; padding: .35em .9em; font-size: .9em; }
.btn--block { width: 100%; }

.field { margin-bottom: 1.1rem; }
.field label, .label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field .hint { font-size: .85em; color: var(--ink-2); margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 48px; padding: .6em .8em; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 10px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--plum-2); outline: none; box-shadow: 0 0 0 3px var(--orchid-soft); }
input[type=file] { font: inherit; width: 100%; padding: .6em; border: 2px dashed var(--line); border-radius: 10px; background: #fff; }
.check { display: flex; align-items: center; gap: .6em; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--plum); }
.error { color: var(--red); font-size: .9em; margin-top: .3rem; font-weight: 700; }
.is-invalid { border-color: var(--red) !important; }
.grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.alert { padding: .9em 1.1em; border-radius: 12px; margin-bottom: 1.2rem; border-left: 5px solid; }
.alert--ok { background: var(--leaf-soft); border-color: var(--leaf); color: #1d4632; }
.alert--err { background: var(--red-soft); border-color: var(--red); color: #6e1f1b; }
.alert--info { background: var(--orchid-soft); border-color: var(--orchid); color: var(--plum); }
.alert ul { margin: .3em 0 0; padding-left: 1.2em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.badge { display: inline-block; padding: .15em .65em; border-radius: 999px; font-size: .8em; font-weight: 700; white-space: nowrap; }
.badge--in, .badge--resuelto { background: var(--leaf-soft); color: var(--leaf); }
.badge--out, .badge--abierto { background: var(--red-soft); color: var(--red); }
.badge--en_proceso { background: var(--amber-soft); color: var(--amber); }
.badge--role { background: var(--orchid-soft); color: var(--plum); }
.badge--off { background: #eee; color: #555; }

/* ── Portada pública ── */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(251, 247, 242, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--plum); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.1; }
.brand svg { width: 38px; height: 38px; flex-shrink: 0; }
.brand small { display: block; font-family: var(--font); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orchid); }
.head-actions { display: flex; align-items: center; gap: .5rem; }
.textsize { display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.textsize button { min-width: 40px; min-height: 38px; border: 0; background: transparent; border-radius: 999px; font: inherit; font-weight: 700; color: var(--plum); cursor: pointer; }
.textsize button[aria-pressed=true] { background: var(--plum); color: #fff; }
@media (min-width: 560px) { .textsize { display: flex; } }

.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #7a3386 0%, transparent 60%), linear-gradient(160deg, var(--plum) 0%, #2e1233 100%); color: #fff; }
.hero .wrap { position: relative; padding-top: clamp(3rem, 9vw, 6rem); padding-bottom: clamp(3rem, 9vw, 6rem); display: grid; gap: 2rem; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.3fr 1fr; } }
.hero h1 { color: #fff; }
.hero .eyebrow { display: inline-block; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: #f3bfd5; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.15em; color: #f1e6f2; max-width: 36em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-art { justify-self: center; width: min(340px, 80vw); opacity: .95; }
.hero-art svg { width: 100%; height: auto; }

.section { padding: clamp(3rem, 8vw, 5rem) 0; }
.section--tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 2rem; }
.section-head .eyebrow { color: var(--orchid); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.pillars { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.pillar svg { width: 40px; height: 40px; color: var(--orchid); margin-bottom: .6rem; }
.about-text p { white-space: pre-line; }

.rules { list-style: none; counter-reset: regla; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .rules { grid-template-columns: 1fr 1fr; } }
.rules li { counter-increment: regla; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.2rem 1.1rem 4.2rem; box-shadow: var(--shadow); }
.rules li::before { content: counter(regla); position: absolute; left: 1.1rem; top: 1.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--orchid-soft); color: var(--plum); font-weight: 700; display: grid; place-items: center; font-family: var(--serif); }
.rules h3 { margin-bottom: .3em; }
.rules p { margin: 0; color: var(--ink-2); white-space: pre-line; }

.info-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .info-grid { grid-template-columns: 1fr 1fr 1fr; } }
.portal-cta { background: linear-gradient(135deg, var(--leaf) 0%, #1f4c37 100%); color: #fff; border-radius: 20px; padding: clamp(1.5rem, 5vw, 2.5rem); display: grid; gap: 1rem; align-items: center; }
.portal-cta h2 { color: #fff; }
@media (min-width: 760px) { .portal-cta { grid-template-columns: 1fr auto; } }
.site-foot { padding: 2rem 0 2.5rem; color: var(--ink-2); font-size: .9em; border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ── Login ── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 400px at 100% 0%, var(--orchid-soft), transparent 60%), var(--bg); }
.auth .card { width: 100%; max-width: 420px; padding: 1.75rem; }
.auth .brand { justify-content: center; margin-bottom: 1.5rem; }

/* ── App ── */
.app-head { background: var(--plum); color: #fff; position: sticky; top: 0; z-index: 30; }
.app-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 62px; }
.app-head .brand { color: #fff; font-size: 1.05rem; }
.app-head .brand small { color: #f3bfd5; }
.app-head .brand svg { width: 32px; height: 32px; }
.nav { display: none; gap: .25rem; align-items: center; }
.nav a, .nav button { color: #f1e6f2; text-decoration: none; font-weight: 700; padding: .5em .8em; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a[aria-current=page] { background: rgba(255, 255, 255, .18); color: #fff; }
.menu-toggle { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.menu-toggle::-webkit-details-marker { display: none; }
.mobile-nav { position: relative; }
.mobile-nav .panel { position: absolute; right: 0; top: 54px; width: min(280px, calc(100vw - 32px)); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: .5rem; display: grid; }
.mobile-nav .panel a, .mobile-nav .panel button { color: var(--ink); text-decoration: none; font-weight: 700; padding: .75em 1em; border-radius: 10px; min-height: 48px; text-align: left; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; width: 100%; }
.mobile-nav .panel a[aria-current=page] { background: var(--orchid-soft); color: var(--plum); }
.mobile-nav .panel hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
@media (min-width: 900px) { .nav { display: flex; } .mobile-nav { display: none; } }

.page { padding: 1.5rem 0 4rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.stats { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); min-width: 0; }
.stat .label { font-size: .8em; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.stat .value { font-family: var(--serif); font-size: clamp(1.25rem, 4.5vw, 1.8rem); font-weight: 600; color: var(--plum); overflow-wrap: anywhere; }
.stat--main { grid-column: 1 / -1; background: linear-gradient(135deg, var(--plum), #2e1233); color: #fff; border: 0; }
.stat--main .label { color: #f3bfd5; }
.stat--main .value { color: #fff; font-size: clamp(1.8rem, 7vw, 2.6rem); }
@media (min-width: 900px) { .stat--main { grid-column: auto; } }
.pos { color: var(--leaf) !important; }
.neg { color: var(--red) !important; }

.cols { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: 1.4fr 1fr; } }
.card h2 { font-size: 1.2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card h2 a { font-family: var(--font); font-size: .8rem; font-weight: 700; }

.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; height: 160px; margin-top: .5rem; }
.bar-group { display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bar { width: 42%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar--in { background: var(--leaf); }
.bar--out { background: var(--orchid); }
.bar-group span { font-size: .75em; color: var(--ink-2); }
.legend { display: flex; gap: 1rem; font-size: .85em; color: var(--ink-2); margin-top: .6rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3em; vertical-align: -1px; }

/* Listas que en móvil son tarjetas y en escritorio filas */
.list { display: grid; gap: .6rem; }
.row { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; text-decoration: none; color: inherit; }
a.row:hover { border-color: var(--plum-2); color: inherit; }
.row .title { font-weight: 700; overflow-wrap: anywhere; }
.row .meta { font-size: .85em; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .2rem .7rem; }
.row .amount { font-family: var(--serif); font-weight: 600; font-size: 1.1em; text-align: right; white-space: nowrap; }
.row .row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.card .list .row { box-shadow: none; }

.filters { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.filters .field { margin: 0; }
.filters .full { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters { grid-template-columns: 160px 170px 1fr 1fr auto; align-items: end; } .filters .full { grid-column: auto; } }

.tabs { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: 2px; }
.tabs a { white-space: nowrap; padding: .45em 1em; border-radius: 999px; border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; min-height: 42px; display: inline-flex; align-items: center; background: #fff; }
.tabs a[aria-current=page] { background: var(--plum); border-color: var(--plum); color: #fff; }

.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.1rem; }
.type-switch label { display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; cursor: pointer; background: #fff; }
.type-switch input { position: absolute; opacity: 0; }
.type-switch input:checked + span { color: inherit; }
.type-switch label:has(input:checked) { border-color: currentColor; }
.type-switch .in:has(input:checked) { background: var(--leaf-soft); color: var(--leaf); }
.type-switch .out:has(input:checked) { background: var(--red-soft); color: var(--red); }
.type-switch label:has(input:focus-visible) { outline: 3px solid var(--orchid); outline-offset: 2px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.photos a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: #eee; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.creds { background: var(--leaf-soft); border: 2px solid var(--leaf); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.creds code { font-size: 1.1em; background: #fff; padding: .15em .5em; border-radius: 6px; user-select: all; }
.rule-edit { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--bg); margin-bottom: .75rem; }
.rule-edit .rule-tools { display: flex; gap: .4rem; justify-content: flex-end; }
.pager { margin-top: 1rem; }
.pager nav { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-2); }
.inline-form { display: inline; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.detail dt { font-weight: 700; color: var(--ink-2); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.info-grid .card + .card { margin-top: 0; }
.stat--wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .stat--wide { grid-column: auto; } }

/* ── Navegación v2: menús desplegables y contadores ── */
@media (min-width: 900px) { .nav { display: none; } .mobile-nav { display: block; } }
@media (min-width: 1100px) { .nav { display: flex; } .mobile-nav { display: none; } }
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; color: #f1e6f2; font-weight: 700; padding: .5em .8em; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; gap: .3em; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:hover, .dd > summary.is-active, .dd[open] > summary { background: rgba(255, 255, 255, .15); color: #fff; }
.dd-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: .4rem; display: grid; z-index: 40; }
.dd-panel a, .dd-panel button { color: var(--ink) !important; text-decoration: none; font-weight: 700; padding: .7em .9em; border-radius: 10px; min-height: 44px; text-align: left; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; width: 100%; display: flex; align-items: center; }
.dd-panel a:hover, .dd-panel button:hover { background: var(--orchid-soft) !important; }
.dd-panel a[aria-current=page] { background: var(--orchid-soft); color: var(--plum) !important; }
.dot-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: .35em; border-radius: 999px; background: var(--orchid); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; }
.menu-toggle { position: relative; }
.dot-count--float { position: absolute; top: -4px; right: -4px; margin: 0; border: 2px solid var(--plum); }

/* ── Cuotas: 12 cuadritos por casa ── */
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.mcell { aspect-ratio: 1; border-radius: 5px; display: grid; place-items: center; font-size: .66rem; font-weight: 700; background: #f0ebee; color: #8a7d8d; min-width: 0; }
.mcell--pagado { background: var(--leaf); color: #fff; }
.mcell--adelantado { background: #7fb79a; color: #fff; }
.mcell--parcial { background: #f2c14e; color: #4d3500; }
.mcell--adeudo { background: var(--red); color: #fff; }
.mcell--pendiente { background: #fff; border: 2px dashed #b9aab9; color: #6d5f70; }
.months-head .mcell { background: none; color: var(--ink-2); aspect-ratio: auto; }
.cuota-row { display: grid; grid-template-columns: 1fr; gap: .55rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.cuota-row .top { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.cuota-row .house { font-weight: 700; font-size: 1.05em; }
.cuota-row .debt { font-family: var(--serif); font-weight: 600; white-space: nowrap; }
.cuota-row .acts { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (min-width: 900px) {
  .cuota-row { grid-template-columns: minmax(130px, 1fr) 400px 190px 330px; align-items: center; }
  .cuota-row .acts { justify-content: flex-end; }
  .cuota-row .top { display: contents; }
}
.legend-cells { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85em; color: var(--ink-2); margin: .5rem 0 1rem; }
.legend-cells span { display: inline-flex; align-items: center; gap: .35em; }
.legend-cells .mcell { width: 16px; height: 16px; aspect-ratio: auto; }
.year-nav { display: flex; align-items: center; gap: .5rem; }
.year-nav strong { font-family: var(--serif); font-size: 1.25rem; color: var(--plum); min-width: 3.5ch; text-align: center; }
.house-edit summary { cursor: pointer; list-style: none; }
.house-edit summary::-webkit-details-marker { display: none; }
.house-edit[open] { border-color: var(--plum-2); }

/* ── Avisos y reservas ── */
.announcement--pinned { border-left: 5px solid var(--orchid); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: .75em; font-weight: 700; color: var(--ink-2); padding: .2rem 0; }
.cal .day { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; font-size: .95em; }
.cal a.day:hover { border-color: var(--plum-2); color: var(--plum); }
.cal .day--past { background: #f6f2f4; color: #b2a6b4; }
.cal .day--today { border: 2px solid var(--plum); }
.cal .day--busy { background: var(--orchid-soft); }
.cal .day i { width: 6px; height: 6px; border-radius: 50%; background: var(--orchid); }
.cal .day--empty { border: 0; background: none; }
.badge--pendiente { background: var(--amber-soft); color: var(--amber); }
.badge--aprobada { background: var(--leaf-soft); color: var(--leaf); }
.badge--rechazada, .badge--cancelada { background: #eee; color: #555; }
.mcell { position: relative; }
.mcell--recargo::after { content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: #f2c14e; box-shadow: 0 0 0 1.5px #fff; }
.tier-rows { display: grid; gap: .4rem; }
.tier-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tier-head span { font-weight: 700; font-size: .85em; color: var(--ink-2); }
.hint { font-size: .85em; color: var(--ink-2); margin-top: .3rem; }

/* ── Bitácora (super admin) ── */
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--plum-2); }
@media (min-width: 900px) { .stats--5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 900px) { .filters--log { grid-template-columns: repeat(5, 1fr); } .filters--log .full { grid-column: span 2; } .filters--log .full:last-child { grid-column: span 3; } }
.log-row { padding: 0; }
.log-row--bad { border-left: 4px solid var(--red); }
.log-sum { list-style: none; cursor: pointer; display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; }
.log-sum::-webkit-details-marker { display: none; }
.log-icon { font-size: 1.2em; line-height: 1.4; flex-shrink: 0; }
.log-main { display: grid; gap: .2rem; min-width: 0; }
.log-detail { padding: 0 1rem .9rem 3rem; }
.log-diff { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .9rem; margin: 0; font-size: .92em; }
.log-diff dt { font-weight: 700; color: var(--ink-2); }
.log-diff dd { margin: 0; overflow-wrap: anywhere; }
.log-diff del { color: var(--red); background: var(--red-soft); text-decoration: line-through; padding: 0 .25em; border-radius: 4px; }
.log-diff ins { color: var(--leaf); background: var(--leaf-soft); text-decoration: none; padding: 0 .25em; border-radius: 4px; }
.log-detail code { font-size: .85em; overflow-wrap: anywhere; }
@media (max-width: 560px) { .log-detail { padding-left: 1rem; } .log-diff { grid-template-columns: 1fr; } .log-diff dd { margin-bottom: .35rem; } }
.health { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .health { grid-template-columns: repeat(3, 1fr); } }
.health-card { margin: 0 !important; }
.health-card .label { font-size: .8em; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.health-card .value { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--plum); }
.health-card--warn { border-left: 4px solid #f2c14e; }
.health-card--bad { border-left: 4px solid var(--red); }
.filters > * { min-width: 0; }

/* ── Logo subido por el super admin ── */
.brand img.brand-logo { height: 40px; width: auto; max-width: 120px; object-fit: contain; flex-shrink: 0; }
.app-head .brand img.brand-logo { height: 36px; max-width: 110px; background: #fff; border-radius: 8px; padding: 3px; }
.auth .brand img.brand-logo { height: 64px; max-width: 200px; }
.logo-current { display: grid; place-items: center; min-height: 140px; background: repeating-conic-gradient(#f0ebee 0 25%, #fff 0 50%) 0 0/20px 20px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: .75rem; }
.logo-current img { max-height: 120px; max-width: 80%; object-fit: contain; }
.logo-previews { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.logo-prev { border-radius: 12px; padding: 1rem; display: grid; place-items: center; gap: .4rem; font-size: .8em; font-weight: 700; }
.logo-prev img { max-height: 48px; max-width: 120px; object-fit: contain; }
.logo-prev--light { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.logo-prev--dark { background: var(--plum); color: #f3bfd5; }
.brand-logo-box { background: #fff; border-radius: 8px; padding: 3px; display: inline-flex; }
