    :root {
      --azul: #004783;
      --azul-2: #005794;
      --azul-claro: #eaf5fb;
      --verde: #6f9b19;
      --verde-bg: #eef8e7;
      --naranja: #eb6e08;
      --naranja-bg: #fff3e8;
      --rojo: #b42318;
      --rojo-bg: #fff0ef;
      --morado: #7b2cbf;
      --morado-bg: #f4ecff;
      --gris-010: #fafafa;
      --gris-025: #f4f5f6;
      --gris-050: #eef0f2;
      --gris-100: #dee2e6;
      --gris-200: #cfd4da;
      --gris-300: #b8c0c8;
      --gris-500: #9c9e9f;
      --gris-600: #7d8389;
      --gris-800: #4b4b4d;
      --gris-900: #2f3337;
      --blanco: #fff;
      --shadow: 0 18px 48px rgba(0, 40, 70, .12);
      --radius: 22px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      color: var(--gris-900);
      background:
        radial-gradient(circle at 0 0, rgba(141, 208, 224, .35), transparent 34rem),
        linear-gradient(135deg, #f7fafc, #fff 42%, #f2f5f7);
    }

    button,
    input,
    select {
      font: inherit;
    }

    .app {
      width: min(1660px, calc(100% - 32px));
      margin: 0 auto;
      padding: 28px 0 56px;
    }

    .hero {
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: 1.6fr .9fr;
      gap: 22px;
      align-items: end;
      padding: 30px;
      border-radius: 30px;
      color: var(--blanco);
      background:
        linear-gradient(120deg, rgba(0, 71, 131, .98), rgba(0, 87, 148, .86)),
        radial-gradient(circle at 88% 10%, rgba(255,255,255,.22), transparent 28rem);
      box-shadow: var(--shadow);
    }

    .hero h1 {
      margin: 0;
      font-size: clamp(1.9rem, 3vw, 3.3rem);
      line-height: 1.03;
      letter-spacing: -.04em;
    }

    .hero p {
      max-width: 820px;
      margin: 12px 0 0;
      color: rgba(255,255,255,.88);
      font-size: 1.02rem;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 42px;
      padding: 10px 14px;
      border: 1px solid transparent;
      border-radius: 999px;
      cursor: pointer;
      font-weight: 800;
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    }

    .btn:hover {
      transform: translateY(-1px);
    }

    .btn-primary {
      color: var(--azul);
      background: var(--blanco);
      box-shadow: 0 10px 24px rgba(0,0,0,.14);
    }

    .btn-ghost {
      color: var(--blanco);
      border-color: rgba(255,255,255,.32);
      background: rgba(255,255,255,.12);
      backdrop-filter: blur(8px);
    }

    .btn-soft {
      color: var(--azul);
      background: var(--azul-claro);
      border-color: rgba(0, 71, 131, .14);
    }

    .btn-danger {
      color: var(--rojo);
      background: var(--rojo-bg);
      border-color: rgba(180, 35, 24, .18);
    }

    .sync-status {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 9px 12px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.28);
      background: rgba(255,255,255,.14);
      color: rgba(255,255,255,.94);
      font-size: .82rem;
      font-weight: 900;
      backdrop-filter: blur(8px);
      white-space: nowrap;
    }

    .sync-status::before {
      content: "";
      width: 9px;
      height: 9px;
      margin-right: 8px;
      border-radius: 999px;
      background: rgba(255,255,255,.75);
      box-shadow: 0 0 0 4px rgba(255,255,255,.12);
    }

    .sync-ok::before {
      background: #a1af00;
      box-shadow: 0 0 0 4px rgba(161,175,0,.18);
    }

    .sync-saving::before,
    .sync-loading::before {
      background: #eb6e08;
      box-shadow: 0 0 0 4px rgba(235,110,8,.2);
    }

    .sync-error::before {
      background: #e63d34;
      box-shadow: 0 0 0 4px rgba(230,61,52,.22);
    }

    .kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin: 20px 0;
    }

    .kpi {
      padding: 18px;
      border: 1px solid var(--gris-100);
      border-radius: var(--radius);
      background: rgba(255,255,255,.9);
      box-shadow: 0 14px 34px rgba(0,40,70,.08);
    }

    .kpi small {
      display: block;
      color: var(--gris-600);
      font-size: .76rem;
      font-weight: 900;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .kpi strong {
      display: block;
      margin-top: 8px;
      color: var(--azul);
      font-size: 2rem;
      line-height: 1;
    }

    .kpi span {
      display: block;
      margin-top: 7px;
      color: var(--gris-600);
      font-size: .9rem;
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 430px;
      gap: 20px;
      align-items: start;
    }

    .panel {
      border: 1px solid var(--gris-100);
      border-radius: 28px;
      background: rgba(255,255,255,.92);
      box-shadow: 0 18px 42px rgba(0,40,70,.09);
    }

    .calendar-panel {
      overflow: hidden;
      padding: 18px;
    }

    .detail-panel {
      position: sticky;
      top: 18px;
      padding: 20px;
    }

    .panel-title {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 16px;
    }

    .panel-title h2 {
      margin: 0;
      color: var(--azul);
      font-size: 1.35rem;
      letter-spacing: -.02em;
    }

    .panel-title p {
      margin: 6px 0 0;
      color: var(--gris-600);
      font-size: .94rem;
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 0 0 16px;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 10px;
      border: 1px solid var(--gris-100);
      border-radius: 999px;
      background: var(--gris-010);
      color: var(--gris-800);
      font-size: .83rem;
      font-weight: 800;
    }

    .dot {
      width: 10px;
      height: 10px;
      border-radius: 99px;
      display: inline-block;
    }

    .dot-green { background: var(--verde); }
    .dot-orange { background: var(--naranja); }
    .dot-red { background: var(--rojo); }
    .dot-purple { background: var(--morado); }
    .dot-blue { background: var(--azul-2); }

    #calendar {
      --fc-border-color: var(--gris-100);
      --fc-today-bg-color: rgba(0, 71, 131, .06);
      --fc-button-bg-color: var(--azul);
      --fc-button-border-color: var(--azul);
      --fc-button-hover-bg-color: var(--azul-2);
      --fc-button-hover-border-color: var(--azul-2);
      --fc-button-active-bg-color: var(--azul-2);
      --fc-button-active-border-color: var(--azul-2);
      --fc-event-border-color: transparent;
      --fc-event-text-color: inherit;
      font-size: .94rem;
    }

    .fc .fc-toolbar-title {
      color: var(--azul);
      font-weight: 900;
      letter-spacing: -.03em;
      text-transform: capitalize;
    }

    .fc .fc-button {
      border-radius: 999px;
      padding: 8px 12px;
      font-weight: 800;
      box-shadow: none !important;
    }

    .fc .fc-daygrid-day {
      background: #fff;
    }

    .fc .fc-daygrid-day-frame {
      min-height: 148px;
      padding: 4px;
    }

    .fc .fc-daygrid-day-number {
      margin: 4px;
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--gris-800);
      font-weight: 900;
      text-decoration: none;
    }

    .fc .fc-day-today .fc-daygrid-day-number {
      color: #fff;
      background: var(--azul);
    }

    .fc .fc-day-sat,
    .fc .fc-day-sun {
      background: #fbfcfd;
    }

    .fc-event {
      border-radius: 10px !important;
      padding: 2px 4px !important;
      margin: 2px 4px !important;
      cursor: pointer;
      box-shadow: none !important;
    }

    .fc-event-title {
      font-weight: 800;
      line-height: 1.2;
      white-space: normal;
    }

    .event-summary {
      font-size: .78rem;
    }

    .event-office,
    .event-telework,
    .event-vacation {
      font-size: .72rem;
    }

    .status-available {
      color: #315d09 !important;
      background: var(--verde-bg) !important;
      border: 1px solid rgba(111,155,25,.18) !important;
    }

    .status-tight {
      color: #9a4700 !important;
      background: var(--naranja-bg) !important;
      border: 1px solid rgba(235,110,8,.2) !important;
    }

    .status-full,
    .status-over {
      color: var(--rojo) !important;
      background: var(--rojo-bg) !important;
      border: 1px solid rgba(180,35,24,.2) !important;
    }

    .event-office {
      color: var(--azul) !important;
      background: #edf5fb !important;
      border: 1px solid rgba(0,71,131,.14) !important;
    }

