/* Gaspec Meetings — tema escuro com as cores da marca (verde Gaspec + vermelho do logotipo). */

:root {
  --ink: #04120b;
  --panel: #0a1d13;
  --panel2: #0f281b;
  --olive: #1e8751;
  --acid: #ff2a2a;
  --acid-dark: #c40d0d;
  --sand: #e1efe3;
  --rust: #ff7a45;
  --line: #1f3d2c;
  --muted: #89a495;
  --white: #f3f7f2;
  --danger: #ff6257;
  --go: #3ddc84;
  --warn: #f5c04a;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 74px;
  --radius: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(30, 135, 81, 0.22), transparent 55%),
    radial-gradient(ellipse at 110% 110%, rgba(255, 42, 42, 0.10), transparent 50%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 14px);
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--acid); }
img { max-width: 100%; }
[hidden] { display: none !important; }

::selection { background: var(--acid); color: #fff; }

:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- tipografia utilitária ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 6px;
}
.eyebrow.red { color: var(--acid); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }

/* ---------- botões e campos ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel2);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--olive); background: #143524; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--acid); border-color: var(--acid); color: #fff; }
.btn.primary:hover { background: #ff4545; border-color: #ff4545; }
.btn.green { background: var(--olive); border-color: var(--olive); color: #fff; }
.btn.green:hover { background: #24a061; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: rgba(255, 98, 87, 0.55); color: var(--danger); }
.btn.danger:hover { background: rgba(255, 98, 87, 0.12); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 10px; }
.btn.block { width: 100%; }
.btn.on { background: rgba(61, 220, 132, 0.12); border-color: var(--go); color: var(--go); }
.btn.live { background: var(--acid); border-color: var(--acid); color: #fff; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line); background: var(--panel2); color: var(--white);
  cursor: pointer; font-size: 15px; position: relative;
}
.icon-btn:hover { border-color: var(--olive); }

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type='text'], input[type='password'], input:not([type]), select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px rgba(30, 135, 81, 0.25); }
select { cursor: pointer; }
textarea { resize: none; }

input[type='range'] { width: 100%; accent-color: var(--acid); }
input[type='checkbox'] { accent-color: var(--acid); width: 16px; height: 16px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; margin: 8px 0; }

.alert {
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: rgba(255, 98, 87, 0.1);
  color: #ffd3cf;
  font-size: 13px;
  margin: 0 0 14px;
}
.alert.ok { border-left-color: var(--go); background: rgba(61, 220, 132, 0.1); color: #c9f5dc; }
.alert.warn { border-left-color: var(--warn); background: rgba(245, 192, 74, 0.1); color: #fbe7b6; }

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 18, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); user-select: none; }
.brand img { width: 52px; height: auto; display: block; }
.brand strong { display: block; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; }
.brand strong em { font-style: normal; color: var(--acid); }
.brand small {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
}
.topbar .spacer { flex: 1; }
.topbar .room-title { min-width: 0; }
.topbar .room-title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.chip.ok { color: var(--go); border-color: rgba(61, 220, 132, 0.4); }
.chip.ok::before { background: var(--go); box-shadow: 0 0 8px var(--go); }
.chip.bad { color: var(--danger); border-color: rgba(255, 98, 87, 0.4); }
.chip.bad::before { background: var(--danger); animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- painéis ---------- */

.panel {
  background: linear-gradient(180deg, rgba(15, 40, 27, 0.92), rgba(10, 29, 19, 0.92));
  border: 1px solid var(--line);
  padding: 18px;
  position: relative;
}
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--acid); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.count.dim { background: var(--line); color: var(--sand); }

.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px 60px; }

/* ---------- login ---------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 460px) 1fr;
}
.login-side { display: flex; flex-direction: column; justify-content: center; padding: 40px 48px; border-right: 1px solid var(--line); background: rgba(4, 18, 11, 0.7); }
.login-side .brand { margin-bottom: 36px; }
.login-side .brand img { width: 74px; }
.login-card h1 { font-size: 28px; margin-bottom: 6px; }
.login-card p.lead { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.tabs { display: flex; border: 1px solid var(--line); margin-bottom: 22px; }
.tabs button {
  flex: 1; min-height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.tabs button[aria-selected='true'] { background: var(--panel2); color: var(--white); box-shadow: inset 0 -2px 0 var(--acid); }
.login-foot { margin-top: 28px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }

.intel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  background:
    linear-gradient(180deg, rgba(4, 18, 11, 0.2), rgba(4, 18, 11, 0.85)),
    url('/images/login-art.svg') center / cover no-repeat;
}
.intel-top { display: flex; justify-content: space-between; gap: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.intel-top .live { color: var(--acid); }
.intel-top .live::before { content: '● '; animation: blink 1.4s infinite; }
.intel h2 { font-size: clamp(30px, 4vw, 54px); max-width: 640px; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.02; }
.intel h2 em { font-style: normal; color: var(--acid); }
.intel p { max-width: 520px; color: var(--sand); opacity: 0.85; }
.intel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 28px; max-width: 640px; }
.intel-grid div { background: rgba(4, 18, 11, 0.85); padding: 14px 16px; }
.intel-grid strong { display: block; font-size: 22px; color: var(--white); }
.intel-grid span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- lobby ---------- */

