:root {
  --bg: #f8fcff;
  --bg-soft: #e9f6fd;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --line: rgba(117, 190, 238, 0.22);
  --text: #414242;
  --muted: #6f7b7d;
  --brand: #75beee;
  --brand-strong: #57b4e8;
  --brand-soft: #cfeaf9;
  --gray-brand: #414242;
  --green: #28b36d;
  --red: #d6575f;
  --amber: #dfa329;
  --shadow: 0 18px 44px rgba(117, 190, 238, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Sora", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(117, 190, 238, 0.32), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(117, 190, 238, 0.12), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7fcff 42%, #eef8fd 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(117, 190, 238, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 190, 238, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 85%);
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
}

.background-orb-a {
  width: 280px;
  height: 280px;
  background: rgba(117, 190, 238, 0.42);
  top: 90px;
  right: 8vw;
}

.background-orb-b {
  width: 220px;
  height: 220px;
  background: rgba(117, 190, 238, 0.2);
  bottom: 10vh;
  left: 8vw;
}

.app-shell,
.admin-shell {
  padding: 24px 28px 34px;
}

.login-gate {
  max-width: 1280px;
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 480px);
  align-items: center;
  gap: 48px;
}

.auth-loading-screen {
  max-width: 1280px;
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.auth-loading-card {
  width: min(100%, 520px);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 30px;
  border-radius: 32px;
  border: 1px solid rgba(117, 190, 238, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 251, 255, 0.96)),
    var(--panel);
  box-shadow: 0 26px 56px rgba(117, 190, 238, 0.18);
}

.auth-loading-crest {
  width: 96px;
  height: 96px;
}

.login-gate-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
  padding: 36px 20px;
}

.login-gate-brand h1 {
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.login-brand-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(117, 190, 238, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(117, 190, 238, 0.12);
}

.login-crest {
  width: clamp(112px, 15vw, 152px);
  height: clamp(112px, 15vw, 152px);
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(117, 190, 238, 0.2));
}

.login-gate-copy,
.login-card-copy,
.login-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-gate-copy {
  width: min(100%, 460px);
  max-width: 460px;
  font-size: 0.96rem;
}

.login-brand-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(100%, 460px);
  max-width: 460px;
}

.login-brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(117, 190, 238, 0.18);
  color: var(--gray-brand);
  font-size: 0.74rem;
  font-weight: 600;
}

.login-card {
  position: relative;
  width: 100%;
  padding: 30px;
  border-radius: 32px;
  border: 1px solid rgba(117, 190, 238, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 251, 255, 0.96)),
    var(--panel);
  box-shadow: 0 26px 56px rgba(117, 190, 238, 0.18);
}

.login-card h2 {
  margin-bottom: 8px;
}

.login-card-rule {
  width: 100%;
  height: 1px;
  margin: 18px 0 20px;
  background: linear-gradient(90deg, rgba(117, 190, 238, 0), rgba(117, 190, 238, 0.34), rgba(117, 190, 238, 0));
}

.login-card-copy {
  margin-bottom: 22px;
  font-size: 0.84rem;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  font-size: 0.9rem;
}

.login-hint {
  margin-top: 14px;
  font-size: 0.74rem;
  text-align: center;
}

.portal-shell {
  display: contents;
}

.brand-stripe {
  max-width: 1280px;
  height: 10px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0 34%, #ffffff 34% 66%, var(--brand) 66% 100%);
  box-shadow: 0 8px 18px rgba(117, 190, 238, 0.18);
}