.event-telework {
  color: #8a2455 !important;
  background: #fdeaf3 !important;
  border: 1px solid rgba(218, 65, 132, .22) !important;
}

.event-telework .fc-event-main {
  color: #8a2455 !important;
}

    .event-vacation {
      color: var(--morado) !important;
      background: var(--morado-bg) !important;
      border: 1px solid rgba(123,44,191,.18) !important;
    }

    .day-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 10px;
      border-radius: 999px;
      font-size: .82rem;
      font-weight: 900;
      white-space: nowrap;
    }

    .pill-available {
      color: #315d09;
      background: var(--verde-bg);
      border: 1px solid rgba(111,155,25,.2);
    }

    .pill-tight {
      color: #9a4700;
      background: var(--naranja-bg);
      border: 1px solid rgba(235,110,8,.22);
    }

    .pill-full,
    .pill-over {
      color: var(--rojo);
      background: var(--rojo-bg);
      border: 1px solid rgba(180,35,24,.22);
    }

    .selected-day {
      padding: 16px;
      border-radius: 20px;
      background: linear-gradient(180deg, #f6fbfd, #fff);
      border: 1px solid var(--gris-100);
      margin-bottom: 16px;
    }

    .selected-day h3 {
      margin: 0;
      color: var(--azul);
      font-size: 1.45rem;
      text-transform: capitalize;
    }

    .selected-day p {
      margin: 7px 0 0;
      color: var(--gris-600);
    }

    .seats {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 13px;
    }

    .seat {
      width: 18px;
      height: 18px;
      border-radius: 6px;
      display: inline-block;
    }

    .seat.occupied {
      background: var(--azul-2);
    }

    .seat.free {
      background: #fff;
      border: 1px solid var(--gris-300);
    }

    .seat.over {
      background: var(--rojo);
    }
.seats[aria-label="7 puestos ocupados"] span.occupied, .seats[aria-label="8 puestos ocupados"] span.occupied {background: #ffa959;}
.seats[aria-label="2 puestos ocupados"] span.occupied, .seats[aria-label="3 puestos ocupados"] span.occupied, .seats[aria-label="4 puestos ocupados"] span.occupied, .seats[aria-label="5 puestos ocupados"] span.occupied, .seats[aria-label="6 puestos ocupados"] span.occupied {
    background: #d1dfc7;
}.seats[aria-label="9 puestos ocupados"] span.occupied, .seats[aria-label="10 puestos ocupados"] span.occupied, .seats[aria-label="11 puestos ocupados"] span.occupied {
    background: #ff0000;
}
    .group {
      margin-top: 16px;
    }

    .group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .group-header h4 {
      margin: 0;
      color: var(--gris-800);
      font-size: .88rem;
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    .count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 26px;
      height: 26px;
      border-radius: 999px;
      color: var(--azul);
      background: #edf5fb;
      font-weight: 900;
      font-size: .84rem;
    }

    .person-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .person-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 36px;
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid transparent;
      cursor: pointer;
      font-size: .84rem;
      font-weight: 800;
      transition: transform .16s ease, box-shadow .16s ease;
    }

    .person-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(0,40,70,.12);
    }

    .person-btn-office {
      color: var(--azul);
      background: #edf5fb;
      border-color: rgba(0,71,131,.16);
    }

.person-btn-telework {
  color: #8a2455;
  background: #fff0f7;
  border-color: rgba(218, 65, 132, .22);
}

.person-btn-telework:hover {
  box-shadow: 0 8px 18px rgba(218, 65, 132, .16);
}

    .person-btn-vacation {
      color: var(--morado);
      background: var(--morado-bg);
      border-color: rgba(123,44,191,.2);
    }
.dot-telework {
  background: #da4184;
}
    .person-btn small {
      opacity: .75;
      font-weight: 900;
    }

    .vacation-form {
      display: grid;
      gap: 10px;
      margin-top: 18px;
      padding: 14px;
      border-radius: 18px;
      background: linear-gradient(180deg, #fbf8ff, #fff);
      border: 1px solid rgba(123,44,191,.16);
    }

    .vacation-form label {
      color: var(--gris-800);
      font-size: .82rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .06em;
    }

    .vacation-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
    }

    .vacation-row select {
      min-height: 42px;
      padding: 9px 12px;
      border: 1px solid var(--gris-200);
      border-radius: 999px;
      background: #fff;
      color: var(--gris-900);
      font-weight: 700;
    }

    .btn-vacation {
      color: var(--morado);
      background: var(--morado-bg);
      border-color: rgba(123,44,191,.2);
    }

    .toolbar-panel {
      display: grid;
      gap: 10px;
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px dashed var(--gris-100);
    }

    .mini-help {
      padding: 14px;
      border-radius: 16px;
      background: #fbfcfd;
      border: 1px solid var(--gris-100);
      color: var(--gris-600);
      font-size: .9rem;
    }

    .mini-help strong {
      color: var(--gris-900);
    }

    .empty {
      padding: 18px;
      border-radius: 18px;
      color: var(--gris-600);
      background: var(--gris-010);
      border: 1px solid var(--gris-100);
    }

    input[type="file"] {
      display: none;
    }
.fc-h-event .fc-event-main {
    color: var(--fc-event-text-color);
    color: #444;
}
    @media (max-width: 1280px) {
      .layout {
        grid-template-columns: 1fr;
      }

      .detail-panel {
        position: static;
      }

      .hero {
        grid-template-columns: 1fr;
      }

      .hero-actions {
        justify-content: flex-start;
      }
    }

    @media (max-width: 900px) {
      .app {
        width: min(100% - 20px, 1660px);
        padding-top: 16px;
      }

      .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .fc .fc-toolbar {
        flex-direction: column;
        gap: 12px;
      }

      .fc .fc-daygrid-day-frame {
        min-height: 126px;
      }
    }

    @media (max-width: 620px) {
      .hero {
        padding: 22px;
        border-radius: 24px;
      }

      .kpis {
        grid-template-columns: 1fr;
      }

      .calendar-panel,
      .detail-panel {
        padding: 14px;
        border-radius: 22px;
      }
    }

    /* DÃ­as anteriores: se muestran mÃ¡s apagados para distinguir el histÃ³rico */
    .fc .fc-day-past {
      background: #fff !important;
    }

    .fc .fc-day-past .fc-daygrid-day-frame {
      opacity: .68;
    }

    .fc .fc-day-past .fc-daygrid-day-number {
      color: var(--gris-500);
      background: transparent;
    }

    .fc .fc-day-past .fc-event {
      opacity: .55;
      filter: grayscale(.35);
    }

    .last-change-box {
      margin: 0 0 16px;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid rgba(0, 71, 131, .12);
      background: linear-gradient(180deg, #f7fbfe, #fff);
      box-shadow: 0 10px 24px rgba(0, 40, 70, .06);
    }

    .last-change-label {
      display: block;
      margin-bottom: 5px;
      color: var(--azul);
      font-size: .76rem;
      font-weight: 900;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .last-change-text {
      margin: 0;
      color: var(--gris-800);
      font-size: .94rem;
      font-weight: 800;
      line-height: 1.35;
    }

    .last-change-meta {
      display: block;
      margin-top: 5px;
      color: var(--gris-600);
      font-size: .78rem;
      font-weight: 700;
    }


    .selected-day-header {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: flex-start;
    }


/* =========================================================
   V4 - Ajuste visual general sin cambiar los colores funcionales
   de oficina, teletrabajo, vacaciones ni disponibilidad.
   ========================================================= */

:root {
  --layout-bg: #f4f7fb;
  --layout-surface: #ffffff;
  --layout-surface-soft: #f8fafc;
  --layout-border: #dbe3ee;
  --layout-border-soft: #e8eef6;
  --layout-ink: #182235;
  --layout-muted: #667085;
  --layout-primary: #172554;
  --layout-primary-2: #1e3a8a;
  --layout-primary-3: #2563eb;
  --layout-shadow: 0 18px 44px rgba(15, 23, 42, .10);
  --layout-shadow-soft: 0 10px 26px rgba(15, 23, 42, .07);
}

body {
  color: var(--layout-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .12), transparent 32rem),
    radial-gradient(circle at 96% 18%, rgba(30, 58, 138, .10), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, var(--layout-bg) 48%, #eef3f9 100%);
}

.app {
  padding: 20px 0 42px;
}

.hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, .95fr);
  gap: 18px;
  align-items: center;
  padding: 22px 24px 28px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 95% 0%, rgba(255,255,255,.20), transparent 23rem),
    linear-gradient(135deg, #0f172a 0%, var(--layout-primary) 48%, var(--layout-primary-2) 100%);
  box-shadow: 0 20px 54px rgba(15, 23, 42, .18);
}