.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.room-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); background: var(--panel); position: relative; }
.room-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--olive); }
.room-card.busy::before { background: var(--acid); }
.room-card h3 { font-size: 18px; }
.room-card .slug { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.room-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--sand); text-transform: uppercase; }
.room-meta .live { color: var(--acid); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; }

/* ---------- admin ---------- */

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.admin-grid .panel + .panel { margin-top: 0; }
h2.mb { margin-bottom: 14px; }
.requests { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.request-card { border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); padding: 14px; }
.request-card strong { display: block; }
.request-card .actions { display: flex; gap: 8px; margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
td { padding: 10px; border-bottom: 1px solid rgba(31, 61, 44, 0.6); vertical-align: middle; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-block; padding: 2px 7px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.tag.admin { border-color: var(--acid); color: var(--acid); }
.tag.ok { border-color: rgba(61, 220, 132, 0.5); color: var(--go); }
.tag.pending { border-color: rgba(245, 192, 74, 0.5); color: var(--warn); }
.tag.bad { border-color: rgba(255, 98, 87, 0.5); color: var(--danger); }
.empty-note { color: var(--muted); font-size: 13px; padding: 12px 0; }

/* ---------- sala ---------- */

.room-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 320px;
  gap: 14px;
  padding: 14px;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}
.sidebar, .chatbar { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.chatbar { display: flex; flex-direction: column; }
.chatbar .panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.profile { display: flex; align-items: center; gap: 12px; }
.profile-info { min-width: 0; flex: 1; }
.profile-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-info select { min-height: 32px; padding: 4px 8px; margin-top: 6px; font-size: 13px; }

.avatar {
  --size: 40px;
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--olive) center / cover no-repeat;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: calc(var(--size) * 0.4);
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: box-shadow 0.12s, border-color 0.12s;
}
.avatar.lg { --size: 56px; }
.avatar.sm { --size: 30px; }
.avatar.speaking { border-color: var(--go); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.35), 0 0 16px rgba(61, 220, 132, 0.55); }
.avatar .dot {
  position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--panel); background: var(--muted);
}
.dot.online { background: var(--go); }
.dot.busy { background: var(--danger); }
.dot.away { background: var(--warn); }
.dot.offline { background: #4a5a50; }
button.avatar { cursor: pointer; padding: 0; }
button.avatar:hover::after {
  content: '✎'; position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); font-size: 18px;
}

.control-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.control-block:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.control-row { display: flex; gap: 8px; }
.control-row > * { flex: 1; }
.slider { margin: 10px 0; }
.slider label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.slider output { font-family: var(--mono); color: var(--sand); }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select-row select, .control-block select { min-height: 34px; padding: 5px 8px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line); background: var(--ink); }

.list { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.person + .person { border-top: 1px solid rgba(31, 61, 44, 0.5); }
.person-info { min-width: 0; flex: 1; }
.person-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-info span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-live { color: var(--acid) !important; font-family: var(--mono); font-weight: 700; letter-spacing: 0.08em; }
.badge-mic { color: var(--go) !important; font-family: var(--mono); font-weight: 700; letter-spacing: 0.08em; }
.group-title { display: flex; justify-content: space-between; margin: 14px 0 4px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); }
.group-title:first-child { margin-top: 0; }
.unread {
  position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--acid); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.stage { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.notice-area { display: flex; flex-direction: column; gap: 8px; }
.notice-area .alert { margin: 0; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.notice-area .alert button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-content: start; }
.video-card { border: 1px solid var(--line); background: #000; display: flex; flex-direction: column; min-width: 0; }
.video-card.expanded { grid-column: 1 / -1; }
.video-card:fullscreen { border: 0; }
.video-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel);
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.video-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-head .live { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--acid); white-space: nowrap; }
.video-head .spacer { flex: 1; }
.conn { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; padding: 2px 6px; border: 1px solid var(--line); color: var(--warn); white-space: nowrap; }
.conn.ok { color: var(--go); border-color: rgba(61, 220, 132, 0.4); }
.conn.bad { color: var(--danger); border-color: rgba(255, 98, 87, 0.4); }
.video-box { position: relative; overflow: auto; aspect-ratio: 16 / 9; background: #000; cursor: zoom-in; }
.video-card.expanded .video-box { aspect-ratio: auto; height: calc(100vh - var(--header-h) - 160px); min-height: 320px; cursor: zoom-out; }
.video-card:fullscreen .video-box { height: auto; flex: 1; aspect-ratio: auto; }
.video-box video { display: block; width: 100%; height: 100%; object-fit: contain; margin: 0 auto; }
.video-box.zoomed video { height: auto; max-width: none; }
.video-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 12px; background: var(--panel); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.video-foot .ctrl { display: flex; align-items: center; gap: 6px; }
.video-foot input[type='range'] { width: 90px; }
.video-foot .stats { font-family: var(--mono); font-size: 11px; color: var(--sand); }
.video-foot .watchers { flex-basis: 100%; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.local-card { border: 1px solid var(--acid); background: repeating-linear-gradient(135deg, rgba(255, 42, 42, 0.08) 0 12px, transparent 12px 24px), var(--panel); padding: 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.local-card .pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 0 rgba(255, 42, 42, 0.6); animation: pulse 1.6s infinite; flex: none; }
.local-card strong { display: block; font-family: var(--mono); letter-spacing: 0.14em; font-size: 14px; }
.local-card .grow { flex: 1; min-width: 200px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(255, 42, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 42, 42, 0); } }

.empty-stage {
  flex: 1; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--line); padding: 30px; color: var(--muted);
  background: radial-gradient(circle at center, rgba(30, 135, 81, 0.12), transparent 60%);
}
.empty-stage img { width: 120px; opacity: 0.35; margin-bottom: 18px; }
.empty-stage h2 { color: var(--white); margin-bottom: 6px; }

