/* ====== RESET BÁSICO ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

:root {
  /* paleta base (usada pelo tema escuro como default) */
  --bg-main: #02040a;
  --bg-surface: #050913;
  --bg-surface-soft: #070c15;
  --bg-column: #060b14;
  --bg-input: #050913;

  --border-soft: #141b2a;
  --border-strong: #1f2a3f;

  --accent: #00ff78;
  --accent-soft: #0ecf6f;
  --accent-dark: #00994f;

  --text-main: #f6f7fb;
  --text-soft: #a9b4d0;
  --text-muted: #6c748a;

  --danger: #ff4b5c;

  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.75);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --lead-card-bg: #081020;
  --lead-card-border: #222a3c;

  /* card selecionado – verde neon */
  --lead-selected-bg: #00ff78;
  --lead-selected-text: #020308;
}

/* ====== TEMA CLARO / ESCURO ====== */
body.theme-dark {
  --bg-main: radial-gradient(circle at top, #07111f 0, #02040a 55%);
  --bg-surface: #050913;
  --bg-surface-soft: #070c15;
  --bg-column: #060b14;
  --bg-input: #050913;

  --border-soft: #141b2a;
  --border-strong: #1f2a3f;

  --text-main: #f6f7fb;
  --text-soft: #a9b4d0;
  --text-muted: #6c748a;

  --lead-card-bg: #081020;
  --lead-card-border: #222a3c;

  --lead-selected-bg: #00ff78;
  --lead-selected-text: #020308;
}

body.theme-light {
  --bg-main: #f4f6fc;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f5f7ff;
  --bg-column: #f3f6ff;
  --bg-input: #ffffff;

  --border-soft: #d2d9ea;
  --border-strong: #b7c2dd;

  --text-main: #171821;
  --text-soft: #3b4259;
  --text-muted: #7b8094;

  --lead-card-bg: #ffffff;
  --lead-card-border: #c5d2ee;

  --lead-selected-bg: #00e86e; /* levemente menos saturado no claro */
  --lead-selected-text: #04130a;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

/* ====== UTILITÁRIOS ====== */
.hidden {
  display: none !important;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.error-msg {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--danger);
}

/* ====== LOGIN ====== */
.centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.card-login {
  width: 100%;
  max-width: 360px;
  padding: 28px 24px 24px;
  border-radius: 24px;
  background: radial-gradient(circle at top, #102238 0, var(--bg-surface) 70%);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 255, 120, 0.25);
  position: relative;
  overflow: hidden;
}

.card-login::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at top left,
    rgba(0, 255, 120, 0.14),
    transparent 60%
  );
  opacity: 0.9;
  pointer-events: none;
}

.card-login h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
  position: relative;
}

.card-login .subtitle {
  margin-bottom: 20px;
  position: relative;
}

.form-group {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: var(--text-soft);
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out,
    background 0.18s ease-out, transform 0.12s ease-out;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(0, 255, 120, 0.2);
  transform: translateY(-1px);
}

button {
  cursor: pointer;
  border: none;
}

/* Botão de login */
#login-btn {
  margin-top: 6px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #020308;
  box-shadow: 0 0 18px rgba(0, 255, 120, 0.45);
  position: relative;
  z-index: 1;
}

/* ====== HEADER DO CRM ====== */

#crm-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, rgba(0, 255, 120, 0.06), transparent 45%),
    var(--bg-main);
}

.crm-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 24px;
  background: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.theme-light .crm-header {
  background: rgba(244, 246, 252, 0.96);
}

.crm-header h2 {
  font-size: 1.1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

/* botão tema (id no HTML é theme-toggle-btn, mas aproveitamos a base via classe) */
#theme-toggle {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: background 0.18s ease-out, border-color 0.18s ease-out,
    color 0.18s ease-out, transform 0.12s ease-out;
}

#theme-toggle:hover {
  background: rgba(0, 255, 120, 0.06);
  border-color: rgba(0, 255, 120, 0.45);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-outline {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 0.8rem;
}

/* ====== ÁREA PRINCIPAL ====== */

.crm-main {
  flex: 1;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Novo lead (topo) */
.new-lead {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-soft);
}

.new-lead h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.new-lead-form {
  display: flex;
  gap: 10px;
}

.new-lead-form input {
  font-size: 0.85rem;
}

#new-lead-title {
  flex: 2;
}

#new-lead-name {
  flex: 1.2;
}

#new-lead-phone {
  flex: 0.8;
}

#create-lead-btn {
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #020308;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(0, 255, 120, 0.32);
}

/* ====== CORPO: PIPELINE + LEAD DETAIL ====== */

