/* =========================
   BASE / THEME
   ========================= */
:root{
  --bg: #0b0f14;
  --frame: #161c24;
  --panel: #1b222c;
  --panel2:#151b23;
  --edge: #2a3442;
  --edge2:#0f131a;

  --text: #d7dde7;
  --muted:#9aa6b6;

  --gold: #d2a24a;
  --amber:#d5852f;

  --p1: #d24b3a;
  --p2: #d58b2f;
  --p3: #c7b14a;
  --p4: #6fb0d6;

  --ok: #4bb36d;

  --shadow: 0 18px 40px rgba(0,0,0,.55);
  --inner: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -1px 0 rgba(0,0,0,.55);
  --bevel: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 45%, rgba(0,0,0,.25));
  --metal: linear-gradient(180deg, #232b36, #151b23 60%, #10151c);
  --metal2: linear-gradient(180deg, #202833, #121820);
  --warnGlow: 0 0 0 1px rgba(210,75,58,.30), 0 0 18px rgba(210,75,58,.25);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 700px at 20% 0%, #101826 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

/* =========================
   FRAME + LAYOUT
   ========================= */
.app{ display:flex; align-items:stretch; justify-content:center; }
.frame{
  width:min(1400px, 100%);
  margin: 18px;
  background: var(--metal);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  border-radius: 10px;
  overflow:hidden;
}
.grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 120px);
}

/* =========================
   TOPBAR
   ========================= */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #232c38, #121821);
  border-bottom: 1px solid var(--edge);
  box-shadow: var(--inner);
}
.topbar__left{ display:flex; flex-direction:column; gap:2px; }
.topbar__title{
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #f0c77a;
  font-size: 34px;
  text-transform:uppercase;
}
.topbar__subtitle{
  color: #b6c2d3;
  font-size: 14px;
  letter-spacing: .8px;
  text-transform:uppercase;
  opacity:.9;
}

.topbar__right{
  display:flex;
  gap:22px;
  align-items:flex-end;
}
.metric{
  display:grid;
  grid-template-columns: auto auto;
  gap: 6px 10px;
  align-items:end;
}
.metric__label{
  color: #b8c3d1;
  font-weight:700;
  font-size: 14px;
  letter-spacing:.5px;
}
.metric__value{
  font-weight:900;
  font-size: 20px;
  letter-spacing:.4px;
  color:#e8eef9;
}
.metric__value .unit{
  font-size: 14px;
  color:#d8b06d;
  font-weight:900;
  margin-left: 4px;
}

/* =========================
   PANELS
   ========================= */
.panel{
  background: var(--metal2);
  border-right: 1px solid var(--edge);
  box-shadow: var(--inner);
}
.panel--main{
  border-right: none;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}

.panel__hdr{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.panel__hdr--minor{ padding-top: 10px; }
.panel__title{
  font-weight: 900;
  letter-spacing: .8px;
  text-transform:uppercase;
  color:#cdd7e6;
  font-size: 16px;
}
.panel__title--minor{ font-size: 14px; opacity:.85; }
.panel__sep{
  height: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(255,255,255,.03));
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(0,0,0,.35);
}