.hero h1 {
  font-size: clamp(1.75rem, 2.45vw, 2.75rem);
  letter-spacing: -.045em;
}

.hero p {
  margin-top: 9px;
  color: rgba(255,255,255,.80);
  font-size: .96rem;
  line-height: 1.48;
}

.hero-actions {
  gap: 8px;
}

.btn,
.sync-status {
  min-height: 38px;
  padding: 8px 12px;
  font-size: .84rem;
}

.btn-primary {
  color: var(--layout-primary);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .16);
}

.btn-ghost {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.24);
}

.btn-soft {
  color: var(--layout-primary-2);
  background: #eff6ff;
  border-color: rgba(37, 99, 235, .14);
}

.panel {
  border-color: var(--layout-border-soft);
  background: rgba(255,255,255,.94);
  box-shadow: var(--layout-shadow-soft);
}

.calendar-panel {
  padding: 14px;
}

.detail-panel {
  padding: 16px;
}

.panel-title {
  margin-bottom: 10px;
}

.panel-title h2 {
  color: var(--layout-primary-2);
  font-size: 1.18rem;
}

.panel-title p {
  margin-top: 4px;
  color: var(--layout-muted);
  font-size: .86rem;
  line-height: 1.35;
}

.legend {
  gap: 6px;
  margin-bottom: 10px;
}

.legend-item {
  padding: 5px 9px;
  border-color: var(--layout-border-soft);
  background: var(--layout-surface-soft);
  font-size: .78rem;
}

/* KPIs mÃ¡s integrados bajo la cabecera y ocupando menos altura */
.kpis {
  position: relative;
  z-index: 3;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -16px 18px 14px;
}

.kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 58px;
  padding: 10px 13px;
  border-color: rgba(219, 227, 238, .9);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09);
  backdrop-filter: blur(8px);
}

.kpi small {
  color: var(--layout-muted);
  font-size: .68rem;
  letter-spacing: .075em;
}

.kpi strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--layout-primary-2);
  font-size: 1.55rem;
  line-height: .95;
}

.kpi span {
  margin-top: 2px;
  color: var(--layout-muted);
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout {
  gap: 16px;
}

#calendar {
  --fc-border-color: var(--layout-border-soft);
  --fc-today-bg-color: rgba(37, 99, 235, .055);
  --fc-button-bg-color: var(--layout-primary-2);
  --fc-button-border-color: var(--layout-primary-2);
  --fc-button-hover-bg-color: var(--layout-primary-3);
  --fc-button-hover-border-color: var(--layout-primary-3);
  --fc-button-active-bg-color: var(--layout-primary-3);
  --fc-button-active-border-color: var(--layout-primary-3);
  font-size: .90rem;
}

.fc .fc-toolbar {
  margin-bottom: .75rem;
}

.fc .fc-toolbar-title {
  color: var(--layout-primary-2);
  font-size: 1.42rem;
}

.fc .fc-button {
  padding: 7px 11px;
  font-size: .84rem;
}

.fc .fc-daygrid-day {
  background: var(--layout-surface);
}
.fc .fc-daygrid-day:hover {
    background: #f7f8ff;
}
.fc .fc-daygrid-day-frame {
  position: relative;
  min-height: 132px;
  padding: 4px 4px 40px;
  height: -webkit-fill-available;
}

.fc .fc-daygrid-day-events {
  position: static;
}

.fc .fc-daygrid-day-number {
  margin: 3px;
  width: 26px;
  height: 26px;
  color: var(--layout-ink);
  font-size: .82rem;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--layout-primary-3);
}

.fc-event {
  border-radius: 9px !important;
  padding: 2px 4px !important;
  margin: 2px 4px !important;
}

/* La lÃ­nea de puestos libres ya no es un evento de FullCalendar: va como pie propio de cada celda */
.day-seat-summary {
position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    border: 1px solid transparent;
    font: inherit;
    font-size: .80rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.day-seat-summary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
}

.event-office,
.event-telework,
.event-vacation {
  font-size: .70rem;
}

/* HistÃ³ricos: se mantienen legibles, pero pasan claramente a segundo plano */
.fc .fc-day-past {
  background: #fff !important;
}

.fc .fc-day-past .fc-daygrid-day-frame {
  opacity: .72;
}

.fc .fc-day-past .day-seat-summary {
  opacity: .76;
}

.last-change-box,
.selected-day,
.vacation-form,
.mini-help,
.empty {
  border-color: var(--layout-border-soft);
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.last-change-label,
.selected-day h3 {
  color: var(--layout-primary-2);
}

.last-change-text {
  color: var(--layout-ink);
}

.last-change-meta,
.selected-day p,
.mini-help,
.empty {
  color: var(--layout-muted);
}

.count {
  color: var(--layout-primary-2);
  background: #eff6ff;
}

@media (max-width: 1280px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .kpis {
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 20px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0 14px;
  }

  .kpi {
    min-height: 56px;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 126px;
  }
}

@media (max-width: 620px) {
  .app {
    width: min(100% - 18px, 1660px);
    padding-top: 12px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 118px;
    padding-bottom: 38px;
  }
  .fc-day-sat, .fc-day-sun {
    display: none;
}
}


/* AutenticaciÃ³n */
[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, .22), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(99, 102, 241, .18), transparent 30rem),
    linear-gradient(135deg, #f6f8fb 0%, #eef3f8 45%, #f8fafc 100%);
}

.login-card {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .16);
  backdrop-filter: blur(14px);
}

.login-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  overflow: hidden;
}

.login-mark img {
    display: block;
    border-radius: 12px;
    width: 100px;
    position: relative;
    top: -10px;
    max-width: 100%;
    max-height: 100%;
    height: auto;
}
.login-brand h1 {
  margin: 0;
  color: #102033;
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.login-brand p,
.login-help {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: #334155;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.login-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-submit {
  width: 100%;
  margin-top: 6px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}

.auth-message {
  min-height: 20px;
  margin: 2px 0 0;
  font-size: .9rem;
  font-weight: 800;
}

.auth-message-error {
  color: #b42318;
}

.auth-message-ok {
  color: #315d09;
}

.login-help {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #dbe3ec;
  font-size: .9rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.95);
  font-size: .82rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.person-btn-locked {
  cursor: not-allowed;
}

.person-btn-locked:hover {
  transform: none;
  box-shadow: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .44);
  backdrop-filter: blur(5px);
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .26);
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-modal-header h2 {
  margin: 0;
  color: #102033;
  font-size: 1.35rem;
  letter-spacing: -.03em;
}

.auth-modal-header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: .94rem;
}

.auth-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 620px) {
  .login-screen {
    padding: 16px;
  }

  .login-card,
  .auth-modal-card {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .btn,
  .sync-status,
  .user-badge {
    width: 100%;
  }
}

/* v7: login mÃ¡s visual y usuario conectado en esquina superior derecha */
.hero {
  padding-top: 78px;
}

.session-corner {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100% - 36px));
  padding: 8px 9px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .13);
  backdrop-filter: blur(14px);
}

.session-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #12304c;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}