.crm-body {
  margin-top: 14px;
  display: flex;
  gap: 18px;
  align-items: stretch;
  flex: 1;
  overflow: hidden;
}

/* Pipeline (esquerda) */

.pipeline {
  flex: 1.6;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  min-width: 0;
}

.column {
  min-width: 260px;
  max-width: 280px;
  background: var(--bg-column);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

body.theme-light .column {
  box-shadow: 0 12px 30px rgba(116, 129, 168, 0.2);
}

.column-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border-soft);
}

.column-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.column-count {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.column-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

/* Cards de lead */
.lead-card {
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--lead-card-bg);
  border: 1px solid var(--lead-card-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease,
    box-shadow 0.15s ease;
}

.lead-card:hover {
  border-color: rgba(0, 255, 120, 0.8);
  background: #0b1628;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

body.theme-light .lead-card:hover {
  background: #e6f8f0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

/* card selecionado – VERDE NEON */
.lead-card.lead-selected,
.lead-card.lead-card--active {
  background: var(--lead-selected-bg);
  border-color: rgba(0, 0, 0, 0.24);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.16),
    0 0 24px rgba(0, 255, 120, 0.65);
  color: var(--lead-selected-text);
}

.lead-card.lead-selected .lead-contact,
.lead-card.lead-card--active .lead-contact,
.lead-card.lead-selected .lead-meta,
.lead-card.lead-card--active .lead-meta {
  color: rgba(0, 0, 0, 0.7);
}

.lead-dragging {
  opacity: 0.6;
  transform: scale(0.98);
}

.lead-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.lead-contact {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.lead-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.lead-stage-select {
  width: 100%;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.75rem;
}

/* highlight de drop */
.drop-zone-over {
  outline: 2px dashed var(--accent);
  outline-offset: -3px;
}

/* ====== PAINEL DO LEAD (direita, “tela cheia” do lead) ====== */

.lead-detail {
  flex: 1.3;
  background: var(--bg-surface-soft);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-width: 360px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

body.theme-light .lead-detail {
  box-shadow: 0 12px 30px rgba(116, 129, 168, 0.22);
}

.lead-detail-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.lead-detail-header h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.lead-detail-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Infos do lead */
.lead-detail-info {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.8rem;
  display: grid;
  gap: 4px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  font-weight: 500;
}

/* ====== CHAT ====== */

.lead-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

.chat-messages {
  flex: 1;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.chat-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat-message {
  max-width: 80%;
  padding: 7px 9px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.chat-message-body {
  white-space: pre-wrap;
}

.chat-message-meta {
  margin-top: 3px;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* mensagem do cliente */
.chat-in {
  align-self: flex-start;
  background: #151515;
  border-radius: 12px 12px 12px 4px;
}

body.theme-light .chat-in {
  background: #e2e7ff;
}

/* mensagem enviada pela empresa */
.chat-out {
  align-self: flex-end;
  background: #2563eb;
  border-radius: 12px 12px 4px 12px;
}

/* barra de envio */
.chat-form {
  border-top: 1px solid var(--border-soft);
  padding: 8px 10px 10px;
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.8rem;
}

#chat-input::placeholder {
  color: var(--text-muted);
}

#chat-send-btn {
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #020308;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* ====== RESPONSIVO ====== */

@media (max-width: 1024px) {
  .crm-body {
    flex-direction: column;
  }

  .lead-detail {
    max-height: none;
    min-width: 0;
  }

  .column {
    height: auto;
  }
}

@media (max-width: 768px) {
  .new-lead-form {
    flex-direction: column;
  }

  .pipeline {
    padding-bottom: 16px;
  }
}

/* ====== CENTRAL DE CRMs – PORTAL INICIAL ====== */

#portal-section {
  /* mantém centralizado, mas dá uma “folga” maior */
  padding: 40px 16px;
}

.portal-card {
  max-width: 640px;
  padding: 32px 40px 30px;
  border-radius: 32px;
  background: radial-gradient(circle at top, #102238 0, var(--bg-surface) 70%);
  border: 1px solid rgba(0, 255, 120, 0.28);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
}

/* brilho suave no fundo do card */
.portal-card::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(
    circle at top left,
    rgba(0, 255, 120, 0.18),
    transparent 60%
  );
  opacity: 0.9;
  pointer-events: none;
}

/* título da central */
.portal-title {
  position: relative;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

/* subtítulo da central */
.portal-subtitle {
  position: relative;
  text-align: center;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-soft);
  margin-bottom: 26px;
}

/* container dos botões */
.portal-buttons {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* botão base da central */
.portal-btn {
  min-width: 210px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.03em;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.18s ease-out,
    background 0.18s ease-out,
    border-color 0.18s ease-out,
    color 0.18s ease-out;
}

/* botão principal – verde neon */
.btn-primary.portal-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #020308;
  border: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(0, 255, 120, 0.6);
}

.btn-primary.portal-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 36px rgba(0, 255, 120, 0.8);
}

/* botão secundário, mas ainda com cara premium */
#portal-section .btn-outline.portal-btn {
  border-color: rgba(0, 255, 120, 0.5);
  color: var(--text-main);
  background: rgba(3, 10, 20, 0.6);
}

#portal-section .btn-outline.portal-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-soft));
  color: #020308;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(0, 255, 120, 0.6);
  transform: translateY(-2px);
}

/* responsivo pra central */
@media (max-width: 640px) {
  .portal-card {
    padding: 26px 20px 22px;
    border-radius: 24px;
  }

  .portal-title {
    font-size: 1.25rem;
    letter-spacing: 0.12em;
  }

  .portal-subtitle {
    font-size: 0.9rem;
  }

  .portal-btn {
    width: 100%;
    min-width: 0;
  }
}

/* ====== GERENCIAMENTO DE USUÁRIOS (MODAL) ====== */

/* botão "Usuários" com um destaque um pouco maior */
.btn-users {
  border-color: rgba(0, 255, 120, 0.6);
  color: var(--text-main);
  font-weight: 500;
}

.btn-users:hover {
  background: rgba(0, 255, 120, 0.08);
  border-color: rgba(0, 255, 120, 0.9);
  color: var(--accent);
}

/* container do modal (overlay) */
.users-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* fundo esfumaçado */
.users-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

/* conteúdo principal do modal */
.users-modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 16px;
  border-radius: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* cabeçalho do modal */
.users-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.users-modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.users-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* botão X de fechar */
.users-modal-close-btn {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-soft);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.users-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* formulário de criação de usuário */
.users-form {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.users-form-row {
  display: flex;
  gap: 8px;
}

.users-form-row .form-group {
  margin-bottom: 0;
  flex: 1;
}

.users-role-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.8rem;
}

.users-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

#users-create-btn {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #020308;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* lista de usuários */
.users-list {
  margin-top: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.users-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.users-list-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.users-list-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.users-list-item-name {
  font-size: 0.86rem;
  font-weight: 500;
}

.users-list-item-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* pillzinho com role */
.user-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 255, 120, 0.12);
  color: var(--accent-soft);
}

.user-role-pill--admin {
  background: rgba(255, 75, 92, 0.12);
  color: var(--danger);
}

/* botão de apagar */
.users-delete-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 75, 92, 0.7);
  background: transparent;
  color: var(--danger);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.users-delete-btn:hover {
  background: rgba(255, 75, 92, 0.1);
}

