/* Gerald Admin Panel — Electric Blue Theme */

:root {
  /* Fondos — dark crimson core → electric blue edges */
  --color-bg-base: #050a10;
  --color-bg-crimson: #4a0a0a;
  --color-bg-blue: #0a2a5a;
  --color-surface: rgba(255, 255, 255, 0.03);
  --color-surface-hover: rgba(255, 255, 255, 0.06);

  /* Bordes */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-agent: rgba(255, 255, 255, 0.15);

  /* Texto */
  --color-text-primary: #e0e4e8;
  --color-text-muted: #6b7a8a;
  --color-text-dim: #4b5a6b;

  /* Acentos */
  --color-accent-blue: #1a6abf;
  --color-agent-glow: rgba(57, 255, 20, 0.35);
  --color-gauge-ram: #3498db;
  --color-gauge-cpu: #f39c12;

  /* Colores por agente */
  --color-orchesta: #9b59b6;
  --color-gerald: #3498db;
  --color-secre: #2ecc71;
  --color-productor: #e67e22;

  /* Tipografia */
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

/* ── Light Mode overrides ─────────────────────── */

body.light-mode {
  --color-bg-base: #ece5d8;
  --color-bg-crimson: #e6ddd0;
  --color-bg-blue: #ddd6c9;
  --color-surface: rgba(80, 60, 40, 0.04);
  --color-surface-hover: rgba(80, 60, 40, 0.08);
  --color-border: rgba(80, 60, 40, 0.13);
  --color-border-agent: rgba(80, 60, 40, 0.15);
  --color-text-primary: #2d2a26;
  --color-text-muted: #6b6560;
  --color-text-dim: #9a928a;
  --color-accent-blue: #b5672e;

  /* Agent colors → saturados legibles */
  --color-orchesta: #7b4f96;
  --color-gerald: #3a7ca5;
  --color-secre: #3a8a5c;
  --color-productor: #b06830;
  --color-border-agent: rgba(80, 60, 40, 0.22);
  --color-agent-glow: rgba(45, 138, 78, 0.2);
}

/* Agent cards → bordes solidos sin glow */
body.light-mode .agent-card:has(.agent-dot.active) {
  border-color: #7aab8a;
  box-shadow: none;
}

body.light-mode .agent-dot.active {
  background: #2d8a4e;
  box-shadow: none;
}

/* Agent role → negrita */
body.light-mode .agent-role {
  font-weight: 600;
}

/* Channel dot active → verde mate fuerte */
body.light-mode .channel-dot.active {
  background: #2d8a4e;
  box-shadow: none;
}

/* Canal activo border → solido sin glow */
body.light-mode .canal-activo {
  border-color: #7aab8a;
  box-shadow: none;
}

body.light-mode .canal-activo:hover {
  border-color: #5a9a6e;
  box-shadow: none;
}

/* Gauge colors → pastel */
body.light-mode .gauge-ram {
  stroke: #7aafc9;
}

body.light-mode .gauge-cpu {
  stroke: #d4a56a;
}

/* Purple accents (buttons, dots) → warm muted */
body.light-mode .btn-crear,
body.light-mode .btn-submit {
  border-color: #a07850;
  background: rgba(160, 120, 80, 0.08);
  color: #8a6540;
}

body.light-mode .btn-crear:hover,
body.light-mode .btn-submit:hover {
  background: rgba(160, 120, 80, 0.16);
  color: #6e4f30;
}

body.light-mode .participante-dot,
body.light-mode .departamento-dot {
  background: #14b8a6;
}

body.light-mode .form-input:focus,
body.light-mode .form-select:focus,
body.light-mode .form-textarea:focus {
  border-color: #a07850;
}

body.light-mode .form-checkbox {
  accent-color: #a07850;
}

/* Error → muted red */
body.light-mode .form-error {
  color: #c4665a;
}

body.light-mode .sidebar-left {
  background: rgba(235, 228, 216, 0.96);
}

body.light-mode .sidebar-left .nav-btn.active {
  background: rgba(160, 120, 80, 0.12);
  color: #996b3d;
}

body.light-mode .sidebar-btn {
  border-color: rgba(80, 60, 40, 0.15);
  background: rgba(80, 60, 40, 0.03);
  color: #2d2a26;
}

body.light-mode .sidebar-btn:hover {
  background: rgba(80, 60, 40, 0.08);
  color: #2d2a26;
}

body.light-mode .sidebar-btn.active {
  background: rgba(80, 60, 40, 0.08);
  color: #2d2a26;
}

body.light-mode .user-dropdown {
  background: rgba(245, 240, 232, 0.98);
}

body.light-mode .form-card {
  background: rgba(245, 240, 232, 0.92);
}

body.light-mode .form-select option {
  background: #f5f0e8;
  color: #2d2a26;
}

body.light-mode .search-input {
  background: rgba(80, 60, 40, 0.05);
}

body.light-mode .canal-card {
  background: rgba(80, 60, 40, 0.03);
}

body.light-mode .agent-card,
body.light-mode .channel-item,
body.light-mode .participante-item,
body.light-mode .usuario-item,
body.light-mode .departamento-item {
  background: rgba(80, 60, 40, 0.03);
  border-color: rgba(80, 60, 40, 0.15);
}

/* ── Theme Toggle Slider ─────────────────────── */

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition: background 0.3s, border-color 0.3s;
}