.session-user-data {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.session-user-data strong {
  overflow: hidden;
  max-width: 180px;
  color: #fff;
  font-size: .88rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-user-data small {
  overflow: hidden;
  max-width: 180px;
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-logout {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}

.session-logout:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .24);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

.login-screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 12% 14%, rgba(96, 165, 250, .20), transparent 26rem),
    radial-gradient(circle at 88% 20%, rgba(14, 165, 233, .18), transparent 28rem),
    radial-gradient(circle at 72% 88%, rgba(99, 102, 241, .12), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, #eef4f8 42%, #f6f8fb 100%);
}

.login-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(.2px);
  pointer-events: none;
}

.login-orb-one {
  width: 380px;
  height: 380px;
  left: -120px;
  bottom: -150px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(14, 165, 233, .10));
}

.login-orb-two {
  width: 280px;
  height: 280px;
  right: -90px;
  top: -90px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .10), rgba(37, 99, 235, .14));
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .78fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 34px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 34px 96px rgba(15, 23, 42, .16);
  backdrop-filter: blur(18px);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: clamp(30px, 5vw, 54px);
  color: #fff;
  background:
    linear-gradient(140deg, rgba(15, 23, 42, .96), rgba(30, 64, 115, .94)),
    radial-gradient(circle at 84% 18%, rgba(56, 189, 248, .30), transparent 24rem);
}

.login-intro::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 28px;
  pointer-events: none;
}

.login-kicker {
  position: relative;
  z-index: 1;
  width: max-content;
  margin-bottom: auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .86);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-intro h1 {

    z-index: 1;
    max-width: 560px;
    margin: 0;
    font-size: clamp(2.25rem, 4.5vw, 4.25rem);
    line-height: .95;
}

.login-intro p {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 1.06rem;
  line-height: 1.55;
}

.login-feature-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.login-feature-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .90);
  font-size: .82rem;
  font-weight: 850;
}

.login-card {
  width: auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4.2vw, 52px);
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
  backdrop-filter: none;
}

.login-brand {
  gap: 15px;
  align-items: center;
  margin-bottom: 28px;
}


.login-card-kicker {
  display: inline-block;
  margin-bottom: 5px;
  color: #2563eb;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-brand h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.login-brand p {
  margin-top: 8px;
  color: #64748b;
  line-height: 1.45;
}

.login-form {
  gap: 11px;
}

.login-form label {
  color: #334155;
  font-size: .75rem;
}

.login-form input {
  min-height: 50px;
  padding: 11px 14px;
  border-color: #d7e0ea;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .70);
}

.login-form input::placeholder {
  color: #94a3b8;
}

.login-form input:focus {
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 10px 24px rgba(15, 23, 42, .06);
}

.login-submit {
  min-height: 50px;
  margin-top: 8px;
  color: #fff;
  background: linear-gradient(135deg, #1e40af, #2563eb 62%, #0ea5e9);
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(37, 99, 235, .25);
}

.login-submit:hover {
  box-shadow: 0 20px 38px rgba(37, 99, 235, .28);
}

.login-help {
  margin-top: 24px;
  padding: 15px 16px 0;
  border-top: 1px dashed #d9e2ec;
  color: #64748b;
  font-size: .92rem;
}

.auth-message {
  min-height: 22px;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-intro {
    min-height: 320px;
  }

  .login-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 84px;
  }

  .session-corner {
    left: 14px;
    right: 14px;
    justify-content: space-between;
    max-width: none;
  }

  .session-user-data {
    flex: 1 1 auto;
  }

  .session-user-data strong,
  .session-user-data small {
    max-width: 100%;
  }

  .login-screen {
    padding: 14px;
  }

  .login-shell {
    border-radius: 26px;
  }

  .login-intro {
    min-height: 260px;
    padding: 28px;
  }

  .login-intro h1 {
    font-size: 2.15rem;
  }

  .login-intro p {
    font-size: .98rem;
  }

  .login-feature-list {
    display: none;
  }

  .login-card {
    padding: 24px;
  }

  .login-brand {
    align-items: flex-start;
  }

  .hero-actions .btn,
  .sync-status {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .session-avatar {
    display: none;
  }

  .session-logout {
    padding-inline: 10px;
  }
}


/* v8: acciones de usuario integradas dentro del bloque superior derecho */
.hero {
  padding-top: 96px;
}

.session-corner {
  align-items: flex-start;
  border-radius: 12px;
  padding: 8px 10px 9px 8px;
}

.session-user-data {
  gap: 0;
}

.session-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.session-mini-action {
  min-height: 23px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .86);
  cursor: pointer;
  font-size: .66rem;
  font-weight: 850;
  line-height: 1;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}

.session-mini-action:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .34);
  color: #fff;
}

.session-mini-action-logout {
  background: rgba(15, 23, 42, .18);
}

/* Compatibilidad: el botÃ³n anterior de cerrar sesiÃ³n ya no se usa como botÃ³n grande */
.session-logout {
  min-height: 23px;
  padding: 4px 8px;
  font-size: .66rem;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 118px;
  }

  .session-corner {
    align-items: center;
  }

  .session-user-actions {
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  .session-corner {
    align-items: flex-start;
  }

  .session-user-actions {
    width: 100%;
  }
}
/* =========================================================
   Ajuste superior: tÃ­tulo arriba, usuario a la derecha,
   acciones debajo y ocultar importar cambios
   ========================================================= */

/* Ocultar por defecto â€œImportar cambiosâ€ */
.hero-actions label[for="importFile"],
#importFile {
  display: none !important;
}

/* Reordenar cabecera superior */
.hero {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 28px 28px 30px !important;
}

/* Bloque del tÃ­tulo: arriba a la izquierda, dejando hueco al usuario */
.hero > div:first-child {
  max-width: calc(100% - 360px);
  padding-right: 24px;
}

.hero h1 {
  margin: 0;
}

.hero p {
  margin-top: 8px;
}

/* Usuario fijo arriba a la derecha */
.session-corner {
  top: 24px !important;
  right: 24px !important;
  align-self: auto;
}

/* Opciones debajo del tÃ­tulo */
.hero-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start !important;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-right: 0;
}

/* Mantener los KPIs tal como estÃ¡n integrados debajo */
.kpis {
  margin-top: -16px;
}

/* Responsive: cuando no haya ancho, usuario y tÃ­tulo se apilan bien */
@media (max-width: 900px) {
  .hero {
    padding-top: 118px !important;
  }

  .hero > div:first-child {
    max-width: 100%;
    padding-right: 0;
  }

  .session-corner {
    top: 18px !important;
    left: 18px !important;
    right: 18px !important;
    max-width: none;
  }

  .hero-actions {
    align-items: stretch;
  }
}
/* =========================================================
   Botones de administraciÃ³n visibles solo para Angel
   ========================================================= */

#btnResetDay,
#btnResetAll {
  display: none !important;
}

body.user-angel #btnResetDay,
body.user-angel #btnResetAll {
  display: inline-flex !important;
}
.fc .fc-daygrid-day.fc-day-today {
    background-color: #dae4ff;
}
/* DÃ­a seleccionado en el calendario */
.fc .fc-daygrid-day.calendario-dia-seleccionado {
  background: #f7f8ff !important;
}


.fc .fc-daygrid-day.calendario-dia-seleccionado .fc-daygrid-day-number {
  background: #2563eb;
  color: #fff;
}
.fc .fc-day-other .fc-daygrid-day-top{
  opacity: 1;
}
/* Usuario solo consulta */
body.user-viewer .vacation-form {
  display: none !important;
}

body.user-viewer .person-btn {
  cursor: not-allowed !important;
  opacity: .68;
}

body.user-viewer .person-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}
.selected-day-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    width: 100%;
}

/* Hace que h3 y p se comporten como hijos directos del grid */
.selected-day-header > div {
    display: contents;
}

.selected-day-header h3 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
}

.selected-day-header .day-pill {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
    white-space: nowrap;
}

.selected-day-header p {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}
body.calendar-saving #dayDetail button,
body.calendar-saving #btnResetDay,
body.calendar-saving #btnResetAll,
body.calendar-saving #importFile {
    pointer-events: none;
}

