/* ============================================================
 * remote-control-stage.css — palco central + painel direito
 * Continuação do remote-control.css
 * ============================================================ */

/* ============================================================
 *  STAGE (centro) — viewport remota
 * ============================================================ */
.rc-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  overflow: hidden;
  min-width: 0;
  background: radial-gradient(circle at 50% -10%, hsl(210 100% 18% / 0.25), transparent 60%);
}

/* ----- Top bar do stage ----- */
.rc-stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rc-stage-top-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rc-stage-top-right { display: flex; align-items: center; gap: 8px; }

.rc-pill-active {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: hsl(160 85% 50% / 0.1);
  border: 1px solid hsl(160 85% 50% / 0.3);
  color: hsl(160 85% 70%);
  font-size: 12px; font-weight: 600;
}
.rc-pill-active::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rc-emerald);
  animation: rcPulse 2s infinite;
}

.rc-pill-conn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: hsl(0 0% 100% / 0.05);
  border: 1px solid var(--rc-border);
  font-size: 12px; font-weight: 500;
}
.rc-pill-conn svg { color: var(--rc-primary); width: 14px; height: 14px; }
.rc-pill-conn .machine {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--rc-primary);
}

.rc-stage-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--rc-muted-fg);
}
.rc-stage-stats span { margin: 0 4px; }
.rc-stage-stats .sep { opacity: 0.5; }
.rc-stage-stats .codec { color: var(--rc-emerald); font-weight: 600; }

.rc-stage-btn {
  height: 32px;
  padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 6px;
  background: hsl(0 0% 100% / 0.05);
  border: 1px solid var(--rc-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rc-muted-fg);
  cursor: pointer;
  transition: all .15s;
}
.rc-stage-btn:hover { background: hsl(0 0% 100% / 0.1); color: var(--rc-fg); }
.rc-stage-btn svg { width: 12px; height: 12px; }
.rc-stage-btn.warn {
  background: hsl(38 92% 60% / 0.1);
  border-color: hsl(38 92% 60% / 0.3);
  color: var(--rc-amber);
}
.rc-stage-btn.warn:hover { background: hsl(38 92% 60% / 0.2); }
.rc-stage-btn.active {
  background: hsl(210 100% 60% / 0.15);
  border-color: hsl(210 100% 60% / 0.4);
  color: var(--rc-primary);
}

/* ----- Frame do desktop remoto ----- */
.rc-frame-wrap {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid hsl(210 100% 60% / 0.3);
  box-shadow: 0 0 60px -20px hsl(210 100% 60% / 0.4);
  background: hsl(230 5% 12%);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-frame canvas,
.rc-frame video {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.rc-frame.fit canvas,
.rc-frame.fit video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ----- Vazio (sem conexão) ----- */
.rc-frame-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--rc-muted-fg);
}
.rc-frame-empty-icon {
  width: 80px; height: 80px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: hsl(210 100% 60% / 0.08);
  margin-bottom: 20px;
  color: var(--rc-primary);
  opacity: 0.6;
}
.rc-frame-empty h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--rc-fg);
  letter-spacing: -0.01em;
}
.rc-frame-empty p {
  font-size: 13px;
  max-width: 480px;
  line-height: 1.6;
  margin: 4px auto;
}
.rc-frame-empty .hint {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--rc-primary);
}

/* ----- Banner privacidade (top) ----- */
.rc-frame-privacy {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: hsl(38 92% 60% / 0.15);
  border: 1px solid hsl(38 92% 60% / 0.3);
  color: var(--rc-amber);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  z-index: 10;
}
.rc-frame-privacy svg { width: 12px; height: 12px; }

