:root {
  --ink: #14213D;
  --paper: #F3F5F9;
  --panel: #FFFFFF;
  --teal: #D94300;
  --teal-dark: #0A4E53;
  --violet: #D94300;
  --violet-dark: #FF5003;
  --line: #E2E5EA;
  --amber: #C98A2D;
  --green: #1E9E6B;
  --red: #C9432D;
  --grey-text: #5B6472;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.console {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 36px;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

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

/* .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--violet) 100%);
  position: relative;
  flex-shrink: 0;
} */

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  border-bottom-color: transparent;
  border-right-color: transparent;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.01em;
}

.brand-sub { font-size: 12.5px; color: var(--grey-text); }

/* .topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--grey-text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
} */

/* ---------- Layout ---------- */

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px 22px;
  box-shadow: 0 1px 3px rgba(20, 33, 61, 0.05);
}

.panel--reports { border-top: 3px solid var(--violet); }
.panel--calls   { border-top: 3px solid var(--teal); }

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

.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

h2 {
  font-family: var(--font-display);
  font-size: 21px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--grey-text);
}

/* ---------- Calls panel ---------- */

.frame-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #F1F4F6;
  height: clamp(480px, 72vh, 760px);
}

.calls-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.frame-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--grey-text);
  pointer-events: none;
  z-index: 1;
}

.frame-loading[hidden] { display: none; }

/* ---------- Reports panel ---------- */

.reports-body { display: flex; flex-direction: column; gap: 10px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.dot--live    { background: var(--green); box-shadow: 0 0 0 3px rgba(30,158,107,0.18); }
.dot--missing { background: var(--red); }
.dot--idle    { background: var(--amber); }

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  padding: 11px 16px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--violet); color: #fff; display: block; }
.btn--primary:hover { background: var(--violet-dark); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--teal-dark);
  font-size: 13px;
  padding: 8px 14px;
}

.btn--ghost:hover { border-color: var(--teal); background: rgba(15,107,114,0.06); }

.hint {
  font-size: 12.5px;
  color: var(--grey-text);
  line-height: 1.5;
  margin: 4px 0 0;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #8A91A0;
}

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