:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #14181d;
  --panel-strong: #1b2229;
  --text: #f4f7fb;
  --muted: #9aa7b4;
  --line: #2b343e;
  --accent: #6ee7b7;
  --accent-strong: #22c55e;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(110, 231, 183, 0.16), transparent 32rem),
    linear-gradient(135deg, #0b0d10 0%, #10161b 48%, #090a0d 100%);
  color: var(--text);
}

button,
input,
a {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 410px) 1fr;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.control-rail,
.meeting-stage {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 29, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.control-rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-radius: 8px;
}

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

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(110, 231, 183, 0.5);
  border-radius: 8px;
  background: rgba(110, 231, 183, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.brand-name,
.brand-subtitle,
.stage-title,
.stage-meta,
.status-label,
.status-card p,
.notes p,
.switch-row p,
.switch-row small {
  margin: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
}

.brand-subtitle,
.stage-meta,
.notes,
.switch-row small {
  color: var(--muted);
  font-size: 0.85rem;
}

.meeting-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  color: #d7e0e8;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1317;
  color: var(--text);
  outline: none;
  padding: 0 13px;
}

.field input:focus {
  border-color: rgba(110, 231, 183, 0.8);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.13);
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.icon-button,
.primary-button,
.secondary-button,
.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.switch-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #303944;
  transition: background 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--accent-strong);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-button,
.secondary-button,
.open-link {
  min-height: 46px;
  border: 1px solid transparent;
  padding: 0 14px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #04100b;
}

.secondary-button,
.open-link {
  border-color: var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.status-card {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid rgba(110, 231, 183, 0.32);
  border-radius: 8px;
  background: rgba(110, 231, 183, 0.08);
}

.status-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-card p:last-child {
  color: #d8e3ed;
  font-size: 0.92rem;
  line-height: 1.45;
}

.notes {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.meeting-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
}

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 16, 0.58);
}

.stage-title {
  font-size: 1rem;
  font-weight: 900;
}

.meeting-frame {
  position: relative;
  min-height: 560px;
  background: #07090b;
}

.meeting-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 114px);
  border: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  width: 100%;
  min-height: calc(100vh - 114px);
  padding: 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 8px;
  background: rgba(110, 231, 183, 0.1);
  color: var(--accent);
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.empty-state p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .meeting-frame,
  .meeting-frame iframe,
  .empty-state {
    min-height: 620px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 10px;
  }

  .control-rail {
    padding: 16px;
  }

  .button-row,
  .stage-topbar {
    grid-template-columns: 1fr;
  }

  .stage-topbar {
    display: grid;
  }

  .open-link {
    width: 100%;
  }
}