/* ----- Toolbar flutuante (dock) ----- */
.rc-frame-dock {
  position: absolute;
  bottom: 56px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 14px;
  background: hsl(0 0% 0% / 0.7);
  backdrop-filter: blur(24px);
  border: 1px solid hsl(0 0% 100% / 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.rc-dock-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: transparent;
  color: var(--rc-muted-fg);
  border: none;
  cursor: pointer;
  transition: all .15s;
}
.rc-dock-btn:hover {
  background: hsl(0 0% 100% / 0.1);
  color: var(--rc-fg);
}
.rc-dock-btn.active {
  background: hsl(210 100% 60% / 0.15);
  color: var(--rc-primary);
}
.rc-dock-btn svg { width: 16px; height: 16px; }
.rc-dock-divider {
  width: 1px; height: 24px;
  background: hsl(0 0% 100% / 0.1);
  margin: 0 4px;
}
.rc-dock-end {
  height: 36px;
  padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 8px;
  background: hsl(0 75% 60% / 0.15);
  color: var(--rc-destructive);
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: all .15s;
}
.rc-dock-end:hover {
  background: var(--rc-destructive);
  color: var(--rc-fg);
}
.rc-dock-end svg { width: 14px; height: 14px; }

/* ============================================================
 *  PAINEL DIREITO (340px)
 * ============================================================ */
.rc-panel {
  width: 340px;
  flex-shrink: 0;
  border-left: 1px solid var(--rc-border);
  background: var(--rc-glass);
  backdrop-filter: blur(24px);
  overflow-y: auto;
}
.rc-panel::-webkit-scrollbar { width: 6px; }
.rc-panel::-webkit-scrollbar-thumb { background: var(--rc-border); border-radius: 3px; }

.rc-panel-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rc-panel-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rc-muted-fg);
  margin-bottom: 8px;
}

.rc-panel-user h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.rc-panel-user p {
  font-size: 11px;
  color: var(--rc-muted-fg);
  margin: 4px 0 0;
}

.rc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rc-stat {
  padding: 12px;
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.03);
  border: 1px solid var(--rc-border);
}
.rc-stat svg {
  width: 14px; height: 14px;
  margin-bottom: 6px;
}
.rc-stat-icon-emerald { color: var(--rc-emerald); }
.rc-stat-icon-primary { color: var(--rc-primary); }
.rc-stat-icon-muted { color: var(--rc-muted-fg); }

.rc-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}
.rc-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rc-muted-fg);
  margin-top: 2px;
}

.rc-panel-section h3 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rc-muted-fg);
  margin: 0 0 12px;
}
.rc-perms-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-perms-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.rc-perms-list svg { color: var(--rc-emerald); flex-shrink: 0; width: 14px; height: 14px; }

.rc-agent-card {
  padding: 14px;
  border-radius: 12px;
  background: hsl(210 100% 60% / 0.05);
  border: 1px solid hsl(210 100% 60% / 0.2);
}
.rc-agent-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.rc-agent-card-head .icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: hsl(210 100% 60% / 0.15);
  display: grid; place-items: center;
  color: var(--rc-primary);
}
.rc-agent-card-head .icon svg { width: 14px; height: 14px; }
.rc-agent-card-head strong {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}
.rc-agent-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--rc-emerald);
  padding: 2px 6px;
  border-radius: 4px;
  background: hsl(160 85% 50% / 0.1);
  border: 1px solid hsl(160 85% 50% / 0.2);
}
.rc-agent-card p {
  font-size: 10px;
  color: var(--rc-muted-fg);
  line-height: 1.5;
  margin: 0;
}

.rc-config-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.03);
  border: 1px solid var(--rc-border);
  text-decoration: none;
  color: var(--rc-fg);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.rc-config-link:hover { background: hsl(0 0% 100% / 0.05); }
.rc-config-link .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rc-config-link svg { width: 14px; height: 14px; }
.rc-config-link .chev { color: var(--rc-muted-fg); }

/* ============================================================
 *  Toast (canto inferior direito)
 * ============================================================ */