/* responsivo pro modal em telas menores */
@media (max-width: 480px) {
  .users-modal-content {
    margin: 0 10px;
    padding: 14px 14px 12px;
  }

  .users-form-row {
    flex-direction: column;
  }
}
/* ====== PÁGINA DE USUÁRIOS ====== */

#users-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

.users-main {
  flex: 1;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.users-panel {
  width: 100%;
  max-width: 960px;
  border-radius: 24px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px 22px;
}

.users-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.users-panel-header h3 {
  font-size: 1.1rem;
}

.users-panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* corpo: lista + formulário lado a lado */
.users-panel-body {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

/* coluna da lista */
.users-list-wrapper {
  flex: 1.4;
  background: var(--bg-surface);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  padding: 10px 12px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
}

.users-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.users-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.users-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
}

.users-list-row:hover {
  border-color: var(--border-soft);
  background: rgba(0, 255, 120, 0.03);
}

.users-list-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* coluna do formulário */
.users-form-wrapper {
  flex: 1;
  background: var(--bg-surface);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  padding: 12px 14px 14px;
}

.users-form-wrapper h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.users-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.users-form input,
.users-form select {
  font-size: 0.85rem;
}

/* botão principal do formulário */
.users-submit-btn {
  margin-top: 4px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #020308;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(0, 255, 120, 0.4);
  border: none;
  cursor: pointer;
}

/* botão de remover usuário */
.users-delete-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: transparent;
  font-size: 0.75rem;
  color: var(--danger);
  cursor: pointer;
}

.users-delete-btn:hover {
  background: rgba(255, 75, 92, 0.08);
  border-color: rgba(255, 75, 92, 0.6);
}

/* responsivo */
@media (max-width: 900px) {
  .users-panel-body {
    flex-direction: column;
  }

  .users-list-wrapper,
  .users-form-wrapper {
    max-height: none;
  }
}