body.calendar-saving #dayDetail button,
body.calendar-saving #btnResetDay,
body.calendar-saving #btnResetAll {
    opacity: 0.65;
}
.forgot-password-link {
    width: fit-content;
    margin: 2px auto 0;
    padding: 4px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.forgot-password-link:hover {
    text-decoration-thickness: 2px;
}

.forgot-password-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

/* RecuperaciÃ³n de contraseÃ±a y estados de envÃ­o */
.login-form button:disabled,
.auth-modal button:disabled {
  cursor: wait;
  opacity: .68;
  transform: none !important;
  box-shadow: none !important;
}

.auth-message:empty {
  min-height: 0;
}

#forgotPasswordMessage,
#resetPasswordMessage {
  line-height: 1.4;
}

@media (max-width: 620px) {
  .forgot-password-link {
    width: 100%;
    text-align: center;
  }
}
.login-feature-list span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Verde */
.login-feature-list span:nth-child(1) {
  background: #E8F5E9;
  color: #2E7D32;
}

/* Rosa */
.login-feature-list span:nth-child(2) {
  background: #FCE4EC;
  color: #C2185B;
}

/* Amarillo */
.login-feature-list span:nth-child(3) {
  background: #FFF8E1;
  color: #F9A825;
}

/* Morado */
.login-feature-list span:nth-child(4) {
  background: #F3E5F5;
  color: #7B1FA2;
}
/* =========================================================
   Modal de exceso de ocupaciÃ³n
   ========================================================= */

.capacity-warning-modal {
  z-index: 3000;
}

.capacity-warning-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;

  width: min(calc(100% - 32px), 650px);
  max-width: 650px;
  padding: 30px;

  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, .24);
  border-radius: 28px;

  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(251, 146, 60, .22),
      transparent 180px
    ),
    linear-gradient(
      145deg,
      #fffaf5,
      #fff 58%,
      #fff4f2
    );

  box-shadow:
    0 34px 90px rgba(15, 23, 42, .28),
    0 0 0 1px rgba(255, 255, 255, .8);
}

.capacity-warning-card::before {
  content: "";

  position: absolute;
  top: 0;
  right: 0;

  width: 170px;
  height: 170px;

  background:
    repeating-linear-gradient(
      -45deg,
      rgba(245, 158, 11, .08) 0 10px,
      transparent 10px 20px
    );

  clip-path: polygon(
    100% 0,
    100% 100%,
    0 0
  );

  pointer-events: none;
}

.capacity-warning-close {
  position: absolute;
  top: 17px;
  right: 17px;
  z-index: 2;
}

.capacity-warning-visual {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 106px;
  height: 106px;
  margin-top: 10px;

  border-radius:
    48% 52% 44% 56% /
    54% 43% 57% 46%;

  color: #fff;
  background:
    linear-gradient(
      145deg,
      #f97316,
      #dc2626
    );

  box-shadow:
    9px 10px 0 rgba(127, 29, 29, .13),
    0 18px 36px rgba(220, 38, 38, .24);

  transform: rotate(-5deg);
}

.capacity-warning-visual::before,
.capacity-warning-visual::after {
  content: "";

  position: absolute;
  border-radius: 999px;
  background: #fb923c;
}

.capacity-warning-visual::before {
  width: 9px;
  height: 9px;
  top: -9px;
  right: 14px;
}

.capacity-warning-visual::after {
  width: 5px;
  height: 5px;
  left: -8px;
  bottom: 17px;
}

.capacity-warning-visual > span {
  font-family:
    "Arial Black",
    "Segoe UI Black",
    sans-serif;
  font-size: 4.5rem;
  font-weight: 950;
  line-height: 1;

  transform: rotate(5deg);
}

.capacity-warning-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.capacity-warning-kicker {
  display: inline-flex;
  align-items: center;

  margin-bottom: 8px;
  padding: 5px 9px;

  border-radius: 999px;

  color: #9a3412;
  background: #ffedd5;

  font-size: .69rem;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.capacity-warning-content h2 {
  margin: 0 40px 12px 0;

  color: #b42318;

  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.04em;
}

.capacity-warning-content > p {
  margin: 0;

  color: #334155;

  font-size: .98rem;
  line-height: 1.58;
}

.capacity-warning-content > p strong {
  color: #0f172a;
}

.capacity-warning-secondary {
  margin-top: 10px !important;
}

.capacity-warning-count {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-top: 18px;
  padding: 11px 13px;

  border: 1px solid rgba(220, 38, 38, .16);
  border-radius: 14px;

  color: #991b1b;
  background: rgba(254, 226, 226, .68);

  font-size: .86rem;
}

.capacity-warning-count > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 25px;
  height: 25px;

  border-radius: 8px;

  color: #fff;
  background: #dc2626;

  font-weight: 950;
}

.capacity-warning-button {
  width: 100%;
  margin-top: 18px;
}


/* =========================================================
   Warning dentro del detalle del dÃ­a
   ========================================================= */

.selected-day-capacity-warning {
  position: relative;

  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 15px;
  padding: 12px 14px;

  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, .20);
  border-radius: 15px;

  color: #7f1d1d;
  background:
    linear-gradient(
      135deg,
      rgba(255, 247, 237, .98),
      rgba(254, 226, 226, .86)
    );

  box-shadow:
    0 10px 22px rgba(153, 27, 27, .08);
}

.selected-day-capacity-warning::after {
  content: "";

  position: absolute;
  top: 0;
  right: 0;

  width: 74px;
  height: 100%;

  opacity: .32;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(220, 38, 38, .15) 0 7px,
      transparent 7px 14px
    );

  pointer-events: none;
}

.selected-day-capacity-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border-radius:
    48% 52% 43% 57% /
    56% 44% 56% 44%;

  color: #fff;
  background: #dc2626;

  font-size: 1.2rem;
  font-weight: 950;

  box-shadow:
    4px 4px 0 rgba(127, 29, 29, .15);

  transform: rotate(-5deg);
}

.selected-day-capacity-warning > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.selected-day-capacity-warning strong {
  display: block;
  margin-bottom: 3px;

  color: #991b1b;

  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.selected-day-capacity-warning p {
  margin: 0;

  color: #7f1d1d;

  font-size: .88rem;
  font-weight: 700;
  line-height: 1.4;
}

.selected-day-capacity-warning b {
  font-weight: 950;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 620px) {
  .capacity-warning-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 25px 21px 22px;
  }

  .capacity-warning-visual {
    width: 78px;
    height: 78px;
    margin: 0 auto;
  }

  .capacity-warning-visual > span {
    font-size: 3.3rem;
  }

  .capacity-warning-content {
    text-align: center;
  }

  .capacity-warning-content h2 {
    margin-right: 0;
  }

  .capacity-warning-count {
    justify-content: center;
    text-align: left;
  }

  .selected-day-capacity-warning {
    align-items: flex-start;
  }
}
/* =========================================================
   Modal de aviso por exceso de ocupaciÃ³n
   ========================================================= */

/* Garantiza que hidden oculte realmente el modal */
.capacity-warning-modal[hidden] {
  display: none !important;
}

.capacity-warning-modal {
  z-index: 4000;
}

/* Evita scroll del fondo mientras estÃ¡ abierto */
body.capacity-warning-open {
  overflow: hidden;
}


/* =========================================================
   Tarjeta principal
   ========================================================= */

.auth-modal .capacity-warning-card {
  position: relative;

  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 26px;

  width: min(calc(100vw - 32px), 680px);
  max-width: 680px;
  padding: 32px;

  overflow: hidden;

  border: 1px solid rgba(234, 88, 12, 0.24);
  border-radius: 28px;

  background:
    radial-gradient(
      circle at 8% 10%,
      rgba(251, 146, 60, 0.20),
      transparent 190px
    ),
    radial-gradient(
      circle at 94% 92%,
      rgba(239, 68, 68, 0.10),
      transparent 210px
    ),
    linear-gradient(
      145deg,
      #fffaf5 0%,
      #ffffff 55%,
      #fff5f3 100%
    );

  box-shadow:
    0 36px 100px rgba(15, 23, 42, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.84);

  animation: capacity-warning-enter 0.24s ease-out;
}