.panel__footer{
  padding: 12px;
  margin-top:auto;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* =========================
   LEFT QUEUE LIST
   ========================= */
.queue{ padding: 8px 10px 12px; display:flex; flex-direction:column; gap:10px; }

.queueItem{
  width:100%;
  text-align:left;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  border-radius: 6px;
  padding: 10px 10px;
  cursor:pointer;
  color: var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  position:relative;
}
.queueItem:hover{ border-color: rgba(210,162,74,.25); }
.queueItem.is-selected{
  border-color: rgba(210,75,58,.55);
  box-shadow: var(--warnGlow);
  background: linear-gradient(180deg, rgba(210,75,58,.20), rgba(0,0,0,.20));
}

.queueItem__name{
  font-weight: 900;
  letter-spacing: .4px;
  text-transform:uppercase;
  font-size: 14px;
}
.queueItem__desc{
  margin-top: 2px;
  color: #c3cfde;
  font-size: 13px;
  opacity:.95;
}
.queueItem__meta{ display:flex; align-items:center; gap:10px; }

.badge{
  min-width: 30px;
  height: 26px;
  padding: 0 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 5px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.badge--p1{ background: rgba(210,75,58,.25); color:#ffd8d3; border-color: rgba(210,75,58,.55); }
.badge--p2{ background: rgba(213,139,47,.22); color:#ffe6c9; border-color: rgba(213,139,47,.50); }
.badge--p3{ background: rgba(199,177,74,.18); color:#fff5c7; border-color: rgba(199,177,74,.45); }
.badge--p4{ background: rgba(111,176,214,.18); color:#d9f0ff; border-color: rgba(111,176,214,.45); }

.speaker{
  width: 0; height:0;
  border-left: 14px solid rgba(213,139,47,.9);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  filter: drop-shadow(0 0 6px rgba(213,139,47,.35));
}

.recentEmpty{
  padding: 10px 12px 18px;
  color: var(--muted);
  font-style: italic;
}

/* Blinking for NEW alarms */
.is-blink{
  animation: blink 1s steps(2,end) infinite;
}
@keyframes blink{
  50%{ filter: brightness(1.25); }
}

/* =========================
   MAIN: ALARM BANNER
   ========================= */
.alarmBanner{
  margin: 14px 14px 0;
  background: linear-gradient(180deg, rgba(210,75,58,.35), rgba(0,0,0,.22));
  border: 1px solid rgba(210,75,58,.55);
  box-shadow: var(--warnGlow), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 8px;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 12px;
}
.alarmBanner__icon{
  width: 28px; height: 28px;
  border-radius: 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.10);
  color:#ffe1dd;
}
.alarmBanner__title{
  font-weight: 1000;
  letter-spacing: .7px;
  text-transform:uppercase;
  color:#ffd4ce;
}

/* =========================
   INSTRUCTIONS AREA
   ========================= */
.instructions{
  padding: 12px 18px 20px;
  overflow:auto;
  flex: 1 1 auto;
}
.section{
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.section:last-child{ border-bottom:none; }
.section__title{
  color: #e1c07f;
  font-weight: 1000;
  letter-spacing:.3px;
  font-size: 22px;
  margin-bottom: 8px;
}
.section__time{
  font-size: 16px;
  color:#bfa06d;
  font-weight: 900;
  opacity:.9;
}
.steps{
  margin: 0;
  padding-left: 24px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  font-size: 18px;
  line-height: 1.25;
}
.steps li{ color:#d7dde7; }
.muted{ color: var(--muted); font-size: 16px; }

.hl{ font-weight:1000; letter-spacing:.2px; }
.hl--warn{ color:#ffcf8b; }
.hl--crit{ color:#ffb1a7; text-shadow: 0 0 10px rgba(210,75,58,.25); }

.chip{
  display:inline-flex;
  align-items:center;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 900;
  color:#ffe6c9;
  border: 1px solid rgba(213,139,47,.45);
  background: rgba(213,139,47,.15);
}
.chip--crit{
  color:#ffd8d3;
  border-color: rgba(210,75,58,.55);
  background: rgba(210,75,58,.18);
}

/* =========================
   ACTION BAR (BOTTOM)
   ========================= */
.actionBar{
  display:flex;
  gap: 12px;
  justify-content:flex-end;
  align-items:center;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(255,255,255,.03));
}
.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.20));
  color: #e8eef9;
  font-weight: 1000;
  letter-spacing:.4px;
  border-radius: 8px;
  padding: 12px 14px;
  cursor:pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.btn:hover{ filter: brightness(1.1); }
.btn:active{ transform: translateY(1px); }

.btn--ack{
  background: linear-gradient(180deg, rgba(180,160,70,.25), rgba(0,0,0,.22));
  border-color: rgba(199,177,74,.55);
  color:#fff3c8;
}
.btn--done{
  background: linear-gradient(180deg, rgba(75,179,109,.22), rgba(0,0,0,.22));
  border-color: rgba(75,179,109,.55);
  color:#d9ffe6;
}

.btn--ghost{
  width:100%;
  background: transparent;
  border-color: rgba(255,255,255,.10);
  color:#cfd9e8;
}

/* =========================
   RESPONSIVE (optional)
   ========================= */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .panel{ border-right: none; }
}
