:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1d2633;
  --muted: #657386;
  --line: #d7dde7;
  --primary: #126e82;
  --primary-dark: #0d5666;
  --danger: #a8323d;
  --danger-dark: #842630;
  --accent: #f2b84b;
  --shadow: 0 10px 28px rgba(29, 38, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 700;
}

a {
  color: inherit;
}

.shell {
  width: min(960px, calc(100vw - 32px));
  margin: 32px auto;
}

.shell.wide {
  width: min(1180px, calc(100vw - 32px));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

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

.small-text {
  display: block;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.badge {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff9eb;
  color: #6b4d12;
  font-weight: 700;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.launch,
.panel,
.sidebar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.launch {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  text-decoration: none;
}

.launch:hover {
  border-color: var(--primary);
}

.launch strong,
.launch small {
  display: block;
}

.launch small {
  margin-top: 4px;
  color: var(--muted);
}

.launch-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #e6f2f5;
  color: var(--primary-dark);
  font-weight: 800;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

.focus-panel {
  text-align: center;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.support-id {
  margin: 8px auto 18px;
  padding: 18px;
  width: min(540px, 100%);
  border: 1px dashed var(--primary);
  border-radius: 8px;
  background: #eef8fa;
  color: var(--primary-dark);
  font-size: clamp(30px, 8vw, 56px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.notice {
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.focus-panel .row {
  justify-content: center;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--primary-dark);
}

.button.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.button.secondary:hover {
  background: #eef2f7;
}

.button.danger {
  background: var(--danger);
}

.button.danger:hover {
  background: var(--danger-dark);
}

.button.full {
  width: 100%;
  margin-top: 14px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}

.input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.id-input {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.audit-key {
  width: min(260px, 100%);
}

.section-title {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
}

.session-live {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #12a063;
  box-shadow: 0 0 0 6px rgba(18, 160, 99, 0.12);
}

#activePanel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tech-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  min-height: calc(100vh - 32px);
  margin: 16px;
  padding: 20px;
}

.status-box {
  min-height: 44px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
}

.viewer {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px 16px 16px 0;
}

video {
  width: 100%;
  max-height: calc(100vh - 32px);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10151d;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.empty-state {
  position: absolute;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-weight: 700;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .launch-grid,
  .tech-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .viewer {
    min-height: 55vh;
    padding: 0 16px 16px;
  }
}