/* Franjas decorativas de advertencia */
.auth-modal .capacity-warning-card::before {
  content: "";

  position: absolute;
  top: 0;
  right: 0;

  width: 180px;
  height: 180px;

  opacity: 0.42;

  background:
    repeating-linear-gradient(
      -45deg,
      rgba(249, 115, 22, 0.16) 0 10px,
      transparent 10px 20px
    );

  clip-path: polygon(
    100% 0,
    100% 100%,
    0 0
  );

  pointer-events: none;
}

/* Mancha inferior decorativa */
.auth-modal .capacity-warning-card::after {
  content: "";

  position: absolute;
  right: -50px;
  bottom: -65px;

  width: 180px;
  height: 150px;

  border-radius:
    44% 56% 61% 39% /
    54% 42% 58% 46%;

  background: rgba(239, 68, 68, 0.05);

  transform: rotate(-14deg);
  pointer-events: none;
}


/* =========================================================
   BotÃ³n de cerrar
   ========================================================= */

.capacity-warning-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  padding: 0;

  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;

  color: #64748b;
  background: rgba(255, 255, 255, 0.78);

  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;

  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);

  cursor: pointer;

  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.capacity-warning-close:hover {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff1f2;
  transform: rotate(4deg) scale(1.04);
}

.capacity-warning-close:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.25);
  outline-offset: 3px;
}


/* =========================================================
   Icono grande de advertencia
   ========================================================= */

.capacity-warning-visual {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 108px;
  height: 108px;
  margin-top: 12px;

  border-radius:
    49% 51% 43% 57% /
    56% 44% 56% 44%;

  color: #fff;

  background:
    linear-gradient(
      145deg,
      #fb923c 0%,
      #f97316 42%,
      #dc2626 100%
    );

  box-shadow:
    9px 10px 0 rgba(127, 29, 29, 0.13),
    0 20px 42px rgba(220, 38, 38, 0.25);

  transform: rotate(-5deg);
}

/* Salpicaduras alrededor del icono */
.capacity-warning-visual::before,
.capacity-warning-visual::after {
  content: "";

  position: absolute;

  border-radius: 50%;
  background: #fb923c;

  box-shadow:
    15px 13px 0 -2px #f97316,
    -11px 24px 0 -3px #ef4444;
}

.capacity-warning-visual::before {
  top: -11px;
  right: 13px;

  width: 10px;
  height: 10px;
}

.capacity-warning-visual::after {
  left: -10px;
  bottom: 18px;

  width: 7px;
  height: 7px;
}

.capacity-warning-visual > span {
  display: block;

  font-family:
    "Arial Black",
    "Segoe UI Black",
    Arial,
    sans-serif;
  font-size: 4.6rem;
  font-weight: 950;
  line-height: 1;

  text-shadow:
    3px 4px 0 rgba(127, 29, 29, 0.24);

  transform: rotate(5deg) translateY(-1px);
}


/* =========================================================
   Contenido textual
   ========================================================= */

.capacity-warning-content {
  position: relative;
  z-index: 2;

  min-width: 0;
}

.capacity-warning-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin: 0 48px 9px 0;
  padding: 6px 10px;

  border: 1px solid rgba(234, 88, 12, 0.14);
  border-radius: 999px;

  color: #9a3412;
  background: rgba(255, 237, 213, 0.88);

  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.capacity-warning-kicker::before {
  content: "";

  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: #f97316;

  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

.capacity-warning-content h2 {
  margin: 0 44px 13px 0;

  color: #b42318;

  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.capacity-warning-content > p {
  max-width: 480px;
  margin: 0;

  color: #475569;

  font-size: 0.98rem;
  line-height: 1.62;
}

.capacity-warning-content > p strong {
  color: #172033;
  font-weight: 850;
}

.capacity-warning-secondary {
  margin-top: 10px !important;

  color: #7c2d12 !important;
  font-weight: 650;
}


/* =========================================================
   Contador de ocupaciÃ³n
   ========================================================= */

.capacity-warning-count {
  position: relative;

  display: flex;
  align-items: center;
  gap: 11px;

  margin-top: 19px;
  padding: 12px 14px;

  overflow: hidden;

  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 15px;

  color: #991b1b;

  background:
    linear-gradient(
      135deg,
      rgba(255, 247, 237, 0.98),
      rgba(254, 226, 226, 0.88)
    );

  box-shadow:
    0 10px 24px rgba(153, 27, 27, 0.08);
}

.capacity-warning-count::after {
  content: "";

  position: absolute;
  top: 0;
  right: 0;

  width: 72px;
  height: 100%;

  opacity: 0.36;

  background:
    repeating-linear-gradient(
      -45deg,
      rgba(220, 38, 38, 0.17) 0 7px,
      transparent 7px 14px
    );

  pointer-events: none;
}

.capacity-warning-count > span {
  position: relative;
  z-index: 1;

  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border-radius:
    48% 52% 44% 56% /
    55% 45% 55% 45%;

  color: #fff;
  background: #dc2626;

  font-size: 1rem;
  line-height: 1;

  box-shadow: 4px 4px 0 rgba(127, 29, 29, 0.14);

  transform: rotate(-5deg);
}

.capacity-warning-count strong {
  position: relative;
  z-index: 1;

  padding-right: 48px;

  color: #991b1b;

  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.4;
}


/* =========================================================
   BotÃ³n principal
   ========================================================= */

.capacity-warning-button {
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  padding: 12px 20px;

  border: 0;
  border-radius: 14px;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #ea580c,
      #dc2626
    );

  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;

  box-shadow:
    0 12px 26px rgba(220, 38, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);

  cursor: pointer;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.capacity-warning-button:hover {
  filter: brightness(1.05) saturate(1.08);

  box-shadow:
    0 16px 30px rgba(220, 38, 38, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);

  transform: translateY(-2px);
}

.capacity-warning-button:active {
  transform: translateY(0);
}

.capacity-warning-button:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.28);
  outline-offset: 3px;
}


/* =========================================================
   AnimaciÃ³n
   ========================================================= */

@keyframes capacity-warning-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 650px) {
  .auth-modal .capacity-warning-card {
    grid-template-columns: 1fr;
    gap: 17px;

    width: min(calc(100vw - 24px), 500px);
    max-height: calc(100vh - 24px);
    padding: 25px 21px 22px;

    overflow-y: auto;
  }

  .capacity-warning-visual {
    width: 78px;
    height: 78px;
    margin: 0 auto;
  }

  .capacity-warning-visual > span {
    font-size: 3.35rem;
  }

  .capacity-warning-content {
    text-align: center;
  }

  .capacity-warning-kicker {
    margin-right: 0;
  }

  .capacity-warning-content h2 {
    margin-right: 0;

    font-size: 2.05rem;
  }

  .capacity-warning-content > p {
    margin-right: auto;
    margin-left: auto;

    font-size: 0.92rem;
  }

  .capacity-warning-count {
    text-align: left;
  }

  .capacity-warning-count strong {
    padding-right: 32px;

    font-size: 0.82rem;
  }

  .capacity-warning-button {
    font-size: 0.86rem;
  }
}

@media (max-width: 390px) {
  .auth-modal .capacity-warning-card {
    padding-right: 17px;
    padding-left: 17px;
  }

  .capacity-warning-count {
    align-items: flex-start;
  }

  .capacity-warning-count strong {
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal .capacity-warning-card {
    animation: none;
  }

  .capacity-warning-close,
  .capacity-warning-button {
    transition: none;
  }
}
/* =========================================================
   V40 · Plano interactivo y reserva individual de puestos
   ========================================================= */

.seat-map-panel {
  margin-top: 18px;
  padding: 22px;
  overflow: hidden;
}

.seat-map-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  align-items: start;
  gap: 20px;
  margin-bottom: 16px;
}

.seat-map-kicker {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--naranja);
  font-size: .69rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.seat-map-heading h2 {
  margin: 0;
  color: var(--layout-primary-2, var(--azul));
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.seat-map-date {
  margin: 7px 0 0;
  color: var(--layout-muted, var(--gris-600));
  font-size: .94rem;
  font-weight: 750;
  text-transform: capitalize;
}

.seat-map-heading-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  max-width: 620px;
}

