:root {
  --bg: #f5efe2;
  --panel: rgba(255, 252, 245, 0.88);
  --ink: #1f1d1a;
  --muted: #6a655b;
  --accent: #1a6f63;
  --accent-strong: #125247;
  --danger: #8c3b2e;
  --line: rgba(31, 29, 26, 0.1);
  --shadow: 0 24px 64px rgba(18, 24, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(26, 111, 99, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(140, 59, 46, 0.12), transparent 28%),
    linear-gradient(160deg, #f7f1e4 0%, #f1e7d3 45%, #ebe1cd 100%);
}

button,
input,
select {
  font: inherit;
}

.login-shell,
.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.login-card,
.panel,
.video-card,
.control-panel,
.topbar {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  width: min(560px, 100%);
  border-radius: 28px;
  padding: 36px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

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

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.secondary-form {
  margin-top: 12px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.8);
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

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

.alert {
  margin-top: 18px;
  border-radius: 14px;
  padding: 12px 14px;
  color: white;
  background: var(--danger);
}

.credentials {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.credentials ul {
  padding-left: 20px;
}

.app-shell {
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-radius: 24px;
  padding: 22px 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.presence {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  background: rgba(31, 29, 26, 0.08);
}

.status-pill.ok {
  background: rgba(26, 111, 99, 0.16);
  color: var(--accent-strong);
}

.control-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  border-radius: 20px;
  padding: 16px;
}

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

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

.video-card {
  border-radius: 24px;
  overflow: hidden;
}

.video-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: #151515;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.panel {
  border-radius: 24px;
  padding: 20px;
}

.member-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(31, 29, 26, 0.08);
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions,
  .presence {
    justify-items: start;
  }
}
