:root {
  --bg-top: #f7efe3;
  --bg-bottom: #d9e6f2;
  --card: rgba(255, 252, 246, 0.82);
  --card-strong: rgba(255, 252, 246, 0.94);
  --ink: #1f2a31;
  --muted: #5a6b72;
  --line: rgba(31, 42, 49, 0.12);
  --occupied: #bb6230;
  --available: #2f7d5c;
  --idle: #7e8a91;
  --shadow: 0 30px 70px rgba(31, 42, 49, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 35%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.display-page {
  position: relative;
  background: linear-gradient(145deg, #d7d6d0 0%, #c9d3dc 45%, #d8ddd4 100%);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.shell,
.display-shell,
.login-shell {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.hero {
  padding: 18px 0 26px;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.hero h1,
.login-card h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
}

.card-grid.two-columns,
.display-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.info-strip {
  margin-bottom: 22px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.info-card {
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.mini-note {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.therapist-card,
.display-room,
.login-card {
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.card-header,
.display-room-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.therapist-card h2,
.display-room h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 0.95;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
}

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

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #f2ede5;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: #ece4d7;
}

.primary-action {
  background: #dcefdc;
}

.secondary-action {
  background: #f3dccf;
}

.preset-button.active,
.ghost-action.active,
.primary-action.active,
.secondary-action.active {
  box-shadow: inset 0 0 0 3px rgba(31, 42, 49, 0.18);
}

.preset-button.active {
  background: #e7efe8;
}

.ghost-action.active {
  background: #dce3e8;
}

.primary-action.active {
  background: #bfe1bf;
}

.secondary-action.active {
  background: #e9c1ac;
}

.save-action,
.ghost-button,
.ghost-action {
  background: #e6edf2;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}

.badge.occupied,
.status-pill.occupied,
.display-room.occupied .display-room-header h2 {
  color: var(--occupied);
}

.badge.occupied,
.status-pill.occupied {
  background: var(--occupied);
  color: white;
}

.badge.available,
.status-pill.available,
.display-room.available .display-room-header h2 {
  color: var(--available);
}

.badge.available,
.status-pill.available {
  background: var(--available);
  color: white;
}

.status-pill.idle,
.display-room.idle .display-room-header h2 {
  color: var(--idle);
}

.status-pill.idle {
  background: #d9dee2;
  color: var(--idle);
}

.display-page {
  overflow: hidden;
}

.display-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  isolation: isolate;
}

.display-shell.wide {
  width: min(1540px, calc(100vw - 20px));
}

.display-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(23, 27, 32, 0.12));
}

.artwork-backdrop {
  position: fixed;
  inset: 0;
  background-position: center 38%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(0.92) contrast(0.98) brightness(1.08);
  transform: scale(1.02);
}

.artwork-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 24%, rgba(24, 27, 31, 0.08) 58%, rgba(24, 27, 31, 0.18) 100%);
}

.display-shell > * {
  position: relative;
  z-index: 1;
}

.display-shell .display-topbar,
.display-shell .display-grid,
.display-shell .artwork-caption {
  z-index: 1;
}

.display-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 12px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

#practice-name {
  margin: 0;
  padding-left: 30px;
  font-size: clamp(1.6rem, 2.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #203039;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
}

.meta-cluster {
  display: flex;
  gap: 14px;
}

.meta-box {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.7);
  border: 1px solid var(--line);
  text-align: right;
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.meta-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.meta-subvalue {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.weather-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.weather-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 24px;
}

.display-grid {
  align-self: end;
  position: relative;
  z-index: 1;
  margin-bottom: 64px;
}

.display-room {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 30px;
}

.artwork-caption {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(1120px, calc(100vw - 40px));
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.42);
  border: 1px solid rgba(255, 252, 246, 0.28);
  color: rgba(31, 42, 49, 0.72);
  font-size: 0.74rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
}

.therapist-name {
  margin: 20px 0 0;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
}

.display-note {
  margin: 12px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.login-page {
  display: grid;
  place-items: center;
}

.login-shell {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(520px, 100%);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.wide-button {
  width: 100%;
}

.error-text {
  min-height: 1.4em;
  color: #a33636;
}

@media (max-width: 900px) {
  .card-grid.two-columns,
  .display-grid,
  .field-grid,
  .button-row,
  .preset-row,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .hero-row,
  .display-topbar,
  .meta-cluster,
  .info-card {
    flex-direction: column;
  }

  .meta-box {
    width: 100%;
    text-align: left;
  }

  #practice-name {
    padding-left: 0;
  }

  .display-grid {
    margin-bottom: 14px;
  }

  .artwork-caption {
    position: static;
    max-width: none;
    margin-top: 10px;
    width: auto;
    transform: none;
    white-space: normal;
  }
}
