    :root {
      color-scheme: light;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
      background: #f6f4ef;
      color: #17201d;
      --mara-green: #165346;
      --mara-green-dark: #0e3d33;
      --mara-terra: #bf5b40;
      --mara-cream: #f6f4ef;
      --mara-card: #fffdfa;
      --mara-line: #e6e1d6;
      --mara-ink: #17201d;
      --mara-muted: #6b7670;
      /* Radii */
      --r-xs: 6px;
      --r-sm: 8px;
      --r-md: 10px;
      --r-lg: 12px;
      --r-xl: 14px;
      --r-2xl: 20px;
      --r-pill: 999px;
      /* Shadows (always ink- or green-tinted; pure black is banned) */
      --shadow-xs: 0 1px 2px rgba(23, 32, 29, 0.08);
      --shadow-sm: 0 1px 3px rgba(23, 32, 29, 0.06);
      --shadow-md: 0 4px 16px rgba(23, 32, 29, 0.09);
      --shadow-lg: 0 18px 44px rgba(23, 32, 29, 0.12);
      --shadow-modal: 0 24px 60px rgba(23, 32, 29, 0.3);
      --focus-ring: 0 0 0 3px rgba(22, 83, 70, 0.12);
      /* Motion */
      --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
      --ease-spring: cubic-bezier(0.2, 0.8, 0.3, 1);
      --t-fast: 120ms;
      --t-quick: 160ms;
      --t-base: 200ms;
      --t-slow: 250ms;
      /* Type scale */
      --fs-2xs: 11px;
      --fs-xs: 12px;
      --fs-sm: 13px;
      --fs-md: 14px;
      --fs-base: 15px;
      --fs-lg: 17px;
      --fs-xl: 19px;
      --fs-2xl: 23px;
      /* Spacing */
      --sp-1: 4px;
      --sp-2: 8px;
      --sp-3: 12px;
      --sp-4: 16px;
      --sp-5: 20px;
      --sp-6: 24px;
      --sp-7: 32px;
      --sp-8: 48px;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      background: var(--mara-cream);
      color: var(--mara-ink);
    }
    main {
      width: min(100%, 1080px);
      margin: 0 auto;
      padding: 0 20px 56px;
    }
    header { padding: 0; }
    /* Topbar: marca + restaurante + fecha + avatar */
    .topbar {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 20px;
      margin: 0 -20px;
      background: var(--mara-green);
      color: #fffdfa;
      border-bottom: 1px solid rgba(255, 253, 250, 0.12);
    }
    .topbar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      font-size: 1.1rem;
      letter-spacing: 0.2px;
    }
    .topbar-sep {
      color: rgba(255,253,250,0.5);
    }
    .topbar-restaurant {
      font-weight: 600;
      font-size: 1rem;
      opacity: 0.95;
    }
    .topbar-spacer { flex: 1; }
    .topbar-date {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border: 1px solid rgba(255,253,250,0.25);
      border-radius: var(--r-pill);
      font-size: 0.9rem;
      opacity: 0.95;
    }
    /* Tabs */
    .tabs {
      display: flex;
      gap: 4px;
      padding: 4px 0;
      margin: 0 -20px 18px;
      border-bottom: 1px solid var(--mara-line);
      background: var(--mara-card);
      overflow-x: auto;
    }
    .tabs-inner {
      display: flex;
      gap: 4px;
      padding: 0 20px;
    }
    .tab {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 14px;
      color: var(--mara-muted);
      font-weight: 650;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      text-decoration: none;
      border-bottom: 2px solid transparent;
      white-space: nowrap;
    }
    .tab svg { width: 16px; height: 16px; }
    .tab.active {
      color: var(--mara-green);
      border-bottom-color: var(--mara-green);
    }
    /* Day bar */
    .daybar {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 0 0 16px;
    }
    .daybar-title {
      font-size: 1.15rem;
      font-weight: 700;
      margin: 0;
    }
    .daybar-nav {
      display: inline-flex;
      gap: 6px;
    }
    .daybar-nav a, .daybar-today {
      display: grid;
      place-items: center;
      min-width: 36px;
      height: 36px;
      padding: 0 10px;
      border: 1px solid var(--mara-line);
      border-radius: var(--r-sm);
      background: var(--mara-card);
      color: var(--mara-ink);
      text-decoration: none;
      font-weight: 650;
      font-size: 0.9rem;
    }
    .daybar-spacer { flex: 1; }
    .btn-primary {
      display: inline-grid;
      place-items: center;
      min-height: 40px;
      padding: 0 16px;
      border: 0;
      border-radius: var(--r-sm);
      background: var(--mara-green);
      color: #fffdfa;
      font-weight: 700;
      cursor: pointer;
      text-decoration: none;
    }
    /* KPI strip */
    .kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin: 0 0 20px;
    }
    .kpi-strip {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
    }
    .kpi {
      padding: 14px 16px;
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      border-radius: var(--r-md);
    }
    .kpi-label {
      font-size: 0.72rem;
      color: var(--mara-muted);
      font-weight: 600;
      margin: 0 0 8px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .kpi-value {
      font-size: 1.85rem;
      font-weight: 750;
      margin: 0;
      line-height: 1;
    }
    .kpi-value.green { color: var(--mara-green); }
    .kpi-value.terra { color: var(--mara-terra); }
    .kpi-value { font-feature-settings: "tnum"; }
    /* Shift sections */
    .shift { margin: 0 0 22px; }
    .shift-label {
      font-size: 0.78rem;
      color: var(--mara-muted);
      font-weight: 700;
      letter-spacing: 0.6px;
      text-transform: uppercase;
      margin: 0 0 8px;
    }
    /* Booking row card — horizontal flex with right-side action panel */
    .b-card {
      display: flex;
      flex-direction: row;
      overflow: hidden;
      position: relative;
      margin: 0 0 8px;
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      border-radius: var(--r-md);
    }
    .b-card[data-status="cancelled"] { opacity: 0.72; }
    .b-card-body {
      flex: 1;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 14px;
      padding: 14px 14px 14px 20px;
      min-width: 0;
    }
    .b-card-time {
      display: flex;
      flex-direction: column;
      gap: 4px;
      width: 72px;
      flex-shrink: 0;
    }
    .b-card-details { flex: 1; min-width: 0; }
    .b-card-name-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin: 0 0 3px;
    }
    .b-card-table-col {
      width: 148px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .b-card-table-col form {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
      margin: 0;
    }
    .b-card-table-col button {
      width: 100%;
      min-height: 28px;
      margin-top: 0;
      padding: 3px 8px;
      font-size: 0.82rem;
      font-weight: 650;
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      color: var(--mara-ink);
    }
    .b-card-table-col select { min-height: 32px; padding: 4px 6px; font-size: 0.84rem; }
    .b-clash-warn { font-size: 0.8rem; color: #8b321f; }
    .b-time { font-weight: 750; font-size: 1.1rem; }
    .b-party { color: var(--mara-muted); font-weight: 600; font-size: 0.88rem; }
    .b-name { font-weight: 650; }
    .b-meta { color: var(--mara-muted); font-size: 0.88rem; margin: 2px 0 0; }
    .b-table {
      display: inline-block;
      padding: 4px 10px;
      background: #efeadf;
      border-radius: var(--r-xs);
      font-size: 0.85rem;
      color: var(--mara-ink);
      font-weight: 600;
    }
    .b-table.empty { background: #f8e4d8; color: #8b321f; }
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 9px;
      border-radius: var(--r-pill);
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .badge::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }
    .badge.confirmed { background: #e2f1ea; color: #0f5a45; }
    .badge.seated { background: #e3edf6; color: #214c73; }
    .badge.pending { background: #fdebc8; color: #8a5a10; }
    .badge.no-show { background: #fbe1d9; color: #8b321f; }
    .badge.cancelled { background: #ece8df; color: #6b7670; }
    .badge.qr { background: #e3ecf5; color: #1a4a72; border: 1px solid #bfdbfe; }
    /* Actions side panel */
    .b-card-actions {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 14px;
      background: #f8f7f4;
      border-left: 1px solid var(--mara-line);
      width: 148px;
      flex-shrink: 0;
      justify-content: center;
    }
    .b-card-actions form {
      display: block;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
      margin: 0;
    }
    .b-card-actions a,
    .b-card-actions button {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-height: 30px;
      padding: 0 10px;
      margin: 0;
      border: 1px solid var(--mara-line);
      border-radius: var(--r-xs);
      background: var(--mara-card);
      color: var(--mara-ink);
      font: inherit;
      font-size: 0.84rem;
      font-weight: 650;
      cursor: pointer;
      text-decoration: none;
    }
    .b-card-actions .danger { color: #8b321f; border-color: #e8c7bc; }
    .b-card-actions .btn-primary-action {
      background: var(--mara-green);
      color: #fffdfa;
      border-color: transparent;
    }
    .b-empty {
      padding: 18px;
      text-align: center;
      color: var(--mara-muted);
      background: var(--mara-card);
      border: 1px dashed var(--mara-line);
      border-radius: var(--r-md);
    }
    /* Drawer (Nueva reserva) */
    details.drawer {
      margin: 20px 0 24px;
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      border-radius: var(--r-md);
      padding: 0;
    }
    details.drawer > summary {
      list-style: none;
      cursor: pointer;
      padding: 14px 18px;
      font-weight: 700;
      color: var(--mara-green);
    }
    details.drawer > summary::-webkit-details-marker { display: none; }
    details.drawer[open] > summary {
      border-bottom: 1px solid var(--mara-line);
    }
    details.drawer > .drawer-body {
      padding: 16px 18px;
    }
    .logout-form {
      flex: 0 0 auto;
      padding: 0;
      border: 0;
      box-shadow: none;
      background: transparent;
    }
    .logout-form button {
      width: auto;
      min-height: 38px;
      margin-top: 0;
      padding: 0 14px;
      border: 1px solid #b8c0ba;
      background: #fffdfa;
      color: #17201d;
      font-size: 0.9rem;
    }
    h1 {
      margin: 0;
      font-size: 1.25rem;
      font-weight: 700;
      letter-spacing: 0;
    }
    .subhead {
      margin: 6px 0 18px;
      max-width: 720px;
      font-size: 0.98rem;
      color: var(--mara-muted);
    }
    .eb-form, .confirmation, .filters {
      background: #fffdfa;
      border: 1px solid #ded8ce;
      border-radius: var(--r-sm);
      box-shadow: var(--shadow-lg);
      padding: 20px;
    }
    .filters {
      margin-bottom: 16px;
      box-shadow: none;
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }
    .eb-form label {
      display: grid;
      gap: 7px;
      color: #2f3c37;
      font-size: 0.94rem;
      font-weight: 650;
    }
    .eb-form .full { grid-column: 1 / -1; }
    .eb-form input, .eb-form textarea {
      width: 100%;
      border: 1px solid #b8c0ba;
      border-radius: var(--r-xs);
      min-height: 44px;
      padding: 10px 11px;
      color: #17201d;
      background: #ffffff;
      font: inherit;
    }
    .eb-form select {
      width: 100%;
      border: 1px solid #b8c0ba;
      border-radius: var(--r-xs);
      min-height: 44px;
      padding: 10px 11px;
      color: #17201d;
      background: #ffffff;
      font: inherit;
    }
    .eb-form textarea { min-height: 96px; resize: vertical; }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.95rem;
    }
    th, td {
      padding: 10px 8px;
      border-bottom: 1px solid #ded8ce;
      text-align: left;
      vertical-align: top;
    }
    th {
      color: #42514b;
      font-size: 0.82rem;
      text-transform: uppercase;
    }
    .eb-slots-form .slots {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
      gap: 10px;
      margin: 0 0 16px;
    }
    .eb-slots-form .slot {
      position: relative;
      min-height: 48px;
    }
    .eb-slots-form .slot input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
    .eb-slots-form .slot span {
      display: grid;
      place-items: center;
      min-height: 48px;
      border: 1px solid #b8c0ba;
      border-radius: var(--r-xs);
      background: #ffffff;
      color: #17201d;
      font-weight: 700;
    }
    .eb-slots-form .slot input:checked + span {
      border-color: #165346;
      background: #165346;
      color: #ffffff;
    }
    .empty {
      margin: 0 0 16px;
      padding: 14px;
      border: 1px solid #ded8ce;
      border-radius: var(--r-xs);
      background: #fbf7ef;
      color: #42514b;
    }
    .flash {
      margin: 0 0 16px;
      padding: 12px 14px;
      border: 1px solid #99c7b3;
      border-radius: var(--r-xs);
      background: #edf7f2;
      color: #165346;
      font-weight: 700;
    }
    .error {
      margin: 0 0 16px;
      padding: 12px 14px;
      border: 1px solid #bf5b40;
      border-radius: var(--r-xs);
      background: #fff1ed;
      color: #8b321f;
      font-weight: 700;
    }
    .nav-links {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
    }
    .nav-links a {
      color: #165346;
      font-weight: 750;
    }
    /* Availability accordions */
    .avail-accordion {
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      border-radius: var(--r-md);
      margin-bottom: 10px;
      overflow: hidden;
    }
    .avail-accordion > summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 18px;
      cursor: pointer;
      list-style: none;
      user-select: none;
    }
    .avail-accordion > summary::-webkit-details-marker { display: none; }
    .avail-accordion[open] > summary { border-bottom: 1px solid var(--mara-line); }
    .avail-accordion.closed { opacity: 0.5; }
    .avail-accordion-body { padding: 14px 18px 18px; }
    .avail-day-name-wrap { display: flex; align-items: center; gap: 10px; }
    .avail-day-name { font-weight: 700; font-size: 0.95rem; color: var(--mara-ink); }
    .avail-section-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: var(--mara-muted);
    }
    .avail-summary-right { display: flex; align-items: center; gap: 10px; }
    .avail-summary-text { font-size: 0.8rem; color: var(--mara-muted); }
    .avail-chevron { font-size: 0.8rem; color: var(--mara-green); transition: transform 0.15s; }
    .avail-accordion[open] .avail-chevron { transform: rotate(180deg); }
    .avail-day-badge {
      display: inline-flex;
      align-items: center;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: var(--r-2xl);
    }
    .avail-day-badge.active { background: #dcf0e8; color: var(--mara-green); }
    .avail-day-badge.closed { background: #f0ece4; color: var(--mara-muted); }
    .shift-card {
      border: 1px solid var(--mara-line);
      border-radius: var(--r-sm);
      overflow: hidden;
      margin-bottom: 8px;
    }
    .shift-card-header {
      background: var(--mara-cream);
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      user-select: none;
    }
    .toggle input[type=checkbox] {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
      pointer-events: none;
    }
    .toggle-track {
      width: 36px;
      height: 20px;
      background: #ccc;
      border-radius: var(--r-md);
      position: relative;
      flex-shrink: 0;
      transition: background 0.15s;
    }
    .toggle-track::after {
      content: '';
      position: absolute;
      left: 2px;
      top: 2px;
      width: 16px;
      height: 16px;
      background: white;
      border-radius: 50%;
      transition: transform 0.15s;
    }
    .toggle input[type=checkbox]:checked + .toggle-track {
      background: var(--mara-green);
    }
    .toggle input[type=checkbox]:checked + .toggle-track::after {
      transform: translateX(16px);
    }
    .shift-card-header label {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--mara-ink);
      cursor: pointer;
    }
    .shift-card-body {
      padding: 12px 14px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 12px;
    }
    .shift-card-body label {
      display: grid;
      gap: 5px;
      font-size: 0.8rem;
      font-weight: 650;
      color: var(--mara-muted);
    }
    .shift-card:has(.shift-card-header input:not(:checked)) .shift-card-body {
      opacity: 0.38;
      pointer-events: none;
    }
    .btn-full { width: 100%; margin-top: 8px; }
    .hint {
      font-size: 0.78rem;
      font-weight: 400;
      color: var(--mara-muted);
      line-height: 1.3;
    }
    .form-footer {
      margin-top: 8px;
      padding-top: 18px;
      border-top: 1px solid var(--mara-line);
    }
    .eb-form .form-footer button { margin-top: 0; }
    .actions {
      display: grid;
      gap: 7px;
      min-width: 128px;
    }
    .confirmation + .confirmation { margin-top: 16px; }
    .confirmation h2 { margin-top: 0; }
    small { color: #42514b; }
    .actions form { padding: 0; border: 0; box-shadow: none; background: transparent; }
    .actions a,
    .inline-button {
      display: grid;
      place-items: center;
      width: 100%;
      min-height: 34px;
      margin: 0;
      border: 1px solid #b8c0ba;
      border-radius: var(--r-xs);
      background: #ffffff;
      color: #17201d;
      font: inherit;
      font-size: 0.86rem;
      font-weight: 700;
      text-decoration: none;
      cursor: pointer;
    }
    .inline-button.danger { border-color: #bf5b40; color: #8b321f; }
    .consent {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-top: 16px;
      font-size: 0.93rem;
      line-height: 1.35;
    }
    .consent input { width: 18px; min-height: 18px; margin-top: 2px; }
    .eb-form button {
      width: 100%;
      margin-top: 18px;
      min-height: 48px;
      border: 0;
      border-radius: var(--r-xs);
      background: #165346;
      color: #ffffff;
      font: inherit;
      font-weight: 750;
      cursor: pointer;
    }
    /* Topbar depth */
    .topbar { box-shadow: var(--shadow-sm); }
    /* North Star metric hero card */
    .metrics-north-star {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 20px 24px;
      margin: 0 0 16px;
      background: var(--mara-card);
      border: 1px solid var(--mara-line);
      border-radius: var(--r-md);
    }
    .metrics-north-star-value {
      font-size: 2.75rem;
      font-weight: 800;
      color: var(--mara-green);
      line-height: 1;
      font-feature-settings: "tnum";
      white-space: nowrap;
    }
    .metrics-north-star-meta { display: flex; flex-direction: column; gap: 3px; }
    .metrics-north-star-label { font-size: 1rem; font-weight: 700; color: var(--mara-ink); }
    .metrics-north-star-desc { font-size: 0.88rem; color: var(--mara-muted); }
    .booking-row { transition: box-shadow var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out); }
    @media (max-width: 640px) {
      article.booking-row { flex-wrap: wrap; }
      .bc-sep { display: none; }
      .bc-time {
        width: auto;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 14px 6px;
      }
      .bc-body {
        width: 100%;
        padding: 4px 14px 10px;
      }
      .bc-table {
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--mara-line);
        padding: 8px 14px;
      }
      .bc-actions {
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--mara-line);
        flex-direction: row;
        flex-wrap: wrap;
        background: var(--mara-card);
        padding: 10px 14px;
        gap: 8px;
        justify-content: flex-start;
      }
      .bc-actions form { flex: 1 1 auto; min-width: 44%; }
      .bc-actions button {
        min-height: 44px;
        font-size: var(--fs-md);
        margin: 0;
      }
    }
    @media (max-width: 680px) {
      main { padding-top: 22px; }
      .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; }
      .admin-header { display: grid; }
      .grid { grid-template-columns: 1fr; }
      .shift-card-body { grid-template-columns: 1fr; }
      .eb-form, .confirmation { padding: 16px; }
      table { font-size: 0.88rem; }
      th, td { padding: 8px 5px; }
      .b-card { flex-direction: column; }
      .b-card-body { flex-wrap: wrap; padding: 12px 12px 12px 18px; gap: 10px; }
      .b-card-time { flex-direction: row; gap: 10px; width: auto; }
      .b-card-table-col { width: auto; }
      .b-card-actions {
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--mara-line);
        flex-direction: row;
        flex-wrap: wrap;
      }
    }

/* ============================================================
   Pantalla 2 — Agenda del día  (ag-*)
   Fuente: docs/design/erp_pantallas/.../Pantalla 2 - Agenda del día.html
============================================================ */

  /* ============ Prototype (admin) ============ */
  .ag {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--mara-cream);
    color: var(--mara-ink);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  .ag-admin-chrome {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 24px;
  }

  /* Topbar */
  .ag-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--mara-green);
    color: #fffdfa;
    flex-shrink: 0;
  }
  .ag-brand { font-weight: 800; font-size: var(--fs-lg); letter-spacing: 0.2px; }
  .ag-tsep { color: rgba(255, 253, 250, 0.5); }
  .ag-rest { font-weight: 600; font-size: 14.5px; opacity: 0.95; }
  .ag-tspacer { flex: 1; }
  .ag-datepill {
    padding: 5px 12px;
    border: 1px solid rgba(255, 253, 250, 0.28);
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 550;
    opacity: 0.95;
  }
  .ag-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 253, 250, 0.16);
    border: 1px solid rgba(255, 253, 250, 0.3);
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.04em;
  }
  .ag-logout-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .ag-logout-form button.ag-logout {
    width: auto;
    min-height: 44px;
    margin-top: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: rgba(255, 253, 250, 0.82);
    font: inherit;
    font-size: var(--fs-xs);
    font-weight: 650;
    cursor: pointer;
  }
  .ag-logout:focus-visible { outline: 2px solid #fffdfa; outline-offset: 2px; }
  @media (hover: hover) and (pointer: fine) {
  }

  /* Tabs */
  .ag-tabs {
    background: var(--mara-card);
    border-bottom: 1px solid var(--mara-line);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    flex-shrink: 0;
  }
  .ag-tabs::-webkit-scrollbar { display: none; }
  .ag-tabs-inner { display: flex; gap: 4px; padding: 0 14px; }
  .ag-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 10px 8px;
    color: var(--mara-muted);
    font-weight: 650;
    font-size: var(--fs-xs);
    /* text-transform: uppercase removed — sentence-case labels */
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--r-sm);
    white-space: nowrap;
    min-height: 44px;
    scroll-snap-align: center;
    transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out);
  }
  .ag-tab-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
  }
  @media (hover: hover) and (pointer: fine) {
  }
  .ag-tab:active { transform: scale(0.97); }
  .ag-tab:focus-visible { outline: 2px solid var(--mara-green); outline-offset: -2px; }
  .ag-tab.active {
    color: var(--mara-green);
    background: #dcf0e8;
    border-bottom-color: transparent;
  }
  @media (prefers-reduced-motion: reduce) {
    .ag-tab { scroll-behavior: auto; transition: none; }
  }

  /* Scroll + main */
  .ag-scroll { flex: 1; overflow-y: auto; }
  .ag-main { max-width: 1080px; margin: 0 auto; padding: 18px 22px 56px; }

  /* Daybar */
  .ag-daybar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    margin: 0 0 20px;
  }
  .ag-daycontext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .ag-kicker {
    color: var(--mara-muted);
    font-size: var(--fs-xs);
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .ag-daytools { display: flex; align-items: center; gap: 10px; }
  .ag-daynav { display: flex; gap: 5px; }
  .ag-daynav-link {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--mara-line);
    border-radius: var(--r-sm);
    background: var(--mara-card);
    color: var(--mara-ink);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease;
  }
  .ag-daynav-link:active { transform: scale(0.97); }
  .ag-daynav-link:focus-visible { outline: 3px solid rgba(22, 83, 70, 0.16); outline-offset: 1px; }
  .ag-daybar .ag-daynav-link { min-width: 40px; height: 40px; font-size: 12.5px; font-weight: 650; }
  .ag-daynav-today { min-width: 48px; color: var(--mara-green); }
  .ag-daynav-arrow-next { transform: scaleX(-1); }
  .ag-daynav-cal { position: relative; padding: 0; }
  .ag-daynav-cal-icon { pointer-events: none; }
  .ag-daynav-cal-input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer;
    -webkit-appearance: none; appearance: none;
  }
  .ag-daynav-cal:focus-within { outline: 3px solid rgba(22, 83, 70, 0.16); outline-offset: 1px; }
  .ag-daytitle { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
  .ag-nueva {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--mara-green);
    border-radius: var(--r-sm);
    background: var(--mara-green);
    color: #fffdfa;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  }
  .ag-nueva:active { transform: scale(0.97); }
  .ag-nueva:focus-visible { outline: 3px solid rgba(22, 83, 70, 0.16); outline-offset: 2px; }

  /* KPIs */
  .ag-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
  .ag-kpi {
    min-height: 90px;
    padding: 15px 16px;
    background: var(--mara-card);
    border: 1px solid var(--mara-line);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: var(--shadow-xs);
  }
  .ag-kpi .lb {
    font-size: var(--fs-2xs);
    color: var(--mara-muted);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }
  .ag-kpi .vl { font-size: 27px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
  .ag-kpi-primary { border-left-width: 3px; border-left-color: var(--mara-green); padding-left: 14px; }
  .ag-kpi-arrivals { border-left-width: 3px; border-left-color: var(--mara-terra); padding-left: 14px; }
  .ag-kpi-people { border-left-width: 3px; border-left-color: var(--mara-muted); padding-left: 14px; }
  .ag-kpi-seated { border-left-width: 3px; border-left-color: var(--mara-green-dark); padding-left: 14px; }
  .rs-kpi-occ { border-left-width: 3px; border-left-color: var(--mara-ink); padding-left: 14px; }

  /* Shift */
  .ag-shift { margin: 0 0 24px; }
  .ag-shifthead { display: flex; align-items: baseline; gap: 9px; margin: 0 0 8px; }
  .ag-shifthead .sl {
    font-size: var(--fs-xs);
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }
  .ag-shifthead .sr { font-size: var(--fs-xs); color: var(--mara-muted); font-variant-numeric: tabular-nums; }
  .ag-shifthead .sn { margin-left: auto; font-size: var(--fs-xs); color: var(--mara-muted); font-weight: 550; }
  .ag-cards { display: flex; flex-direction: column; gap: 8px; }
  .ag-empty {
    padding: 20px;
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--mara-muted);
    background: var(--mara-card);
    border: 1px dashed var(--mara-line);
    border-radius: var(--r-md);
  }
  .ag-empty-configure { margin: 0 0 24px; text-align: left; }
  .ag-empty-configure a { margin-left: 4px; color: var(--mara-green); font-weight: 650; }
  .ag-shift-closed { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--mara-line); }

  /* Waitlist: a calm queue, visually separate from service bookings. */
  .ag-waitlist { margin: 0 0 28px; overflow: hidden; border: 1px solid #ead7a5; border-radius: var(--r-md); background: #fffbf5; }
  .ag-waitlist-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    color: #76561b;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 700;
    list-style: none;
  }
  .ag-waitlist-summary::-webkit-details-marker { display: none; }
  .ag-waitlist-summary .material-symbols-outlined { font-size: 19px; }
  .ag-waitlist-summary strong { margin-left: auto; min-width: 24px; padding: 2px 7px; border-radius: var(--r-pill); background: #f5e5b7; color: #76561b; text-align: center; font-size: var(--fs-xs); }
  .ag-waitlist-list { border-top: 1px solid #ead7a5; }
  .ag-waitlist-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px 0 14px; border-bottom: 1px solid #f0e5ca; font-size: var(--fs-sm); }
  .ag-waitlist-row:last-child { border-bottom: 0; }
  .ag-waitlist-guest { min-width: 0; overflow: hidden; color: var(--mara-ink); text-overflow: ellipsis; white-space: nowrap; }
  .ag-waitlist-status { color: var(--mara-muted); font-size: var(--fs-xs); }
  .ag-waitlist-remove { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .ag-waitlist-remove-btn { min-width: 36px; min-height: 36px; padding: 0 8px; border: 1px solid #e8c7bc; border-radius: var(--r-sm); background: var(--mara-card); color: #8b321f; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; }
  .ag-waitlist-remove-btn:focus-visible { outline: 3px solid rgba(191, 91, 64, 0.18); outline-offset: 1px; }

  /* Now marker */
  .ag-now { display: flex; align-items: center; gap: 10px; padding: 1px 0; }
  .ag-now::before, .ag-now::after { content: ""; flex: 1; border-top: 1px dashed #d9a18d; }
  .ag-now span {
    font-size: var(--fs-2xs);
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--mara-terra);
    font-variant-numeric: tabular-nums;
  }

  /* Booking card */
  .ag-card {
    position: relative;
    display: flex;
    background: var(--mara-card);
    border: 1px solid var(--mara-line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }
  .ag-card.off { opacity: 0.66; }
  .ag-c-time {
    width: 118px;
    flex-shrink: 0;
    padding: 13px 12px 13px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    border-right: 1px solid var(--mara-line);
  }
  .ag-c-time .tm { font-size: var(--fs-lg); font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
  .ag-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: var(--r-pill);
    font-size: var(--fs-2xs);
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .ag-c-body {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
  }
  .ag-c-namerow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .ag-c-namerow .nm { font-weight: 700; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ag-c-namerow .px {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--mara-ink);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
  }
  .ag-c-contact { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--mara-muted); }
  .ag-c-contact .dot { color: var(--mara-line); }
  .ag-c-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
  .ag-chip {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 8px;
    border-radius: var(--r-pill);
    font-size: var(--fs-2xs);
    font-weight: 650;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .ag-chip.note { background: #f1efe9; color: #4d5a54; border-color: #e3dfd3; }
  .ag-chip.warn { background: #fdf0ec; color: #8b321f; border-color: #f0cfc2; }
  .ag-chip.occ { background: #fff4ec; color: #b3501f; border-color: #f3d4bd; }
  .ag-chip.rec { background: #fdf6d8; color: #7d5c10; border-color: #f0e3ad; }
  .ag-chip.qr { background: #e9f0f7; color: #1a4a72; border-color: #c9dcef; }
  .ag-chip.mail { background: #edf3fc; color: #1d4ed8; border-color: #cfdef7; }
  .ag-chip.ok { background: #e9f6ef; color: #15803d; border-color: #c4e6d2; }
  .ag-chip.ko { background: #fdeeee; color: #991b1b; border-color: #f3cccc; }
  .ag-chip.soon { background: #ece8df; color: #6b7670; border-color: #ded9cb; }

  /* Mesa column */
  .ag-c-mesa {
    width: 152px;
    flex-shrink: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-left: 1px solid var(--mara-line);
  }
  .ag-mesasel {
    width: 100%;
    min-height: 32px;
    padding: 4px 7px;
    border: 1px solid var(--mara-line);
    border-radius: var(--r-sm);
    background: #ffffff;
    color: var(--mara-ink);
    font-family: inherit;
    font-size: var(--fs-xs);
    font-weight: 600;
  }
  .ag-mesachip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #efeadf;
    border-radius: var(--r-sm);
    font-size: var(--fs-xs);
    font-weight: 650;
    white-space: nowrap;
  }
  .ag-mesachip.empty { background: #f8e4d8; color: #8b321f; }
  .ag-mesachip.off { background: transparent; border: 1px dashed var(--mara-line); color: var(--mara-muted); }
  .ag-clash { font-size: var(--fs-2xs); font-weight: 700; color: #8b321f; }

  /* Actions column */
  .ag-c-actions {
    width: 136px;
    flex-shrink: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: #f8f6f1;
    border-left: 1px solid var(--mara-line);
  }
  .ag-btn {
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }
  .ag-btn-inline { width: auto; }
  .ag-btn:disabled { opacity: 0.45; cursor: default; }
  .ag-btn.pri { background: var(--mara-green); color: #fffdfa; }
  .ag-btn.out { background: #ffffff; border-color: var(--mara-green); color: var(--mara-green); }
  .ag-btn.terra { background: #ffffff; border-color: #dcae9e; color: var(--mara-terra); }
  .ag-btn.blue { background: #2563eb; color: #ffffff; }
  .ag-btn.sec { background: #ffffff; border-color: var(--mara-line); color: var(--mara-ink); }
  .ag-btn.danger { background: transparent; border-color: #e8c7bc; color: #8b321f; }
  .ag-confirmbox {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: #fdf0ec;
    border: 1px solid #f0cfc2;
    border-radius: var(--r-sm);
  }
  .ag-confirmbox span { font-size: var(--fs-2xs); font-weight: 700; color: #8b321f; line-height: 1.3; }
  .ag-confirmbox .row { display: flex; gap: 5px; }
  .ag-confirmbox .row button {
    flex: 1;
    min-height: 26px;
    border-radius: var(--r-xs);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .ag-confirmbox .si { background: var(--mara-terra); border: 0; color: #fffdfa; }
  .ag-confirmbox .no { background: #ffffff; border: 1px solid var(--mara-line); color: var(--mara-ink); }

  /* Modal nueva reserva */
  .ag-overlay {
    position: absolute;
    inset: 0;
    z-index: 90;
    background: rgba(23, 32, 29, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .ag-modal {
    width: min(560px, 100%);
    max-height: 100%;
    overflow-y: auto;
    background: var(--mara-cream);
    border-radius: var(--r-xl);
    padding: 20px 22px;
    box-shadow: var(--shadow-modal);
  }
  .ag-modal-head h2 { margin: 0 0 3px; font-size: 18px; font-weight: 800; }
  .ag-modal-head p { margin: 0 0 16px; font-size: 12.5px; color: var(--mara-muted); line-height: 1.45; }
  .ag-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .ag-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 650; color: #2f3c37; }
  .ag-form label em { font-style: normal; font-weight: 500; color: var(--mara-muted); }
  .ag-form .full { grid-column: 1 / -1; }
  .ag-form input, .ag-form select {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #b8c0ba;
    border-radius: var(--r-sm);
    background: #ffffff;
    color: var(--mara-ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
  }
  .ag-form input:focus, .ag-form select:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; }
  .ag-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
  .ag-modal-foot .ag-btn { width: auto; min-height: 38px; padding: 0 18px; font-size: var(--fs-sm); }

  /* Toast */
  .ag-toast {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 95;
    background: var(--mara-ink);
    color: var(--mara-cream);
    font-size: 12.5px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--r-pill);
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    transition:
      opacity var(--t-quick) var(--ease-out),
      transform var(--t-quick) var(--ease-out);
    transition-behavior: allow-discrete;
  }
  @starting-style {
    .ag-toast {
      opacity: 0;
      transform: translate(-50%, 8px);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .ag-toast { transition: none; }
  }

  /* ============ Móvil (≤760px) ============ */
  /* Prototype toggles `.ag.movil`; production triggers the same layout via media
     query. Selectors and !important overrides are adapted to the server-rendered
     markup (form/<details> wrappers around the mesa select and status actions,
     <a> daynav buttons). iOS-notch padding from the prototype is dropped. */
  @media (max-width: 760px) {
    .ag-top { padding: 12px 16px; }
    .ag-datepill { display: none; }
    .ag-main { padding: 14px 14px 40px; }
    .ag-daybar { grid-template-columns: 1fr; align-items: stretch; gap: 12px; }
    .ag-daytools { justify-content: space-between; }
    .ag-daytitle { width: 100%; order: -1; font-size: var(--fs-lg); }
    .ag-nueva { min-height: 44px; }
    .ag-daynav a, .ag-daynav button, .ag-daynav-cal { min-width: 44px; height: 44px; }
    .ag-kpis { grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
    .ag-kpi { padding: 11px 13px; gap: 5px; }
    .ag-kpi .vl { font-size: var(--fs-2xl); }
    .ag-shifthead .sn { display: none; }

    .ag-card { flex-direction: column; }
    .ag-c-time {
      width: 100%;
      flex-direction: row;
      align-items: center;
      padding: 11px 14px 0 18px;
      border-right: 0;
      gap: 10px;
    }
    .ag-c-time .tm { font-size: 16px; }
    .ag-c-body { padding: 7px 14px 11px 18px; }
    .ag-c-mesa {
      width: 100%;
      flex-direction: row;
      align-items: center;
      padding: 9px 14px 9px 18px;
      border-left: 0;
      border-top: 1px solid var(--mara-line);
    }
    .ag-c-mesa form { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; }
    .ag-mesasel { flex: 1; min-height: 44px; font-size: var(--fs-sm); }
    .ag-c-actions {
      width: 100%;
      flex-direction: row;
      flex-wrap: wrap;
      padding: 9px 14px 11px 18px;
      border-left: 0;
      border-top: 1px solid var(--mara-line);
    }
    .ag-c-actions form, .ag-c-actions details { flex: 1 1 auto; min-width: 44%; margin: 0; }
    .ag-c-actions .ag-btn { min-height: 44px; font-size: var(--fs-sm); }
    .ag-confirmbox { width: 100%; }
    .ag-confirmbox .row button { min-height: 44px; }

    .ag-overlay { align-items: flex-end; padding: 0; }
    .ag-modal {
      width: 100%;
      max-height: 88%;
      border-radius: var(--r-2xl) var(--r-2xl) 0 0;
      padding: 18px 18px 34px;
    }
    .ag-form { grid-template-columns: 1fr; }
    .ag-form input, .ag-form select { min-height: 46px; }
    .ag-modal-foot .ag-btn { flex: 1; min-height: 46px; }
    .ag-toast { bottom: 100px; }
  }

/* ============================================================
   Nav — mobile scrollable pills (≤768px)
============================================================ */
  @media (max-width: 768px) {
    .ag-tabs {
      -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
      mask-image: linear-gradient(to right, black 70%, transparent 100%);
    }
    .ag-tab {
      padding: 8px 12px;
    }
  }

/* ============================================================
   Pantallas 3–4 — Clientes  (lc-* / fc-*)
============================================================ */

  .lc-headrow, .fc-crumbrow { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
  .lc-title { margin: 0; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.01em; }
  .lc-count { margin: 4px 0 0; font-size: 12.5px; color: var(--mara-muted); font-weight: 550; }
  .lc-export { min-height: 36px; padding: 0 14px; font-size: 12.5px; text-decoration: none; }
  .lc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
  .lc-search { flex: 1 1 280px; min-height: 38px; padding: 0 12px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: var(--mara-card); color: var(--mara-ink); font: inherit; font-size: var(--fs-sm); }
  .lc-search:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; }
  .lc-tabla { overflow: hidden; background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-md); }
  .lc-head, .lc-row { display: grid; grid-template-columns: minmax(230px, 1.5fr) 140px 72px 84px 118px 72px 24px; align-items: center; gap: 12px; }
  .lc-head { padding: 10px 14px; border-bottom: 1px solid var(--mara-line); background: #f8f6f0; }
  .lc-th { color: var(--mara-muted); font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; }
  .lc-th.num { justify-self: end; }
  .lc-row { padding: 12px 14px; color: var(--mara-ink); text-decoration: none; border-bottom: 1px solid var(--mara-line); }
  .lc-row:last-child { border-bottom: 0; }
  .lc-cliente { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .lc-avatar, .fc-avatar { display: grid; place-items: center; border-radius: 50%; background: #e9f6ef; color: var(--mara-green); border: 1px solid #cfe8dc; font-weight: 800; letter-spacing: 0.04em; flex-shrink: 0; }
  .lc-avatar { width: 34px; height: 34px; font-size: var(--fs-2xs); }
  .lc-nombre-wrap { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
  .lc-nombre { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lc-chip, .fc-tag, .fc-tag-add { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid #e6e1d6; background: #f6f4ef; color: var(--mara-muted); font-size: var(--fs-2xs); font-weight: 700; }
  .lc-tel, .lc-ult { font-size: 12.5px; color: var(--mara-muted); font-weight: 550; font-variant-numeric: tabular-nums; }
  .lc-num { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; justify-self: end; }
  .lc-cons { font-size: var(--fs-xs); font-weight: 650; color: #b6b0a0; }
  .lc-chev { font-size: var(--fs-base); color: #c4bda9; justify-self: end; }
  .lc-vacio { display: flex; flex-direction: column; gap: 6px; padding: 28px; text-align: center; color: var(--mara-muted); background: var(--mara-card); border: 1px dashed var(--mara-line); border-radius: var(--r-md); }
  .lc-vacio strong { color: var(--mara-ink); font-size: 14.5px; }
  .lc-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
  .lc-pager-info { margin-right: auto; font-size: var(--fs-xs); color: var(--mara-muted); font-weight: 550; font-variant-numeric: tabular-nums; }
  .lc-pager .ag-btn { min-height: 34px; padding: 0 13px; text-decoration: none; }

  /* Composable filter selects + sortable headers (Pantalla 4) */
  .lc-main { max-width: 1020px; }
  .lc-filtro { min-height: 38px; padding: 6px 9px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: var(--mara-card); color: var(--mara-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
  .lc-filtro:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; }
  .lc-sortsel { display: none; }
  .lc-th { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; white-space: nowrap; }
  a.lc-th { cursor: pointer; }
  .lc-th.on { color: var(--mara-green); }
  .lc-th.num { justify-content: flex-end; }
  .lc-th .ar { font-size: var(--fs-2xs); width: 10px; }
  .lc-th.static { cursor: default; }
  .lc-chip.mal { background: #fdf0ec; border-color: #f0cfc2; color: #8b321f; }
  .lc-num.mal { color: var(--mara-terra); }
  .lc-cons.si { color: var(--mara-green); }

  .fc-crumb { color: var(--mara-muted); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
  .fc-head { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 16px; }
  .fc-avatar { width: 62px; height: 62px; font-size: var(--fs-xl); }
  .fc-head-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .fc-head-main h1 { margin: 0; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
  .fc-contact { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13.5px; font-weight: 550; }
  .fc-contact .dot, .fc-meta .dot, .fc-rgpd-links .dot { color: #c9c3b4; }
  .fc-meta { display: flex; flex-wrap: wrap; gap: 7px; font-size: var(--fs-xs); color: var(--mara-muted); }
  .fc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
  .fc-tag.mal { background: #fdf0ec; border-color: #f0cfc2; color: #8b321f; }
  .fc-tag-add { border-style: dashed; background: #fffdfa; color: var(--mara-muted); }
  .fc-proxima { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin: 0 0 16px; border-radius: var(--r-md); border: 1px solid #cfe8dc; background: #e9f6ef; }
  .fc-proxima.mal { background: #fdf0ec; border-color: #f0cfc2; }
  .fc-prox-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
  .fc-prox-main .lb { font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-green); }
  .fc-prox-main .vl { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .fc-prox-main .aviso { font-size: 12.5px; font-weight: 650; color: #8b321f; margin-top: 2px; }
  .fc-prox-link, .fc-link { border: 0; background: transparent; color: var(--mara-green); font: inherit; font-size: 12.5px; font-weight: 750; text-decoration: none; cursor: pointer; padding: 0; }
  .fc-link.mal { color: #8b321f; }
  .ag-kpi .vl.txt { font-size: 18px; line-height: 1.1; }
  .ag-kpi .vl.mal { color: var(--mara-terra); }
  .fc-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
  .fc-col2 { display: flex; flex-direction: column; gap: 14px; }
  .fc-card { display: flex; flex-direction: column; gap: 12px; padding: 15px; background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-md); }
  .fc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .fc-card-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.01em; }
  .fc-field { display: flex; flex-direction: column; gap: 4px; }
  .fc-field .lb { font-size: var(--fs-2xs); color: var(--mara-muted); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; }
  .fc-field p { margin: 0; font-size: 13.5px; line-height: 1.5; }
  .fc-field p.vacio, .fc-vacio { color: #a8a395; font-weight: 500; }
  .fc-consent { display: flex; gap: 10px; align-items: flex-start; cursor: default; }
  .fc-consent input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--mara-green); flex-shrink: 0; }
  .fc-consent span { font-size: var(--fs-sm); line-height: 1.5; color: var(--mara-ink); }
  .fc-rgpd-links { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
  .fc-hist-rows { display: flex; flex-direction: column; }
  .fc-hist-row { display: grid; grid-template-columns: 128px 60px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--mara-line); color: var(--mara-ink); text-decoration: none; }
  .fc-hist-row:last-child { border-bottom: 0; }
  .fc-hist-row .fe { font-weight: 650; font-variant-numeric: tabular-nums; }
  .fc-hist-row .fe em { font-style: normal; font-weight: 550; color: var(--mara-muted); }
  .fc-hist-row .px, .fc-hist-row .me { color: var(--mara-muted); font-weight: 550; }
  .fc-hist-row .me { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fc-hist-row .ag-badge { justify-self: end; }
  .fc-hist-foot { margin: 0; font-size: 11.5px; color: var(--mara-muted); }

  /* Ficha — cabecera, etiquetas editables y formularios en línea (E16-S2-T1) */
  .fc-main { max-width: 920px; margin: 0 auto; }
  .fc-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--mara-green); color: #fffdfa; font-weight: 800; letter-spacing: 0.03em; flex-shrink: 0; }
  .fc-kpi-sub { font-size: 11.5px; color: var(--mara-muted); font-weight: 550; margin-top: -3px; }
  .fc-prox-link { flex-shrink: 0; white-space: nowrap; }
  .fc-tag { gap: 5px; min-height: 24px; padding: 3.5px 6px 3.5px 10px; background: #e9f0ec; border: 1px solid #cfdfd6; color: var(--mara-green); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
  .fc-tag.mal { background: #fdf0ec; border-color: #f0cfc2; color: #8b321f; }
  .fc-tag .fc-tag-x { margin: 0; display: inline-flex; }
  .fc-tag button { border: 0; background: transparent; color: inherit; opacity: 0.55; font-size: var(--fs-sm); line-height: 1; padding: 0 2px; cursor: pointer; font-family: inherit; }
  .fc-tag-add-wrap { display: inline-flex; }
  .fc-tag-add-wrap > summary.fc-tag-add { list-style: none; cursor: pointer; padding: 4px 10px; min-height: 0; border: 1px dashed #c4bda9; border-radius: var(--r-pill); background: transparent; color: var(--mara-muted); font-size: 11.5px; font-weight: 650; }
  .fc-tag-add-wrap > summary.fc-tag-add::-webkit-details-marker { display: none; }
  .fc-tag-add-wrap[open] > summary.fc-tag-add { display: none; }
  .fc-tag-add-form { display: inline-flex; margin: 0; }
  .fc-tag-add-form input { width: 150px; min-height: 27px; padding: 2px 10px; border: 1px solid var(--mara-green); border-radius: var(--r-pill); background: #fff; font: inherit; font-size: 11.5px; font-weight: 600; outline: none; }
  .fc-consent strong { font-weight: 700; }
  .fc-consent-form { margin: 0; }
  .fc-card-foot { display: flex; justify-content: flex-end; gap: 8px; }
  .fc-field textarea { width: 100%; padding: 8px 11px; border: 1px solid #b8c0ba; border-radius: var(--r-sm); background: #fff; color: var(--mara-ink); font: inherit; font-size: var(--fs-sm); line-height: 1.45; resize: vertical; }
  .fc-field textarea:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; }
  .fc-link[disabled] { opacity: 0.5; cursor: default; text-decoration: none; }

  @media (max-width: 760px) {
    .lc-head { display: none; }
    .lc-row { grid-template-columns: 1fr 24px; }
    .lc-tel, .lc-num, .lc-ult, .lc-cons { display: none; }
    .lc-sortsel { display: block; flex: 1 1 100%; }
    .fc-cols { grid-template-columns: 1fr; }
    .fc-proxima { flex-wrap: wrap; }
    .fc-prox-link { width: 100%; }
    .fc-hist-row { grid-template-columns: 1fr 48px auto; }
    .fc-hist-row .me { display: none; }
  }

/* ============================================================
   Pantalla 5 — Campañas  (ca-*)
============================================================ */

  .ca-headrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
  .ca-title { margin: 0; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.01em; }
  .ca-subtitle { margin: 4px 0 0; color: var(--mara-muted); font-size: var(--fs-sm); font-weight: 550; }
  .ca-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px; border: 1px solid var(--mara-line); border-radius: var(--r-md); background: var(--mara-card); }
  .ca-tab { min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--mara-muted); font: inherit; font-size: 12.5px; font-weight: 750; cursor: default; }
  .ca-tab.active { background: #e9f6ef; color: var(--mara-green); }
  .ca-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ca-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-md); }
  .ca-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ca-card-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.01em; }
  .ca-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: #f6f4ef; border: 1px solid var(--mara-line); color: var(--mara-muted); font-size: var(--fs-2xs); font-weight: 750; }
  .ca-empty { display: flex; flex-direction: column; gap: 6px; padding: 24px; text-align: center; border: 1px dashed var(--mara-line); border-radius: var(--r-md); color: var(--mara-muted); }
  .ca-empty strong { color: var(--mara-ink); font-size: var(--fs-md); }
  .ca-segment { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--mara-line); border-radius: var(--r-md); background: #f8f6f0; }
  .ca-segment-name { font-size: 13.5px; font-weight: 800; }
  .ca-segment-meta { color: var(--mara-muted); font-size: var(--fs-xs); font-weight: 650; }
  .ca-segment-count { color: var(--mara-green); font-size: 12.5px; font-weight: 800; }
  .ca-note { margin: 0; color: var(--mara-muted); font-size: 12.5px; line-height: 1.5; }

  @media (max-width: 760px) {
    .ca-headrow { align-items: flex-start; flex-direction: column; }
    .ca-grid { grid-template-columns: 1fr; }
  }

/* ============================================================
   Pantalla 6 — Resumen semanal  (rs-*)
============================================================ */

  .rs-main { max-width: 1020px; }
  .rs-headrow { flex-wrap: wrap; }
  .rs-headrow .lc-title {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .rs-email-form {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .rs-email-form .ag-btn {
    width: auto;
    min-height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
  }
  .rs-daynav a {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--mara-line);
    border-radius: var(--r-sm);
    background: var(--mara-card);
    color: var(--mara-ink);
    font-size: 18px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
  }
  .rs-encurso { background: #fdebc8; color: #8a5a10; }
  .rs-compara { margin: -8px 0 14px; font-size: var(--fs-xs); color: var(--mara-muted); }
  .ag-badge.rs-badge-repeat { background: #fdf0ec; color: #8b321f; }
  .rs-delta { font-size: 11.5px; font-weight: 700; }
  .rs-delta.bien { color: #15803d; }
  .rs-delta.mal { color: #b3501f; }
  .rs-delta.igual { color: var(--mara-muted); font-weight: 600; }

/* Edit booking: the decision path is summary, table, then time. */
  .eb-header { display: grid; gap: 4px; margin: 0 0 16px; }
  .eb-header h1 { margin: 0; color: var(--mara-ink); font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
  .eb-kicker { color: var(--mara-muted); font-size: var(--fs-xs); font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
  .eb-header .subhead { margin: 0; color: var(--mara-muted); font-size: var(--fs-sm); }
  .eb-summary { display: grid; gap: 10px; margin-bottom: 12px; }
  .eb-summary-lead { margin: 0; color: var(--mara-muted); font-size: var(--fs-xs); font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
  .eb-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .eb-summary-grid p { display: grid; gap: 3px; margin: 0; color: var(--mara-ink); font-size: var(--fs-sm); }
  .eb-summary-grid p span { color: var(--mara-muted); font-size: var(--fs-xs); font-weight: 650; }
  .eb-form { display: grid; gap: 14px; margin: 0 0 12px; }
  .eb-form label { display: grid; gap: 5px; color: var(--mara-ink); font-weight: 650; }
  .eb-form select, .eb-form input { min-height: 44px; }
  .eb-form button { min-height: 44px; width: fit-content; padding: 0 16px; border-radius: var(--r-sm); background: var(--mara-green); color: #fffdfa; font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
  .eb-table-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .eb-table-form label { min-width: 0; }
  .eb-filter-form { padding: 14px; background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-md); }
  .eb-filter-form .grid { margin: 0; }
  .eb-slots-form { padding-top: 4px; }
  @media (max-width: 680px) {
    .eb-summary-grid { grid-template-columns: 1fr; gap: 9px; }
    .eb-table-form { grid-template-columns: 1fr; align-items: stretch; }
    .eb-form button { width: 100%; }
  }

  .rs-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 14px;
    align-items: start;
    margin: 0 0 14px;
  }
  /* Grid items default to min-width:auto, so a scroll-region's forced min-width
     (rs-heat-scroll, rs-chart-scroll) would otherwise blow out the shared track
     once .rs-grid collapses to one column on mobile. */
  .rs-grid > .fc-card, .rs-grid > .rs-col2 { min-width: 0; }
  .rs-col2 { display: flex; flex-direction: column; gap: 14px; }

  .rs-leyenda { display: flex; flex-wrap: wrap; gap: 12px; }
  .rs-leyenda em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--mara-muted);
    font-size: var(--fs-2xs);
    font-style: normal;
    font-weight: 650;
  }
  .rs-leyenda em::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: var(--r-xs);
  }
  .rs-leyenda em.comida::before { background: #8cbaa4; }
  .rs-leyenda em.cena::before { background: var(--mara-green); }
  .rs-leyenda em.prev::before {
    background: repeating-linear-gradient(45deg, #b9d4c6 0 3px, #eef3ee 3px 6px);
    border: 1px solid #b9d4c6;
  }
  .rs-chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rs-chart-scroll:focus-visible { outline: 2px solid var(--mara-green); outline-offset: 2px; border-radius: var(--r-sm); }
  .rs-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 166px;
    padding: 4px 2px 0;
  }
  .rs-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .rs-col .tot {
    font-size: 12.5px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }
  .rs-col .barras {
    width: 100%;
    max-width: 44px;
    min-height: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .rs-col .seg { display: block; width: 100%; }
  .rs-col .seg.cena { background: var(--mara-green); border-radius: var(--r-xs) var(--r-xs) 0 0; }
  .rs-col .seg.comida { background: #8cbaa4; border-radius: 0 0 var(--r-xs) var(--r-xs); }
  .rs-col.prev .seg.cena {
    background: repeating-linear-gradient(45deg, #6f9e8b 0 4px, #d9e7df 4px 8px);
  }
  .rs-col.prev .seg.comida {
    background: repeating-linear-gradient(45deg, #b9d4c6 0 4px, #eef3ee 4px 8px);
  }
  .rs-col.prev .tot { color: var(--mara-muted); }
  .rs-col .dia {
    color: var(--mara-muted);
    font-size: var(--fs-2xs);
    font-weight: 650;
    white-space: nowrap;
  }
  .rs-col .dia em { color: var(--mara-terra); font-style: normal; font-weight: 750; }
  .rs-col.hoy .dia { color: var(--mara-ink); }

  .ca-subtabs {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: #eceadf;
    border-radius: var(--r-md);
  }
  .ca-subtabs.chica .ca-subtab {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .ca-subtab {
    min-height: 30px;
    padding: 0 13px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--mara-muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .ca-subtab.on {
    background: var(--mara-card);
    color: var(--mara-green);
    box-shadow: var(--shadow-xs);
  }
  .rs-heat-scroll {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .rs-heat-scroll:focus-visible { outline: 2px solid var(--mara-green); outline-offset: 2px; border-radius: var(--r-sm); }
  .rs-heat-scroll .rs-heat-row { min-width: 480px; }
  .rs-heat-row {
    display: grid;
    grid-template-columns: 64px repeat(7, 1fr);
    gap: 4px;
    align-items: center;
  }
  .rs-heat-row .zona { font-size: 11.5px; font-weight: 700; }
  .rs-heat-row .celda {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    color: var(--mara-ink);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .rs-heat-row.head .celda {
    min-height: auto;
    color: var(--mara-muted);
    font-size: var(--fs-2xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .rs-heat-row .celda.lv1 { background: #eef3ee; }
  .rs-heat-row .celda.lv2 { background: #d9e7df; }
  .rs-heat-row .celda.lv3 { background: #b9d4c6; }
  .rs-heat-row .celda.lv4 { background: #8cbaa4; }
  .rs-heat-row .celda.lv5 { background: #3e7a64; color: #fffdfa; }
  .rs-heat-row .celda.pend {
    border: 1px dashed var(--mara-line);
    color: #b6b0a0;
  }

  .rs-origenes { display: flex; flex-direction: column; gap: 8px; }
  .rs-origen {
    display: grid;
    grid-template-columns: 168px 1fr 32px;
    align-items: center;
    gap: 10px;
  }
  .rs-origen .lb { font-size: 12.5px; font-weight: 600; }
  .rs-origen .bar {
    height: 12px;
    overflow: hidden;
    border-radius: var(--r-pill);
    background: #f0ece2;
  }
  .rs-origen .fill {
    display: block;
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--mara-green);
  }
  .rs-origen .n {
    text-align: right;
    font-size: 12.5px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }
  .rs-fuera {
    margin: 2px 0 0;
    padding: 10px 13px;
    border: 1px solid #d4e4d6;
    border-radius: var(--r-md);
    background: #eef3ee;
    font-size: 12.5px;
    line-height: 1.5;
  }
  .rs-fuera strong { color: var(--mara-green); font-weight: 800; }

  .rs-tasa { color: var(--mara-terra); font-size: var(--fs-xs); font-weight: 700; }
  .rs-ns-rows { display: flex; flex-direction: column; }
  .rs-ns-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 2px;
    border-bottom: 1px solid #f0ece2;
    font-size: 12.5px;
  }
  .rs-ns-row:last-child { border-bottom: 0; }
  .rs-ns-row .nm { font-weight: 700; }
  .rs-ns-row .dd { color: var(--mara-muted); font-weight: 550; }
  .rs-ns-row .ag-badge { margin-left: auto; }
  .ca-pie {
    margin: 14px 2px 0;
    color: var(--mara-muted);
    font-size: var(--fs-xs);
    line-height: 1.5;
  }

  @media (max-width: 760px) {
    .rs-headrow { gap: 10px; }
    .rs-headrow .lc-title { width: 100%; order: -1; font-size: var(--fs-lg); }
    .rs-email-form .ag-btn { min-height: 42px; }
    .rs-grid { grid-template-columns: 1fr; }
    .rs-chart { gap: 4px; }
    .rs-col { min-width: 42px; }
  .rs-col .dia { font-size: var(--fs-2xs); }
    .rs-heat-row { grid-template-columns: 56px repeat(7, 1fr); gap: 3px; }
  .rs-heat-row .celda { min-height: 30px; font-size: var(--fs-2xs); }
    .rs-origen { grid-template-columns: 132px 1fr 28px; }
    .rs-origen .lb { font-size: 11.5px; }
  }

  /* ============================================================
     Pantalla 1 — Página pública de reserva (móvil-first wizard)
     Prefijo rp-*. Self-contained: no depende del chrome admin.
     ============================================================ */
  .rp-root {
    width: min(100%, 480px);
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--mara-cream);
    color: var(--mara-ink);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    position: relative;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  @media (min-width: 481px) {
    /* Grid-center the card in the viewport instead of top-aligning a
       content-hugging box; gated on :has() so browsers without support just
       fall back to the top-margin layout below (still fully usable). */
    body:has(.rp-root) { display: grid; place-items: center; }
    .rp-root {
      min-height: min(640px, calc(100dvh - 32px));
      max-height: calc(100dvh - 32px);
      margin: 16px auto;
      border: 1px solid var(--mara-line);
      border-radius: var(--r-2xl);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
    }
  }
  .rp-scroll { flex: 1; overflow-y: auto; padding-top: 6px; }
  .rp-pad { padding: 0 18px; }
  .rp-hidden { display: none !important; }
  .rp-display { font-family: "Fraunces", Georgia, serif; font-optical-sizing: auto; letter-spacing: -0.01em; }
  .rp-demo-banner {
    width: 100%; padding: 7px 14px; font-size: var(--fs-sm); font-weight: 600; text-align: center;
    background: var(--mara-cream); color: var(--mara-terra); border-bottom: 1px solid var(--mara-line);
  }

  /* Top bar with back + progress */
  .rp-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px 4px; }
  .rp-back {
    width: 38px; height: 38px; flex-shrink: 0;
    display: grid; place-items: center;
    border: 1px solid var(--mara-line); border-radius: 50%;
    background: var(--mara-card); color: var(--mara-ink); cursor: pointer; padding: 0;
    transition: background var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-back:active { background: var(--mara-line); transform: scale(0.97); }
  .rp-progress { flex: 1; display: flex; gap: 5px; }
  .rp-progress span {
    flex: 1; height: 3px; border-radius: var(--r-pill); background: var(--mara-line);
    transition: background var(--t-base) var(--ease-out);
  }
  .rp-progress span.on { background: var(--mara-green); }
  .rp-stepcount {
    font-size: var(--fs-xs); font-weight: 600; color: var(--mara-muted);
    flex-shrink: 0; font-variant-numeric: tabular-nums;
  }
  .rp-langswitch { display: flex; gap: 4px; flex-shrink: 0; }
  .rp-langlink {
    width: 38px; height: 38px; flex-shrink: 0;
    display: grid; place-items: center;
    border: 1px solid var(--mara-line); border-radius: 50%;
    background: var(--mara-card); font-size: var(--fs-sm);
    text-decoration: none;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out);
  }
  .rp-langlink.sel { border-color: var(--mara-green); background: var(--mara-cream); }

  /* Hero / restaurant header */
  .rp-hero { padding: 6px 18px 0; }
  .rp-hero h1 { margin: 12px 0 2px; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; }
  .rp-hero-meta { margin: 0; font-size: var(--fs-sm); color: var(--mara-muted); }
  .rp-claim {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; font-size: var(--fs-xs); font-weight: 650; color: var(--mara-green);
  }
  .rp-claim::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mara-green); }

  /* Step question — h1 already carries .rp-display; this stays a size step below it */
  .rp-q { margin: 22px 0 2px; font-size: var(--fs-xl); font-weight: 750; letter-spacing: -0.01em; }
  .rp-qsub { margin: 0 0 14px; font-size: var(--fs-sm); color: var(--mara-muted); }

  /* Date strip */
  .rp-datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 18px 8px; scrollbar-width: none; }
  .rp-datestrip::-webkit-scrollbar { display: none; }
  .rp-day {
    flex-shrink: 0; width: 62px; padding: 10px 0 9px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    border: 1px solid var(--mara-line); border-radius: var(--r-lg);
    background: var(--mara-card); cursor: pointer; font-family: inherit;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out),
      transform var(--t-fast) var(--ease-out);
  }
  .rp-day:active { transform: scale(0.95); }
  .rp-day .dw { font-size: var(--fs-2xs); font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mara-muted); }
  .rp-day .dn { font-size: var(--fs-xl); font-weight: 750; color: var(--mara-ink); line-height: 1.1; }
  .rp-day .dm { font-size: var(--fs-2xs); font-weight: 550; color: var(--mara-muted); }
  .rp-day.sel { background: var(--mara-green); border-color: var(--mara-green); }
  .rp-day.sel .dw, .rp-day.sel .dn, .rp-day.sel .dm { color: var(--mara-card); }
  .rp-day.closed { border-style: dashed; background: transparent; }
  .rp-day.closed .dn { color: var(--mara-muted); }
  .rp-day.closed .dm { color: var(--mara-terra); font-weight: 650; }
  .rp-day.closed.sel { background: transparent; border-color: var(--mara-terra); }

  /* Closed-day notice */
  .rp-cerrado { margin: 14px 18px 0; padding: 16px; border: 1px solid var(--mara-line); border-radius: var(--r-lg); background: var(--mara-card); }
  .rp-cerrado strong { display: block; font-size: var(--fs-base); margin-bottom: 3px; }
  .rp-cerrado p { margin: 0 0 12px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.45; }

  /* Shift groups + time chips */
  .rp-shift { margin: 0 0 18px; }
  .rp-shifthead { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
  .rp-shifthead .sl { font-size: var(--fs-xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-ink); }
  .rp-shifthead .sr { font-size: var(--fs-xs); color: var(--mara-muted); font-variant-numeric: tabular-nums; }
  .rp-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .rp-time {
    min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border: 1px solid var(--mara-line); border-radius: var(--r-lg); background: var(--mara-card);
    font-family: inherit; font-size: var(--fs-base); font-weight: 700; color: var(--mara-ink);
    cursor: pointer; font-variant-numeric: tabular-nums;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out),
      transform var(--t-fast) var(--ease-out);
  }
  .rp-time:active { transform: scale(0.95); }
  .rp-time.sel { background: var(--mara-green); border-color: var(--mara-green); color: var(--mara-card); }
  /* Completo: quiet and calm, not alarming — same grid, muted tint, no red.
     grid-column: auto guards against the legacy global `.full { grid-column: 1 / -1 }`
     form-field spanner (admin.css ~492) that otherwise stacks these chips full-width. */
  .rp-time.full {
    grid-column: auto;
    background: color-mix(in srgb, var(--mara-line) 55%, var(--mara-cream));
    border-style: solid; border-color: var(--mara-line); color: var(--mara-muted); font-weight: 600;
  }
  .rp-time.full .fl {
    font-size: var(--fs-2xs); font-weight: 650; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--mara-muted);
  }
  /* Ya pasada: inert, not an invitation. `.full` is tappable (it opens the waitlist), so
     past must not borrow its look — it reads as struck-through and disabled, and the button
     itself carries `disabled`. Distinct state, distinct affordance. */
  .rp-time.past {
    grid-column: auto;
    background: transparent; border-color: color-mix(in srgb, var(--mara-line) 60%, transparent);
    color: var(--mara-muted); font-weight: 600; opacity: 0.55;
    cursor: default; text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--mara-muted) 60%, transparent);
  }
  .rp-time.past:active { transform: none; }
  .rp-time.past .fl {
    font-size: var(--fs-2xs); font-weight: 650; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--mara-muted); text-decoration: none;
  }
  .rp-time .rp-offer { display: block; font-size: var(--fs-2xs); font-weight: 650; color: var(--mara-green); margin-top: 1px; }
  .rp-time.sel .rp-offer { color: var(--mara-card); }
  .rp-hint { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--mara-muted); line-height: 1.45; }

  /* Sin huecos banner — calm cream card; terra is reserved for the waitlist CTA. */
  .rp-banner { margin: 0 0 16px; padding: 13px 14px; border: 1px solid var(--mara-line); border-radius: var(--r-lg); background: var(--mara-card); }
  .rp-banner strong { display: block; font-size: var(--fs-md); color: var(--mara-ink); margin-bottom: 2px; }
  .rp-banner p { margin: 0; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.45; }

  /* Pax grid */
  .rp-pax { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .rp-paxchip {
    min-height: 56px; display: grid; place-items: center;
    border: 1px solid var(--mara-line); border-radius: var(--r-lg); background: var(--mara-card);
    font-family: inherit; font-size: var(--fs-xl); font-weight: 750; color: var(--mara-ink); cursor: pointer;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out),
      transform var(--t-fast) var(--ease-out);
  }
  .rp-paxchip:active { transform: scale(0.95); }
  .rp-paxchip.sel { background: var(--mara-green); border-color: var(--mara-green); color: var(--mara-card); }
  .rp-bignote { margin: 14px 0 0; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; }
  .rp-bignote a { color: var(--mara-green); font-weight: 700; text-decoration: none; white-space: nowrap; }

  /* Form */
  .rp-form { display: grid; gap: 13px; }
  .rp-field { display: grid; gap: 6px; }
  .rp-field .lb { font-size: var(--fs-sm); font-weight: 650; color: var(--mara-ink); }
  .rp-field .lb em { font-style: normal; font-weight: 500; color: var(--mara-muted); }
  .rp-input {
    width: 100%; min-height: 48px; padding: 10px 13px;
    border: 1px solid color-mix(in srgb, var(--mara-ink) 32%, transparent);
    border-radius: var(--r-md); background: #ffffff;
    color: var(--mara-ink); font: inherit; font-size: var(--fs-base);
    transition: border-color var(--t-quick) var(--ease-out);
  }
  .rp-input:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; border-color: var(--mara-green); }
  textarea.rp-input { min-height: 72px; resize: vertical; }
  .rp-fieldhint { font-size: var(--fs-xs); color: var(--mara-muted); }
  .rp-more { border: 1px solid var(--mara-line); border-radius: var(--r-lg); background: var(--mara-card); overflow: hidden; }
  .rp-more-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 13px 14px; border: 0; background: transparent; font-family: inherit;
    font-size: var(--fs-md); font-weight: 650; color: var(--mara-green); cursor: pointer; text-align: left;
    transition: background var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-more-toggle:active { transform: scale(0.97); }
  .rp-more-hint { color: var(--mara-muted); font-weight: 500; font-size: var(--fs-xs); }
  .rp-more-body { padding: 13px 14px 14px; display: grid; gap: 13px; border-top: 1px solid var(--mara-line); }
  /* Plain block text — this is a running paragraph with an inline <a>, not a
     checkbox row. (A flex layout here squishes the link into a lopsided column.) */
  .rp-consent { font-size: var(--fs-xs); line-height: 1.45; color: var(--mara-muted); }
  .rp-consent a { color: var(--mara-green); font-weight: 600; }
  /* Optional marketing opt-in. Deliberately a separate block from .rp-consent:
     that paragraph is the Art 13 notice (no control), this one is the only
     checkbox on the form and must never look like a condition of booking. */
  .rp-optin { display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-3); font-size: var(--fs-xs); line-height: 1.45; color: var(--mara-muted); cursor: pointer; }
  .rp-optin input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--mara-green); }
  .rp-legal-card { max-width: 680px; }
  .rp-legal-copy { display: grid; gap: var(--sp-3); }
  .rp-legal-copy h2 { margin: var(--sp-2) 0 0; color: var(--mara-ink); font-size: var(--fs-md); }
  .rp-spacer { height: var(--sp-4); }
  .rp-noscript { padding: var(--sp-5); font-size: var(--fs-md); }

  /* Footer CTA */
  .rp-footer { border-top: 1px solid var(--mara-line); background: var(--mara-card); padding: 10px 18px max(24px, calc(env(safe-area-inset-bottom) + 10px)); position: sticky; bottom: 0; }
  .rp-summary {
    display: flex; align-items: center; gap: 6px; margin: 0 0 9px;
    font-size: var(--fs-sm); font-weight: 600; color: var(--mara-ink); min-height: 18px; flex-wrap: wrap;
  }
  .rp-summary .dot { color: var(--mara-line); }
  .rp-summary .ph { color: var(--mara-muted); font-weight: 500; }
  .rp-cta {
    width: 100%; min-height: 52px; border: 0; border-radius: var(--r-lg);
    background: var(--mara-green); color: var(--mara-card); font-family: inherit; font-size: var(--fs-base); font-weight: 750; cursor: pointer;
    transition: background var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-cta:active { background: var(--mara-green-dark); transform: scale(0.97); }
  .rp-cta:disabled { background: color-mix(in srgb, var(--mara-green) 22%, var(--mara-cream)); cursor: default; }
  .rp-btn2 {
    width: 100%; min-height: 50px;
    border: 1px solid color-mix(in srgb, var(--mara-ink) 32%, transparent);
    border-radius: var(--r-lg);
    background: var(--mara-card); color: var(--mara-ink); font-family: inherit; font-size: var(--fs-base); font-weight: 700; cursor: pointer;
    transition: border-color var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-btn2:active { border-color: var(--mara-green); transform: scale(0.97); }
  .rp-btn-danger {
    width: 100%; min-height: 50px;
    border: 1px solid color-mix(in srgb, var(--mara-terra) 35%, var(--mara-card));
    border-radius: var(--r-lg);
    background: transparent; color: color-mix(in srgb, var(--mara-terra) 65%, black);
    font-family: inherit; font-size: var(--fs-base); font-weight: 700; cursor: pointer;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out),
      transform var(--t-fast) var(--ease-out);
  }
  .rp-btn-danger:active { transform: scale(0.97); }
  .rp-btn-terra {
    width: 100%; min-height: 50px; border: 0; border-radius: var(--r-lg);
    background: var(--mara-terra); color: var(--mara-card); font-family: inherit; font-size: var(--fs-base); font-weight: 750; cursor: pointer;
    transition: background var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-btn-terra:active { transform: scale(0.97); }
  .rp-link {
    background: none; border: 0; padding: 12px; width: 100%; font-family: inherit;
    font-size: var(--fs-md); font-weight: 700; color: var(--mara-green); cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  }

  /* Result screens */
  .rp-result { padding: 8px 18px 28px; }
  .rp-check {
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--mara-green) 14%, var(--mara-card)); margin: 18px 0 14px;
  }
  .rp-check.terra { background: color-mix(in srgb, var(--mara-terra) 16%, var(--mara-card)); }
  .rp-result h2 { margin: 0 0 4px; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; }
  .rp-result .sub { margin: 0 0 18px; font-size: var(--fs-md); color: var(--mara-muted); line-height: 1.5; }
  .rp-card { border: 1px solid var(--mara-line); border-radius: var(--r-xl); background: var(--mara-card); overflow: hidden; margin: 0 0 14px; }
  .rp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--mara-line); font-size: var(--fs-md); }
  .rp-row:last-child { border-bottom: 0; }
  .rp-row .k { color: var(--mara-muted); font-weight: 550; flex-shrink: 0; }
  .rp-row .v { font-weight: 700; text-align: right; }
  .rp-wsnote {
    display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; padding: 11px 13px;
    border-radius: var(--r-lg); background: color-mix(in srgb, var(--mara-green) 10%, var(--mara-card));
    border: 1px solid color-mix(in srgb, var(--mara-green) 22%, var(--mara-card));
    font-size: var(--fs-sm); color: var(--mara-green); line-height: 1.45;
  }
  .rp-badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill);
    font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    background: color-mix(in srgb, var(--mara-green) 14%, var(--mara-card)); color: var(--mara-green);
  }
  .rp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .rp-badge.off { background: #ece8df; color: var(--mara-muted); }

  /* Map placeholder */
  .rp-map {
    height: 128px; border: 1px solid var(--mara-line); border-radius: var(--r-lg);
    background: repeating-linear-gradient(45deg, var(--mara-line) 0 10px, var(--mara-cream) 10px 20px);
    display: grid; place-items: center; margin: 0 0 8px;
  }
  .rp-map span {
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-2xs); color: var(--mara-muted);
    background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-xs); padding: 4px 9px;
  }
  .rp-dir { font-size: var(--fs-sm); color: var(--mara-muted); margin: 0 0 4px; }
  .rp-dir strong { color: var(--mara-ink); }
  .rp-maps-link { font-size: var(--fs-sm); font-weight: 700; color: var(--mara-green); text-decoration: none; }
  .rp-powered { margin: 26px 0 6px; text-align: center; font-size: var(--fs-2xs); color: var(--mara-muted); }
  .rp-powered b { color: var(--mara-green); font-weight: 750; }

  /* Bottom sheet (lista de espera) */
  .rp-overlay {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(23, 32, 29, 0.42); display: flex; align-items: flex-end; justify-content: center;
    transition: opacity var(--t-base) var(--ease-out);
    transition-behavior: allow-discrete;
  }
  @starting-style { .rp-overlay { opacity: 0; } }
  .rp-sheet {
    width: min(100%, 480px); background: var(--mara-cream); border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    padding: 10px 18px 36px;
    transition: transform var(--t-slow) var(--ease-spring);
    transition-behavior: allow-discrete;
  }
  @starting-style { .rp-sheet { transform: translateY(40px); } }
  .rp-sheet-handle { width: 38px; height: 4px; border-radius: var(--r-pill); background: var(--mara-line); margin: 0 auto 14px; }
  .rp-sheet h3 { margin: 0 0 4px; font-size: var(--fs-lg); font-weight: 750; }
  .rp-sheet .sub { margin: 0 0 14px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; }
  .rp-minipax { display: flex; gap: 7px; margin: 0 0 4px; }
  .rp-minipax button {
    flex: 1; min-height: 44px; border: 1px solid var(--mara-line); border-radius: var(--r-md); background: var(--mara-card);
    font-family: inherit; font-size: var(--fs-base); font-weight: 700; color: var(--mara-ink); cursor: pointer;
    transition: background var(--t-quick) var(--ease-out), border-color var(--t-quick) var(--ease-out),
      transform var(--t-fast) var(--ease-out);
  }
  .rp-minipax button:active { transform: scale(0.95); }
  .rp-minipax button.sel { background: var(--mara-green); border-color: var(--mara-green); color: var(--mara-card); }

  /* Confirm sheet (cancelar reserva). Shown via :target — the manage page ships no JS,
     so the trigger is an <a href="#rp-cancel"> and "volver" is an <a href="#">. Scoped
     under .rp-confirm* so it cannot leak into the waitlist sheet above. */
  .rp-confirm { display: none; }
  .rp-confirm:target {
    display: flex; position: fixed; inset: 0; z-index: 90;
    align-items: flex-end; justify-content: center;
  }
  .rp-confirm-scrim { position: absolute; inset: 0; background: rgba(23, 32, 29, 0.42); }
  .rp-confirm-sheet { position: relative; z-index: 1; }
  .rp-confirm-sheet .rp-q { margin: 4px 0 6px; }
  .rp-confirm-sheet form { margin: 18px 0 10px; }
  /* .rp-btn-danger / .rp-btn2 are sized for <button>; as anchors they need a box. */
  a.rp-btn-danger, a.rp-btn2 {
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; text-decoration: none;
  }

  /* Date jump — sibling of #rp-form, revealed by reserva.js on step 0 only. It lands
     just above the footer CTA because #rp-form flexes to fill the step area; the top
     border keeps it reading as a secondary zone rather than floating loose. */
  .rp-jump {
    display: flex; align-items: center; gap: 8px; padding: 10px 18px;
    border-top: 1px solid var(--mara-line);
  }
  .rp-jump.rp-hidden { display: none; }
  .rp-jump-lb { font-size: var(--fs-sm); font-weight: 650; color: var(--mara-muted); white-space: nowrap; }
  .rp-jump-date {
    flex: 1; min-width: 0; min-height: 44px; padding: 0 10px;
    border: 1px solid var(--mara-line); border-radius: var(--r-md);
    background: var(--mara-card); color: var(--mara-ink);
    font-family: inherit; font-size: var(--fs-base);
  }
  .rp-jump-go {
    min-height: 44px; padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--mara-ink) 32%, transparent);
    border-radius: var(--r-md); background: var(--mara-card); color: var(--mara-ink);
    font-family: inherit; font-size: var(--fs-base); font-weight: 700; cursor: pointer;
    transition: border-color var(--t-quick) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-jump-go:active { border-color: var(--mara-green); transform: scale(0.97); }

  /* Toast */
  .rp-toast {
    position: fixed; left: 50%; bottom: 116px; transform: translateX(-50%); z-index: 95;
    background: var(--mara-ink); color: var(--mara-cream); font-size: var(--fs-sm); font-weight: 600;
    padding: 10px 16px; border-radius: var(--r-pill); white-space: nowrap;
    transition: transform var(--t-quick) var(--ease-out);
    transition-behavior: allow-discrete;
  }
  @starting-style { .rp-toast { transform: translate(-50%, 8px); } }

  /* Step entrance: interruptible transition instead of a fire-and-forget
     keyframe. transform-only on purpose — visibility must never depend on
     the animation clock (frozen-clock contexts would hide content); the
     rp-hidden toggle above stays an instant display flip, never animated. */
  .rp-step {
    transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
    transition-behavior: allow-discrete;
  }
  @starting-style { .rp-step { opacity: 0; transform: translateY(7px); } }

  /* Hover affordances only where a real pointer is present — no sticky
     :hover states on touch. */
  @media (hover: hover) and (pointer: fine) {
    .rp-day:not(.sel):not(.closed):hover,
    .rp-time:not(.sel):not(.full):not(.past):hover,
    .rp-paxchip:not(.sel):hover,
    .rp-btn2:hover {
      border-color: var(--mara-green);
      transform: translateY(-1px);
    }
    .rp-back:hover { background: var(--mara-line); transform: translateY(-1px); }
    .rp-more-toggle:hover { background: color-mix(in srgb, var(--mara-green) 6%, var(--mara-card)); }
    .rp-cta:not(:disabled):hover { background: var(--mara-green-dark); transform: translateY(-1px); }
    .rp-btn-danger:hover {
      border-color: color-mix(in srgb, var(--mara-terra) 55%, var(--mara-card));
      background: color-mix(in srgb, var(--mara-terra) 6%, var(--mara-card));
      transform: translateY(-1px);
    }
    .rp-minipax button:hover { border-color: var(--mara-green); transform: translateY(-1px); }
  }

  @media (prefers-reduced-motion: reduce) {
    .rp-step, .rp-sheet, .rp-toast, .rp-overlay, .rp-progress span,
    .rp-day, .rp-time, .rp-paxchip, .rp-cta, .rp-btn2, .rp-btn-danger, .rp-btn-terra,
    .rp-more-toggle, .rp-back, .rp-minipax button, .rp-input {
      transition: none !important;
    }
    .rp-day:active, .rp-time:active, .rp-paxchip:active, .rp-cta:active, .rp-btn2:active,
    .rp-btn-danger:active, .rp-btn-terra:active, .rp-more-toggle:active, .rp-back:active,
    .rp-minipax button:active,
    .rp-day:hover, .rp-time:hover, .rp-paxchip:hover, .rp-cta:hover, .rp-btn2:hover,
    .rp-btn-danger:hover, .rp-back:hover, .rp-minipax button:hover {
      transform: none !important;
    }
  }

  /* ============ Pantalla 5 — Segmentos y campañas (E17, ca-* full) ============ */
  .ca-row, .ca-seg-row {
    display: grid;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #f0ece2;
    background: transparent;
    font-family: inherit;
    color: var(--mara-ink);
    text-align: left;
  }
  .ca-row { grid-template-columns: minmax(0, 1fr) 78px 180px 100px 18px; cursor: pointer; text-decoration: none; }
  .ca-row:last-child, .ca-seg-row:last-child { border-bottom: 0; }
  .ca-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .ca-row-main .nm { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ca-row-main .sb { font-size: var(--fs-xs); color: var(--mara-muted); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ca-row .ag-badge { justify-self: start; }
  .ca-resnum { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ca-resnum em { font-style: normal; color: var(--mara-muted); font-weight: 600; }
  .ca-resnum em.ok { color: var(--mara-green); }
  .ca-resnum.muted { color: #b6b0a0; }
  .ca-progreso { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
  .ca-progreso .bar { width: 86px; height: 6px; border-radius: var(--r-pill); background: #eae6da; overflow: hidden; }
  .ca-progreso .fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--mara-green); }
  .ca-progreso .num { font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }

  /* Segmentos */
  .ca-seg-row { grid-template-columns: minmax(0, 1fr) 200px auto; }
  .ca-seed {
    padding: 1.5px 7px; border-radius: var(--r-pill);
    background: #f1efe9; border: 1px solid #e3dfd3; color: #4d5a54;
    font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em;
  }
  .ca-seg-counts { font-size: 12.5px; color: var(--mara-muted); font-weight: 550; font-variant-numeric: tabular-nums; }
  .ca-seg-counts strong { color: var(--mara-ink); font-weight: 750; }
  .ca-seg-acciones { display: flex; gap: 6px; }

  /* Detalle */
  .ca-det-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
  .ca-det-meta { font-size: 12.5px; color: var(--mara-muted); font-weight: 550; }
  .ca-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ca-aviso { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 11px 14px; margin: 0 0 14px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.45; }
  .ca-aviso.info { background: #e9f0f7; border: 1px solid #c9dcef; color: #1a4a72; }
  .ca-regla { margin: -4px 2px 14px; font-size: var(--fs-xs); color: var(--mara-muted); line-height: 1.5; }
  .ca-plantilla-tag { font-size: var(--fs-2xs); font-weight: 700; color: var(--mara-muted); text-transform: uppercase; letter-spacing: 0.05em; }
  .ca-burbuja { margin: 0; max-width: 480px; padding: 11px 14px; background: #eef5ee; border: 1px solid #d4e4d6; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-xs); font-size: 13.5px; line-height: 1.5; }
  .ca-nota { margin: 0; font-size: 11.5px; color: var(--mara-muted); line-height: 1.45; }
  .ca-nota.mal { color: #8b321f; font-weight: 600; }
  .ca-sends { display: flex; flex-direction: column; }
  .ca-send-row { display: grid; grid-template-columns: 150px 120px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid #f0ece2; font-size: 12.5px; }
  .ca-send-row:last-child { border-bottom: 0; }
  .ca-send-row .nm { font-weight: 700; }
  .ca-send-row .tl { color: var(--mara-muted); font-weight: 550; font-variant-numeric: tabular-nums; }
  .ca-send-row .er { color: #8b321f; font-size: 11.5px; font-weight: 600; }
  .ca-send-row .ag-badge { justify-self: end; }
  .ca-det-acciones { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
  .ca-det-acciones .ag-btn { min-height: 38px; padding: 0 16px; font-size: var(--fs-sm); }
  .ca-confirm { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #8b321f; }

  /* Modales de campaña/segmento */
  .ca-modal { width: min(640px, 100%); }
  .ca-preview { display: grid; gap: 5px; }
  .ca-preview .lb { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mara-muted); }
  .ca-dosfilas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ca-resumen { margin-top: 14px; padding: 11px 14px; background: #eef3ee; border: 1px solid #d4e4d6; border-radius: var(--r-md); font-size: 12.5px; line-height: 1.5; }
  .ca-resumen strong { font-weight: 750; }
  .ca-resumen .coste strong { color: var(--mara-green); }
  .ca-conds { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
  .ca-conds .lb { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mara-muted); }
  .ca-cond { display: flex; align-items: center; gap: 8px; }
  .ca-cond select, .ca-cond input { min-height: 38px; padding: 6px 9px; border: 1px solid #b8c0ba; border-radius: var(--r-sm); background: #ffffff; color: var(--mara-ink); font: inherit; font-size: 12.5px; font-weight: 600; }
  .ca-cond select:focus, .ca-cond input:focus { outline: 2px solid var(--mara-green); outline-offset: -1px; }
  .ca-cond-num { display: inline-flex; align-items: center; gap: 6px; }
  .ca-cond-num input { width: 70px; }
  .ca-cond-num em { font-style: normal; font-size: var(--fs-xs); color: var(--mara-muted); font-weight: 600; }
  .ca-cond-x { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--mara-muted); font-size: var(--fs-base); cursor: pointer; font-family: inherit; }
  .ca-cond.fija { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #f1efe9; border: 1px solid #e3dfd3; border-radius: var(--r-sm); font-size: var(--fs-xs); color: #4d5a54; line-height: 1.45; }
  .ca-cond.fija .candado { flex-shrink: 0; padding: 1.5px 7px; border-radius: var(--r-pill); background: var(--mara-green); color: #fffdfa; font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; }
  .ca-hidden { display: none; }

  /* ----- Móvil (ca-*) ----- */
  @media (max-width: 760px) {
    .ca-row { grid-template-columns: minmax(0, 1fr) auto 18px; }
    .ca-row .ca-resnum, .ca-row .ca-progreso { display: none; }
    .ca-row > .ag-badge:first-of-type { display: none; }
    .ca-seg-row { grid-template-columns: 1fr; gap: 8px; }
    .ca-seg-acciones .ag-btn { min-height: 42px; flex: 1; }
    .ca-kpis { grid-template-columns: 1fr 1fr; }
    .ca-send-row { grid-template-columns: minmax(0, 1fr) auto; }
    .ca-send-row .tl, .ca-send-row .er { display: none; }
    .ca-det-acciones { flex-wrap: wrap; }
    .ca-det-acciones .ag-btn { min-height: 44px; flex: 1; }
    .ca-cond { flex-wrap: wrap; }
  }

  /* ============ Pantalla — Consultas (L10-2, inq-*) ============ */
  .inq-row {
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.6fr) 90px auto;
    width: 100%;
    padding: 11px 14px;
    border-bottom: 1px solid #f0ece2;
  }
  .inq-row:last-child { border-bottom: 0; }
  .inq-row .inq-who { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .inq-row .inq-who .nm { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .inq-contact { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: var(--fs-xs); color: var(--mara-muted); font-weight: 550; }
  .inq-contact span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .inq-msg { min-width: 0; font-size: 12.5px; color: var(--mara-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .inq-date { font-size: 12px; color: var(--mara-muted); font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .inq-actions { display: flex; gap: 6px; justify-self: end; }
  .inq-actions .ag-btn { min-height: 32px; padding: 0 12px; font-size: var(--fs-xs); }

  @media (max-width: 760px) {
    .inq-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
    .inq-actions { justify-self: start; flex-wrap: wrap; }
    .inq-actions .ag-btn { min-height: 42px; flex: 1; }
  }

  /* ============ Pantalla — Eventos (L10-3, ev-*) ============ */
  .ev-error { margin: 0 0 14px; padding: 9px 12px; background: #fbe4e0; border: 1px solid #f0c2b8; border-radius: var(--r-sm); font-size: var(--fs-xs); color: #8a2f1f; line-height: 1.4; }
  .ev-hint { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--mara-muted); }
  .ev-form { margin-bottom: 18px; }
  .ev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .ev-grid .ev-span2 { grid-column: 1 / -1; }
  .ev-grid .fld input, .ev-grid .fld select, .ev-grid .fld textarea { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; font-size: 13px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: var(--mara-card); color: var(--mara-ink); font-family: inherit; }
  .ev-grid .fld textarea { min-height: 72px; resize: vertical; }
  .ev-grid .fld input:focus, .ev-grid .fld select:focus, .ev-grid .fld textarea:focus { outline: none; border-color: var(--mara-green); }
  .ev-grid button.ag-btn { min-height: 44px; }
  @media (max-width: 640px) {
    .ev-grid { grid-template-columns: 1fr; }
  }

  .ev-row {
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.6fr) minmax(0, 1.4fr);
    width: 100%;
    padding: 11px 14px;
    border-bottom: 1px solid #f0ece2;
    color: inherit;
    text-decoration: none;
  }
  .ev-row:last-child { border-bottom: 0; }
  .ev-row .ev-who { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .ev-row .ev-who .nm { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ev-when { font-size: 12.5px; color: var(--mara-muted); font-weight: 550; white-space: nowrap; }
  .ev-seats { font-size: 12.5px; font-weight: 700; color: var(--mara-ink); font-variant-numeric: tabular-nums; }
  .ev-link { min-width: 0; font-size: 12px; color: var(--mara-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  @media (max-width: 760px) {
    .ev-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
  }

  .ev-public-url { margin: 0; font-size: 13px; word-break: break-all; }
  .ev-public-url a { color: var(--mara-green); }
  .ev-det-acciones { display: flex; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }

  .ev-attendees { display: grid; gap: 0; }
  .ev-attendee-row {
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 60px 90px;
    padding: 9px 0;
    border-bottom: 1px solid #f0ece2;
    font-size: 12.5px;
  }
  .ev-attendee-row:last-child { border-bottom: 0; }
  .ev-attendee-row .nm { font-weight: 700; }
  .ev-attendee-row .ct { min-width: 0; color: var(--mara-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  @media (max-width: 640px) {
    .ev-attendee-row { grid-template-columns: 1fr 1fr; }
  }

  .ev-pub-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--r-lg); margin: 0 0 14px; }

  /* Phase 2b: Clientes + Campañas composition */
  .lc-main, .ca-main, .inq-main { width: 100%; max-width: 1080px; margin: 0 auto; }
  .lc-heading, .ca-heading { display: grid; gap: 4px; min-width: 0; }
  .lc-kicker, .ca-kicker {
    color: var(--mara-muted);
    font-size: var(--fs-xs);
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .lc-subtitle, .ca-subtitle { margin: 0; color: var(--mara-muted); font-size: var(--fs-sm); line-height: 1.45; }
  .lc-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(150px, 1fr)) minmax(150px, 0.9fr);
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .lc-search, .lc-filtro { min-height: 44px; }
  .lc-search { width: 100%; }
  .lc-filtro { width: 100%; }
  .lc-count { margin: 0 0 8px; }
  .lc-tabla { box-shadow: var(--shadow-xs); }
  .lc-row { min-height: 64px; transition: background-color 160ms ease, transform 120ms ease; }
  .lc-row:active { transform: scale(0.995); }
  .lc-row-meta { display: none; }
  .ca-headrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 14px;
    margin: 0 0 20px;
  }
  .ca-primary-action { width: auto; margin-top: 0; white-space: nowrap; }
  .ca-subtabs { margin: 0; align-self: end; min-height: 40px; align-items: center; }
  .ca-subtab { min-height: 36px; }
  .ca-table { box-shadow: var(--shadow-xs); }
  .ca-row, .ca-seg-row { min-height: 64px; }
  .ca-row-meta { display: none; }
  .ca-row:active { transform: scale(0.995); }
  .ca-det-head { margin-bottom: 20px; }
  .ca-det-head .lc-title { width: 100%; }

  @media (max-width: 900px) {
    .lc-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, 1fr)); }
    .lc-sortsel { display: block; }
    .ca-headrow { grid-template-columns: minmax(0, 1fr) auto; }
    .ca-headrow .ag-dayspacer { display: none; }
    .ca-primary-action { grid-column: 2; grid-row: 1 / span 2; }
  }

  @media (max-width: 760px) {
    .lc-headrow { align-items: stretch; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
    .lc-heading { width: 100%; }
    .lc-headrow .ag-dayspacer { display: none; }
    .lc-export { width: 100%; min-height: 44px; }
    .lc-toolbar { grid-template-columns: 1fr; gap: 8px; }
    .lc-toolbar .lc-search { grid-row: auto; }
    .lc-row { grid-template-columns: 1fr 24px; gap: 8px; padding: 12px 14px; }
    .lc-row-meta { display: block; grid-column: 1; margin-top: 2px; color: var(--mara-muted); font-size: var(--fs-xs); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lc-cliente { grid-row: 1; }
    .lc-row .lc-chev { grid-column: 2; grid-row: 1 / span 2; }
    .ca-headrow { grid-template-columns: 1fr; align-items: stretch; gap: 10px; margin-bottom: 16px; }
    .ca-primary-action { grid-column: auto; grid-row: auto; width: 100%; }
    .ca-subtabs { width: fit-content; align-self: start; }
    .ca-row { grid-template-columns: minmax(0, 1fr) auto 18px; min-height: 72px; padding: 12px 14px; }
    .ca-row .ca-resnum, .ca-row .ca-progreso, .ca-row > .ag-badge:first-of-type { display: none; }
    .ca-row-meta { display: block; margin-top: 3px; color: var(--mara-muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ca-seg-row { min-height: 0; }
    .ca-kpis { margin-bottom: 18px; }
  }

  /* ───────── Pantalla 10 · Mesas ───────── */
  .ag-head { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; flex-wrap: wrap; }
  .ag-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
  .ag-headspacer { flex: 1; }
  .ag-sub { margin: 0 0 18px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; max-width: 62ch; }
  label.fld { display: grid; gap: 7px; color: #2f3c37; font-size: 13.5px; font-weight: 650; }

  /* Selector de vista (Plano / Lista) */
  .ms-vista { display: inline-flex; gap: 3px; padding: 3px; background: #eceadf; border-radius: var(--r-md); }
  .ms-vista-b { min-height: 30px; padding: 0 14px; display: inline-flex; align-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--mara-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none; }
  .ms-vista-b.on { background: var(--mara-card); color: var(--mara-green); box-shadow: var(--shadow-xs); }

  /* Tarjeta de zona */
  .ms-zcard { background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-lg); margin: 0 0 14px; overflow: hidden; }
  .ms-zhead { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mara-line); flex-wrap: wrap; }
  .ms-zhead h2 { margin: 0; font-size: var(--fs-sm); font-weight: 750; color: var(--mara-ink); white-space: nowrap; }
  .ms-zbody { padding: 16px 18px; }
  .ms-zone-dot { width: 11px; height: 11px; border-radius: var(--r-xs); flex-shrink: 0; }
  .ms-zone-meta { font-size: 11.5px; font-weight: 600; color: var(--mara-muted); white-space: nowrap; }
  .ms-zone-cap { color: #9a9384; }
  .ms-zone-cap.over { color: #8b321f; font-weight: 750; }
  .ms-addz { min-height: 30px; padding: 0 11px; font-size: 11.5px; }
  .ms-warn { margin: 12px 0 0; padding: 9px 12px; background: #fff5ec; border: 1px solid #f0d9bf; border-radius: var(--r-sm); font-size: var(--fs-xs); color: #8a5a10; line-height: 1.4; }
  .ms-empty { margin: 0; font-size: var(--fs-xs); color: var(--mara-muted); }

  /* Plano (fichas de mesa) */
  .ms-floor { display: flex; flex-wrap: wrap; gap: 11px; }
  .ms-tile { height: 64px; min-width: 60px; border: 1.5px solid var(--mara-line); border-radius: var(--r-lg); background: #ffffff; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--mara-ink); position: relative; text-decoration: none; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); box-shadow: inset 0 -3px 0 rgba(22,83,70,0.06); }
  .ms-tile:active { transform: translateY(1px); }
  .ms-tile.comb { border-style: dashed; }
  .ms-tile.off { opacity: 0.55; background: repeating-linear-gradient(45deg, #fbfaf6 0 6px, #f3f0e8 6px 12px); box-shadow: none; }
  .ms-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .ms-tile-label { font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.01em; }
  .ms-tile-comb { font-size: var(--fs-2xs); color: var(--mara-green); }
  .ms-tile-cap { font-size: var(--fs-xs); font-weight: 700; color: var(--mara-muted); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 3px; }
  .ms-tile-cap small { font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
  .ms-tile-off { position: absolute; top: 6px; right: 8px; font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.05em; color: #a8a08f; }

  /* Lista (filas) */
  .ms-rows { display: flex; flex-direction: column; }
  .ms-row { display: flex; align-items: center; gap: 16px; padding: 11px 4px; border-bottom: 1px solid #f0ece2; }
  .ms-row:last-child { border-bottom: 0; }
  .ms-row.off { opacity: 0.6; }
  .ms-row-label { font-size: var(--fs-md); font-weight: 800; min-width: 42px; }
  .ms-cap-chip { font-size: var(--fs-xs); font-weight: 700; color: var(--mara-ink); background: #eef3ef; border: 1px solid #d9e6df; border-radius: var(--r-pill); padding: 3px 10px; font-variant-numeric: tabular-nums; }
  .ms-cap-chip small { font-weight: 600; color: var(--mara-muted); }
  .ms-row-tg { margin: 0; font-size: 11.5px; color: var(--mara-muted); font-weight: 650; }
  .ms-row-form { margin: 0; display: inline-flex; }
  .ms-tg-lb { white-space: nowrap; }

  /* Modal editor */
  .ms-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(17,27,24,0.42); display: grid; place-items: center; padding: 24px; animation: ms-fade 0.14s ease; }
  @keyframes ms-fade { from { opacity: 0; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    .ms-overlay { animation: none; }
    .ms-tile { transition: none; }
    .ms-tile:active { transform: none; }
  }
  .ms-modal { width: 100%; max-width: 480px; background: var(--mara-card); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-modal); }
  .ms-modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--mara-line); }
  .ms-modal-head h3 { margin: 0; flex: 1; font-size: 16px; font-weight: 800; }
  .ms-x { width: 30px; height: 30px; flex-shrink: 0; display: inline-grid; place-items: center; border: 0; border-radius: var(--r-sm); background: #f1ede4; color: var(--mara-muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: none; }
  .ms-modal-body { padding: 18px; }
  .ms-modal-toggles { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--mara-line); }
  .ms-modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--mara-line); background: #fbfaf6; }
  .ms-modal-foot form { margin: 0; }
  .ms-foot-right { display: flex; gap: 8px; }

  @media (max-width: 720px) {
    .ms-row { flex-wrap: wrap; gap: 10px; }
    .ms-row .ag-headspacer { display: none; }
    .ms-modal { max-width: 100%; }
    .ms-zhead { gap: 8px; }
  }

  /* ───────────────────── Pantalla 11 · Contenido ───────────────────── */
  .cont-main { max-width: 1140px; }
  .ag-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
  .ag-title { margin: 0; font-size: var(--fs-xl); font-weight: 800; color: var(--mara-ink); letter-spacing: -0.01em; }
  .ag-headspacer { flex: 1; }
  .ag-sub { margin: 0 0 18px; max-width: 720px; font-size: var(--fs-sm); line-height: 1.5; color: var(--mara-muted); }
  .ag-badge.muted { background: #efece4; color: var(--mara-muted); }

  .cont-layout { display: block; }
  .cont-layout.con-preview { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
  .cont-form { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

  /* Content cards: vertical (override the agenda row-card .ag-card) */
  .cont-form .ag-card { display: block; box-shadow: var(--shadow-sm); }
  .cont-form .ag-card::before { display: none; }
  .ag-card-head { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--mara-line); }
  .ag-card-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 750; color: var(--mara-ink); }
  .ag-card-head .ico { font-size: var(--fs-base); line-height: 1; }
  .ag-card-body { padding: 16px; }
  .cont-stack { display: flex; flex-direction: column; gap: 16px; }

  .cont-form .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .cont-form .fld { display: grid; gap: 7px; margin: 0; color: #2f3c37; font-size: var(--fs-xs); font-weight: 750; }
  .cont-form .fld.full { grid-column: 1 / -1; }
  .cont-form .fld input,
  .cont-form .fld textarea,
  .cont-dish-row input { width: 100%; border: 1px solid #b8c0ba; border-radius: var(--r-sm); min-height: 40px; padding: 9px 11px; color: var(--mara-ink); background: #ffffff; font-family: inherit; font-size: 13.5px; font-weight: 500; }
  .cont-form .fld textarea { min-height: 0; line-height: 1.5; resize: vertical; }
  .cont-form .fld input:focus,
  .cont-form .fld textarea:focus,
  .cont-dish-row input:focus { outline: none; border-color: var(--mara-green); box-shadow: var(--focus-ring); }
  .cont-form .fld input:disabled { background: #f2efe9; color: var(--mara-muted); }
  .cont-form .fld .hint { font-weight: 500; }

  /* Platos especiales */
  .cont-dishes { display: flex; flex-direction: column; gap: 8px; }
  .cont-dish-row { display: flex; gap: 8px; align-items: center; }
  .cont-dish-row input { flex: 1; }
  .cont-dish-x { width: 42px; height: 42px; flex-shrink: 0; border: 1px solid #e8c7bc; border-radius: var(--r-sm); background: #fff1ed; color: #8b321f; cursor: pointer; font-size: var(--fs-sm); }

  /* Vista previa (chat del asistente) */
  .cont-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
  .cont-pv-head { display: flex; align-items: center; gap: 7px; font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-muted); }
  .cont-pv-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 3px rgba(43, 182, 115, 0.18); }
  .cont-chat { background: #ece6dd; border: 1px solid var(--mara-line); border-radius: var(--r-xl); overflow: hidden; }
  .cont-chat-top { display: flex; align-items: center; gap: 9px; padding: 11px 13px; background: var(--mara-green); color: #fffdfa; }
  .cont-chat-av { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 253, 250, 0.18); border: 1px solid rgba(255, 253, 250, 0.3); display: grid; place-items: center; font-size: var(--fs-2xs); font-weight: 750; }
  .cont-chat-name { font-size: var(--fs-sm); font-weight: 750; }
  .cont-chat-sub { font-size: var(--fs-2xs); opacity: 0.85; }
  .cont-chat-body { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background-image: radial-gradient(rgba(22, 83, 70, 0.05) 1px, transparent 1px); background-size: 14px 14px; }
  .cont-bub { max-width: 86%; padding: 9px 12px; border-radius: var(--r-xl); font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-xs); }
  .cont-bub.in { align-self: flex-start; background: #fffdfa; border-bottom-left-radius: var(--r-xs); color: var(--mara-ink); }
  .cont-bub.out { align-self: flex-end; background: #d6f0d8; border-bottom-right-radius: var(--r-xs); color: #143a1a; }
  .cont-bub em { color: var(--mara-green); font-style: italic; }
  .cont-dishlist { margin: 6px 0 4px; padding-left: 18px; }
  .cont-dishlist li { font-weight: 650; line-height: 1.3; margin-bottom: 3px; }
  .cont-link { color: var(--mara-green); font-weight: 700; text-decoration: underline; word-break: break-all; }
  .cont-pv-foot { margin: 0; font-size: var(--fs-2xs); color: var(--mara-muted); line-height: 1.45; }

  /* Móvil */
  .ag.movil .cont-layout.con-preview { grid-template-columns: 1fr; }
  .ag.movil .cont-form .grid { grid-template-columns: 1fr; }
  .ag.movil .cont-dish-x { width: 44px; height: 44px; }
  @media (max-width: 720px) {
    .cont-layout.con-preview { grid-template-columns: 1fr; }
    .cont-form .grid { grid-template-columns: 1fr; }
    .cont-preview { position: static; }
  }

  /* ===================================================================== */
  /* Pantalla 9 · Disponibilidad (ag-* design system)                      */
  /* ===================================================================== */
  .disp-form [hidden] { display: none !important; }
  .disp-lead { font-size: var(--fs-sm); color: var(--mara-muted); margin: 0 0 18px; max-width: 70ch; line-height: 1.5; }
  .disp-note { font-size: var(--fs-xs); color: var(--mara-muted); margin: 14px 0 0; line-height: 1.5; }
  .ag-kpi .vl small { font-size: var(--fs-sm); font-weight: 600; color: var(--mara-muted); }

  /* Cards */
  .disp-card { background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-lg); margin: 0 0 18px; overflow: hidden; }
  .disp-card-head { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--mara-line); }
  .disp-card-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 750; color: var(--mara-ink); }
  .disp-card-head .ico { font-size: var(--fs-base); line-height: 1; }
  .disp-card-body { padding: 14px 16px; }

  /* Leyenda */
  .disp-leg { display: flex; gap: 12px; }
  .disp-leg em { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: var(--fs-2xs); font-weight: 650; color: var(--mara-muted); }
  .disp-leg em::before { content: ""; width: 11px; height: 11px; border-radius: var(--r-xs); }
  .disp-leg em.comida::before { background: #8cbaa4; }
  .disp-leg em.cena::before { background: var(--mara-green); }

  /* Línea de tiempo */
  .disp-tl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .disp-tl-scroll:focus-visible { outline: 2px solid var(--mara-green); outline-offset: 2px; border-radius: var(--r-sm); }
  .disp-tl-scroll .disp-tl { min-width: 460px; }
  .disp-tl { display: flex; flex-direction: column; gap: 5px; }
  .disp-tl-axis, .disp-tl-row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
  .disp-tl-daycol { font-size: 11.5px; font-weight: 700; color: var(--mara-muted); text-transform: capitalize; }
  .disp-tl-track { position: relative; height: 30px; }
  .disp-tl-track.head { height: 16px; }
  .disp-tl-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--fs-2xs); font-weight: 650; color: var(--mara-muted); }
  .disp-tl-row .disp-tl-track { background: #f3f0e8; border-radius: var(--r-sm); border: 1px solid var(--mara-line); }
  .disp-tl-row.cerrado .disp-tl-track { background: repeating-linear-gradient(45deg, #f2efe7 0 6px, #ece8df 6px 12px); }
  .disp-tl-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(23,32,29,0.06); }
  .disp-tl-cerrado { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: var(--fs-2xs); font-weight: 700; color: #aaa291; text-transform: uppercase; letter-spacing: 0.05em; }
  .disp-tl-blk { position: absolute; top: 3px; bottom: 3px; border-radius: var(--r-xs); display: flex; align-items: center; padding: 0 7px; overflow: hidden; min-width: 0; }
  .disp-tl-blk.lunch { background: #8cbaa4; }
  .disp-tl-blk.dinner { background: var(--mara-green); }
  .disp-tl-blk-lb { font-size: var(--fs-2xs); font-weight: 750; color: #fffdfa; white-space: nowrap; }
  .disp-tl-blk.lunch .disp-tl-blk-lb { color: #11352a; }

  /* Lista de días */
  .disp-days { display: flex; flex-direction: column; gap: 8px; }
  .disp-day { border: 1px solid var(--mara-line); border-radius: var(--r-md); overflow: hidden; background: var(--mara-card); }
  .disp-day.cerrado { opacity: 0.72; }
  .disp-day-sum { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
  .disp-day-sum::-webkit-details-marker { display: none; }
  .disp-day-name { font-size: var(--fs-md); font-weight: 750; min-width: 92px; }
  .disp-day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .disp-day-chip { font-size: var(--fs-2xs); font-weight: 650; color: var(--mara-green); background: #e9f3ee; border: 1px solid #d2e6db; border-radius: var(--r-pill); padding: 2px 9px; }
  .disp-chev { color: var(--mara-green); font-size: var(--fs-xs); transition: transform 0.15s; }
  .disp-day[open] .disp-chev { transform: rotate(180deg); }
  .disp-day-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 14px; }

  /* Tarjeta de turno */
  .disp-shift { border: 1px solid var(--mara-line); border-radius: var(--r-md); overflow: hidden; }
  .disp-shift.off { opacity: 0.92; }
  .disp-shift-head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--mara-cream); border-bottom: 1px solid var(--mara-line); }
  .disp-shift-name { font-size: 12.5px; font-weight: 750; }
  .disp-shift-body { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; padding: 11px 12px; }
  .disp-shift-body .fld:nth-of-type(4) { grid-column: 1 / -1; }
  .disp-shift.off .disp-shift-body { opacity: 0.4; }

  /* Campos */
  .disp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .disp-form .fld { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-2xs); color: var(--mara-muted); font-weight: 600; min-width: 0; }
  .disp-form .fld input, .disp-form .fld select { width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px; font-size: 12.5px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: var(--mara-card); color: var(--mara-ink); font-family: inherit; }
  .disp-form .fld input:focus, .disp-form .fld select:focus { outline: none; border-color: var(--mara-green); }
  .disp-form .fld input:disabled { background: #f3f0e8; color: var(--mara-muted); }
  .disp-hint { font-size: var(--fs-2xs); color: var(--mara-muted); font-weight: 500; }

  @media (max-width: 760px) {
    .disp-day-body { grid-template-columns: 1fr; }
    .disp-grid { grid-template-columns: 1fr; }
    .disp-shift-body { grid-template-columns: 1fr 1fr; }
    .disp-shift-body .fld:nth-of-type(3), .disp-shift-body .fld:nth-of-type(4) { grid-column: 1 / -1; }
    .disp-day-name { min-width: 0; }
    .disp-day-chips { display: none; }
  }

/* ============================================================
   Pantalla 12 — Ajustes  (aj-*)
   Fuente: design_handoff .../Pantalla 12 - Ajustes.html + mara-chrome.css
============================================================ */
  .aj-page { max-width: 1040px; }
  .aj-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
  .aj-main, .aj-side { min-width: 0; }
  .aj-main > .aj-card:last-child, .aj-side > .aj-card:last-child { margin-bottom: 0; }

  /* Page header */
  .aj-head { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; flex-wrap: wrap; }
  .aj-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--mara-ink); }
  .aj-headspacer { flex: 1; }
  .aj-sub { margin: 0 0 18px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; max-width: 62ch; }
  .aj-error { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-sm); background: #fdebe4; color: #8b321f; font-size: var(--fs-sm); font-weight: 600; }

  /* Card */
  .aj-card { background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-lg); padding: 0; margin: 0 0 14px; overflow: hidden; }
  .aj-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mara-line); }
  .aj-card-head h2 { margin: 0; font-size: var(--fs-xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-ink); white-space: nowrap; }
  .aj-card-head .ico { font-size: var(--fs-md); }
  .aj-card-body { padding: 16px 18px; }
  .aj-card-body.aj-canales { padding: 0; }

  /* Buttons */
  .aj-btn { min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--r-sm); border: 1px solid transparent; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; }
  .aj-btn.pri { background: var(--mara-green); color: #fffdfa; }
  .aj-btn.sec { background: #ffffff; border-color: var(--mara-line); color: var(--mara-ink); }
  .aj-btn.danger { background: #fff1ed; border-color: #e8c7bc; color: #8b321f; }
  .aj-btn:disabled { opacity: 0.45; cursor: default; }

  /* Badges */
  .aj-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
  .aj-badge.green { background: #dcf0e8; color: var(--mara-green); }
  .aj-badge.muted { background: #f0ece4; color: var(--mara-muted); }
  .aj-badge.amber { background: #fdebc8; color: #8a5a10; }

  /* Form fields */
  .aj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .aj-fld { display: grid; gap: 7px; color: #2f3c37; font-size: 13.5px; font-weight: 650; }
  .aj-fld.aj-full { grid-column: 1 / -1; }
  .aj-page input, .aj-page select { min-height: 40px; padding: 0 11px; border: 1px solid #b8c0ba; border-radius: var(--r-sm); background: #ffffff; color: var(--mara-ink); font-family: inherit; font-size: 13.5px; }
  .aj-page input:focus, .aj-page select:focus { outline: none; border-color: var(--mara-green); box-shadow: var(--focus-ring); }
  .aj-page input[readonly] { background: #f2efe9; color: var(--mara-muted); cursor: default; }
  .aj-hint { font-size: 11.5px; font-weight: 500; color: var(--mara-muted); line-height: 1.4; }
  .aj-hint strong { font-weight: 700; color: var(--mara-ink); }
  .aj-form-foot { margin-top: 16px; }

  /* Status dot */
  .aj-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
  .aj-status-dot.live { background: #2bb673; box-shadow: 0 0 0 3px rgba(43,182,115,0.18); }
  .aj-status-dot.warn { background: #d99a2b; box-shadow: 0 0 0 3px rgba(217,154,43,0.18); }
  .aj-status-dot.off { background: var(--mara-muted); box-shadow: 0 0 0 3px rgba(122,130,125,0.16); }

  /* Estado / activacion */
  .aj-estado-ok { display: flex; align-items: flex-start; gap: 12px; }
  .aj-estado-txt { min-width: 0; flex: 1; }
  .aj-estado-h { font-size: var(--fs-base); font-weight: 800; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
  .aj-estado-p { margin: 4px 0 0; font-size: 12.5px; color: var(--mara-muted); line-height: 1.5; max-width: 60ch; }
  .aj-checks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .aj-checks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
  .aj-check-ico { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: var(--fs-xs); font-weight: 800; flex-shrink: 0; }
  .aj-checks li.ok .aj-check-ico { background: #dcf0e8; color: var(--mara-green); }
  .aj-checks li.no .aj-check-ico { background: #fdebe4; color: #8b321f; }
  .aj-checks li.no { color: #8b321f; }
  .aj-activar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .aj-activar-row-spaced { margin-top: 14px; }
  .aj-activar-row form { margin: 0; }

  /* Canales */
  .aj-canal { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #f0ece2; }
  .aj-canal:last-child { border-bottom: 0; }
  .aj-canal-main { min-width: 0; flex: 0 1 auto; }
  .aj-canal-top { display: flex; align-items: center; gap: 9px; }
  .aj-canal-name { font-size: var(--fs-md); font-weight: 750; }
  .aj-canal-detalle { font-size: 12.5px; font-weight: 650; color: var(--mara-ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
  .aj-canal-desc { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--mara-muted); line-height: 1.45; max-width: 52ch; }

  /* Slug */
  .aj-slug { display: flex; align-items: stretch; border: 1px solid #b8c0ba; border-radius: var(--r-sm); overflow: hidden; }
  .aj-slug:focus-within { border-color: var(--mara-green); box-shadow: var(--focus-ring); }
  .aj-slug-pre { display: grid; place-items: center; padding: 0 11px; background: #f1ede4; color: var(--mara-muted); font-size: var(--fs-sm); font-weight: 650; white-space: nowrap; border-right: 1px solid var(--mara-line); }
  .aj-slug input { border: 0; border-radius: 0; min-height: 42px; }
  .aj-slug input:focus { box-shadow: none; }

  /* Equipo */
  .aj-users { display: flex; flex-direction: column; }
  .aj-user { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; padding: 11px 2px; border-bottom: 1px solid #f0ece2; margin: 0; }
  .aj-user.off { opacity: 0.55; }
  .aj-user-av { width: 36px; height: 36px; border-radius: 50%; background: #e7efe9; color: var(--mara-green); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 750; flex-shrink: 0; }
  .aj-user-main { flex: 1; min-width: 120px; }
  .aj-user-email { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .aj-user-lastlogin { font-size: 11.5px; color: var(--mara-muted); }
  .aj-user-role { width: auto; min-height: 36px; min-width: 130px; padding: 6px 9px; font-size: 12.5px; }
  .aj-user-tg { font-size: 11.5px; color: var(--mara-muted); font-weight: 650; min-width: 92px; }
  .aj-user-save { width: fit-content; min-height: 34px; padding: 0 12px; }
  .aj-tg-lb { white-space: nowrap; }
  .aj-invite { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--mara-line); }
  .aj-invite input { flex: 1; }
  .aj-invite select { width: auto; min-width: 140px; }
  .aj-roles-leyenda { margin: 12px 0 0; line-height: 1.6; }

  /* Zona de peligro */
  .aj-danger { border-color: #ecd2c8; }
  .aj-danger .aj-card-head { border-bottom-color: #f0ddd5; }
  .aj-danger-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .aj-danger-h { font-size: 13.5px; font-weight: 750; }
  .aj-danger-p { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--mara-muted); line-height: 1.45; max-width: 58ch; }
  .aj-confirm summary { list-style: none; cursor: pointer; display: inline-flex; }
  .aj-confirm summary::-webkit-details-marker { display: none; }
  .aj-confirm-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border: 1px solid #e8c7bc; border-radius: var(--r-sm); background: #fff6f3; font-size: 12.5px; font-weight: 600; color: #8b321f; }
  .aj-confirm-box form { margin: 0; }

  /* Movil */
  @media (max-width: 760px) {
    .aj-layout { grid-template-columns: 1fr; }
    .aj-grid { grid-template-columns: 1fr; }
    .aj-user { flex-wrap: wrap; }
    .aj-user-role { min-width: 110px; }
    .aj-invite { flex-wrap: wrap; }
    .aj-invite input { flex-basis: 100%; }
    .aj-estado-ok, .aj-canal, .aj-danger-body { flex-wrap: wrap; }
  }

  /* Phase 2c: operational states and phone-first affordances. */
  .disp-error { margin: -4px 0 16px; }
  .disp-empty { display: grid; gap: 5px; padding: 20px; border: 1px dashed var(--mara-line); border-radius: var(--r-lg); background: #e9f3ee; color: var(--mara-green); text-align: center; }
  .disp-empty strong { font-size: var(--fs-sm); }
  .disp-empty span { color: var(--mara-muted); font-size: var(--fs-xs); }
  .disp-shift-head { min-height: 44px; }
  .disp-form .ag-btn, .cont-form .ag-btn { min-height: 44px; }
  .disp-tl-tick, .disp-hint, .cont-pv-foot { font-size: 11px; }
  .cont-empty { color: var(--mara-muted); }
  .cont-preview { min-width: 0; }
  .cont-chat { box-shadow: var(--shadow-xs); }
  .cont-chat-name { display: block; font-size: var(--fs-sm); }
  .cont-chat-sub { display: block; color: rgba(255, 253, 250, 0.85); font-size: 11px; opacity: 1; }
  .cont-dish-x { min-width: 44px; min-height: 44px; }
  .cont-dish-x:active, .cont-form .ag-btn:active, .disp-form .ag-btn:active { transform: scale(.97); }

  @media (prefers-reduced-motion: reduce) {
    .cont-dish-x, .cont-form .ag-btn, .disp-form .ag-btn { transition: none; }
  }

  /* Phase 2c: Mesas and QR composition. */
  .ms-page { display: grid; gap: 16px; }
  .ms-head { align-items: end; gap: 16px; }
  .ms-head-copy { display: flex; align-items: end; gap: 16px; min-width: 0; }
  .ms-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .ms-head-actions .ag-btn, .ms-qr-actions .ag-btn { width: auto; min-height: 44px; }
  .ms-qr-link { color: var(--mara-green); }
  .ms-settings-note { margin: 0; }
  .ms-vista-b, .ms-addz, .ms-x { min-height: 44px; }
  .ms-empty-state { display: grid; gap: 6px; margin-top: 0; padding: 24px; border: 1px dashed var(--mara-line); border-radius: var(--r-lg); background: #e9f3ee; color: var(--mara-green); text-align: center; }
  .ms-empty-state strong { font-size: var(--fs-md); }
  .ms-empty-state span { color: var(--mara-muted); font-size: var(--fs-sm); }
  .ms-qr-page { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
  .ms-qr-back { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; color: var(--mara-green); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
  .ms-qr-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding: 24px; border: 1px solid var(--mara-line); border-radius: var(--r-xl); background: var(--mara-card); box-shadow: var(--shadow-sm); }
  .ms-qr-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-lg); background: #e9f3ee; color: var(--mara-green); }
  .ms-qr-icon .material-symbols-outlined { font-size: 34px; }
  .ms-qr-copy { display: grid; gap: 8px; }
  .ms-qr-kicker { margin: 0; color: var(--mara-green); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .ms-qr-copy h1 { margin: 0; color: var(--mara-ink); font-size: 19px; line-height: 1.25; }
  .ms-qr-copy p:not(.ms-qr-kicker) { margin: 0; color: var(--mara-muted); font-size: var(--fs-sm); line-height: 1.5; }
  .ms-qr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  @media (max-width: 700px) {
    .ms-head, .ms-head-copy { align-items: stretch; }
    .ms-head, .ms-head-copy, .ms-head-actions { flex-direction: column; }
    .ms-head-actions .ag-btn { width: 100%; justify-content: center; }
    .ms-qr-card { grid-template-columns: 1fr; padding: 20px; }
    .ms-qr-icon { width: 56px; height: 56px; }
    .ms-qr-actions { flex-direction: column; }
    .ms-qr-actions .ag-btn { width: 100%; justify-content: center; }
  }

  /* ============================================================
     Pantalla 13 — Auditoría  (aud-*)
  ============================================================ */
  .aud-page { max-width: 900px; }
  .aud-head { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; flex-wrap: wrap; }
  .aud-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--mara-ink); }
  .aud-headspacer { flex: 1; }
  .aud-sub { margin: 0 0 18px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; max-width: 62ch; }

  .aud-card { background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-lg); overflow: hidden; }
  .aud-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mara-line); }
  .aud-card-head h2 { margin: 0; font-size: var(--fs-xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-ink); white-space: nowrap; }
  .aud-card-head .ico { font-size: var(--fs-md); }

  .aud-table-scroll { overflow-x: auto; }
  .aud-table-scroll:focus-visible { outline: 2px solid var(--mara-green); outline-offset: 2px; border-radius: var(--r-sm); }
  .aud-table { width: 100%; border-collapse: collapse; min-width: 620px; }
  .aud-table th { text-align: left; padding: 9px 18px; font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mara-muted); border-bottom: 1px solid var(--mara-line); white-space: nowrap; }
  .aud-table td { padding: 11px 18px; font-size: var(--fs-sm); color: var(--mara-ink); border-bottom: 1px solid var(--mara-line); vertical-align: top; }
  .aud-table tbody tr:last-child td { border-bottom: none; }
  .aud-table tbody tr { transition: background var(--t-fast) var(--ease-out); }
  .aud-when { white-space: nowrap; color: var(--mara-muted); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
  .aud-actor { font-weight: 650; }

  .aud-empty { display: grid; gap: 5px; padding: 32px 20px; text-align: center; }
  .aud-empty strong { font-size: var(--fs-sm); color: var(--mara-ink); }
  .aud-empty span { color: var(--mara-muted); font-size: var(--fs-xs); }

  @media (prefers-reduced-motion: reduce) {
    .aud-table tbody tr { transition: none; }
  }

  /* ============================================================
     Pantalla 14 — Usuarios  (usr-*)
  ============================================================ */
  .usr-page { max-width: 900px; }
  .usr-head { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; flex-wrap: wrap; }
  .usr-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--mara-ink); }
  .usr-headspacer { flex: 1; }
  .usr-sub { margin: 0 0 18px; font-size: var(--fs-sm); color: var(--mara-muted); line-height: 1.5; max-width: 62ch; }

  .usr-card { background: var(--mara-card); border: 1px solid var(--mara-line); border-radius: var(--r-lg); overflow: hidden; margin: 0 0 16px; }
  .usr-card:last-child { margin-bottom: 0; }
  .usr-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mara-line); }
  .usr-card-head h2 { margin: 0; font-size: var(--fs-xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mara-ink); white-space: nowrap; }
  .usr-card-head .ico { font-size: var(--fs-md); }

  .usr-form { padding: 16px 18px; display: grid; gap: 14px; }
  .usr-error { margin: 0; padding: 10px 12px; background: #fdf0ec; border: 1px solid #f0c4b4; border-radius: var(--r-sm); color: #8b321f; font-size: var(--fs-sm); }
  .usr-form-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
  .usr-form-grid .fld input, .usr-form-grid .fld select { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: #ffffff; color: var(--mara-ink); font-family: inherit; font-size: var(--fs-sm); }
  .usr-form-grid .fld input:focus, .usr-form-grid .fld select:focus { outline: none; border-color: var(--mara-green); box-shadow: var(--focus-ring); }
  .usr-toggle-fld { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: #2f3c37; }
  .usr-form .ag-btn { width: fit-content; min-height: 44px; }

  .usr-table-scroll { overflow-x: auto; }
  .usr-table-scroll:focus-visible { outline: 2px solid var(--mara-green); outline-offset: 2px; border-radius: var(--r-sm); }
  .usr-table { width: 100%; border-collapse: collapse; min-width: 0; }
  .usr-table th { text-align: left; padding: 9px 11px; font-size: var(--fs-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mara-muted); border-bottom: 1px solid var(--mara-line); white-space: nowrap; }
  .usr-table td { padding: 11px; font-size: var(--fs-sm); color: var(--mara-ink); border-bottom: 1px solid var(--mara-line); vertical-align: middle; }
  .usr-table td:nth-child(4) { white-space: nowrap; }
  .usr-table tbody tr:last-child td { border-bottom: none; }
  .usr-table tbody tr { transition: background var(--t-fast) var(--ease-out); }

  .usr-row-form { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
  .usr-row-role { width: auto; min-height: 36px; min-width: 100px; padding: 0 6px; border: 1px solid var(--mara-line); border-radius: var(--r-sm); background: #ffffff; color: var(--mara-ink); font-family: inherit; font-size: 12px; }
  .usr-row-toggle { min-height: 36px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mara-muted); font-weight: 650; white-space: nowrap; }
  .usr-row-save { width: auto; min-height: 34px; padding: 0 11px; font-size: 11.5px; }

  .usr-empty { display: grid; gap: 5px; margin: 16px 18px; padding: 24px; border: 1px dashed var(--mara-line); border-radius: var(--r-lg); background: #e9f3ee; color: var(--mara-green); text-align: center; }
  .usr-empty strong { font-size: var(--fs-sm); }
  .usr-empty span { color: var(--mara-muted); font-size: var(--fs-xs); }

  @media (prefers-reduced-motion: reduce) {
    .usr-table tbody tr { transition: none; }
  }

  @media (max-width: 760px) {
    .usr-form-grid { grid-template-columns: 1fr; }
    .usr-form .ag-btn { width: 100%; justify-content: center; }
    .usr-table-scroll { overflow-x: visible; }
    .usr-table, .usr-table tbody { display: block; }
    .usr-table thead {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
    .usr-table tbody tr {
      display: grid; gap: 8px; padding: 12px 14px;
      border-bottom: 1px solid var(--mara-line);
    }
    .usr-table tbody tr:last-child { border-bottom: none; }
    .usr-table td { display: none; padding: 0; border: 0; }
    .usr-table td:first-child, .usr-table td:last-child { display: block; }
    .usr-table td:first-child { font-weight: 700; overflow-wrap: anywhere; }
    .usr-row-form { flex-direction: row; align-items: center; }
    .usr-row-role { flex: 1 1 100px; width: auto; min-width: 0; min-height: 44px; }
    .usr-row-toggle { min-height: 44px; }
    .usr-row-save { width: auto; min-height: 44px; }
  }

  /* ===== Public status pages (rp-status) ===== */
  /* Phase 3 — shared component for every public state page (errors, waitlist,
     reminders, cancellations) plus manage-page recomposition and success-page
     polish. Descendant of .rp-root/.rp-scroll (defined above); introduces no
     new hex — tones are color-mix() derived from the brand tokens in :root. */

  .rp-status {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    justify-content: center; padding: var(--sp-8) var(--sp-5) var(--sp-6); flex: 1;
  }
  /* Let the status section fill the card height so its content centers vertically */
  .rp-root:has(> .rp-scroll > .rp-status) .rp-scroll { display: flex; flex-direction: column; }
  .rp-status-icon {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; margin: 0 0 var(--sp-4);
  }
  .rp-status-icon.ok { background: color-mix(in srgb, var(--mara-green) 16%, transparent); color: var(--mara-green); }
  .rp-status-icon.warn { background: color-mix(in srgb, var(--mara-muted) 20%, transparent); color: var(--mara-muted); }
  .rp-status-icon.err { background: color-mix(in srgb, var(--mara-terra) 16%, transparent); color: var(--mara-terra); }
  .rp-status-title { margin: 0 0 8px; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.01em; color: var(--mara-ink); }
  .rp-status-detail { margin: 0 0 var(--sp-6); font-size: var(--fs-base); color: var(--mara-muted); line-height: 1.55; max-width: 38ch; }
  .rp-status-detail p { margin: 0 0 8px; }
  .rp-status-detail p:last-child { margin-bottom: 0; }
  .rp-status-actions, .rp-action-stack {
    display: grid; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto;
  }
  .rp-status-actions a, .rp-status-actions button,
  .rp-action-stack a, .rp-action-stack button {
    min-height: 44px; display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: transform var(--t-fast) var(--ease-out);
  }
  .rp-status-actions a:active, .rp-status-actions button:active,
  .rp-action-stack a:active, .rp-action-stack button:active { transform: scale(0.97); }

  /* Small utilities used by the success page to replace inline style= attrs */
  .rp-mt-block { display: block; margin-top: 14px; }
  .rp-check-sm { flex-shrink: 0; margin-top: 1px; }
  .rp-section-label { margin: 22px 0 10px; font-size: var(--fs-base); font-weight: 750; color: var(--mara-ink); }

  /* Reminder confirm-identity form error banner */
  .rp-form-error {
    margin: 0 0 4px; padding: 10px 12px; border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--mara-terra) 12%, transparent);
    color: var(--mara-terra); font-size: var(--fs-sm); font-weight: 600;
  }

  /* Manage page (Gestion de reserva) */
  .rp-manage-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 0 6px; }

  /* Slot picker — wraps admin-shared _render_slots() output for the public manage page only */
  .rp-slotpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 16px; }
  .rp-slotpick label.slot {
    position: relative; display: grid; place-items: center; min-height: 44px; padding: 10px 6px;
    border: 1px solid var(--mara-line); border-radius: var(--r-md); background: var(--mara-card);
    font-size: var(--fs-sm); font-weight: 650; color: var(--mara-ink); cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out),
      color var(--t-fast) var(--ease-out);
  }
  .rp-slotpick label.slot input { position: absolute; opacity: 0; pointer-events: none; }
  /* Keep the public picker self-contained from the scoped admin slot controls. */
  .rp-slotpick label.slot span,
  .rp-slotpick label.slot input:checked + span {
    display: block; min-height: 0; border: 0; border-radius: 0; background: transparent;
    color: inherit; font-weight: inherit;
  }
  .rp-slotpick label.slot:has(input:checked) { background: var(--mara-green); border-color: var(--mara-green); color: var(--mara-card); }
  .rp-slotpick label.slot:has(input:focus-visible) { outline: 2px solid var(--mara-green); outline-offset: 2px; }
  .rp-slotpick label.slot:active { transform: scale(0.97); }
  .rp-slotpick p.empty {
    grid-column: 1 / -1; margin: 0; padding: 16px; text-align: center; color: var(--mara-muted);
    font-size: var(--fs-sm); border: 1px dashed var(--mara-line); border-radius: var(--r-lg);
  }
  @media (hover: hover) {
    .rp-slotpick label.slot:hover { border-color: var(--mara-green); }
    .rp-locate-card:hover { border-color: var(--mara-green); }
  }

  /* Success page "Cómo llegar" tappable location card (replaces the striped .rp-map placeholder) */
  .rp-locate-card {
    display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 8px; padding: 12px 14px;
    border: 1px solid var(--mara-line); border-radius: var(--r-xl); background: var(--mara-card);
    text-decoration: none; color: inherit;
    transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
  }
  .rp-locate-card:active { transform: scale(0.97); }
  .rp-locate-icon {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: color-mix(in srgb, var(--mara-green) 14%, transparent); color: var(--mara-green);
  }
  .rp-locate-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .rp-locate-text strong { display: block; font-size: var(--fs-base); font-weight: 700; color: var(--mara-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rp-locate-text span { font-size: var(--fs-xs); color: var(--mara-muted); }
  .rp-locate-go { color: var(--mara-muted); flex-shrink: 0; }

  @media (prefers-reduced-motion: reduce) {
    .rp-status-actions a, .rp-status-actions button,
    .rp-action-stack a, .rp-action-stack button,
    .rp-slotpick label.slot, .rp-locate-card {
      transition: none;
    }
    .rp-status-actions a:active, .rp-status-actions button:active,
    .rp-action-stack a:active, .rp-action-stack button:active,
    .rp-slotpick label.slot:active, .rp-locate-card:active {
      transform: none;
    }
  }

  @media (hover: hover) and (pointer: fine) {
    .ag-logout:hover { background: rgba(255, 253, 250, 0.12); color: #fffdfa; }
    .ag-tab:hover { color: var(--mara-ink); background: var(--mara-cream); }
    .ag-daynav-link:hover { border-color: var(--mara-green); background: var(--mara-cream); }
    .ag-waitlist-remove-btn:hover { border-color: var(--mara-terra); }
    .ag-mesasel:hover, .rs-daynav a:hover { border-color: var(--mara-green); }
    .ag-btn.pri:hover:not(:disabled), .eb-form button:hover, .aj-btn.pri:hover { background: var(--mara-green-dark); }
    .ag-btn.terra:hover { border-color: var(--mara-terra); }
    .ag-btn.sec:hover { border-color: var(--mara-green); }
    .ag-btn.danger:hover { border-color: #c98873; }
    .lc-row:hover, .ca-row:hover { background: #f8f6f0; }
    .ca-row:hover .lc-chev { color: var(--mara-green); }
    .lc-filtro:hover { border-color: var(--mara-green); }
    a.lc-th:hover { color: var(--mara-ink); }
    .fc-crumb:hover { color: var(--mara-green); }
    .fc-prox-link:hover, .fc-link:hover, .ms-qr-back:hover { text-decoration: underline; }
    .fc-tag button:hover { opacity: 1; }
    .fc-tag-add-wrap > summary.fc-tag-add:hover { border-color: var(--mara-green); color: var(--mara-green); }
    .ca-cond-x:hover { background: #f0ece2; color: #8b321f; }
    .ms-tile:hover { border-color: var(--mara-green); box-shadow: var(--shadow-md); }
    .disp-day-sum:hover, .aud-table tbody tr:hover, .usr-table tbody tr:hover { background: #faf9f6; }
    .aj-btn.sec:hover { border-color: var(--mara-green); }
    .aj-btn.danger:hover { border-color: var(--mara-terra); }
    .cont-dish-x:hover { border-color: var(--mara-terra); background: #ffe7df; }
  }