.theme-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e0e4e8;
  transition: transform 0.3s, background 0.3s;
}

.theme-toggle input:checked + .theme-slider {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.theme-toggle input:checked + .theme-slider::before {
  transform: translateX(20px);
  background: #f59e0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background: radial-gradient(
    ellipse at 50% 40%,
    var(--color-bg-crimson) 0%,
    var(--color-bg-blue) 45%,
    var(--color-bg-base) 100%
  );
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────── */

.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 24px;
  margin-left: 160px; /* space for left sidebar */
}

/* ── Right Sidebar ─────────────────────────────── */

.sidebar-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 160px;
  height: 100vh;
  background: rgba(5, 10, 20, 0.85);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  gap: 4px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.sidebar-left .sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-text-muted);
  padding: 8px 6px 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 8px;
}

.sidebar-left .nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  opacity: 1;
  visibility: visible;
}

.sidebar-left .nav-btn:hover {
  background: var(--color-surface-hover);
  color: #fff;
}

.sidebar-left .nav-btn.active {
  background: rgba(26, 106, 191, 0.18);
  color: #5aafff;
}

.sidebar-left .nav-btn .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid #5b21b6;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-bottom: 8px;
}

.sidebar-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #ffffff;
}

.sidebar-btn.active {
  background: rgba(124, 58, 237, 0.18);
  color: #ffffff;
}

.sidebar-btn .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Header ────────────────────────────────────── */

.header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.header-brand:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  width: 200px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: var(--color-text-dim);
}

.search-input:focus {
  border-color: var(--color-accent-blue);
}

.user-menu {
  position: relative;
}

.user-icon-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 18px;
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.user-icon-btn:hover {
  background: var(--color-surface-hover);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 42px;
  right: 0;
  background: rgba(10, 15, 25, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-width: 140px;
  padding: 6px 0;
  z-index: 200;
  backdrop-filter: blur(12px);
}

.user-dropdown.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--color-surface-hover);
}

/* ── Dashboard Grid ───────────────────────────── */

.dashboard-grid {
  display: flex;
  gap: 20px;
  padding: 24px 0;
}

.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.dashboard-right {
  flex: 1;
  min-width: 0;
}

/* ── Panel Card (shared) ──────────────────────── */

.panel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 20px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* ── Gauges (CPU / RAM) ───────────────────────── */

.gauges-row {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.gauge-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-cpu {
  stroke: var(--color-gauge-cpu);
}

.gauge-ram {
  stroke: var(--color-gauge-ram);
}

.gauge-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gauge-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.gauge-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Channels ─────────────────────────────────── */

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
}

.channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-text-dim);
}

.channel-dot.active {
  background: #2ecc71;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.4);
}

.channel-dot.inactive {
  background: #555;
}

.channel-name {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.channel-status {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Agent Cards ──────────────────────────────── */

.agents-panel {
  height: 100%;
}

.agent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid var(--color-border-agent);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-card:has(.agent-dot.active) {
  border-color: var(--color-agent-glow);
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.18);
}

.agent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-text-dim);
}

.agent-dot.active {
  background: #39ff14;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.agent-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--agent-color, var(--color-text-primary));
}

.agent-role {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Participantes ────────────────────────────── */

.participantes-body {
  padding: 24px 0;
}

.participantes-title-row {
  display: flex;
  align-items: center;
  padding: 0 32px;
  margin-bottom: 64px;
}

.btn-crear {
  padding: 10px 18px;
  border: 1.5px solid #7c3aed;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.btn-crear:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #c4b5fd;
}

.participantes-heading {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.title-spacer {
  width: 140px;
  flex-shrink: 0;
}

.participantes-list-wrapper {
  display: flex;
  justify-content: center;
}

.participantes-grid {
  width: 75%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.participante-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  transition: background 0.2s;
}

.participante-item:hover {
  background: var(--color-surface-hover);
}

.participante-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c3aed;
  flex-shrink: 0;
}

.participante-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.participante-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.participante-depto {
  font-size: 11px;
  color: var(--color-text-muted);
}

.participantes-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 48px 0;
}

/* ── Departamentos ─────────────────────────────── */

.departamentos-body {
  padding: 32px 40px 48px;
  min-height: 100vh;
}

.departamentos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.departamento-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background 0.2s;
}

.departamento-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14b8a6;
  flex-shrink: 0;
  margin-top: 5px;
}

.departamento-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.departamento-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.departamento-jefe {
  font-size: 11px;
  color: var(--color-text-muted);
}

