/* ==========================================================================
   Hera Gestor — sistema de diseño "Google-like con marca Hera"
   Tokens reales de heracode.com (hera.css). WCAG AA: ver PLAN_GESTOR.md §3.
   ========================================================================== */

@font-face { font-family: 'Saira'; src: url('../fonts/Saira.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inconsolata'; src: url('../fonts/Inconsolata.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #2d2270;  --ink-2: #1f1850;  --ink-soft: #efedfa;
  --green: #00ea8c;  --green-text: #00794f;  --green-soft: #e3fbf1;
  --coral: #fe6472;  --coral-text: #c82f44;  --coral-soft: #ffe8eb;
  --amber-text: #8a5a00;  --amber-soft: #fff4d6;
  --body: #4b4766;  --faint: #666280;
  --bg: #ffffff;  --soft: #fbfaff;  --line: #ece9f5;  --line-2: #f0eef7;
  --r: 18px;  --r-sm: 10px;
  --shadow: 0 1px 0 rgba(45,34,112,.04);
  --shadow-lg: 0 30px 70px -30px rgba(45,34,112,.35);
  --head: 'Saira', system-ui, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Inconsolata', ui-monospace, Menlo, Consolas, monospace;
  --topbar: 60px;  --sidenav: 236px;  --bottomnav: 64px;
  --focus: 0 0 0 2px #fff, 0 0 0 4px var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--soft); color: var(--body); font: 15px/1.5 var(--text); }
h1, h2, h3 { font-family: var(--head); color: var(--ink); margin: 0 0 .35rem; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }  h2 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
a { color: var(--ink); }
small { font-size: 12px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--faint); }  .small { font-size: 13px; }  .mono { font-family: var(--mono); }
.inline { display: inline; }  .wrap { word-break: break-all; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; }

/* --- Barra superior ------------------------------------------------------ */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar); background: var(--bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px; z-index: 20; }
.brand img { height: 28px; width: auto; display: block; }
.client-switch { flex: 1; display: flex; justify-content: center; min-width: 0; }
.client-switch__btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 40px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: 500 14px/1 var(--text); cursor: pointer; }
.client-switch__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-switch__btn:hover { background: var(--soft); }
@media (max-width: 480px) { .client-switch__btn span { display: none; } .client-switch__btn { padding: 0 10px; gap: 4px; } }
.topbar__user { display: flex; align-items: center; gap: 4px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px/1 var(--head); display: inline-grid; place-items: center; flex: 0 0 auto; }
.avatar--soft { background: var(--ink-soft); color: var(--ink); }
.iconbtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--faint); border-radius: 50%; cursor: pointer; }
.iconbtn:hover, .iconbtn.is-active { background: var(--ink-soft); color: var(--ink); }

