/* Stayroom — sistema visual propio. Sin dependencias externas (CSP estricta).
   Pensado para jornadas largas: fondos luminosos sin blanco puro de fondo, texto casi negro
   (no negro), color con significado y siempre acompañado de texto o símbolo. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Superficies */
  --bg: #f3f6f9;
  --bg-tint: #eaf6f5;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #ebeff4;
  --border: #e1e7ee;
  --border-strong: #cad3de;
  --text: #17212b;
  --text-2: #354352;
  --muted: #5d6a79;

  /* Marca: mar (verde azulado) + sol (coral y ámbar) */
  --primary: #0e7c86;
  --primary-hover: #0a6a73;
  --primary-ink: #ffffff;
  --primary-soft: #e0f3f3;
  --primary-soft-2: #c4e8e8;
  --coral: #f26b4f;
  --coral-ink: #b8402a;
  --coral-soft: #fdeae5;
  --sun: #f5a524;
  --sun-soft: #fff3da;
  --violet: #6a55c9;
  --violet-soft: #efecfb;

  /* Estados */
  --ok: #157a3c;
  --ok-soft: #e2f5e8;
  --ok-fill: #22a05a;
  --warn: #965a00;
  --warn-soft: #fff1d6;
  --warn-fill: #f0a020;
  --danger: #c22f28;
  --danger-soft: #fde6e4;
  --danger-fill: #e0483f;
  --info: #2459a8;
  --info-soft: #e4eefb;
  --info-fill: #3a7bd5;
  --muted-soft: #eceff3;

  /* Canales (barras del calendario: texto blanco con contraste AA) */
  --ch-booking: #1f5fbf;
  --ch-airbnb: #c93a53;
  --ch-expedia: #9a6510;
  --ch-vrbo: #3b4cc0;
  --ch-direct: #0b7a5a;
  --ch-manual: #6d4fc2;
  --blocked: #6b7686;
  --conflict: #c22f28;
  --bar-ink: #ffffff;

  /* Forma */
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-xs: 0 1px 2px rgba(23, 33, 43, .05);
  --shadow: 0 1px 2px rgba(23, 33, 43, .04), 0 6px 20px -8px rgba(23, 33, 43, .10);
  --shadow-lg: 0 10px 40px -12px rgba(23, 33, 43, .28);
  --ring: 0 0 0 3px rgba(14, 124, 134, .28);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --sidebar-w: 256px;
  --topbar-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b; --bg-tint: #10211f; --surface: #161e26; --surface-2: #1b242e; --surface-3: #222c37;
    --border: #28333f; --border-strong: #364352; --text: #e5ebf1; --text-2: #c3cdd7; --muted: #9aa7b5;
    --primary: #36b9bd; --primary-hover: #5ccbce; --primary-ink: #06201f; --primary-soft: #153337; --primary-soft-2: #1d4448;
    --coral: #f2846c; --coral-ink: #f59a86; --coral-soft: #3a211c; --sun: #f5b347; --sun-soft: #352a14;
    --violet: #a596ee; --violet-soft: #26213f;
    --ok: #5fd08f; --ok-soft: #15301f; --ok-fill: #2aa862; --warn: #f0b85a; --warn-soft: #372a12; --warn-fill: #e0a030;
    --danger: #f2837a; --danger-soft: #3c1d1b; --danger-fill: #e0564d; --info: #82b1ef; --info-soft: #1a2a40; --info-fill: #4a88dc;
    --muted-soft: #222b35; --blocked: #5d6876; --conflict: #d23f37;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .45);
    --shadow-lg: 0 14px 44px -12px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(54, 185, 189, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151b; --bg-tint: #10211f; --surface: #161e26; --surface-2: #1b242e; --surface-3: #222c37;
  --border: #28333f; --border-strong: #364352; --text: #e5ebf1; --text-2: #c3cdd7; --muted: #9aa7b5;
  --primary: #36b9bd; --primary-hover: #5ccbce; --primary-ink: #06201f; --primary-soft: #153337; --primary-soft-2: #1d4448;
  --coral: #f2846c; --coral-ink: #f59a86; --coral-soft: #3a211c; --sun: #f5b347; --sun-soft: #352a14;
  --violet: #a596ee; --violet-soft: #26213f;
  --ok: #5fd08f; --ok-soft: #15301f; --ok-fill: #2aa862; --warn: #f0b85a; --warn-soft: #372a12; --warn-fill: #e0a030;
  --danger: #f2837a; --danger-soft: #3c1d1b; --danger-fill: #e0564d; --info: #82b1ef; --info-soft: #1a2a40; --info-fill: #4a88dc;
  --muted-soft: #222b35; --blocked: #5d6876; --conflict: #d23f37;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .45);
  --shadow-lg: 0 14px 44px -12px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(54, 185, 189, .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: .9375rem; line-height: 1.55;
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: .97rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .86em; }
.num, .table td, .stat-value, .cal, .kv dd { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.pre-line { white-space: pre-line; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 1rem; color: var(--primary-ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft-2); }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.icon-lg { width: 1.4rem; height: 1.4rem; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border); padding: 1rem .8rem .8rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: .25rem; z-index: 30;
}
.brand { display: flex; align-items: center; gap: .65rem; padding: .2rem .45rem .9rem; font-weight: 750; font-size: 1.04rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none;
  background: radial-gradient(circle at 74% 26%, var(--sun) 0 18%, transparent 19%), linear-gradient(140deg, #19b3b0, #0e7c86 60%, #0b5f7a);
  box-shadow: 0 4px 12px -4px rgba(14, 124, 134, .6);
}
.brand-mark svg { width: 20px; height: 20px; }
.org-chip { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: .55rem; text-decoration: none; color: var(--text); }
.org-chip:hover { border-color: var(--border-strong); color: var(--text); }
.org-chip .avatar { width: 28px; height: 28px; font-size: .78rem; }
.org-chip .org-text { min-width: 0; line-height: 1.25; }
.org-chip strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-chip span { font-size: .74rem; color: var(--muted); }
.sidebar .btn-new { width: 100%; margin-bottom: .4rem; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: .7rem; padding: .44rem .6rem; border-radius: var(--radius-sm); color: var(--text-2);
  text-decoration: none; font-size: .92rem; font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.nav a .icon { width: 1.15rem; height: 1.15rem; color: var(--muted); transition: color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a:hover .icon { color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary-hover); font-weight: 650; }
.nav a.active .icon { color: var(--primary); }
.nav a.active::before { content: ""; position: absolute; left: -.8rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav .count { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; border-radius: 999px; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; background: var(--muted-soft); color: var(--text-2); }
.nav .count.danger { background: #c22f28; color: #fff; } /* rojo fijo: con --danger-fill el blanco no llegaba al contraste AA */
.nav .count.warn { background: var(--sun); color: #3d2600; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: .8rem .6rem .25rem; }
.sidebar-foot { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .6rem; }
.sidebar-foot .who { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-foot .who strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { font-size: .75rem; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: var(--primary-hover); background: var(--primary-soft); flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: .75rem; height: var(--topbar-h); padding: 0 1.5rem;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 650; font-size: .98rem; display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.search { position: relative; flex: 1; max-width: 460px; }
.search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type=search] { padding-left: 2.4rem; padding-right: 2.2rem; background: var(--surface-2); border-color: transparent; min-height: 40px; }
.search input:hover { border-color: var(--border); }
.search input:focus { background: var(--surface); }
.search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); }
kbd { font-family: var(--font); font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .38rem; line-height: 1.4; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 1.25rem; height: 1.25rem; }
.icon-btn .dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger-fill); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
[data-theme-toggle] .sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .sun { display: block; }
  :root:not([data-theme="light"]) [data-theme-toggle] .moon { display: none; }
}
.content { padding: 1.6rem 1.75rem 3rem; width: 100%; max-width: 1360px; }
.menu-toggle { display: none; }
.backdrop { display: none; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(10, 18, 26, .42); z-index: 25; }
  .menu-toggle { display: inline-grid; }
  .content { padding: 1.1rem 1rem 2.5rem; }
  .topbar { padding: 0 .6rem; gap: .25rem; }
  .topbar-title { display: block; }
  .topbar .search { display: none; }
  .search-link { display: inline-grid; }
  .hide-mobile { display: none; }
}
@media (min-width: 961px) { .search-link { display: none; } }

/* ---------- Encabezado de página ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap; }
.page-header .ph-main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.page-header .ph-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.page-header .ph-icon .icon { width: 1.4rem; height: 1.4rem; }
.page-header .ph-text { min-width: 0; }
.page-header h1 { margin: 0; overflow-wrap: anywhere; }
.page-header p { margin: .2rem 0 0; color: var(--muted); max-width: 75ch; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .86rem; color: var(--muted); text-decoration: none; margin-bottom: .4rem; }
.back-link:hover { color: var(--primary); }
@media (max-width: 640px) { .page-header .ph-icon { display: none; } h1 { font-size: 1.4rem; } }

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.35rem; margin-bottom: 1.1rem; min-width: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft-2); color: inherit; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: .8rem; }
.card .card { box-shadow: none; background: var(--surface-2); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .85rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.card-head h2 .icon { color: var(--primary); }
.card-head a:not(.btn) { font-size: .86rem; font-weight: 550; text-decoration: none; display: inline-flex; align-items: center; gap: .2rem; }
.card-head a:not(.btn):hover { text-decoration: underline; }
.card-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); box-shadow: inset 4px 0 0 var(--danger-fill), var(--shadow); }
.card-warn { box-shadow: inset 4px 0 0 var(--warn-fill), var(--shadow); }
.card-demo { border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); }

.grid { display: grid; gap: 1.1rem; }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + .grid, .card + .grid, .grid + .demo-banner { margin-top: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Cifras ---------- */
.stat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; gap: .85rem; align-items: flex-start; min-width: 0; color: inherit; text-decoration: none; }
a.stat { transition: transform .15s var(--ease), box-shadow .15s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.stat-icon .icon { width: 1.3rem; height: 1.3rem; }
.stat-body { min-width: 0; display: block; }
.stat-body > span { display: block; }
.stat-label { font-size: .82rem; color: var(--muted); font-weight: 550; }
.stat-value { font-size: 1.6rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; margin-top: .1rem; }
.stat-hint { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.tone-coral .stat-icon, .tile-icon.tone-coral { background: var(--coral-soft); color: var(--coral-ink); }
.tone-sun .stat-icon, .tile-icon.tone-sun { background: var(--sun-soft); color: var(--warn); }
.tone-ok .stat-icon, .tile-icon.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-violet .stat-icon, .tile-icon.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-info .stat-icon, .tile-icon.tone-info { background: var(--info-soft); color: var(--info); }
.tone-danger .stat-icon, .tile-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-warn .stat-icon, .tile-icon.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-primary .stat-icon, .tile-icon.tone-primary { background: var(--primary-soft); color: var(--primary); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .45rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-xs); transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.05rem; height: 1.05rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 2px rgba(14, 124, 134, .3), 0 4px 12px -6px rgba(14, 124, 134, .6); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--surface); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 32px; padding: .25rem .65rem; font-size: .84rem; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; min-height: 0; font-weight: 550; text-decoration: underline; box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
form.inline { display: inline; }

.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.segmented a { border: 0; background: transparent; padding: .3rem .75rem; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--text-2); text-decoration: none; min-height: 30px; display: inline-flex; align-items: center; }
.segmented a:hover { color: var(--text); }
.segmented a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.segmented { max-width: 100%; flex-wrap: wrap; }

/* ---------- Etiquetas de estado ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .32rem; padding: .12rem .58rem; border-radius: 999px; font-size: .76rem;
  font-weight: 650; white-space: nowrap; background: var(--muted-soft); color: var(--text-2); line-height: 1.5; vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary-hover); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.demo { background: var(--warn-soft); color: var(--warn); border: 1px dashed currentColor; letter-spacing: .04em; font-size: .68rem; }
.badge.demo::before, .badge.plain::before { display: none; }
.badge.ch-booking { background: color-mix(in srgb, var(--ch-booking) 13%, var(--surface)); color: color-mix(in srgb, var(--ch-booking) 80%, #000); }
.badge.ch-airbnb { background: color-mix(in srgb, var(--ch-airbnb) 13%, var(--surface)); color: color-mix(in srgb, var(--ch-airbnb) 80%, #000); }
.badge.ch-expedia { background: color-mix(in srgb, var(--ch-expedia) 14%, var(--surface)); color: color-mix(in srgb, var(--ch-expedia) 80%, #000); }
.badge.ch-vrbo { background: color-mix(in srgb, var(--ch-vrbo) 13%, var(--surface)); color: color-mix(in srgb, var(--ch-vrbo) 80%, #000); }
.badge.ch-direct { background: color-mix(in srgb, var(--ch-direct) 13%, var(--surface)); color: color-mix(in srgb, var(--ch-direct) 80%, #000); }
.badge.ch-manual { background: color-mix(in srgb, var(--ch-manual) 13%, var(--surface)); color: color-mix(in srgb, var(--ch-manual) 80%, #000); }
:root[data-theme="dark"] .badge.ch-booking { background: color-mix(in srgb, var(--ch-booking) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-booking) 40%, #fff); } 
:root[data-theme="dark"] .badge.ch-airbnb { background: color-mix(in srgb, var(--ch-airbnb) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-airbnb) 40%, #fff); } 
:root[data-theme="dark"] .badge.ch-expedia { background: color-mix(in srgb, var(--ch-expedia) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-expedia) 40%, #fff); } 
:root[data-theme="dark"] .badge.ch-vrbo { background: color-mix(in srgb, var(--ch-vrbo) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-vrbo) 40%, #fff); } 
:root[data-theme="dark"] .badge.ch-direct { background: color-mix(in srgb, var(--ch-direct) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-direct) 40%, #fff); } 
:root[data-theme="dark"] .badge.ch-manual { background: color-mix(in srgb, var(--ch-manual) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-manual) 40%, #fff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.ch-booking { background: color-mix(in srgb, var(--ch-booking) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-booking) 40%, #fff); }
  :root:not([data-theme="light"]) .badge.ch-airbnb { background: color-mix(in srgb, var(--ch-airbnb) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-airbnb) 40%, #fff); }
  :root:not([data-theme="light"]) .badge.ch-expedia { background: color-mix(in srgb, var(--ch-expedia) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-expedia) 40%, #fff); }
  :root:not([data-theme="light"]) .badge.ch-vrbo { background: color-mix(in srgb, var(--ch-vrbo) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-vrbo) 40%, #fff); }
  :root:not([data-theme="light"]) .badge.ch-direct { background: color-mix(in srgb, var(--ch-direct) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-direct) 40%, #fff); }
  :root:not([data-theme="light"]) .badge.ch-manual { background: color-mix(in srgb, var(--ch-manual) 30%, var(--surface)); color: color-mix(in srgb, var(--ch-manual) 40%, #fff); }
}

/* ---------- Avisos ---------- */
.alert { display: flex; gap: .7rem; align-items: flex-start; border-radius: var(--radius-md); padding: .85rem 1rem; margin-bottom: 1.1rem; border: 1px solid transparent; }
.alert > .icon { width: 1.25rem; height: 1.25rem; margin-top: .05rem; }
.alert-body { min-width: 0; flex: 1; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.alert a { color: inherit; font-weight: 650; }
.demo-banner {
  display: flex; gap: .7rem; align-items: flex-start; border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); color: var(--warn);
  background: repeating-linear-gradient(-45deg, var(--warn-soft), var(--warn-soft) 14px, color-mix(in srgb, var(--warn-soft) 55%, var(--surface)) 14px, color-mix(in srgb, var(--warn-soft) 55%, var(--surface)) 28px);
  border-radius: var(--radius-md); padding: .75rem 1rem; font-weight: 550; margin-bottom: 1.1rem;
}
.demo-banner > .icon { margin-top: .15rem; width: 1.2rem; height: 1.2rem; }

.toasts { position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: .65rem; align-items: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--ok-fill); border-radius: var(--radius-md); padding: .8rem .9rem; box-shadow: var(--shadow-lg); animation: toast-in .28s var(--ease); }
.toast > .icon { color: var(--ok); width: 1.25rem; height: 1.25rem; margin-top: .05rem; }
.toast p { margin: 0; flex: 1; }
.toast .icon-btn { width: 28px; height: 28px; margin: -.25rem -.35rem 0 0; }
.toast.leaving { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: start; }
.form-row > .actions { align-self: end; }
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .35rem; color: var(--text-2); }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .3rem; line-height: 1.45; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: .5rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: .93rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: var(--ring); }
input[readonly] { background: var(--surface-2); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; color: var(--text); }
.check input { margin-top: .18rem; flex: none; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .25rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 0; }
legend { padding: 0 .35rem; font-weight: 600; }
.w-auto { width: auto; }