.hero,
.admin-header {
  max-width: 1280px;
  margin: 0 auto 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(140deg, rgba(117, 190, 238, 0.22), rgba(255, 255, 255, 0.98)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(117, 190, 238, 0.22);
  color: var(--muted);
  font-size: 0.76rem;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crest-image {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(117, 190, 238, 0.18));
}

.crest-image-admin {
  width: 60px;
  height: 60px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-strong);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Antonio", sans-serif;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

h2 {
  font-size: clamp(1.12rem, 1.6vw, 1.5rem);
}

h3 {
  font-size: 1.25rem;
}

.admin-copy,
.hint,
.selection-card,
.agenda-meta,
.room-meta,
.admin-item-meta,
.feedback-card p,
.field span,
.legend span {
  line-height: 1.5;
}

.admin-copy {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-chip,
.room-chip,
.kind-chip,
.ghost-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(117, 190, 238, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-brand);
  font-size: 0.78rem;
}

.layout,
.admin-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.layout {
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "filters filters"
    "schedule booking"
    "agenda booking";
}

.filters-panel { grid-area: filters; }
.schedule-panel { grid-area: schedule; }
.booking-panel { grid-area: booking; }
.agenda-panel { grid-area: agenda; }

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

.admin-stats,
.admin-agenda-panel {
  grid-column: 1 / -1;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-glass {
  background:
    linear-gradient(180deg, rgba(117, 190, 238, 0.18), rgba(255, 255, 255, 0.92)),
    var(--panel);
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-link,
.ghost-button,
.primary-button,
.secondary-button,
.status-select,
.action-button,
.field input,
.field select,
.field textarea {
  font: inherit;
}

.admin-link,
.ghost-button,
.secondary-button {
  color: var(--gray-brand);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(117, 190, 238, 0.22);
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.admin-link:hover,
.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.slot-button:hover,
.room-pill:hover,
.action-button:hover {
  transform: translateY(-1px);
  border-color: rgba(117, 190, 238, 0.4);
}

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

.filters-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field span {
  color: var(--muted);
  font-size: 0.76rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(117, 190, 238, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: var(--gray-brand);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(117, 190, 238, 0.9);
  box-shadow: 0 0 0 4px rgba(117, 190, 238, 0.18);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.stat-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(117, 190, 238, 0.12), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(117, 190, 238, 0.14);
}

.stat-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-brand);
}

.stat-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.room-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.room-pill {
  min-width: 180px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(117, 190, 238, 0.16);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  color: var(--gray-brand);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.room-pill.active {
  border-color: rgba(117, 190, 238, 0.46);
  background: linear-gradient(180deg, rgba(117, 190, 238, 0.26), rgba(255, 255, 255, 0.96));
}

.room-pill-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.room-pill-copy,
.room-highlight p,
.agenda-empty,
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.room-highlight {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(117, 190, 238, 0.18), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(117, 190, 238, 0.16);
}

.room-highlight h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.slot-button {
  position: relative;
  padding: 10px 8px;
  min-height: 60px;
  border-radius: 12px;
  border: 1px solid rgba(117, 190, 238, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--gray-brand);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.slot-button.free {
  background: linear-gradient(180deg, rgba(117, 190, 238, 0.26), rgba(255, 255, 255, 0.98));
}

.slot-button.busy,
.slot-button.disabled {
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(192, 23, 32, 0.12), rgba(255, 255, 255, 0.9));
}

.slot-button.past {
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(65, 66, 66, 0.1), rgba(255, 255, 255, 0.9));
}

.slot-button.selected {
  border-color: rgba(55, 142, 196, 0.98);
  background: linear-gradient(180deg, rgba(55, 142, 196, 0.92), rgba(90, 176, 227, 0.96));
  box-shadow: inset 0 0 0 2px rgba(22, 96, 148, 0.3), 0 8px 18px rgba(55, 142, 196, 0.22);
  color: #ffffff;
}

.slot-button.in-range {
  border-color: rgba(78, 160, 210, 0.82);
  background: linear-gradient(180deg, rgba(95, 176, 224, 0.82), rgba(138, 204, 241, 0.9));
  box-shadow: inset 0 0 0 1px rgba(47, 128, 178, 0.18);
  color: #10354c;
}

.slot-button.selected .slot-caption {
  color: rgba(255, 255, 255, 0.9);
}

.slot-button.in-range .slot-caption {
  color: rgba(16, 53, 76, 0.82);
}

.slot-time {
  display: block;
  margin-bottom: 4px;
  font-size: 0.84rem;
  font-weight: 700;
}

.slot-caption {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.selection-card {
  min-height: auto;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(117, 190, 238, 0.28);
  color: var(--muted);
}

.selection-card.armed {
  color: var(--text);
  border-style: solid;
  border-color: rgba(117, 190, 238, 0.52);
  background: linear-gradient(145deg, rgba(117, 190, 238, 0.22), rgba(255, 255, 255, 0.96));
}

.booking-form,
.stack-form {
  display: grid;
  gap: 12px;
}

.primary-button,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.primary-button:hover,
.action-button:hover {
  filter: saturate(1.08);
}

.primary-button {
  box-shadow: 0 10px 24px rgba(117, 190, 238, 0.28);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.legend-free { background: var(--green); }
.legend-busy { background: var(--red); }
.agenda-list,
.admin-list {
  display: grid;
  gap: 12px;
}

.agenda-filters-grid {
  margin-bottom: 14px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.week-day-card {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(117, 190, 238, 0.16);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.week-day-card.active {
  border-color: rgba(117, 190, 238, 0.46);
  background: linear-gradient(180deg, rgba(117, 190, 238, 0.22), rgba(255, 255, 255, 0.96));
}

.week-day-label,
.week-day-value,
.week-day-note {
  margin: 0;
}

.week-day-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-day-value {
  margin-top: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.week-day-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.agenda-item,
.admin-item {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(117, 190, 238, 0.16);
  background: rgba(255, 255, 255, 0.86);
}

.sync-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(117, 190, 238, 0.28);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.76rem;
}

.slots-grid .sync-note {
  grid-column: 1 / -1;
}

.agenda-top,
.admin-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.agenda-title,
.admin-item-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.agenda-meta,
.admin-item-meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.agenda-tags,
.admin-tags,
.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.kind-chip {
  background: rgba(117, 190, 238, 0.2);
}


.ghost-chip {
  color: var(--muted);
}

.status-chip.confirmada {
  background: rgba(40, 179, 109, 0.16);
}

.status-chip.pendiente {
  background: rgba(223, 163, 41, 0.18);
}

.status-chip.cancelada {
  background: rgba(214, 87, 95, 0.18);
}

.status-select {
  min-width: 138px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(117, 190, 238, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: var(--gray-brand);
}

.action-button.delete {
  background: linear-gradient(135deg, #d86a74, #c5444f);
  color: #fff4f4;
}

.feedback-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.feedback-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.feedback-card {
  width: min(520px, calc(100vw - 32px));
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(117, 190, 238, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.98));
  box-shadow: var(--shadow);
}

.feedback-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(214, 87, 95, 0.12);
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 800;
}

.feedback-modal[data-variant="success"] .feedback-icon {
  background: rgba(40, 179, 109, 0.14);
  color: var(--green);
}

.feedback-modal[data-variant="success"] .feedback-card {
  border-color: rgba(40, 179, 109, 0.2);
}

.feedback-card .primary-button {
  margin-top: 12px;
  width: 100%;
}

.admin-hero-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-gate-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(117, 190, 238, 0.12);
  border: 1px solid rgba(117, 190, 238, 0.18);
  color: var(--muted);
  font-size: 0.74rem;
}

.portal-footer {
  max-width: 1280px;
  margin: 18px auto 0;
  padding-top: 6px;
}

.portal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 0;
  border-top: 1px solid rgba(117, 190, 238, 0.16);
}

.portal-footer-copy {
  color: var(--muted);
  font-size: 0.72rem;
}

.footer-admin-link {
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
}

.footer-admin-link:hover {
  color: var(--brand-strong);
}

.access-panel {
  max-width: 720px;
  margin: 32px auto 0;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .login-gate {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding: 18px 0 12px;
  }

  .login-gate-brand {
    padding-bottom: 0;
  }

  .layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-areas:
      "filters"
      "schedule"
      "booking"
      "agenda";
  }

  .stats-row,
  .filters-grid,
  .form-grid,
  .slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .app-shell,
  .admin-shell {
    padding: 14px;
  }

  .login-card {
    padding: 22px 18px 20px;
    border-radius: 24px;
  }

  .login-gate {
    gap: 18px;
    min-height: calc(100vh - 56px);
    align-content: center;
  }

  .login-gate-brand {
    gap: 10px;
    padding: 12px 2px 0;
  }

  .login-gate-brand h1 {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .login-gate-copy {
    width: min(100%, 320px);
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .login-brand-tags {
    gap: 8px;
    width: min(100%, 320px);
  }

  .login-brand-tag,
  .login-brand-badge {
    font-size: 0.68rem;
  }

  .hero,
  .admin-header,
  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-brand,
  .hero-top,
  .portal-footer-inner,
  .section-heading,
  .agenda-top,
  .admin-item-top {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-row,
  .filters-grid,
  .form-grid,
  .slots-grid {
    grid-template-columns: 1fr;
  }

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

  .room-pill {
    min-width: 100%;
  }

  .login-submit {
    min-height: 50px;
  }

  .user-badge {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .login-gate {
    min-height: calc(100vh - 38px);
  }

  .login-crest {
    width: 96px;
    height: 96px;
  }

  .login-card-copy,
  .login-hint {
    font-size: 0.78rem;
  }

  .hero,
  .admin-header,
  .panel {
    padding: 16px;
  }

  .field input,
  .field select,
  .field textarea,
  .primary-button,
  .secondary-button,
  .ghost-button {
    font-size: 0.8rem;
  }

  input[type="date"] {
    overflow: hidden;
  }
}