.seat-map-summary {
  margin: 0;
  color: var(--layout-ink, var(--gris-900));
  font-size: .87rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: right;
}

.seat-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.seat-map-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--layout-border-soft, var(--gris-100));
  border-radius: 999px;
  background: #fff;
  color: var(--layout-muted, var(--gris-600));
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}

.seat-map-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .10);
}

.seat-map-legend-free {
  background: #79b83d;
}

.seat-map-legend-occupied {
  background: #f28a2e;
}

.seat-map-legend-mine {
  background: #dc6511;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, .10),
    0 0 0 2px rgba(234, 88, 12, .20) !important;
}

.seat-map-legend-locked {
  background:
    repeating-linear-gradient(
      -45deg,
      #b8d99a 0 4px,
      #e6f2dc 4px 8px
    );
}

.seat-map-content {
  min-height: 160px;
}

.seat-map-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  border: 1px dashed var(--layout-border, var(--gris-200));
  border-radius: 20px;
  color: var(--layout-muted, var(--gris-600));
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
  font-size: .94rem;
  font-weight: 750;
  text-align: center;
}

.seat-map-notice {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 14px;
  color: #1e3a8a;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  font-size: .84rem;
  font-weight: 780;
  line-height: 1.45;
}

.seat-map-notice.is-readonly {
  color: #475569;
  border-color: rgba(100, 116, 139, .16);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.seat-map-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--layout-border-soft, var(--gris-100));
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .95), rgba(255, 255, 255, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
  scrollbar-width: thin;
  scrollbar-color: #b8c4d2 transparent;
}

.seat-map-scroll:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 3px;
}

.seat-map-stage {
  position: relative;
  width: min(100%, 1180px);
  min-width: 760px;
  aspect-ratio: 570 / 365;
  margin: 0 auto;
  isolation: isolate;
}

.seat-map-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.seat-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.seat-map-button {
  position: absolute;
  left: var(--seat-left);
  top: var(--seat-top);
  width: var(--seat-width);
  height: var(--seat-height);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 5px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 7px 16px rgba(15, 23, 42, .15),
    inset 0 1px 0 rgba(255, 255, 255, .20);
  transform: translateZ(0);
  transition:
    transform .16s ease,
    filter .16s ease,
    box-shadow .16s ease,
    opacity .16s ease;
}

.seat-map-button.is-free {
  border-color: rgba(49, 93, 9, .32);
  background:
    linear-gradient(145deg, rgba(140, 198, 76, .96), rgba(89, 150, 34, .96));
}

.seat-map-button.is-occupied {
  border-color: rgba(154, 71, 0, .36);
  background:
    linear-gradient(145deg, rgba(247, 160, 75, .97), rgba(235, 110, 8, .97));
}

.seat-map-button.is-mine {
  border-color: #fff7ed;
  background:
    linear-gradient(145deg, #f97316, #c2410c);
  box-shadow:
    0 0 0 4px rgba(249, 115, 22, .22),
    0 10px 22px rgba(154, 52, 18, .24),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

.seat-map-button.is-locked {
  color: #315d09;
  border-color: rgba(111, 155, 25, .22);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(189, 219, 160, .96) 0 8px,
      rgba(229, 242, 217, .96) 8px 16px
    );
  box-shadow: none;
}

.seat-map-button:hover:not(:disabled) {
  z-index: 5;
  filter: brightness(1.06) saturate(1.08);
  transform: translateY(-2px) scale(1.025);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, .22),
    inset 0 1px 0 rgba(255, 255, 255, .25);
}

.seat-map-button:focus-visible {
  z-index: 6;
  outline: 4px solid rgba(37, 99, 235, .30);
  outline-offset: 2px;
}

.seat-map-button:disabled {
  cursor: not-allowed;
}

.seat-map-button.is-occupied:disabled:not(.is-mine) {
  opacity: .94;
}

.seat-map-button.is-locked:disabled {
  opacity: .82;
}

.seat-map-seat-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(.55rem, 1.05vw, .88rem);
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(15, 23, 42, .28);
}

