/* ----- Brand + status tokens ----------------------------------------
   The panel's whole background carries the status color, because on a
   wall panel the color IS the information: it has to read from down the
   hall before anyone can read a word. Charcoal cards hold the detail.  */

:root {
  --charcoal: #3D4542;
  --charcoal-deep: #2B312F;
  --gold: #BF910C;
  --paper: #F4F2ED;
  --paper-dim: rgba(244, 242, 237, 0.62);

  /* status colors (muted, professional — not neon) */
  --available: #2E7D57;
  --available-deep: #24614380;
  --in-use: #C0392B;
  --in-use-deep: #8E271C80;
  --soon: #7B4EA8;
  --soon-deep: #573A7480;
  --neutral: #4A524F;

  --status: var(--neutral);
  --status-deep: var(--charcoal-deep);
}

html[data-status="available"]    { --status: var(--available); --status-deep: var(--available-deep); }
html[data-status="in-use"]       { --status: var(--in-use);    --status-deep: var(--in-use-deep); }
html[data-status="starting-soon"]{ --status: var(--soon);      --status-deep: var(--soon-deep); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--paper);
  background: radial-gradient(circle at 50% 22%, var(--status), var(--status-deep) 78%);
  transition: background 900ms ease;
}

.panel {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3vh, 44px) clamp(24px, 4vw, 64px);
  gap: clamp(16px, 2.5vh, 32px);
}

/* ----- top bar ----- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }

.logo { height: clamp(34px, 5vh, 52px); width: auto; display: block; }

.room-name {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 4.4vh, 46px);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock { text-align: right; line-height: 1; }
.clock .time {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 5vh, 54px);
  font-variant-numeric: tabular-nums;
}
.clock .date {
  font-size: clamp(12px, 1.8vh, 18px);
  color: var(--paper-dim);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ----- the glanceable center ----- */
.stage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.status-word {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(72px, 20vh, 220px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.status-detail {
  font-size: clamp(18px, 3vh, 34px);
  font-weight: 500;
  color: var(--paper);
  margin-top: clamp(6px, 1.5vh, 18px);
  max-width: 22ch;
}

/* ----- today's agenda ----- */
.agenda {
  background: rgba(43, 49, 47, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: clamp(14px, 2vh, 24px) clamp(18px, 2.5vw, 30px);
  max-height: 34vh;
  overflow: hidden;
}

.agenda-head {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 1.7vh, 16px);
  color: var(--gold);
  margin-bottom: 10px;
}

.agenda-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.agenda-item {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: clamp(6px, 1vh, 11px) 8px;
  border-radius: 8px;
  font-size: clamp(15px, 2.2vh, 24px);
}
.agenda-item .slot {
  font-variant-numeric: tabular-nums;
  color: var(--paper-dim);
  min-width: 9.5em;
  font-weight: 500;
}
.agenda-item .subject {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agenda-item.is-now {
  background: rgba(191, 145, 12, 0.16);
  box-shadow: inset 3px 0 0 var(--gold);
}
.agenda-item.is-now .slot { color: var(--paper); }
.agenda-item.is-past { opacity: 0.4; }

.agenda-empty {
  color: var(--paper-dim);
  font-size: clamp(15px, 2.2vh, 22px);
  padding: 8px;
}

/* soft pulse while a meeting is starting soon */
html[data-status="starting-soon"] .status-word { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; } 50% { opacity: 0.72; } }

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

/* ----- touch actions (booking / cancel) ----- */
.actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:clamp(14px,3vh,28px); }
.actions-label {
  font-family:"Barlow Condensed",sans-serif; text-transform:uppercase; letter-spacing:.1em;
  font-size:clamp(13px,1.9vh,18px); color:var(--paper-dim); margin-right:4px;
}
.btn {
  font:600 clamp(16px,2.4vh,24px)/1 "Inter",sans-serif; color:var(--paper);
  background:rgba(244,242,237,.14); border:1.5px solid rgba(244,242,237,.4);
  border-radius:999px; padding:clamp(12px,1.8vh,18px) clamp(20px,2.6vw,30px);
  cursor:pointer; min-width:72px; min-height:56px; /* finger-friendly */
  -webkit-tap-highlight-color:transparent; transition:transform .08s ease, background .15s ease;
}
.btn:active { transform:scale(.95); }
.btn-book:hover, .btn-book:active { background:rgba(244,242,237,.26); }
.btn-cancel {
  background:rgba(244,242,237,.18); border-color:var(--paper);
}
.btn-cancel:active { background:rgba(244,242,237,.3); }

/* toast */
.toast {
  position:fixed; left:50%; bottom:6%; transform:translateX(-50%) translateY(20px);
  background:var(--charcoal-deep); color:var(--paper); font:500 clamp(15px,2vh,20px) "Inter",sans-serif;
  padding:14px 26px; border-radius:12px; box-shadow:0 8px 30px rgba(0,0,0,.35);
  opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease; z-index:10;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
