/* ==========================================================================
   VEXA GESTÃO — DESIGN SYSTEM
   Dark Luxury · Financial · Enterprise
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Backgrounds */
  --bg-deep: #050505;
  --bg-surface: #0a0d0c;
  --bg-card: rgba(15, 18, 16, 0.75);
  --bg-card-hover: rgba(22, 199, 132, 0.04);
  --bg-input: rgba(255, 255, 255, 0.04);

  /* Sidebar */
  --sidebar-w: 240px;
  --topbar-h: 62px;

  /* Brand */
  --emerald-primary: #16C784;
  --emerald-deep: #0B8F61;
  --emerald-glow: rgba(22, 199, 132, 0.25);
  --emerald-subtle: rgba(22, 199, 132, 0.08);
  --emerald-border: rgba(22, 199, 132, 0.22);

  /* Borders */
  --border-light: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(22, 199, 132, 0.45);

  /* Text */
  --text-primary: #F4F7F5;
  --text-secondary: rgba(244, 247, 245, 0.72);
  --text-muted: rgba(244, 247, 245, 0.42);

  /* Status financeiro */
  --status-paid: #16C784;
  --status-paid-bg: rgba(22, 199, 132, 0.12);
  --status-pending: #eab308;
  --status-pending-bg: rgba(234, 179, 8, 0.12);
  --status-overdue: #ef4444;
  --status-overdue-bg: rgba(239, 68, 68, 0.12);
  --status-cancelled: #64748b;
  --status-cancelled-bg: rgba(100, 116, 139, 0.12);
  --status-draft: rgba(255, 255, 255, 0.45);
  --status-draft-bg: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Easing */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */

.gestao-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.gestao-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.login-brand img { height: 28px; width: auto; }

.login-brand-sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-primary);
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.login-title span { color: var(--emerald-primary); }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-field { display: flex; flex-direction: column; gap: 6px; }

.login-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-field input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s var(--ease-smooth);
}

.login-field input:focus { border-color: var(--border-focus); }

.login-error {
  font-size: 0.8rem;
  color: var(--status-overdue);
  background: var(--status-overdue-bg);
  border-radius: 6px;
  padding: 10px 12px;
  display: none;
}

.login-error.visible { display: block; }

.btn-login {
  background: var(--emerald-primary);
  color: #050505;
  border: none;
  border-radius: 8px;
  padding: 13px 20px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.btn-login:hover { opacity: 0.88; }
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

.gestao-app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Ambient glow */
.gestao-ambient-glow {
  position: fixed;
  top: -80px; right: -40px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(22, 199, 132, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.gestao-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 16px;
  z-index: 10;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-brand-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 26px;
  padding-left: 6px;
}

.sidebar-brand-box img { height: 24px; width: auto; }

.sidebar-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-primary);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-section {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 6px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
}

.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 12px 0;
}

.sidebar-crm-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  margin-bottom: 8px;
  text-decoration: none;
}

.sidebar-crm-link:hover {
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.sidebar-user-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
}

.user-avatar-hex {
  width: 32px; height: 32px;
  background: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--emerald-primary);
  flex-shrink: 0;
}

.user-meta { flex: 1; min-width: 0; }
.user-meta .name { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .role { font-size: 0.68rem; color: var(--text-muted); }

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-logout:hover { color: var(--status-overdue); }

/* ==========================================================================
   MAIN STAGE
   ========================================================================== */

.gestao-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Topbar */
.gestao-topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  background: var(--bg-deep);
}

.topbar-left { display: flex; flex-direction: column; gap: 2px; }

.topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-crumb {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-subtle);
  border: 1px solid var(--emerald-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald-primary);
}

.status-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald-primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Viewport de conteúdo */
.gestao-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.gestao-content::-webkit-scrollbar { width: 4px; }
.gestao-content::-webkit-scrollbar-track { background: transparent; }
.gestao-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* View containers */
.gestao-view { display: none; }
.gestao-view.active { display: block; }

/* ==========================================================================
   CARDS E MÉTRICAS
   ========================================================================== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 22px;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  border-color: var(--emerald-border);
  background: var(--bg-card-hover);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--emerald-primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.metric-card:hover::before { opacity: 0.6; }

.metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.metric-value.highlight { color: var(--emerald-primary); }
.metric-value.warning { color: var(--status-pending); }
.metric-value.danger { color: var(--status-overdue); }

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TABELAS
   ========================================================================== */

.gestao-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.gestao-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
}

.gestao-table-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gestao-table {
  width: 100%;
  border-collapse: collapse;
}

.gestao-table th {
  padding: 10px 22px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255,255,255,0.02);
}

