/* =========================================================================
   DirectoryBase - sistema de diseno compartido (arquitecto).
   Las areas AÑADEN estilos en su archivo: public.css, account.css, agent.css, admin.css.
   Tokens en :root; componentes con prefijos cortos (btn, card, field, lc- tarjeta de ficha...).
   ========================================================================= */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --border: #e3e5ee;
  --border-strong: #cfd3e1;
  --text: #171a2b;
  --text-2: #4b5068;
  --muted: #6e7389;
  --primary: #0f766e;
  --primary-600: #0b5d56;
  --primary-50: #e6f4f2;
  --accent: #0f766e;
  --success: #0f9d63;
  --success-50: #e7f7f0;
  --warning: #b7791f;
  --warning-50: #fdf6e3;
  --danger: #d93355;
  --danger-50: #fdecef;
  --info: #2563eb;
  --info-50: #e8f0fe;
  --star: #f5a524;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 43, .06);
  --shadow: 0 6px 24px -8px rgba(23, 26, 43, .14);
  --shadow-lg: 0 18px 48px -12px rgba(23, 26, 43, .22);
  --container: 1240px;
  --gutter: 20px;
  --header-h: 68px;
  --focus: 0 0 0 3px rgba(15, 118, 110, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 40px 0; }
.section-title { font-size: 1.5rem; margin-bottom: 18px; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hide-sm { }
.icon { flex: none; vertical-align: middle; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-md { padding: 10px 16px; font-size: .95rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); }
.btn-link { background: none; color: var(--primary); padding-left: 0; padding-right: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.inline-form { display: inline; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges / alertas ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge-primary { background: var(--primary-50); color: var(--primary-600); }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-accent { background: var(--accent); color: #fff; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; font-size: .92rem; }
.alert > .icon { margin-top: 2px; }
.alert-title { display: block; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert p { margin: 4px 0 0; }
.alert-info { background: var(--info-50); border-color: #c9dafc; color: #1e40af; }
.alert-success { background: var(--success-50); border-color: #bfe8d6; color: #0b6b44; }
.alert-warning { background: var(--warning-50); border-color: #f2df9f; color: #8a5a10; }
.alert-danger { background: var(--danger-50); border-color: #f6c1cc; color: #9f1d3a; }

/* ---------- Tarjetas / cabeceras ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 1.05rem; margin: 0; }
.card-body { padding: 20px; }
.page-header { margin-bottom: 22px; }
.page-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { margin: 0; }
.page-subtitle { color: var(--muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.empty-state { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 16px; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.field-label .req { color: var(--danger); }
.field-label .opt { color: var(--muted); font-weight: 400; font-size: .8rem; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
textarea.input { resize: vertical; min-height: 96px; }
.has-error .input { border-color: var(--danger); }
.field-help { font-size: .8rem; color: var(--muted); margin: 5px 0 0; }
.field-error { font-size: .82rem; color: var(--danger); margin: 5px 0 0; }
.input-group { display: flex; gap: 6px; }
.fieldset, .fieldset-group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.fieldset-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 2px; }
.fieldset-group legend { font-weight: 700; padding: 0 6px; }
.check, .switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 8px 14px; }
.radio-inline { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio-stack { display: grid; gap: 8px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }
.form-errors { position: relative; }
.stars-radio { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-radio label { font-size: 1.8rem; color: var(--border-strong); cursor: pointer; line-height: 1; }
.stars-radio input:checked ~ label, .stars-radio label:hover, .stars-radio label:hover ~ label { color: var(--star); }
.stars-radio input:focus-visible + label { box-shadow: var(--focus); border-radius: 4px; }

/* ---------- Estrellas ---------- */
.stars { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.stars-track { position: relative; color: var(--border-strong); letter-spacing: 1px; font-size: .95rem; }
.stars-track::before { content: "★★★★★"; position: absolute; inset: 0; width: var(--rating, 0%); overflow: hidden; color: var(--star); white-space: nowrap; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table td .inline-form + .inline-form { margin-left: 6px; }

/* ---------- Paginacion ---------- */
.pagination-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 24px 0; }
.pagination-summary { color: var(--muted); font-size: .88rem; margin: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.page-link { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; font-size: .88rem; }
.page-link:hover { background: var(--surface-2); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Modal / toasts ---------- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.modal::backdrop { background: rgba(15, 18, 35, .5); backdrop-filter: blur(2px); }
.modal-box { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.1rem; margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--text); color: #fff; box-shadow: var(--shadow-lg); font-size: .92rem; animation: toast-in .2s ease-out; }
.toast-success { background: #0b6b44; }
.toast-error { background: #9f1d3a; }
.toast-warning { background: #8a5a10; }
.toast-info { background: #1e3a8a; }
.toast-close { background: none; border: 0; color: inherit; cursor: pointer; opacity: .8; padding: 2px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Cabecera publica ---------- */
.topbar { background: #11142a; color: #c9cbe0; font-size: .82rem; }
.topbar a { color: #e6e7f5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.topbar-contact, .topbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.social-links { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.locale-select { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 3px 8px; font: inherit; }
.topbar .locale-select option { color: var(--text); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
.site-header.has-accent { box-shadow: inset 0 3px 0 var(--accent); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none !important; }
.brand-mark { color: var(--accent); font-size: 1.2rem; }
.header-search { flex: 1 1 auto; min-width: 0; max-width: 420px; display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.header-search .hs-type { border: 0; background: transparent; font: inherit; font-size: .85rem; max-width: 120px; min-width: 0; color: var(--text-2); padding: 6px; }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: 6px; }
.header-search input:focus { outline: none; }
.main-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.site-header, .site-main, .site-footer { max-width: 100vw; }
html, body { overflow-x: clip; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list a, .nav-more summary { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; }
.nav-list a:hover, .nav-list a.active, .nav-more summary:hover { background: var(--surface-2); color: var(--text); }
.nav-list a.active { color: var(--accent); }
.nav-more { position: relative; }
.nav-more summary { list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more ul, .dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px; z-index: 60; }
.dropdown li a, .dropdown .link-button { display: flex; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; }
.dropdown li a:hover, .dropdown .link-button:hover { background: var(--surface-2); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-trigger { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text); position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary-50); color: var(--primary-600); font-weight: 800; }
.dot-badge { position: absolute; top: -4px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.nav-toggle { display: none; margin-left: auto; }
.back-to-top { position: fixed; right: 16px; bottom: 16px; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- Pie ---------- */
.site-footer { background: #11142a; color: #b9bcd3; margin-top: 60px; }
.site-footer a { color: #e6e7f5; }
.newsletter { background: linear-gradient(120deg, var(--primary) 0%, #7c3aed 100%); color: #fff; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 32px var(--gutter); }
.nl-title { color: #fff; margin-bottom: 4px; }
.newsletter p { margin: 0; opacity: .9; }
.nl-form { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-form .input { flex: 1; min-width: 200px; border-color: transparent; }
.nl-form .field { flex-basis: 100%; margin: 0; }
.nl-form .btn-primary { background: #11142a; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; padding: 44px var(--gutter); }
.footer-title { font-size: .95rem; color: #fff; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.brand-footer { color: #fff; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: .85rem; }

/* ---------- Hero / mosaicos (arranque) ---------- */
.hero { background: radial-gradient(1200px 400px at 10% -10%, #c7c3ff 0%, transparent 60%), linear-gradient(135deg, #1b1e3c, #312e81); color: #fff; padding: 72px 0 64px; }
.hero-title { font-size: clamp(2rem, 4vw, 3rem); color: #fff; }
.hero-text { font-size: 1.1rem; opacity: .9; max-width: 640px; }
.hero-search { display: flex; gap: 8px; max-width: 640px; margin-top: 22px; background: #fff; padding: 6px; border-radius: 14px; }
.hero-search .input { border: 0; }
.vertical-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.vertical-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 16px; border-radius: var(--radius-lg); overflow: hidden; color: #fff; background: var(--accent); text-decoration: none !important; box-shadow: var(--shadow); }
.vertical-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transition: transform .3s; }
.vertical-tile:hover img { transform: scale(1.05); }
.vertical-tile > span { position: relative; }
.vt-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; margin-bottom: auto; }
.vt-name { font-weight: 800; font-size: 1.1rem; }
.vt-count { font-size: .85rem; opacity: .9; }

/* ---------- Tarjeta de ficha (F-006) ---------- */
.listing-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.listing-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.listing-grid.view-list { grid-template-columns: 1fr; }
.listing-card { --accent: var(--primary); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; height: 100%; }
.listing-card:hover, .listing-card.is-highlighted { box-shadow: var(--shadow); transform: translateY(-2px); }
.listing-card.view-list { flex-direction: row; }
.listing-card.view-list .lc-media { width: 38%; min-width: 220px; aspect-ratio: auto; }
.lc-media { position: relative; aspect-ratio: 16 / 11; background: var(--surface-2); overflow: hidden; }
.carousel, .carousel-track { height: 100%; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: var(--shadow-sm); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.lc-media:hover .carousel-btn, .carousel-btn:focus-visible { opacity: 1; }
.lc-noimg { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.lc-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.lc-fav-form { position: absolute; top: 8px; right: 8px; margin: 0; }
.fav-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--text-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .1s, color .15s; }
.fav-btn:hover { transform: scale(1.06); }
.fav-btn.is-active { color: var(--danger); }
.fav-btn.is-active svg { fill: currentColor; }
.lc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.lc-vertical { margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.lc-title { font-size: 1.02rem; margin: 0; }
.lc-title a { color: var(--text); }
.lc-title a::after { content: ""; position: absolute; inset: 0; }
.listing-card { position: relative; }
.lc-media .carousel-btn, .lc-fav-form, .lc-cta { position: relative; z-index: 2; }
.lc-media .carousel-btn { position: absolute; }
.lc-fav-form { position: absolute; }
.lc-location { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: .86rem; }
.lc-fields { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.lc-fields li { font-size: .78rem; background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; }
.lc-fields .open-now { background: var(--success-50); color: var(--success); font-weight: 600; }
.lc-fields .closed-now { background: var(--danger-50); color: var(--danger); font-weight: 600; }
.lc-footer { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--border); }
.lc-price { margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.lc-price strong { font-size: 1.1rem; color: var(--text); }
.lc-price del { color: var(--muted); font-size: .85rem; }
.lc-suffix { color: var(--muted); font-size: .82rem; }

/* ---------- Atributos dinamicos ---------- */
.attr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0; }
.attr-item { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.attr-item dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.attr-item dd { margin: 2px 0 0; font-weight: 600; }
.filter-group { border: 0; padding: 0; margin: 0 0 16px; }
.filter-group legend { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.filter-group .check { display: flex; margin-bottom: 6px; }
.chip-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Mapa ---------- */
.map { width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); z-index: 0; }
.map-popup { display: grid; gap: 4px; min-width: 180px; }
.map-popup img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; }
.map-popup strong { font-size: .92rem; }

/* ---------- Paneles ---------- */
.layout-panel .site-main { padding-top: 24px; }
.panel-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.panel-aside { position: sticky; top: calc(var(--header-h) + 16px); }
.panel-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.panel-nav-group + .panel-nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.panel-nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 6px 10px; }
.panel-nav ul { list-style: none; margin: 0; padding: 0; }
.panel-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: .9rem; text-decoration: none; }
.panel-nav a:hover { background: var(--surface-2); color: var(--text); }
.panel-nav a.active { background: var(--primary-50); color: var(--primary-600); font-weight: 700; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; }
.panel-logout { margin: 8px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--border); color: var(--text-2); font-size: .9rem; }
.panel-menu-btn { display: none; }
.usage { display: grid; gap: 6px; }
.usage-row { display: flex; justify-content: space-between; font-size: .88rem; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--primary); }
.usage-link { font-size: .85rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.kpi-label { font-size: .8rem; color: var(--muted); }
.kpi-value { font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); }

/* ---------- Admin ---------- */
.layout-admin { background: #f4f5fa; }
.admin-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.admin-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.admin-topbar .locale-select { color: var(--text); border-color: var(--border-strong); }
.admin-topbar .bell { position: relative; }
.admin-topbar .bell .dot-badge { left: 22px; top: 0; }
.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.admin-aside { border-right: 1px solid var(--border); background: var(--surface); padding: 12px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.admin-aside .panel-nav { border: 0; padding: 0; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-menu-btn { display: none; }

/* ---------- Checkout / auth / error ---------- */
.layout-checkout { background: var(--surface-2); }
.checkout-header { padding: 18px var(--gutter); }
.checkout-main { max-width: 860px; padding-bottom: 60px; }
.auth-wrap { display: grid; place-items: center; padding: 48px var(--gutter); }
.auth-card { width: min(460px, 100%); }
.auth-alt { margin-top: 16px; text-align: center; }
.demo-hint { font-size: .8rem; text-align: center; margin-top: 10px; }
.error-page { text-align: center; padding: 80px var(--gutter); }
.error-code { font-size: 4.5rem; font-weight: 900; color: var(--primary); margin: 0; font-family: var(--font-display); line-height: 1; }
.error-msg { color: var(--text-2); font-size: 1.05rem; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Contenido enriquecido ---------- */
.prose { line-height: 1.7; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose blockquote { border-left: 4px solid var(--primary); margin: 1em 0; padding: .4em 1em; background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .listing-grid.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .header-search { max-width: 300px; }
}
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 18px; }
  .main-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .main-nav .nav-more ul, .main-nav .dropdown { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .nav-actions { flex-wrap: wrap; }
  .header-search { max-width: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 18px; }
  .main-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-more ul, .dropdown { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .nav-actions { flex-wrap: wrap; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-bottom: 10px; }
  .header-inner { flex-wrap: wrap; }
  .listing-grid, .listing-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-shell { grid-template-columns: 1fr; }
  .panel-menu-btn { display: inline-flex; }
  .panel-aside { position: static; display: none; }
  .panel-aside.is-open { display: block; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-menu-btn { display: inline-flex; }
  .admin-aside { display: none; position: fixed; top: 60px; left: 0; bottom: 0; width: 280px; z-index: 45; box-shadow: var(--shadow-lg); }
  .admin-aside.is-open { display: block; }
  .admin-main { padding: 20px var(--gutter) 60px; }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hide-sm { display: none !important; }
  .listing-grid, .listing-grid.cols-2, .listing-grid.cols-4 { grid-template-columns: 1fr; }
  .listing-card.view-list { flex-direction: column; }
  .listing-card.view-list .lc-media { width: 100%; min-width: 0; aspect-ratio: 16 / 11; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 48px 0; }
  .hero-search { flex-direction: column; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table td { border: 0; padding: 6px 14px; }
  .table td::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
  .check-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Demo (DEMO_MODE=1) ---------- */
.demo-banner { background: #fff7e0; color: #5c4400; border-bottom: 1px solid #f1d98a; font-size: .85rem; text-align: center; padding: 6px var(--gutter); }
.demo-banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.demo-accounts { margin-top: 22px; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.demo-accounts-title { font-size: 1rem; margin: 0 0 4px; }
.demo-accounts-list { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 8px; }
.demo-accounts-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.demo-accounts-list code, .demo-accounts code { overflow-wrap: anywhere; }

/* ---- Publilisto: portada generada, ficha sin reclamar y bloque de Google Maps ---- */
.cover-art { position: relative; height: 100%; min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 8px; overflow: hidden;
  color: #fff; background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, transparent 55%),
  linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #111827)); }
.cover-art::before { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 14px); }
.cover-initials { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: .04em; line-height: 1;
  width: 86px; height: 86px; display: grid; place-items: center; border-radius: 22px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); }
.cover-label { position: relative; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .92; padding: 0 12px; text-align: center; }
.cover-hero { min-height: 220px; border-radius: var(--radius-lg); margin: 12px 0 8px; }
.cover-hero .cover-initials { width: 110px; height: 110px; font-size: 3.2rem; border-radius: 28px; }
.unclaimed-note { display: flex; gap: 6px; align-items: flex-start; font-size: .85rem; margin: 10px 0 14px; }
.gplace-rating { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.gplace-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gplace-photos figure { margin: 0; }
.gplace-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.gplace-photos figcaption { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.gplace-hours { columns: 2; font-size: .85rem; padding-left: 18px; }
.gplace-attr { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: .8rem; margin: 10px 0 0; }