body.rc-page .toast-host {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
body.rc-page .toast {
  background: var(--rc-card);
  border: 1px solid var(--rc-border);
  border-left: 3px solid var(--rc-primary);
  color: var(--rc-fg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(20px);
  transition: all .25s;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
body.rc-page .toast.show { opacity: 1; transform: none; }
body.rc-page .toast-success { border-left-color: var(--rc-emerald); }
body.rc-page .toast-warn { border-left-color: var(--rc-amber); }
body.rc-page .toast-error { border-left-color: var(--rc-destructive); }

@keyframes rcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
 *  Responsivo
 * ============================================================ */
@media (max-width: 1280px) {
  .rc-sidebar { width: 260px; }
  .rc-panel { width: 300px; }
}
@media (max-width: 1024px) {
  .rc-shell { flex-direction: column; height: auto; }
  .rc-sidebar, .rc-panel { width: 100%; max-height: 35vh; border-right: none; border-left: none; }
  .rc-sidebar { border-bottom: 1px solid var(--rc-border); }
  .rc-stage { flex: 1; padding: 16px; }
}
@media (max-width: 720px) {
  .rc-stage-top, .rc-stage-stats { flex-wrap: wrap; }
  .rc-frame-dock { bottom: 12px; }
}

/* ============================================================
 *  Aba "Acesso Remoto" — versão mini (home #remoteAccessSection)
 * ============================================================ */
.remote-access-section .agents-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.remote-access-section .agents-counts {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: hsl(210 10% 60%);
}
.remote-access-section .count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  background: hsl(0 0% 100% / 0.04);
  border: 1px solid hsl(210 20% 98% / 0.08);
}
.remote-access-section .count-badge::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block;
}
.remote-access-section .count-badge.online { color: hsl(160 85% 60%); }
.remote-access-section .count-badge.online::before { background: hsl(160 85% 50%); }
.remote-access-section .count-badge.offline { color: hsl(210 10% 60%); }
.remote-access-section .count-badge.offline::before { background: hsl(0 0% 30%); }

.remote-access-section .btn-download-agent {
  background: linear-gradient(135deg, hsl(210 100% 60%) 0%, hsl(195 100% 55%) 100%);
  color: hsl(230 20% 4%);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.remote-access-section .btn-download-agent:hover { filter: brightness(1.1); }

.remote-access-section .btn-open-control {
  background: hsl(230 20% 6%);
  border: 1px solid hsl(210 20% 98% / 0.08);
  color: hsl(210 20% 98%);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.remote-access-section .btn-open-control:hover { border-color: hsl(210 100% 60%); }

.remote-access-section .agents-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.remote-access-section .agent-card {
  background: hsl(230 20% 6%);
  border: 1px solid hsl(210 20% 98% / 0.08);
  border-radius: 12px;
  padding: 14px;
  transition: border-color .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.remote-access-section .agent-card:hover { border-color: hsl(210 100% 60%); }
.remote-access-section .agent-card.online { border-left: 3px solid hsl(160 85% 50%); }
.remote-access-section .agent-card.offline { border-left: 3px solid hsl(0 0% 30%); opacity: 0.7; }
.remote-access-section .agent-card.idle { border-left: 3px solid hsl(38 92% 60%); }
.remote-access-section .agent-card-header {
  display: flex; align-items: center; gap: 10px;
}
.remote-access-section .agent-card-info { flex: 1; min-width: 0; }
.remote-access-section .agent-card-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.remote-access-section .agent-card-info small {
  font-size: 11px;
  color: hsl(210 10% 60%);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.remote-access-section .agent-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: hsl(160 85% 50% / 0.1);
  color: hsl(160 85% 60%);
}
.remote-access-section .agent-card.offline .agent-status-text {
  background: hsl(0 0% 30% / 0.2);
  color: hsl(210 10% 60%);
}
.remote-access-section .agent-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: hsl(210 10% 60%);
  margin-top: 4px;
}
.remote-access-section .agent-version {
  background: hsl(210 100% 60% / 0.1);
  color: hsl(210 100% 70%);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