.gestao-table td {
  padding: 14px 22px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.gestao-table tr:last-child td { border-bottom: none; }

.gestao-table tr:hover td {
  background: rgba(22, 199, 132, 0.03);
  color: var(--text-primary);
}

.td-name { font-weight: 600; color: var(--text-primary); }
.td-mono { font-family: var(--font-mono); font-size: 0.8rem; }
.td-amount { font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }

/* ==========================================================================
   STATUS BADGES
   ========================================================================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-paid    { color: var(--status-paid); background: var(--status-paid-bg); }
.status-pending { color: var(--status-pending); background: var(--status-pending-bg); }
.status-overdue { color: var(--status-overdue); background: var(--status-overdue-bg); }
.status-cancelled { color: var(--status-cancelled); background: var(--status-cancelled-bg); }
.status-draft   { color: var(--status-draft); background: var(--status-draft-bg); }
.status-active  { color: var(--status-paid); background: var(--status-paid-bg); }
.status-inactive { color: var(--status-cancelled); background: var(--status-cancelled-bg); }

/* ==========================================================================
   BOTÕES
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--emerald-primary);
  color: #050505;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  transition: color 0.15s, background 0.15s;
}

.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-overdue);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.18); }

/* ==========================================================================
   FORMULÁRIOS (MODAIS / PÁGINAS DE DETALHES)
   ========================================================================== */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

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

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}

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

/* ==========================================================================
   MODAL OVERLAY
   ========================================================================== */

.gestao-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.gestao-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.gestao-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.2s var(--ease-smooth);
}

.gestao-modal-overlay.open .gestao-modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px 26px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header-left { display: flex; flex-direction: column; gap: 4px; }
.page-title { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.page-header-right { display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   FILTROS DE TABELA
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.filter-pill.active {
  border-color: var(--emerald-border);
  background: var(--emerald-subtle);
  color: var(--emerald-primary);
}

.search-input-wrapper {
  position: relative;
  margin-left: auto;
}

.search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  outline: none;
  width: 240px;
  transition: border-color 0.2s;
}

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

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
   PRÓXIMOS PAGAMENTOS CARD
   ========================================================================== */

.next-payments-list { display: flex; flex-direction: column; gap: 8px; }

.next-payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: background 0.15s, border-color 0.15s;
}

.next-payment-item:hover {
  background: rgba(22, 199, 132, 0.03);
  border-color: var(--emerald-border);
}

.npi-client { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.npi-date { font-size: 0.75rem; color: var(--text-muted); }
.npi-amount { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }

/* ==========================================================================
   CHAT IA
   ========================================================================== */

.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h) - 64px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  display: flex;
  gap: 10px;
  max-width: 80%;
}

.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-message.assistant { align-self: flex-start; }

.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.chat-avatar.user-av { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.chat-avatar.ai-av { background: var(--emerald-subtle); color: var(--emerald-primary); border: 1px solid var(--emerald-border); }

.chat-bubble {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.chat-message.assistant .chat-bubble { border-color: var(--emerald-border); }
.chat-message.user .chat-bubble { background: rgba(22,199,132,0.08); }

/* Card de confirmação de ação financeira */
.ai-confirmation-card {
  background: rgba(234, 179, 8, 0.06);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 8px;
}

.ai-confirmation-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--status-pending);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.ai-confirmation-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.ai-confirmation-actions { display: flex; gap: 8px; }

.btn-confirm-action {
  background: var(--emerald-primary);
  color: #050505;
  border: none;
  border-radius: 7px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-confirm-action:hover { opacity: 0.88; }

.btn-cancel-action {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

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

.ai-chat-input-bar {
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.ai-chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.875rem;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.ai-chat-input:focus { border-color: var(--border-focus); }

.btn-send-ai {
  background: var(--emerald-primary);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  color: #050505;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.btn-send-ai:hover { opacity: 0.88; }
.btn-send-ai:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}

.empty-state-icon { font-size: 2.5rem; opacity: 0.5; }
.empty-state-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.empty-state-subtitle { font-size: 0.82rem; max-width: 320px; }

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.gestao-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9000;
}

.gestao-toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  animation: slideInToast 0.25s var(--ease-smooth);
}

.gestao-toast.success { border-color: var(--emerald-border); }
.gestao-toast.error { border-color: rgba(239, 68, 68, 0.3); }
.gestao-toast.warning { border-color: rgba(234, 179, 8, 0.3); }

@keyframes slideInToast {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */

.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(22, 199, 132, 0.2);
  border-top-color: var(--emerald-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   SCROLLBAR GLOBAL
   ========================================================================== */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