.seat-map-occupant {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(.43rem, .76vw, .68rem);
  font-weight: 800;
  line-height: 1.05;
  opacity: .92;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-map-button.is-locked .seat-map-seat-name,
.seat-map-button.is-locked .seat-map-occupant {
  text-shadow: none;
}

.seat-map-lock {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: clamp(.45rem, .8vw, .68rem);
  line-height: 1;
}

/* Los puestos exteriores son más estrechos en el plano. */
.seat-map-button-extra .seat-map-seat-name {
  font-size: clamp(.48rem, .88vw, .76rem);
}

.seat-map-button-extra .seat-map-occupant {
  font-size: clamp(.39rem, .68vw, .58rem);
}

/* Nombre y puesto, uno debajo del otro, en el listado de oficina. */
.person-btn.person-btn-with-seat {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 96px;
  min-height: 44px;
  padding: 7px 11px;
  border-radius: 14px;
  line-height: 1.05;
}

.person-btn-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-btn.person-btn-with-seat small {
  display: block;
  max-width: 100%;
  color: #315d09;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1.1;
  opacity: .82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-btn.person-btn-with-seat small:first-letter {
  text-transform: uppercase;
}

body.calendar-saving .seat-map-button {
  pointer-events: none;
  opacity: .68;
}

@media (max-width: 900px) {
  .seat-map-panel {
    padding: 17px;
  }

  .seat-map-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .seat-map-heading-side {
    justify-items: start;
    max-width: none;
  }

  .seat-map-summary {
    text-align: left;
  }

  .seat-map-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .seat-map-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 22px;
  }

  .seat-map-heading h2 {
    font-size: 1.35rem;
  }

  .seat-map-stage {
    min-width: 700px;
  }

  .seat-map-notice {
    font-size: .79rem;
  }

  .seat-map-legend > span {
    font-size: .68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seat-map-button {
    transition: none;
  }
}


/* =========================================================
   V42 · Acceso rápido al plano y puestos habituales
   ========================================================= */

.seat-map-panel {
  scroll-margin-top: 18px;
}

.seat-map-notice.is-warning {
  color: #8a3b00;
  border-color: rgba(235, 110, 8, .28);
  background:
    linear-gradient(135deg, #fff7ed, #fffaf5);
  box-shadow: 0 10px 24px rgba(154, 71, 0, .09);
}

.seat-map-panel.seat-map-attention {
  animation: seat-map-attention-pulse .72s ease-out;
}

@keyframes seat-map-attention-pulse {
  0% {
    box-shadow:
      0 18px 42px rgba(0, 40, 70, .09),
      0 0 0 0 rgba(235, 110, 8, .34);
  }

  55% {
    box-shadow:
      0 22px 48px rgba(0, 40, 70, .13),
      0 0 0 8px rgba(235, 110, 8, .14);
  }

  100% {
    box-shadow:
      0 18px 42px rgba(0, 40, 70, .09),
      0 0 0 0 rgba(235, 110, 8, 0);
  }
}

.office-seat-intro {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -2px 0 11px;
  padding: 10px 11px;
  border: 1px solid rgba(37, 99, 235, .13);
  border-radius: 13px;
  color: #475569;
  background: linear-gradient(135deg, #f8fbff, #f3f7ff);
}

.office-seat-intro-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  font-size: .82rem;
  font-weight: 950;
  box-shadow: 0 7px 15px rgba(37, 99, 235, .18);
}

.office-seat-intro p {
  margin: 0;
  color: inherit;
  font-size: .76rem;
  font-weight: 720;
  line-height: 1.42;
}

.person-btn.person-btn-with-seat .person-seat-shortcut {
  position: relative;
  max-width: 100%;
  margin: 1px -4px -2px;
  padding: 3px 6px;
  border-radius: 7px;
  color: #9a4700;
  background: rgba(255, 237, 213, .92);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: 1;
  transition:
    color .16s ease,
    background .16s ease,
    transform .16s ease,
    box-shadow .16s ease;
}

.person-btn.person-btn-with-seat .person-seat-shortcut::after {
  content: "↓";
  margin-left: 4px;
  font-size: .72em;
  text-decoration: none;
}

.person-btn.person-btn-with-seat .person-seat-shortcut:hover {
  color: #7c2d12;
  background: #ffedd5;
  box-shadow: 0 4px 10px rgba(154, 71, 0, .12);
  transform: translateY(-1px);
}
/* Puesto clicable dentro del botón de persona */
.person-btn.person-btn-with-seat .person-seat-shortcut {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  margin: 2px -4px -3px;
  padding: 1px 8px 2px;
  border: 1px solid rgba(0, 71, 131, 0.18);
  border-radius: 8px;
  color: var(--azul);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem !important;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  box-shadow:
    0 2px 5px rgba(0, 71, 131, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

/* Hover exclusivamente sobre el puesto */
.person-btn.person-btn-with-seat .person-seat-shortcut:hover {
  color: #fff;
  background: var(--azul);
  border-color: var(--azul);

  box-shadow:
    0 7px 15px rgba(0, 71, 131, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  transform: translateY(-1px);
}

.person-btn.person-btn-with-seat .person-seat-shortcut:hover::before {
  color: var(--azul);
  background: #fff;

  transform: scale(1.06);
}

/* Pulsación */
.person-btn.person-btn-with-seat .person-seat-shortcut:active {
  transform: translateY(0) scale(0.98);
}

/* Accesibilidad con teclado */
.person-btn.person-btn-with-seat .person-seat-shortcut:focus-visible {
  outline: 3px solid rgba(0, 71, 131, 0.22);
  outline-offset: 2px;
}
.person-btn.person-btn-with-seat .person-seat-shortcut::after {
  font-size: 16px;
  margin-left: 0;
}
@media (max-width: 620px) {
  .office-seat-intro {
    padding: 9px 10px;
  }

  .office-seat-intro p {
    font-size: .73rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seat-map-panel.seat-map-attention {
    animation: none;
  }

  .person-btn.person-btn-with-seat .person-seat-shortcut {
    transition: none;
  }
}
/* =========================================================
   Resumen fijo inferior del día · SOLO MÓVIL
   ========================================================= */

.mobile-day-summary {
  display: none;
}


@media (max-width: 620px) {

  /*
   * Dejamos espacio al final de la página para que
   * la barra flotante no tape el contenido.
   */
  #calendarApp {
    padding-bottom: 165px;
  }


.mobile-day-summary {
  position: fixed;

  left: 0;
  right: 0;
  bottom: 0;

  z-index: 2800;

  display: grid;
  gap: 9px;

  width: 100%;

  padding:
    12px
    14px
    calc(12px + env(safe-area-inset-bottom));

  border: 0;
  border-top: 1px solid rgba(148, 163, 184, .28);

  /*
   * Solo redondeamos arriba.
   * Abajo queda totalmente unido a la pantalla.
   */
  border-radius: 18px 18px 0 0;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, .98),
      rgba(247, 250, 255, .98)
    );

  box-shadow:
    0 -10px 32px rgba(15, 23, 42, .16);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}


  /* ==============================
     Línea superior
     ============================== */

  .mobile-day-summary-main {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      auto;

    gap: 10px;

    align-items: start;
  }


  .mobile-day-summary-date {
    min-width: 0;

    display: grid;
    gap: 2px;
  }


  .mobile-day-summary-kicker {
    color: #64748b;

    font-size: .61rem;
    font-weight: 900;

    line-height: 1;

    letter-spacing: .075em;
    text-transform: uppercase;
  }


  .mobile-day-summary-date > strong {
    overflow: hidden;

    color: #172554;

    font-size: .88rem;
    font-weight: 950;

    line-height: 1.2;

    text-overflow: ellipsis;
    white-space: nowrap;

    text-transform: capitalize;
  }


  .mobile-day-summary-occupancy {
    color: #64748b;

    font-size: .72rem;
    line-height: 1.25;
  }


  .mobile-day-summary-occupancy b {
    color: #334155;
    font-weight: 900;
  }


  /*
   * Reutilizamos tus pill,
   * pero algo más pequeña aquí.
   */
  .mobile-day-summary .day-pill {
    align-self: center;

    padding: 5px 8px;

    font-size: .67rem;
  }


  /* ==============================
     Línea del usuario
     ============================== */

  .mobile-day-summary-user {
    display: grid;

    grid-template-columns:
      auto
      minmax(0, 1fr)
      auto;

    gap: 7px;

    align-items: center;

    padding-top: 8px;

    border-top:
      1px solid
      rgba(148, 163, 184, .20);
  }


  .mobile-day-summary-user-label {
    color: #64748b;

    font-size: .65rem;
    font-weight: 900;

    line-height: 1;

    text-transform: uppercase;

    letter-spacing: .055em;
  }


  /*
   * Botón utilizando exactamente la estética
   * de los botones que ya tienes.
   */
  .mobile-day-summary .mobile-self-status {
    width: fit-content;
    max-width: 100%;

    min-height: 34px;

    padding: 6px 9px;

    justify-self: start;

    gap: 6px;

    cursor: pointer;
  }


  .mobile-day-summary
  .mobile-self-status
  .person-btn-name {
    overflow: hidden;

    max-width: 105px;

    text-overflow: ellipsis;
    white-space: nowrap;
  }


  .mobile-day-summary
  .mobile-self-status
  small {
    display: inline-flex;
    align-items: center;

    margin: 0;
    padding: 3px 6px;

    border-radius: 7px;

    font-size: .65rem;
    font-weight: 900;

    text-decoration: none;
  }


  /*
   * Si está en oficina, el puesto queda
   * integrado en el azul.
   */
  .mobile-day-summary
  .person-btn-office
  small {
    color: var(--azul);

    background:
      rgba(
        255,
        255,
        255,
        .75
      );

    border:
      1px solid
      rgba(
        0,
        71,
        131,
        .14
      );
  }


  /*
   * Teletrabajo mantiene la gama rosa.
   */
  .mobile-day-summary
  .person-btn-telework
  small {
    color: #8a2455;

    background:
      rgba(
        255,
        255,
        255,
        .62
      );

    border:
      1px solid
      rgba(
        218,
        65,
        132,
        .14
      );
  }


  .mobile-day-summary
  .mobile-self-status:hover {
    transform: translateY(-1px);

    box-shadow:
      0 8px 18px
      rgba(15, 23, 42, .13);
  }


  /* Texto explicativo muy discreto */
  .mobile-day-summary-change-hint {
    max-width: 100px;

    color: #64748b;

    font-size: .60rem;
    font-weight: 700;

    line-height: 1.15;

    text-align: right;
  }


  /*
   * Mientras se guarda evitamos dobles pulsaciones.
   */
  body.calendar-saving
  .mobile-day-summary
  button {
    pointer-events: none;
    opacity: .62;
  }
}


/* En pantallas muy pequeñas simplificamos todavía más */
@media (max-width: 390px) {

  #calendarApp {
    padding-bottom: 170px;
  }

  .mobile-day-summary {
    left: 7px;
    right: 7px;

    padding:
      10px;

    border-radius: 16px;
  }


  .mobile-day-summary-change-hint {
    display: none;
  }


  .mobile-day-summary-user {
    grid-template-columns:
      auto
      minmax(0, 1fr);
  }


  .mobile-day-summary
  .mobile-self-status
  .person-btn-name {
    max-width: 90px;
  }
}
/* =========================================================
   Barra inferior móvil · ajuste final
   ========================================================= */

@media (max-width: 620px) {

  .mobile-day-summary {
    position: fixed;

    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;

    padding:
      14px
      22px
      calc(20px + env(safe-area-inset-bottom))
      22px !important;

    border-radius: 0 !important;

    box-sizing: border-box;
  }

}


@media (max-width: 390px) {

  .mobile-day-summary {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    margin: 0 !important;

    padding:
      14px
      20px
      calc(20px + env(safe-area-inset-bottom))
      20px !important;
  }

}