.unlock { align-self: center; }

.chat-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.msg { font-size: 13px; }
.msg-head { display: flex; gap: 8px; align-items: baseline; }
.msg-head strong { font-size: 12px; color: var(--sand); }
.msg-head time { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--white); }
.msg.mine .msg-head strong { color: var(--acid); }
.msg.system { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.file-link { display: inline-flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--white); text-decoration: none; max-width: 100%; margin-top: 4px; }
.file-link:hover { border-color: var(--olive); }
.file-link small { color: var(--muted); font-family: var(--mono); }
.file-link img { max-width: 220px; max-height: 160px; object-fit: contain; display: block; }
.composer { display: flex; gap: 6px; margin-top: 10px; align-items: flex-end; }
.composer textarea { min-height: 40px; max-height: 120px; padding: 9px 10px; font-size: 13px; }
.progress { height: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--acid); transition: width 0.1s; }

.dm-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--olive);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.dm-head .person-info strong { font-size: 14px; }
.dm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px; }

.toast-area { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--olive); font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); max-width: min(520px, calc(100vw - 32px)); }
.toast.error { border-left-color: var(--danger); }

/* ---------- responsivo ---------- */

@media (max-width: 1280px) {
  .room-grid { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .chatbar { grid-column: 2; max-height: 340px; }
  .stage { grid-row: 1; grid-column: 2; }
  .sidebar { grid-row: 1 / span 2; }
}

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { border-right: 0; padding: 32px 20px; }
  .intel { min-height: 420px; padding: 28px 20px; }
  .admin-grid, .form-row { grid-template-columns: 1fr; }
  .room-grid { display: flex; flex-direction: column; height: auto; }
  .stage { order: 1; overflow: visible; }
  .sidebar { order: 2; overflow: visible; }
  .chatbar { order: 3; max-height: none; height: 420px; }
  .video-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand small, .who, .topbar .room-title .eyebrow { display: none; }
  .brand img { width: 42px; }
  .page { padding: 20px 16px 48px; }
}

@media (max-width: 560px) {
  .brand strong { font-size: 14px; }
  .top-actions .btn { padding: 0 10px; }
  .intel-grid { grid-template-columns: 1fr; }
  .chip { padding: 5px 7px; }
  .topbar:has(.room-title) .brand > div { display: none; }
  .topbar:has(.room-title) .chip { font-size: 0; gap: 0; padding: 8px; }
  .topbar .room-title h1 { font-size: 16px; }
}

/* ---------- câmeras ---------- */

.cam-options { margin-top: 8px; }
.cam-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cam-tile {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: zoom-in;
  background: radial-gradient(circle at center, rgba(30, 135, 81, 0.18), transparent 70%), var(--panel);
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.cam-tile.speaking { border-color: var(--go); box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.35), 0 0 18px rgba(61, 220, 132, 0.35); }
.cam-tile.big { grid-column: span 2; grid-row: span 2; cursor: zoom-out; }
.cam-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cam-tile.mirror video { transform: scaleX(-1); }
.cam-tile .avatar { --size: 64px; }
.cam-tile .cam-name {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px);
  padding: 3px 8px; background: rgba(4, 18, 11, 0.78); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cam-tile .cam-icons { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; font-size: 12px; }
.cam-tile .cam-icons span { padding: 2px 6px; background: rgba(4, 18, 11, 0.78); }
@media (max-width: 560px) {
  .cam-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cam-tile.big { grid-column: 1 / -1; grid-row: auto; }
}
