:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --brand: #136f63;
  --brand-dark: #0c5148;
  --danger: #b42318;
  --soft: #edf7f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 44px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

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

.main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(16px, 4vw, 44px) 56px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.panel,
.room-card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.auth-card {
  margin: 9vh auto 0;
  max-width: 420px;
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

.badge {
  background: var(--soft);
  border: 1px solid #b8ddd6;
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.badge.danger {
  background: #fff1f0;
  border-color: #fecdca;
  color: var(--danger);
}

.button,
button {
  align-items: center;
  background: var(--brand);
  border: 0;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
}

.button.secondary,
button.secondary {
  background: #eef2f6;
  color: var(--ink);
}

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

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

form {
  display: grid;
  gap: 12px;
}

label {
  color: #344054;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.video-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

video {
  aspect-ratio: 16 / 9;
  background: #0b111d;
  border-radius: 8px;
  display: block;
  width: 100%;
}

.chat-box {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 330px;
  overflow: auto;
  padding: 10px;
}

.chat-line {
  border-bottom: 1px solid #edf0f5;
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.flash {
  background: #fff8e6;
  border: 1px solid #fedf89;
  border-radius: 8px;
  color: #7a4a00;
  margin-bottom: 16px;
  padding: 10px 12px;
}

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