/* --- Navegación lateral (escritorio) y inferior (móvil) ------------------- */
.sidenav { position: fixed; top: var(--topbar); left: 0; bottom: 0; width: var(--sidenav); background: var(--bg); border-right: 1px solid var(--line); padding: 14px 12px; display: none; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; color: var(--body); text-decoration: none; font-weight: 500; }
.sidenav a:hover { background: var(--soft); }
.sidenav a.is-active { background: var(--ink-soft); color: var(--ink); }
.sidenav a.is-soon { color: #a7a2c4; pointer-events: none; }
.sidenav a small { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #a7a2c4; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--bottomnav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); display: flex; z-index: 20; }
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--faint); text-decoration: none; min-height: 44px; }
.bottomnav a .icon { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; }
.bottomnav a.is-active { color: var(--ink); }
.bottomnav a.is-active .icon { background: var(--ink-soft); }
.bottomnav a.is-soon { color: #b8b3d3; pointer-events: none; }

/* --- Contenido ----------------------------------------------------------- */
.main { padding: calc(var(--topbar) + 16px) 16px calc(var(--bottomnav) + 28px); }
.main__inner { max-width: 1100px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title h2 { margin: 0; }
.footnote { margin-top: 20px; }

@media (min-width: 900px) {
  .sidenav { display: flex; }
  .bottomnav { display: none; }
  .main { margin-left: var(--sidenav); padding: calc(var(--topbar) + 28px) 32px 48px; }
  h1 { font-size: 2rem; }
}

/* --- Tarjetas, rejillas, listas ------------------------------------------ */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card--table { padding: 6px 12px; overflow-x: auto; }
.grid { display: grid; gap: 12px; }
.grid--tiles { grid-template-columns: repeat(2, 1fr); }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid--tiles { grid-template-columns: repeat(3, 1fr); } .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .grid--tiles { grid-template-columns: repeat(6, 1fr); } }

.stat { display: flex; flex-direction: column; gap: 6px; text-decoration: none; min-height: 96px; padding: 16px; transition: border-color .15s, transform .15s; }
.stat:hover { border-color: #cfc9ea; transform: translateY(-1px); }
.stat__num { font: 600 2.1rem/1 var(--head); color: var(--ink); }
.stat__label { font-size: 13px; color: var(--faint); line-height: 1.3; }
.stat--alert .stat__num { color: var(--coral-text); }
.stat--alert { border-color: #ffd0d6; background: #fffafb; }

.list { list-style: none; margin: 0; padding: 0; }
.list__row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.list__row:first-child { border-top: 0; }
.list__body { flex: 1; min-width: 0; }
.list__title { font-weight: 600; color: var(--ink); }
.list__sub { color: var(--faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stars { font-size: 14px; letter-spacing: 1px; color: #e0a100; white-space: nowrap; }
.stars__off { color: #dcd8ee; }

.empty { text-align: center; padding: 36px 16px; color: var(--faint); }
.empty .icon { width: 56px; height: 56px; color: #c9c3e6; margin-bottom: 6px; }
.empty p { margin: 0 0 6px; }
.empty .btn { margin-top: 12px; }

/* --- Botones, chips, badges ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 600 14px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn .icon { width: 20px; height: 20px; margin-left: -4px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink-soft); }
.btn-block { width: 100%; justify-content: center; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--line-2); color: var(--body); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ink { background: var(--ink-soft); color: var(--ink); }
.badge-green { background: var(--green-soft); color: var(--green-text); }
.badge-coral { background: var(--coral-soft); color: var(--coral-text); }
.badge-amber { background: var(--amber-soft); color: var(--amber-text); }
.devchip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; margin-right: 4px; }
.devchip--blocked { background: var(--coral-soft); color: var(--coral-text); border: 1px solid #ffd0d6; }
.devchip--warn { background: var(--amber-soft); color: var(--amber-text); border: 1px solid #ffe4a8; }
@media (max-width: 480px) { .devchip span { display: none; } .devchip { padding: 0 8px; } }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* --- Formularios y avisos ------------------------------------------------ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid #d8d3ec; border-radius: var(--r-sm); background: var(--bg); color: var(--body); font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-soft); }
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; font-weight: 500; border: 1px solid transparent; transition: opacity .5s; }
.flash.is-hiding { opacity: 0; }
.flash--error { background: var(--coral-soft); color: var(--coral-text); border-color: #ffd0d6; }
.flash--success { background: var(--green-soft); color: var(--green-text); border-color: #bff2dc; }
.flash--info { background: var(--ink-soft); color: var(--ink); border-color: #dcd7f3; }
.flash--warning { background: var(--amber-soft); color: var(--amber-text); border-color: #ffe4a8; }

/* --- Tablas y pares clave/valor ----------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line-2); vertical-align: top; }
.tbl thead th { border-top: 0; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.kv > div:first-child { border-top: 0; }
.kv__k { color: var(--faint); }  .kv__v { text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* --- Alta guiada -------------------------------------------------------- */
.steps { display: grid; gap: 12px; max-width: 760px; }
.step { position: relative; padding-left: 64px; }
.step__num { position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: var(--ink-2); font: 700 15px/32px var(--head); text-align: center; }
.quote { background: var(--soft); border-left: 3px solid var(--green); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 12px 14px; }
.quote p:last-child { margin: 0; }
.copyable { cursor: pointer; background: var(--ink-soft); padding: 2px 8px; border-radius: 6px; color: var(--ink); }

/* --- Login --------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--soft); }
.login__card { width: 100%; max-width: 400px; padding: 32px 28px; }
.login__logo { display: block; margin: 0 auto 18px; height: 40px; width: auto; }
.login__title { text-align: center; }
.login__sub { text-align: center; color: var(--faint); margin-bottom: 22px; }

/* --- Selector de cliente (details/summary, sin JS) ------------------------ */
.switch { position: relative; max-width: 100%; }
.switch > summary { list-style: none; }
.switch > summary::-webkit-details-marker { display: none; }
.switch[open] > summary { background: var(--ink-soft); }
.switch__panel { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); min-width: 280px; max-width: min(92vw, 420px); max-height: 70vh; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 8px; z-index: 30; display: flex; flex-direction: column; gap: 2px; }
.switch__item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--body); font: 500 14px/1.3 var(--text); cursor: pointer; text-decoration: none; min-height: 44px; }
.switch__item:hover { background: var(--soft); }
.switch__item.is-active { background: var(--ink-soft); color: var(--ink); font-weight: 600; }
.switch__item--add { color: var(--ink); border-top: 1px solid var(--line-2); border-radius: 0 0 12px 12px; margin-top: 4px; }
.avatar--xs { width: 26px; height: 26px; font-size: 11px; }
@media (max-width: 480px) { .switch__panel { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar) + 8px); transform: none; max-width: none; } }

/* --- Chips de filtro, reseñas, layout principal+lateral ------------------ */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips--wrap { margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--body); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip:hover { background: var(--soft); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip__n { font-family: var(--mono); font-weight: 500; opacity: .8; }
.list__row--review { align-items: flex-start; }
.review__meta { display: flex; flex-direction: column; gap: 2px; min-width: 84px; }
.list__sub--wrap { white-space: normal; }
.grid--main-side { grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .grid--main-side { grid-template-columns: minmax(0, 1fr) 320px; } }
.grid--main-side aside { display: flex; flex-direction: column; gap: 12px; }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li a { display: flex; align-items: center; gap: 8px; padding: 8px 0; text-decoration: none; font-weight: 500; border-top: 1px solid var(--line-2); }
.linklist li:first-child a { border-top: 0; }
.kv--small { font-size: 13px; }
.review__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.review__text, .review__reply, .draft blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--line); background: var(--soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 15px; line-height: 1.6; }
.review__reply { border-left-color: var(--green); }
.draft { margin-bottom: 10px; }
.actions--col { flex-direction: column; margin-top: 0; }
.actions--head { margin-top: 0; }
.btn-danger { color: var(--coral-text); }
.btn-danger:hover { background: var(--coral-soft); }
.form .grid { margin-bottom: 12px; }
.field textarea { min-height: 88px; resize: vertical; }
.field--check label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--body); }
.field--check input { width: 18px; height: 18px; accent-color: var(--ink); }
.field select { appearance: auto; }
a.plain { text-decoration: none; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }
.draft-form .field textarea { min-height: 180px; font-size: 15px; line-height: 1.6; }
/* --- Estado del sistema y avisos (Hoy) ----------------------------------- */
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--body); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.status--ok { background: var(--green-soft); color: var(--green-text); }
.status--warn { background: var(--amber-soft); color: var(--amber-text); }
.status--bad { background: var(--coral-soft); color: var(--coral-text); }
.status--lock { background: var(--coral-soft); color: var(--coral-text); }
.status--lock::before { display: none; }
.notice__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); margin-top: 8px; flex: 0 0 auto; }
.notice--urgent .notice__dot { background: var(--coral); }
.notice--daily .notice__dot { background: var(--ink); }
.btn-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
/* --- Fotos y vídeos ------------------------------------------------------ */
.media-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 700px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
.media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.media-card__thumb { position: relative; aspect-ratio: 4 / 3; background: var(--line-2); }
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card__tag { position: absolute; left: 10px; top: 10px; }
.media-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.media-card__form .field { margin-bottom: 8px; }
.media-card--rejected .media-card__thumb, .media-card--error .media-card__thumb { opacity: .55; }
.text-coral { color: var(--coral-text); }
.field input[type=file] { padding: 8px; }
/* --- Horarios ------------------------------------------------------------- */
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-ghost.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.hours-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hours-form__custom { display: inline-flex; gap: 4px; align-items: center; }
.hours-form__custom input[type=time] { min-height: 34px; padding: 4px 6px; border: 1px solid #d8d3ec; border-radius: 8px; font: inherit; font-size: 13px; width: 96px; }
.tbl--hours td { vertical-align: middle; }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-inline .field { margin: 0; min-width: 140px; flex: 1 1 140px; }
/* --- Posts ---------------------------------------------------------------- */
.post-card__text { white-space: pre-line; margin: 6px 0 8px; }
.media-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-pick__item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--faint); cursor: pointer; border: 2px solid transparent; border-radius: 10px; padding: 4px; text-align: center; }
.media-pick__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.media-pick__item input { position: absolute; opacity: 0; width: 0; height: 0; }
.media-pick__item:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); color: var(--ink); }
.media-pick__item:has(input:focus-visible) { box-shadow: var(--focus); }
.draft__meta { margin-bottom: 8px; }
details.card > summary { cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* --- Administración (F8) ------------------------------------------------- */
.subnav { margin: -4px 0 16px; }
.tbl .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.tbl th.num { font-family: var(--text); }
.tbl .nowrap { white-space: nowrap; }
.kv__v .copyable { overflow-wrap: anywhere; }
.kv-head { margin: 18px 0 4px; }
.tbl .wrap, .kv__v.wrap { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.tbl--compact { font-size: 13px; }
.tbl--compact th, .tbl--compact td { padding: 7px 6px; }
.tbl tr.is-current td { background: var(--ink-soft); }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bar { position: relative; height: 8px; min-width: 60px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.bar--green > span { background: var(--green); }
.bar--amber > span { background: var(--amber-text); }
.bar--coral > span { background: var(--coral); }
.progress { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.progress .bar { flex: 1; height: 10px; }
.budget-card { margin-top: 12px; }
.budget-card p { margin: 8px 0 0; }
.month-nav { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.month-nav__label { margin: 0; }
.help, .field .help { display: block; color: var(--faint); font-size: 12px; margin-top: 5px; line-height: 1.4; }
.field .error { display: block; color: var(--coral-text); font-size: 12px; font-weight: 600; margin-top: 5px; }
.field.has-error input, .field.has-error select { border-color: var(--coral); }
.check-inline { display: flex !important; align-items: center; gap: 8px; margin-top: 8px; font-weight: 500 !important; color: var(--body) !important; font-size: 13px; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--ink); min-height: 0; }
.settings-group .grid--2 { margin-bottom: 4px; }
.pricing-grid input { min-height: 38px; padding: 6px 8px; border: 1px solid #d8d3ec; border-radius: 8px; font: inherit; font-size: 13px; width: 100%; min-width: 70px; }
.pricing-grid td.num input { text-align: right; font-family: var(--mono); }
.pricing-grid td:first-child input { min-width: 180px; }
.pricing-grid input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-soft); }
a.avatar { text-decoration: none; }
a.avatar:hover, a.avatar.is-active { box-shadow: 0 0 0 3px var(--ink-soft); }
.menu-list { padding: 4px 20px; }
.menu-list a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--line-2); text-decoration: none; font-weight: 600; color: var(--ink); }
.menu-list a:first-child { border-top: 0; }
.menu-list .icon { width: 24px; height: 24px; color: var(--faint); }
.user-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.user-card--off { opacity: .75; }
.user-card .form-inline .field--check { flex: 0 0 auto; min-width: 0; padding-bottom: 12px; }
.user-card .kv--small { margin-top: 6px; }

/* --- Informes (F9) -------------------------------------------------------- */
.card--preview { padding: 8px; background: var(--soft); }
.report-frame { display: block; width: 100%; height: 78vh; min-height: 560px; border: 0; border-radius: 12px; background: #fff; }
.steps-plain { padding-left: 18px; margin: 0; }
.steps-plain li { margin-bottom: 6px; }
@media (min-width: 1100px) { .grid--tiles { grid-template-columns: repeat(7, 1fr); } }

/* --- Vista previa de post (huecos) --------------------------------------- */
.post-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.post-preview__img { aspect-ratio: 4 / 3; background: var(--line-2) center / cover no-repeat; }
.post-preview__body { padding: 12px 14px 14px; }
.post-preview__client { font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.post-preview__title { font: 600 15px/1.3 var(--head); color: var(--ink); margin-bottom: 4px; }
.post-preview__text { font-size: 14px; line-height: 1.5; white-space: pre-line; max-height: 9.5em; overflow: hidden; }
.post-preview__cta { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ink); color: var(--ink); font-size: 13px; font-weight: 600; }

/* --- Comprobación previa de subida (Fotos) --------------------------------- */
.upcheck { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; }
.upcheck__item { padding: 6px 0; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }
.upcheck__item:first-child { border-top: 0; }
.upcheck__item.is-ok { color: var(--green-text); }
.upcheck__item.is-bad { color: var(--coral-text); }

/* --- Servicios contratados ------------------------------------------------- */
.svc-list { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.svc-list li { padding: 6px 0; border-top: 1px solid var(--line-2); }
.svc-list li:first-child { border-top: 0; }
.svc-list li.is-on { color: var(--green-text); font-weight: 600; }
.svc-list li.is-off { color: var(--faint); }

/* --- Envíos a Google (ensayo en seco) -------------------------------------- */
.attempt { margin-top: 4px; }
.attempt > summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.attempt__body { margin: 6px 0 0; padding: 10px 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }

/* Formularios con fieldset (Administración → Escrituras en Google): sin borde; atenuado cuando está desactivado por el tope */
.fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset-plain:disabled { opacity: .55; }
.fieldset-plain:disabled .btn { pointer-events: none; }

/* Vigilancia de la ficha (2026-09-30): comparación ficha / Google o antes / ahora */
.watch-list { display: grid; gap: 12px; }
.watch-bulk { margin: 0 0 10px; }
.watch-card.is-seen { opacity: .85; }
.watch-card__title { margin: 4px 0 2px; font-size: 1.05rem; }
.watch-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.watch-compare > div, .watch-note { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0; }
.watch-compare p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.watch-note { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .watch-compare { grid-template-columns: 1fr; } }
.media-dups { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.media-bulk { margin: 0 0 12px; align-items: center; }
.media-dup { gap: 6px; margin-top: 8px; }
.settings-test { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
/* --- Historial de la ficha ------------------------------------------------ */
.hist-filters { margin-bottom: 10px; }
.hist-filters .small { margin: 10px 0 0; }
.hist-tbl .hist-val { min-width: 120px; max-width: 280px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hist-tbl .hist-who { min-width: 150px; }
.hist-tbl .hist-who .badge { margin: 0 4px 4px 0; }
.hist-claim { margin-top: 6px; }
@media (max-width: 640px) { /* en el móvil cada registro es una tarjeta: sin desplazamiento lateral */
  .hist-tbl thead, .hist-tbl .hist-none { display: none; }
  .hist-tbl, .hist-tbl tbody, .hist-tbl tr, .hist-tbl td { display: block; width: 100%; }
  .hist-tbl tr { padding: 10px 0; border-top: 1px solid var(--line-2); }
  .hist-tbl tr:first-child { border-top: 0; }
  .hist-tbl td { border-top: 0; padding: 3px 0; }
  .hist-tbl .hist-val, .hist-tbl .hist-who { min-width: 0; max-width: none; }
  .hist-tbl td[data-k]::before { content: attr(data-k); display: block; color: var(--faint); font-size: 12px; }
}
.hist-more summary { cursor: pointer; }
.hist-more[open] summary { color: var(--faint); margin-bottom: 4px; }

/* --- Copias de seguridad de las fichas ------------------------------------ */
.bk-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bk-photo { margin: 0; min-width: 0; }
.bk-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--line-2); display: block; margin-bottom: 4px; }
.bk-photo figcaption { overflow-wrap: anywhere; }
.bk-item { border-top: 1px solid var(--line-2); padding: 10px 0; min-width: 0; overflow-wrap: anywhere; }
.bk-item:first-of-type { border-top: 0; }
.bk-text { white-space: pre-line; }
.bk-reply { background: var(--soft); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 6px; }
.bk-row { flex-wrap: wrap; }
.bk-row__actions { gap: 6px; }

.mcp-newkey { border-color: var(--green); }
.mcp-command { display: block; padding: 10px 12px; overflow-wrap: anywhere; white-space: normal; }