/* Opciones grandes (modo de precios, automatizaciones) */
.choice-list { display: grid; gap: .6rem; }
.choice { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem .95rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; margin: 0; font-weight: 500; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 70%, var(--surface)); }
.choice:has(input:disabled) { cursor: default; }
.choice input { margin-top: .2rem; flex: none; }
.choice strong { display: block; color: var(--text); }
.choice .hint { display: block; margin-top: .1rem; }
.choice .tile-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .055em; color: var(--muted); font-weight: 650; padding: .6rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table th:first-child { border-top-left-radius: var(--radius-xs); }
.table th:last-child { border-top-right-radius: var(--radius-xs); }
.table th.right { text-align: right; }
.table td { padding: .7rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
.table .row-link { font-weight: 650; text-decoration: none; color: var(--text); }
.table .row-link:hover { color: var(--primary); text-decoration: underline; }
.table td.right form + form { margin-left: .3rem; }
.table tr.total td { background: var(--surface-2); }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto .8rem; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty-icon .icon { width: 1.6rem; height: 1.6rem; }
.empty h3 { color: var(--text); font-size: 1.02rem; }
.empty p { max-width: 52ch; margin-left: auto; margin-right: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .65rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.list li:last-child { border-bottom: none; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }

dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.2rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .87rem; }
dl.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

details > summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: .4rem; color: var(--primary); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: .15rem; }
details[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: .75rem; }
details.panel { border: 1px solid var(--border); border-radius: var(--radius-md); padding: .85rem 1rem; background: var(--surface); }
details.panel > summary { display: flex; width: 100%; }
details.panel[open] { box-shadow: var(--shadow); }
details.danger-zone > summary { color: var(--danger); }