.departamento-miembros {
  font-size: 11px;
  color: #14b8a6;
}

.departamentos-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 48px 0;
}

/* ── MCP ─────────────────────────────────────── */

.mcp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background 0.2s;
}

.mcp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f39c12;
  flex-shrink: 0;
}

.mcp-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mcp-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.mcp-desc {
  font-size: 11px;
  color: var(--color-text-muted);
}

body.light-mode .mcp-item {
  background: rgba(80, 60, 40, 0.03);
  border-color: rgba(80, 60, 40, 0.15);
}

body.light-mode .mcp-dot {
  background: #d68910;
}

/* ── Canales ─────────────────────────────────── */

.canal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background 0.2s;
}

.canal-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.canal-activo .canal-item-dot {
  background: #2ecc71;
}

.canal-inactivo .canal-item-dot {
  background: #e74c3c;
}

.canal-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.canal-item-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.canal-item-estado {
  font-size: 11px;
}

.canal-activo .canal-item-estado {
  color: #2ecc71;
}

.canal-inactivo .canal-item-estado {
  color: #e74c3c;
}

.canal-item-account {
  font-size: 11px;
  color: var(--color-text-muted);
}

body.light-mode .canal-item {
  background: rgba(80, 60, 40, 0.03);
  border-color: rgba(80, 60, 40, 0.15);
}

body.light-mode .canal-activo .canal-item-dot {
  background: #27ae60;
}

body.light-mode .canal-inactivo .canal-item-dot {
  background: #c0392b;
}

/* ── Agentes ─────────────────────────────────── */

.agente-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background 0.2s;
}

.agente-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--agente-color, #7c3aed);
  flex-shrink: 0;
}

.agente-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agente-item-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.agente-item-modelo {
  font-size: 11px;
  color: var(--agente-color, #7c3aed);
}

.agente-item-proposito {
  font-size: 11px;
  color: var(--color-text-muted);
}

body.light-mode .agente-item {
  background: rgba(80, 60, 40, 0.03);
  border-color: rgba(80, 60, 40, 0.15);
}

/* ── Footer Credit ────────────────────────────── */

.footer-credit {
  position: fixed;
  bottom: 12px;
  right: 20px;
  font-size: 10px;
  color: #7c5cbf;
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  letter-spacing: 0.3px;
  opacity: 0.6;
}

/* ── Form (Crear Participante) ────────────────── */

.form-wrapper {
  display: flex;
  justify-content: center;
}

.form-card {
  width: 560px;
  background: rgba(10, 15, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: #c8cdd3;
}

.form-input,
.form-select,
.form-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #7c3aed;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #8a95a3;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7a8a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-select option {
  background: #0a0f1a;
  color: var(--color-text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-help {
  font-size: 11px;
  color: var(--color-text-dim);
}

.form-error {
  font-size: 12px;
  color: #ef4444;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.btn-submit {
  padding: 10px 22px;
  border: 1.5px solid #7c3aed;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-submit:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #e0d5ff;
}

.btn-cancel {
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-cancel:hover {
  color: var(--color-text-primary);
}

/* ── Usuarios / Canales ──────────────────────── */

.usuarios-body {
  padding: 24px 0;
}

.canales-list-wrapper {
  display: flex;
  justify-content: center;
}

.canales-grid {
  width: 75%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.canal-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 25px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.3s;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.canal-activo {
  border: 2px solid rgba(57, 255, 20, 0.5);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.15);
}

.canal-activo:hover {
  border-color: rgba(57, 255, 20, 0.8);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.canal-inactivo {
  border: 2px solid rgba(140, 140, 140, 0.4);
}

.canal-inactivo:hover {
  border-color: rgba(140, 140, 140, 0.6);
  background: rgba(255, 255, 255, 0.03);
}

.canal-todos {
  border: 2px solid rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

.canal-todos:hover {
  border-color: rgba(124, 58, 237, 0.8);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

body.light-mode .canal-todos {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: none;
}

body.light-mode .canal-todos:hover {
  border-color: rgba(124, 58, 237, 0.7);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

.canal-nombre {
  font-size: 18px;
  font-weight: 700;
  color: var(--canal-color);
  margin: 0;
}

.canal-usuarios-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.canal-descripcion {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Usuario item in channel list */
.usuario-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  transition: background 0.2s;
}

.usuario-item:hover {
  background: var(--color-surface-hover);
}

.usuario-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c3aed;
  flex-shrink: 0;
}

body.light-mode .usuario-dot {
  background: #7c3aed;
}

.usuario-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.usuario-nombre {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.usuario-canal {
  font-size: 11px;
  color: #7c3aed;
}

.usuario-email {
  font-size: 11px;
  color: var(--color-text-muted);
}

.usuario-estado {
  font-size: 11px;
  margin-left: auto;
  color: var(--color-text-muted);
}

/* ── Checkbox ────────────────────────────────── */

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
  cursor: pointer;
}