/* Menús desplegables (details) */
.menu { position: relative; }
.menu > summary { list-style: none; color: inherit; }
.menu > summary::before { display: none; }
.menu[open] > summary { margin: 0; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 40; animation: toast-in .16s var(--ease); }
.menu-panel .menu-head { padding: .5rem .65rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; line-height: 1.3; }
.menu-panel .menu-head strong { display: block; }
.menu-panel .menu-head span { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--text); }
.menu-panel .icon { color: var(--muted); }

/* Diálogo de atajos */
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(10, 18, 26, .45); }
.shortcuts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1rem; margin: 0 0 1rem; align-items: center; }
.shortcuts dt { display: flex; gap: .25rem; }
.shortcuts dd { margin: 0; color: var(--text-2); }

/* ---------- Panel ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.45rem 1.6rem; margin-bottom: 1.1rem; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(245, 165, 36, .38) 0, transparent 46%), linear-gradient(120deg, #0b6f7a 0%, #0c7d84 50%, #12928d 100%);
  box-shadow: 0 12px 32px -16px rgba(11, 111, 122, .7);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
}
.hero::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 320px; height: 160px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .08); pointer-events: none; }
.hero h1 { color: #fff; font-size: 1.6rem; margin-bottom: .25rem; }
.hero p { margin: 0; color: rgba(255, 255, 255, .9); }
.hero .actions { position: relative; z-index: 1; }
.hero .btn:not(.btn-primary) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); color: #fff; box-shadow: none; }
.hero .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .24); }
.hero .btn-primary { background: #fff; color: #0b5f6a; border-color: #fff; }
.hero .btn-primary:hover { background: #effafa; color: #0b5f6a; }
:root[data-theme="dark"] .hero { background: radial-gradient(120% 140% at 100% 0%, rgba(245, 165, 36, .22) 0, transparent 46%), linear-gradient(120deg, #0b4c55 0%, #0c6468 50%, #0f7a75 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: radial-gradient(120% 140% at 100% 0%, rgba(245, 165, 36, .22) 0, transparent 46%), linear-gradient(120deg, #0b4c55 0%, #0c6468 50%, #0f7a75 100%); } }

.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
@media (max-width: 1100px) { .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .today-grid { gap: .6rem; } .today-grid .stat { padding: .8rem; gap: .6rem; flex-direction: column; } .today-grid .stat-icon { width: 34px; height: 34px; } .today-grid .stat-value { font-size: 1.35rem; } }

.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.attention li { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.attention .tile-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.attention .att-text { min-width: 0; flex: 1; line-height: 1.35; }
.attention .att-text strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.attention .att-text span { font-size: .8rem; color: var(--muted); }
.all-good { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: var(--radius-md); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.all-good .icon { width: 1.4rem; height: 1.4rem; }

.mov { list-style: none; margin: 0; padding: 0; }
.mov li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.mov li:first-child { padding-top: 0; }
.mov li:last-child { border-bottom: 0; padding-bottom: 0; }
.mov .when { width: 50px; flex: none; text-align: center; border-radius: 10px; padding: .3rem 0; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mov .when.in { background: var(--primary-soft); color: var(--primary-hover); }
.mov .when.out { background: var(--coral-soft); color: var(--coral-ink); }
.mov .when .icon { display: block; margin: 0 auto .1rem; width: 1rem; height: 1rem; }
.mov .who { min-width: 0; flex: 1; line-height: 1.35; }
.mov .who a { font-weight: 650; text-decoration: none; color: var(--text); }
.mov .who a:hover { color: var(--primary); text-decoration: underline; }
.mov .who span { display: block; font-size: .8rem; color: var(--muted); }
.mov .mov-side { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .mov li { flex-wrap: wrap; } .mov .mov-side { width: 100%; justify-content: flex-start; padding-left: calc(50px + .75rem); } }

.occ-chart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; align-items: end; height: 140px; margin-top: .4rem; }
.occ-chart .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.occ-chart .bar-bg { width: 100%; max-width: 30px; flex: 1; background: var(--surface-3); border-radius: 7px; overflow: hidden; display: flex; align-items: flex-end; }
.occ-chart .bar-bg > span { display: block; width: 100%; background: linear-gradient(180deg, #19b3b0, var(--primary)); border-radius: 7px; }
.occ-chart .col.weekend .bar-bg > span { background: linear-gradient(180deg, #ff9a7d, var(--coral)); }
.occ-chart .d { font-size: .66rem; color: var(--muted); line-height: 1.15; text-align: center; }
.occ-chart .d b { display: block; color: var(--text-2); font-size: .74rem; }
.occ-chart .col.today .d b { color: var(--primary); }
.h0 { height: 0; } .h5 { height: 5%; } .h10 { height: 10%; } .h15 { height: 15%; } .h20 { height: 20%; } .h25 { height: 25%; } .h30 { height: 30%; }
.h35 { height: 35%; } .h40 { height: 40%; } .h45 { height: 45%; } .h50 { height: 50%; } .h55 { height: 55%; } .h60 { height: 60%; } .h65 { height: 65%; }
.h70 { height: 70%; } .h75 { height: 75%; } .h80 { height: 80%; } .h85 { height: 85%; } .h90 { height: 90%; } .h95 { height: 95%; } .h100 { height: 100%; }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
.legend-inline { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.legend-inline i.wk { background: var(--coral); }
.legend-inline i.wd { background: var(--primary); }

.mode-bars { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); margin: .5rem 0 .6rem; gap: 2px; }
.mode-bars span { display: block; height: 100%; }
.mode-bars .m-manual, .mode-legend .m-manual { background: var(--blocked); }
.mode-bars .m-recommend, .mode-legend .m-recommend { background: var(--info-fill); }
.mode-bars .m-autopilot, .mode-legend .m-autopilot { background: var(--sun); }
.mode-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); }
.mode-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.kpi { padding: .65rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.kpi .stat-label { font-size: .74rem; }
.kpi strong { display: block; font-size: 1.15rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .stat-hint { font-size: .74rem; }

/* Primeros pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.steps li { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.steps li.done { background: var(--surface-2); }
.steps li.done .step-text strong { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.steps .step-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .82rem; background: var(--primary-soft); color: var(--primary-hover); }
.steps li.done .step-mark { background: var(--ok-fill); color: #fff; }
.steps .step-text { flex: 1; min-width: 0; line-height: 1.35; }
.steps .step-text strong { display: block; font-size: .92rem; }
.steps .step-text span { font-size: .8rem; color: var(--muted); }
@media (max-width: 520px) { .steps li { flex-wrap: wrap; } .steps li .btn { margin-left: calc(28px + .75rem); } }

/* ---------- Calendario ---------- */
.toolbar { display: flex; align-items: center; gap: .5rem .6rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .7rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.toolbar .sep { flex: 1; }
.toolbar input, .toolbar select { min-height: 36px; width: auto; font-size: .88rem; padding-top: .3rem; padding-bottom: .3rem; }
.toolbar .period { font-weight: 650; font-size: .95rem; padding: 0 .3rem; white-space: nowrap; }
.toolbar label { margin: 0; }
.toolbar form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; min-height: 36px; padding: .3rem .7rem; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.cal { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); max-height: max(420px, calc(100vh - 250px)); }
.cal table { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: fixed; }
.cal th, .cal td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0; }
.cal thead th { font-size: .7rem; color: var(--muted); font-weight: 600; padding: .3rem .15rem .4rem; text-align: center; background: var(--surface-2); position: sticky; top: 0; z-index: 3; line-height: 1.2; text-transform: capitalize; }
.cal thead th .dn { display: block; font-size: .98rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; margin: 1px auto 0; width: 1.9rem; border-radius: 8px; }
.cal thead th .mn { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); font-weight: 750; min-height: .85rem; }
.cal thead th.weekend { background: color-mix(in srgb, var(--coral-soft) 75%, var(--surface-2)); }
.cal thead th.weekend .dn { color: var(--coral-ink); }
.cal thead th.today .dn { color: var(--primary-ink); background: var(--primary); }
.cal .unit-col { position: sticky; left: 0; background: var(--surface); z-index: 2; width: 180px; padding: .4rem .7rem; text-align: left; font-size: .86rem; box-shadow: 1px 0 0 var(--border); }
.cal thead .unit-col { z-index: 4; background: var(--surface-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; vertical-align: bottom; }
.cal .unit-col a { font-weight: 650; color: var(--text); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .unit-col a:hover { color: var(--primary); text-decoration: underline; }
.cal .unit-col small { display: block; color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.cal .group-row th { background: var(--surface-3); text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: .3rem 0; font-weight: 700; }
.cal .group-name { position: sticky; left: .7rem; display: inline-block; }
.cell { height: 52px; padding: 0; font-size: .76rem; position: relative; vertical-align: middle; text-align: center; }
.cal.d7 thead th:not(.unit-col) { width: 120px; }
.cal.d14 thead th:not(.unit-col) { width: 72px; }
.cal.d30 thead th:not(.unit-col) { width: 54px; }
.cal.d30 .cell { font-size: .7rem; }
.cell.weekend { background: color-mix(in srgb, var(--coral-soft) 32%, transparent); }
.cell.today { box-shadow: inset 2px 0 0 var(--primary); }
.cell .free-link, .cell .free-view { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text); text-decoration: none; padding: .15rem; line-height: 1.25; transition: background .12s; }
.cell .free-link:hover { background: var(--primary-soft); color: var(--text); }
.cell .free-link:hover .plus { opacity: 1; }
.cell .plus { position: absolute; top: 3px; right: 3px; opacity: 0; color: var(--primary); width: .8rem; height: .8rem; transition: opacity .12s; }
.cell .price { font-weight: 650; color: var(--text); }
.cell .rec { display: inline-flex; align-items: center; gap: 1px; font-size: .66rem; font-weight: 650; border-radius: 5px; padding: 0 .22rem; margin-top: 2px; }
.cell .rec .icon { width: .68rem; height: .68rem; }
.cell .rec.up { color: var(--ok); background: var(--ok-soft); }
.cell .rec.down { color: var(--coral-ink); background: var(--coral-soft); }
.cell.closed { background: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--muted-soft) 5px, var(--muted-soft) 7px); }
.cell.closed .price { color: var(--muted); text-decoration: line-through; }
.cell .closed-tag { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: .64rem; font-weight: 650; }
.cell .closed-tag .icon { width: .68rem; height: .68rem; }
.cell .bar {
  position: absolute; top: 7px; bottom: 7px; left: 0; right: 0; padding: 0 .5rem; color: var(--bar-ink); font-size: .76rem; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-decoration: none; display: flex; align-items: center; gap: .35rem; text-align: left;
  background: var(--primary); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); transition: filter .12s; z-index: 1;
}
.cell .bar.first { left: 5px; border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.cell .bar.last { right: 5px; border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.cell .bar:not(.first)::before { content: "‹"; opacity: .85; }
.cell .bar:not(.last)::after { content: "›"; opacity: .85; margin-left: auto; }
.cell .bar:hover, .cell .bar:focus-visible { color: var(--bar-ink); filter: brightness(1.12); }
.cell .bar .code { font-size: .6rem; font-weight: 800; letter-spacing: .04em; padding: .02rem .3rem; border-radius: 4px; background: rgba(0, 0, 0, .22); flex: none; }
.cell .bar .nights { margin-left: auto; font-weight: 500; font-size: .7rem; flex: none; }
.cell .bar .gname { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cell .bar .icon { width: .85rem; height: .85rem; }
.bar.ch-booking { background: var(--ch-booking); }
.bar.ch-airbnb { background: var(--ch-airbnb); }
.bar.ch-expedia { background: var(--ch-expedia); }
.bar.ch-vrbo { background: var(--ch-vrbo); }
.bar.ch-direct { background: var(--ch-direct); }
.bar.ch-manual { background: var(--ch-manual); }
.cell.blocked .bar { background: repeating-linear-gradient(-45deg, var(--blocked), var(--blocked) 6px, color-mix(in srgb, var(--blocked) 82%, #000) 6px, color-mix(in srgb, var(--blocked) 82%, #000) 12px); }
.cell.conflict .bar { background: repeating-linear-gradient(-45deg, var(--conflict), var(--conflict) 7px, color-mix(in srgb, var(--conflict) 80%, #000) 7px, color-mix(in srgb, var(--conflict) 80%, #000) 14px); }
/* Carril «Solape»: la reserva que choca va debajo de la que ocupa la noche, sin taparla. */
.cal tr.lane-overlap .cell { height: 40px; }
.cal tr.lane-overlap .unit-col { background: var(--danger-soft); }
.cal tr.lane-overlap .lane-name { display: flex; align-items: center; gap: .3rem; color: var(--danger); font-weight: 700; font-size: .8rem; }
.cal tr.lane-overlap .lane-name .icon { width: .85rem; height: .85rem; }
.cal tr.lane-overlap .unit-col small { color: var(--danger); }
.cal.d30 .cell .bar .code, .cal.d30 .cell .bar .nights { display: none; }
@media (max-width: 960px) {
  .cal table { width: max-content; min-width: 0; }
  .cal .unit-col { width: 124px; padding: .4rem .55rem; }
  .cal { max-height: none; }
}

.legend { display: flex; gap: .45rem 1.1rem; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--text-2); margin: .75rem 0 0; }
.legend .sw { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.legend i.ch-booking { background: var(--ch-booking); } .legend i.ch-airbnb { background: var(--ch-airbnb); } .legend i.ch-expedia { background: var(--ch-expedia); }
.legend i.ch-vrbo { background: var(--ch-vrbo); } .legend i.ch-direct { background: var(--ch-direct); } .legend i.ch-manual { background: var(--ch-manual); }
.legend i.blocked { background: repeating-linear-gradient(-45deg, var(--blocked), var(--blocked) 3px, color-mix(in srgb, var(--blocked) 75%, #000) 3px, color-mix(in srgb, var(--blocked) 75%, #000) 6px); }
.legend i.conflict { background: repeating-linear-gradient(-45deg, var(--conflict), var(--conflict) 3px, color-mix(in srgb, var(--conflict) 75%, #000) 3px, color-mix(in srgb, var(--conflict) 75%, #000) 6px); }
.legend i.closed { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 2px, var(--border-strong) 2px, var(--border-strong) 4px); border: 1px solid var(--border-strong); }
.legend .rec { font-size: .72rem; font-weight: 650; border-radius: 5px; padding: 0 .3rem; }
.legend .rec.up { color: var(--ok); background: var(--ok-soft); }
.legend .rec.down { color: var(--coral-ink); background: var(--coral-soft); }

/* Selector de apartamentos (cambios de tarifa en bloque) */
.unit-picker { padding: .6rem .8rem; }
.unit-picker legend { font-size: .86rem; color: var(--text-2); }
.unit-picker-list { max-height: 190px; overflow-y: auto; display: grid; gap: .3rem; margin-top: .4rem; padding-right: .3rem; }
.unit-picker .check { font-size: .9rem; margin: 0; }

/* ---------- Precios ---------- */
.price-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
@media (max-width: 1250px) { .price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-day { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .65rem; background: var(--surface); font-size: .8rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.price-day:hover { border-color: var(--border-strong); }
.price-day:has(input:checked) { border-color: var(--primary); box-shadow: var(--ring); }
.price-day.weekend { background: color-mix(in srgb, var(--coral-soft) 40%, var(--surface)); }
.price-day.occupied { background: var(--surface-2); }
.price-day.occupied .now { color: var(--muted); }
.price-day .d { font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: .3rem; color: var(--text-2); font-size: .78rem; }
.price-day .now { font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.price-day .reco { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; white-space: nowrap; }
.price-day .up { color: var(--ok); font-weight: 650; } .price-day .down { color: var(--coral-ink); font-weight: 650; }
.price-day .badges { display: flex; gap: .25rem; flex-wrap: wrap; }
.price-day details > summary { font-size: .78rem; }
.price-day details[open] > summary { margin-bottom: .3rem; }
.confidence { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.confidence > span { display: block; height: 100%; background: var(--info-fill); border-radius: 999px; }
.factor-list { margin: .2rem 0 .3rem; padding-left: 1rem; color: var(--text-2); font-size: .78rem; }
.factor-list li { margin-bottom: .15rem; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .7rem; box-shadow: var(--shadow); margin-top: .75rem; }
.sticky-actions .check { margin: 0; }

.mode-banner { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.1rem; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.mode-banner .tile-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.mode-banner .tile-icon .icon { width: 1.35rem; height: 1.35rem; }
.mode-banner .mb-text { flex: 1; min-width: 220px; }
.mode-banner .mb-text strong { display: block; font-size: 1rem; }
.mode-banner .mb-text span { color: var(--text-2); font-size: .88rem; }
.mode-banner.m-autopilot { border-color: color-mix(in srgb, var(--sun) 60%, var(--border)); background: linear-gradient(90deg, var(--sun-soft), var(--surface) 75%); }
.mode-banner.m-recommend { background: linear-gradient(90deg, var(--info-soft), var(--surface) 75%); }

.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, #19b3b0, var(--primary)); border-radius: 999px; }

/* Barras de ingresos (estadísticas) */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-past { fill: var(--primary); }
.chart .bar-future { fill: var(--primary-soft); stroke: var(--primary); stroke-dasharray: 3 2; }
.chart .axis { stroke: var(--border); }
progress { width: 100%; height: 8px; accent-color: var(--primary); }

/* ---------- Canales ---------- */
.portal { display: flex; flex-direction: column; gap: .6rem; }
.portal-head { display: flex; align-items: center; gap: .7rem; }
.portal-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.05rem; flex: none; }
.portal-logo.ch-booking { background: var(--ch-booking); } .portal-logo.ch-airbnb { background: var(--ch-airbnb); } .portal-logo.ch-expedia { background: var(--ch-expedia); }
.portal-logo.ch-vrbo { background: var(--ch-vrbo); } .portal-logo.ch-direct { background: var(--ch-direct); } .portal-logo.ch-manual { background: var(--ch-manual); }
.portal-logo.sm { width: 26px; height: 26px; border-radius: 8px; font-size: .76rem; }
.portal-head h2 { margin: 0; }
.portal-head > div { min-width: 0; }
.portal-head .badge { white-space: normal; }
.portal .conn { display: flex; flex-direction: column; gap: .3rem; padding: .55rem .65rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.portal .conn a { font-weight: 650; text-decoration: none; }
.portal .conn a:hover { text-decoration: underline; }
.portal .portal-actions { margin-top: auto; display: flex; flex-direction: column; gap: .4rem; }
.portal .portal-actions form, .portal .portal-actions .btn { width: 100%; }
.cap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .2rem 1rem; list-style: none; padding: 0; margin: 0; }
.cap-list li { display: flex; align-items: center; gap: .45rem; font-size: .86rem; padding: .3rem 0; }
.cap-list .yes { color: var(--ok); }
.cap-list li.off { color: var(--muted); }

.copy-field { display: flex; gap: .4rem; align-items: center; }
.copy-field input { flex: 1; min-width: 0; font-size: .8rem; }

/* ---------- Acceso y web pública ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 2.5rem 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  background: radial-gradient(90% 70% at 85% 10%, rgba(245, 165, 36, .45) 0, transparent 55%), linear-gradient(150deg, #07444d 0%, #0a5d68 50%, #0e7c86 100%);
}
.auth-aside::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.auth-aside .brand { color: #fff; padding: 0; }
.auth-aside .brand-mark { background: radial-gradient(circle at 74% 26%, var(--sun) 0 18%, transparent 19%), rgba(255, 255, 255, .18); box-shadow: none; }
.auth-aside h2 { color: #fff; font-size: 1.9rem; letter-spacing: -.03em; max-width: 17ch; margin-bottom: 1.2rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; position: relative; z-index: 1; }
.auth-aside li { display: flex; gap: .65rem; align-items: center; color: rgba(255, 255, 255, .94); }
.auth-aside li .icon { width: 1.3rem; height: 1.3rem; padding: .25rem; border-radius: 50%; background: rgba(255, 255, 255, .18); box-sizing: content-box; }
.auth-aside .foot { font-size: .82rem; color: rgba(255, 255, 255, .78); position: relative; z-index: 1; margin: 0; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card > .brand { display: none; }
.auth-card .card { padding: 1.6rem; }
.auth-card h1 { font-size: 1.45rem; }
.auth-card .form > .btn-primary { width: 100%; min-height: 44px; }
.auth-links { margin-top: 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.auth-links p { margin-bottom: .4rem; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-aside { display: none; } .auth-card > .brand { display: flex; justify-content: center; } }
.auth.single { grid-template-columns: minmax(0, 1fr); }
.auth.single .auth-card > .brand { display: flex; justify-content: center; }

.public-hero { position: relative; overflow: hidden; color: #fff; padding: 3rem 0 3.6rem; background: radial-gradient(80% 120% at 90% 0%, rgba(245, 165, 36, .42) 0, transparent 50%), linear-gradient(135deg, #07444d, #0a5d68 50%, #0e7c86); }
.public-hero h1 { font-size: 2.1rem; color: #fff; letter-spacing: -.03em; }
.public-hero p { color: rgba(255, 255, 255, .92); margin: 0 0 .35rem; }
.public-hero .public-wrap { padding-top: 0; padding-bottom: 0; }
.public-wrap { max-width: 980px; margin: 0 auto; padding: 1.5rem; }
.public-search { margin-top: -2.4rem; position: relative; }
.public-footer a { color: var(--muted); }
/* Pasos para el cambio (modo sombra). */
.switch-steps { padding-left: 1.2rem; margin: 0; }
.switch-steps > li { margin-bottom: 1.1rem; }
.switch-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.switch-steps .small { margin: .25rem 0 .45rem; }
/* Web comercial (portada sin sesión). */
.home-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.home-brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 750; font-size: 1.05rem; letter-spacing: -.02em; }
.home-brand .icon { width: 1.4rem; height: 1.4rem; }
.home-nav a, .home-login { color: #fff; font-weight: 650; }
.home-actions { margin-top: 1.2rem; align-items: center; }
.home-features { margin-bottom: 1rem; }
.home-features h3 { display: flex; align-items: center; gap: .45rem; font-size: 1rem; margin: 0 0 .4rem; }
.home-features h3 .icon { width: 1.1rem; height: 1.1rem; color: var(--primary); flex: none; }
.home-actions-bottom { justify-content: center; align-items: center; margin: 1.5rem 0 .5rem; }
.price-big { font-size: 1.6rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.theme-toggle { min-width: 40px; }

/* ---------- Utilidades (la CSP no admite estilos en línea) ---------- */
.mt { margin-top: .75rem; } .mt-lg { margin-top: 1.25rem; } .mb0 { margin-bottom: 0; } .mb { margin-bottom: .75rem; }
.flex { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.strong { font-weight: 650; }
.text-ok { color: var(--ok); } .text-danger { color: var(--danger); } .text-warn { color: var(--warn); }
.lead { font-size: 1.02rem; color: var(--text-2); }

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

/* ---------- Impresión (facturas) ---------- */
/* ---------- Informes: barras horizontales en una lista ---------- */
.bar-track { flex: 1; min-width: 60px; height: 10px; background: var(--surface-3); border-radius: 6px; overflow: hidden; display: block; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #19b3b0, var(--primary)); border-radius: 6px; }

/* ---------- Operativa: «Mi día» y la semana por persona ---------- */
.task-list { display: grid; gap: .9rem; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; display: grid; gap: .7rem; min-width: 0; }
.task-card.urgent { border-left-color: var(--coral, #e8604c); }
.task-card.overdue { border-left-color: var(--danger); }
.task-card h3 { margin: 0; font-size: 1.15rem; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.task-card .task-meta { margin: 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.task-card .access { background: var(--warn-soft); border-radius: var(--radius-sm); padding: .65rem .8rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; margin: 0; }
.task-card .checklist { display: grid; gap: .45rem; border: 0; padding: 0; margin: 0; }
.task-card .checklist label { display: flex; gap: .65rem; align-items: center; min-height: 44px; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 500; }
.task-card .checklist input { width: 1.25rem; height: 1.25rem; flex: none; }
.task-card .btn-done { width: 100%; justify-content: center; min-height: 52px; font-size: 1.05rem; }
.task-actions { display: grid; gap: .6rem; }
.day-heading { display: flex; align-items: baseline; gap: .6rem; margin: 1.4rem 0 .7rem; }
.day-heading h2 { margin: 0; }
.week-board { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
.week-board th, .week-board td { border-bottom: 1px solid var(--border); padding: .5rem; vertical-align: top; text-align: left; }
.week-board thead th { font-size: .82rem; color: var(--muted); font-weight: 650; }
.week-board thead th.today { color: var(--primary); }
.week-board tbody th { width: 150px; font-weight: 650; }
.week-board td.today { background: var(--primary-soft); }
.week-chip { display: block; font-size: .8rem; line-height: 1.3; padding: .3rem .45rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: .3rem; overflow-wrap: anywhere; }
.week-chip.turnover { background: var(--warn-soft); border-color: transparent; font-weight: 600; }
.week-chip.done { opacity: .55; text-decoration: line-through; }
.week-count { font-size: .75rem; color: var(--muted); }
.incident-photo { max-width: 100%; max-height: 260px; border-radius: var(--radius-sm); display: block; margin-top: .4rem; }

@media print {
  .sidebar, .topbar, .page-header .btn, .toasts, footer, .backdrop, .skip-link, .no-print, .back-link { display: none !important; }
  .shell, .main, .content { display: block !important; padding: 0 !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #999; }
}

/* IA: asistente y captación de clientes (docs/AI_FEATURES.md) */
.ai-thread { display: flex; flex-direction: column; gap: .9rem; }
.ai-msg { max-width: 92%; border-radius: var(--radius-md); padding: .75rem .95rem; border: 1px solid var(--border); background: var(--surface); }
.ai-msg-user { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }
.ai-msg-assistant { align-self: flex-start; background: var(--surface-2); }
.ai-msg-who { margin-bottom: .3rem; font-weight: 600; }
.ai-msg-body > :first-child { margin-top: 0; }
.ai-msg-body > :last-child { margin-bottom: 0; }
.ai-msg-body ul, .ai-msg-body ol { padding-left: 1.2rem; }
.ai-msg-body table { border-collapse: collapse; font-size: .9rem; }
.ai-msg-body th, .ai-msg-body td { border: 1px solid var(--border); padding: .3rem .5rem; text-align: left; }
.ai-msg-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .55rem; }
.ai-fill { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.ai-fill input { min-height: 32px; max-width: 11rem; }
.ai-examples { text-align: left; margin: .4rem auto 0; max-width: 34rem; }
.ai-progress { width: 100%; height: .6rem; accent-color: var(--primary); }
.ai-chat .card + .card { margin-top: 1.1rem; }

/* Marca y web comercial (Stayroom) ------------------------------------------------------------------------
   El logotipo en dos tonos (Stay·room) y la web comercial: cabecera, portada, productos, precio y pie.
   Todo el texto sobre el degradado oscuro pasa de 4,9:1 de contraste (el tono más claro es #0e7c86). */
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: -.035em; }
.brand-accent { color: var(--primary); }
.brand-tagline { font-size: .72rem; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: .18rem; }
.auth-aside .brand-accent { color: #ffd27a; }
.auth-aside .brand-tagline { color: rgba(255, 255, 255, .86); }
.btn-lg { min-height: 48px; padding: .75rem 1.3rem; font-size: 1rem; border-radius: 12px; }

.mk { background: var(--bg); }
.mk-wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.mk-narrow { max-width: 820px; }
.mk-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.mk-bar { display: flex; align-items: center; gap: 1.4rem; min-height: 66px; }
.mk-bar .brand { padding: 0; }
.mk-nav { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; margin-left: auto; }
.mk-nav a, .mk-login { color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.mk-nav a:hover, .mk-login:hover { color: var(--primary); }
.mk-nav a[aria-current="page"] { color: var(--primary); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.mk-account { display: flex; align-items: center; gap: 1rem; }
.mk-menu { display: none; margin-left: auto; }
.mk-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.mk-menu > summary::-webkit-details-marker { display: none; }
.mk-menu > summary .icon { width: 1.3rem; height: 1.3rem; }
.mk-menu nav { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1.5rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.mk-menu nav a:not(.btn) { padding: .65rem 0; color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--border); }
.mk-menu nav .btn { margin-top: .7rem; justify-content: center; }
@media (max-width: 1020px) { .mk-nav, .mk-account { display: none; } .mk-menu { display: block; } }

.mk-hero { color: #fff; padding: 4.2rem 0 4.6rem; background: radial-gradient(60% 90% at 95% 0%, rgba(245, 165, 36, .30) 0, transparent 55%), linear-gradient(135deg, #07444d, #0a5d68 50%, #0e7c86); }
.mk-hero-page { padding: 2.6rem 0 3rem; }
.mk-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.85rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; max-width: 22ch; margin-bottom: 1rem; }
.mk-hero-page h1 { max-width: 30ch; font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
.mk-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; align-items: center; }
@media (max-width: 980px) { .mk-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; } }
.mk-eyebrow { display: inline-block; margin: 0 0 1rem; padding: .32rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-size: .8rem; font-weight: 650; letter-spacing: .01em; }
.mk-lead { color: rgba(255, 255, 255, .94); font-size: 1.1rem; line-height: 1.6; max-width: 60ch; margin: 0 0 1.6rem; }
.mk-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; }
.mk-link-light { color: #fff; font-weight: 650; display: inline-flex; align-items: center; gap: .35rem; text-decoration: underline; text-underline-offset: 4px; }
.mk-link-light:hover { color: #fff; text-decoration-thickness: 2px; }
.mk-link-light .icon { width: 1.05rem; height: 1.05rem; }
.mk-hero-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .92rem; color: rgba(255, 255, 255, .94); }
.mk-hero-points li { display: inline-flex; align-items: center; gap: .4rem; }
.mk-hero-points .icon { width: 1.05rem; height: 1.05rem; color: #ffd27a; }
.mk-crumbs { font-size: .85rem; margin-bottom: 1rem; color: rgba(255, 255, 255, .9); }
.mk-crumbs a { color: #fff; }

.mk-demo { margin: 0; background: var(--surface); color: var(--text); border-radius: 20px; padding: 1.2rem 1.25rem; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55); border: 1px solid var(--border); }
.mk-demo-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .9rem; font-size: .85rem; font-weight: 650; }
.mk-chip { font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; background: var(--sun-soft); color: var(--text); }
.mk-week { list-style: none; padding: 0; margin: 0 0 .9rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.mk-week li { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem .2rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mk-week li span { font-size: .72rem; color: var(--muted); text-transform: capitalize; }
.mk-week li strong { font-size: .9rem; }
.mk-week li.is-hot { background: var(--primary-soft); border-color: var(--primary-soft-2); }
.mk-why { display: flex; flex-direction: column; gap: .2rem; padding: .75rem .85rem; border-radius: 12px; background: var(--surface-2); font-size: .88rem; margin-bottom: .7rem; }
.mk-factors { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; }
.mk-factors li { display: flex; justify-content: space-between; gap: .8rem; }
.mk-up { color: var(--ok); }
.mk-down { color: var(--danger); }

.mk-section { padding: 4rem 0; }
.mk-section-tint { background: var(--bg-tint); }
.mk-h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .6rem; }
.mk-sub { color: var(--text-2); font-size: 1.02rem; max-width: 62ch; margin: 0 0 1.8rem; }
.mk-grid { display: grid; gap: 1.1rem; }
.mk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .mk-grid-3, .mk-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mk-grid-2, .mk-grid-3, .mk-grid-4 { grid-template-columns: minmax(0, 1fr); } .mk-section { padding: 2.8rem 0; } }
.mk-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.4rem; color: var(--text); }
.mk-card h3 { font-size: 1.05rem; font-weight: 700; margin: .2rem 0 .45rem; }
.mk-card-link { text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); }
.mk-card-link:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft-2); }
.mk-card-link strong { display: block; margin: .2rem 0 .3rem; }
.mk-card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: .55rem; }
.mk-card-icon .icon { width: 1.3rem; height: 1.3rem; }
.mk-honest { border-left: 4px solid var(--info-fill); }

.mk-steps { list-style: none; counter-reset: paso; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.mk-steps li { counter-increment: paso; position: relative; display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.4rem 1.35rem 4rem; box-shadow: var(--shadow); }
.mk-steps li::before { content: counter(paso); position: absolute; left: 1.2rem; top: 1.25rem; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 800; }
.mk-steps li span { color: var(--text-2); font-size: .93rem; }
@media (max-width: 860px) { .mk-steps { grid-template-columns: minmax(0, 1fr); } }

.mk-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .mk-split { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; } }
.mk-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .85rem; }
.mk-checks li { display: flex; gap: .65rem; align-items: flex-start; color: var(--text); }
.mk-checks .icon { width: 1.25rem; height: 1.25rem; color: var(--primary); flex: none; margin-top: .12rem; }
.mk-checks-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.6rem; margin-top: 1.8rem; }
@media (max-width: 760px) { .mk-checks-cols { grid-template-columns: minmax(0, 1fr); } }

.mk-faq { display: flex; flex-direction: column; gap: .6rem; }
.mk-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.mk-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.15rem; font-weight: 650; }
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary .icon { width: 1.15rem; height: 1.15rem; flex: none; color: var(--muted); transition: transform .15s var(--ease); }
.mk-faq details[open] summary .icon { transform: rotate(180deg); }
.mk-faq details p { margin: 0; padding: 0 1.15rem 1.1rem; color: var(--text-2); }

.mk-price-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.mk-price-table th, .mk-price-table td { text-align: left; padding: .7rem .4rem; border-bottom: 1px solid var(--border); }
.mk-price-table thead th { font-size: .82rem; color: var(--muted); font-weight: 650; }
.mk-price-table tbody th { font-weight: 600; }

.mk-cta { color: #fff; padding: 3.4rem 0; background: radial-gradient(50% 120% at 100% 0%, rgba(245, 165, 36, .28) 0, transparent 60%), linear-gradient(135deg, #07444d, #0a5d68 55%, #0e7c86); }
.mk-cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.mk-cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -.03em; }
.mk-cta p { color: rgba(255, 255, 255, .94); margin: 0; }

.mk-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }
.mk-footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 860px) { .mk-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-footer-brand { grid-column: 1 / -1; } }
.mk-footer-brand .brand { padding: 0; margin-bottom: .8rem; }
.mk-footer nav { display: flex; flex-direction: column; gap: .5rem; }
.mk-footer nav a { color: var(--text-2); text-decoration: none; font-size: .92rem; }
.mk-footer nav a:hover { color: var(--primary); text-decoration: underline; }
.mk-foot-title { margin: 0 0 .3rem; font-weight: 750; font-size: .85rem; color: var(--text); }
.mk-copy { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
/* La flecha, el color y el margen de los <details> de la aplicación no van ni en las preguntas ni en el menú. */
.mk-faq details > summary, .mk-menu > summary { color: var(--text); }
.mk-faq details > summary::before, .mk-menu > summary::before { display: none; }
.mk-faq details[open] > summary, .mk-menu[open] > summary { margin-bottom: 0; }
/* La llamada principal sobre el degradado, en el ámbar del sol de la marca: destaca y pasa de 8:1 de contraste. */
.mk-hero .btn-primary, .mk-cta .btn-primary { background: #f5a524; border-color: #f5a524; color: #1f1400; box-shadow: 0 10px 24px -12px rgba(245, 165, 36, .9); }
.mk-hero .btn-primary:hover, .mk-cta .btn-primary:hover { background: #ffb84d; border-color: #ffb84d; color: #1f1400; }
.mk-week li strong { white-space: nowrap; }
@media (max-width: 520px) { .mk-week { gap: .25rem; } .mk-week li { padding: .45rem 0; } .mk-week li strong { font-size: .74rem; letter-spacing: -.02em; } }
/* El primario sobre el fondo teñido se queda en 4,47:1: los enlaces de esas secciones, un tono más oscuro (5,8:1). */
.mk-section-tint a:not(.btn):not(.mk-card) { color: var(--primary-hover); }

/* Casos de prueba (docs/CASOS.md): la captura, los pasos para mandarlo a Claude Code y su texto. */
.issue-shot { max-width: 100%; max-height: 420px; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }
.issue-steps { padding-left: 1.3rem; margin: 0 0 .75rem; }
.issue-steps li + li { margin-top: .45rem; }
.issue-step { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; vertical-align: baseline; }
.issue-files { margin-bottom: 1rem; }
.issue-files .mono { overflow-wrap: anywhere; }
.issue-prompt { width: 100%; font-size: .78rem; line-height: 1.45; resize: vertical; }
