/* ============================================================
   CRM B2 — Inteligência Financeira
   Dark Theme UI System
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Cores */
  --bg-base:       #0f172a;
  --bg-surface:    #1e293b;
  --bg-card:       #1e293b;
  --bg-hover:      #263548;
  --bg-input:      #0f172a;
  --bg-modal:      #1e293b;
  --border:        #2d3f55;
  --border-light:  #334155;

  /* Texto */
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --text-link:     #4e7fff;

  /* Brand */
  --brand:         #4e7fff;
  --brand-hover:   #3b6ef5;
  --brand-dim:     rgba(78,127,255,0.15);

  /* Status */
  --verde:         #10b981;
  --verde-dim:     rgba(16,185,129,0.15);
  --laranja:       #f59e0b;
  --laranja-dim:   rgba(245,158,11,0.15);
  --vermelho:      #ef4444;
  --vermelho-dim:  rgba(239,68,68,0.15);
  --roxo:          #8b5cf6;
  --roxo-dim:      rgba(139,92,246,0.15);
  --amarelo:       #eab308;
  --amarelo-dim:   rgba(234,179,8,0.15);
  --ciano:         #06b6d4;
  --ciano-dim:     rgba(6,182,212,0.15);

  /* Layout */
  --sidebar-w:     240px;
  --topbar-h:      60px;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --transition:    0.18s ease;
}

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════ */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-base);
  padding: 20px;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-img {
  display: block;
  margin: 0 auto 8px;
  width: 220px;
  height: auto;
  object-fit: contain;
}
.login-logo .logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--b2-teal);
  box-shadow: 0 0 0 3px var(--b2-teal-dim);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.btn-primary {
  width: 100%;
  background: var(--b2-teal);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}
.btn-primary:hover { background: var(--b2-teal-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.login-error {
  background: var(--vermelho-dim);
  border: 1px solid var(--vermelho);
  color: var(--vermelho);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

/* ══════════════════════════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════════════════════════ */
#app {
  display: none;
  height: 100vh;
  overflow: hidden;
}
#app.visible { display: flex; }

/* ── Sidebar ──────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-logo-img {
  display: block;
  width: 140px;
  height: auto;
  object-fit: contain;
}

.sidebar-section {
  padding: 16px 12px 4px;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
  font-family: 'Montserrat', sans-serif;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--b2-white); }
.nav-item.ativo { background: var(--b2-teal-dim); color: var(--b2-teal); font-weight: 600; }
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--vermelho);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.user-info:hover { background: var(--bg-hover); }
.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--b2-teal-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--b2-teal);
  flex-shrink: 0;
}
.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }

/* ── Main Area ────────────────────────────────────────────── */
#main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

#topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.topbar-search {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  gap: 8px;
  width: 240px;
}
.topbar-search input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search .search-icon { color: var(--text-muted); font-size: 0.9rem; }

#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* ── Loading Spinner ──────────────────────────────────────── */
.loading-spin {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--b2-teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════
   PAGE HEADERS
══════════════════════════════════════════════════════════ */
.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ══════════════════════════════════════════════════════════
   KPI CARDS
══════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.kpi-azul::before   { background: var(--b2-teal); }
.kpi-verde::before  { background: var(--verde); }
.kpi-laranja::before { background: var(--laranja); }
.kpi-vermelho::before { background: var(--vermelho); }
.kpi-roxo::before   { background: var(--roxo); }
.kpi-amarelo::before { background: var(--amarelo); }
.kpi-ciano::before  { background: var(--ciano); }

.kpi-icon { font-size: 1.4rem; margin-bottom: 4px; }
.kpi-valor {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.kpi-sub   { font-size: 0.72rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   DASHBOARD CHARTS
══════════════════════════════════════════════════════════ */
.dash-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.dash-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.dash-full { grid-column: 1 / -1; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label {
  width: 110px;
  min-width: 110px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.bar-val { width: 30px; font-size: 0.78rem; color: var(--text-muted); text-align: right; }

.fase-grid { display: flex; flex-direction: column; gap: 6px; }
.fase-item { display: flex; align-items: center; gap: 10px; }
.fase-nome { width: 140px; font-size: 0.78rem; color: var(--text-secondary); }
.fase-bar-wrap { flex: 1; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.fase-bar { height: 100%; background: var(--b2-teal); border-radius: 3px; transition: width 0.6s ease; }
.fase-num { width: 24px; font-size: 0.78rem; color: var(--text-muted); text-align: right; }

/* ══════════════════════════════════════════════════════════
   TABELAS
══════════════════════════════════════════════════════════ */
.tabela-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.tabela thead tr {
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}
.tabela th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.tabela th:hover { color: var(--text-primary); }
.tabela td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.tabela tbody tr { transition: background var(--transition); }
.tabela tbody tr:hover { background: var(--bg-hover); }
.tabela tbody tr:last-child td { border-bottom: none; }
.clicavel { cursor: pointer; }

/* ══════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-ok       { background: var(--verde-dim);    color: var(--verde);    border: 1px solid var(--verde); }
.badge-leve     { background: var(--laranja-dim);  color: var(--laranja);  border: 1px solid var(--laranja); }
.badge-atraso   { background: var(--vermelho-dim); color: var(--vermelho); border: 1px solid var(--vermelho); }
.badge-churn    { background: rgba(100,116,139,0.2); color: #64748b;       border: 1px solid #334155; }
.badge-semdata  { background: rgba(100,116,139,0.15); color: var(--text-muted); border: 1px solid var(--border); }

.badge-pd  { background: var(--b2-teal-dim);   color: var(--b2-teal);   border: 1px solid var(--b2-teal); }
.badge-inv { background: var(--ciano-dim);   color: var(--ciano);   border: 1px solid var(--ciano); }
.badge-a7x { background: var(--roxo-dim);   color: var(--roxo);   border: 1px solid var(--roxo); }
.badge-ass { background: var(--verde-dim);   color: var(--verde);   border: 1px solid var(--verde); }

.badge-gestor     { background: var(--amarelo-dim); color: var(--amarelo); border: 1px solid var(--amarelo); }
.badge-planejador { background: var(--b2-teal-dim);   color: var(--b2-teal);   border: 1px solid var(--b2-teal); }
.badge-cs         { background: var(--verde-dim);   color: var(--verde);   border: 1px solid var(--verde); }

/* ══════════════════════════════════════════════════════════
   BOTÕES
══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-blue  { background: var(--b2-teal);    color: #fff; }
.btn-blue:hover  { background: var(--b2-teal-hover); }
.btn-green { background: var(--verde);    color: #fff; }
.btn-green:hover { background: #0da271; }
.btn-red   { background: var(--vermelho); color: #fff; }
.btn-red:hover   { background: #dc2626; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════
   FILTROS / TOOLBAR
══════════════════════════════════════════════════════════ */
.filters-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 12px;
  font-size: 0.84rem;
  outline: none;
  transition: border-color var(--transition);
}
.filter-input:focus { border-color: var(--b2-teal); }
.filter-input::placeholder { color: var(--text-muted); }

select.filter-input option { background: var(--bg-surface); }

/* ══════════════════════════════════════════════════════════
   MODAIS
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow);
  animation: slideUp 0.18s ease;
  position: relative;
}
.modal-lg { max-width: 960px; }
.modal-xl { max-width: 1100px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-header h2 { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--vermelho); color: #fff; }

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

/* ── Tabs dentro de modal ─────────────────────────────────── */
.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
}
.modal-tab {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.ativo { color: var(--b2-teal); border-bottom-color: var(--b2-teal); }

.tab-content { display: none; }
.tab-content.ativo { display: block; }

/* ══════════════════════════════════════════════════════════
   KANBAN
══════════════════════════════════════════════════════════ */
.kanban-wrap {
  overflow-x: auto;
  padding-bottom: 16px;
}
.kanban-board {
  display: flex;
  gap: 12px;
  min-width: max-content;
  align-items: flex-start;
}
.kanban-col {
  width: 220px;
  min-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.kanban-count {
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.kanban-cards { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.kanban-card:hover { border-color: var(--b2-teal); box-shadow: 0 0 0 1px var(--b2-teal-dim); }
.kanban-card-id { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 2px; }
.kanban-card-nome { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.kanban-card-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════
   ACOMPANHAMENTO MODAL
══════════════════════════════════════════════════════════ */
.acomp-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 500px;
}
.acomp-sidebar {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px;
}
.acomp-main { overflow-y: auto; padding: 20px; }

.reuniao-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.reuniao-item:hover { background: var(--bg-hover); }
.reuniao-item.ativo { background: var(--b2-teal-dim); border-color: var(--b2-teal); }
.reuniao-item .r-nome { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); }
.reuniao-item .r-data { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.reuniao-item .r-prog { font-size: 0.7rem; color: var(--verde); margin-top: 2px; }

.tarefa-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tarefa-item:last-child { border-bottom: none; }
.tarefa-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  margin-top: 1px;
}
.tarefa-check.checked { background: var(--verde); border-color: var(--verde); color: #fff; }
.tarefa-texto { flex: 1; font-size: 0.84rem; color: var(--text-primary); }
.tarefa-texto.concluida { text-decoration: line-through; color: var(--text-muted); }

/* Pre-onboarding */
.preonb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.preonb-check { font-size: 1.1rem; }
.preonb-label { flex: 1; font-size: 0.84rem; color: var(--text-primary); }
.preonb-data { font-size: 0.72rem; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   GANTT
══════════════════════════════════════════════════════════ */
.gantt-wrap { overflow-x: auto; }
.gantt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.gantt-table th {
  background: var(--bg-hover);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.gantt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.gantt-table tbody tr:hover { background: var(--bg-hover); }
.gantt-sub td:first-child { padding-left: 32px; color: var(--text-secondary); }

.gantt-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}
.gantt-planejado  { background: var(--b2-teal-dim);   color: var(--b2-teal); }
.gantt-em_andamento { background: var(--amarelo-dim); color: var(--amarelo); }
.gantt-concluido  { background: var(--verde-dim);   color: var(--verde); }
.gantt-atrasado   { background: var(--vermelho-dim); color: var(--vermelho); }

/* ══════════════════════════════════════════════════════════
   TAREFAS DO TIME
══════════════════════════════════════════════════════════ */
.tarefa-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: all var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.tarefa-card:hover { border-color: var(--b2-teal); }
.tarefa-card.prioridade-Alta    { border-left-color: var(--vermelho); }
.tarefa-card.prioridade-Normal  { border-left-color: var(--b2-teal); }
.tarefa-card.prioridade-Baixa   { border-left-color: var(--text-muted); }

.tarefa-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tarefa-card-titulo { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.tarefa-card-meta   { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-a_fazer     { background: var(--b2-teal-dim);   color: var(--b2-teal); }
.status-em_andamento { background: var(--amarelo-dim); color: var(--amarelo); }
.status-concluido   { background: var(--verde-dim);   color: var(--verde); }
.status-cancelado   { background: rgba(100,116,139,0.2); color: #64748b; }

/* ══════════════════════════════════════════════════════════
   ALERTAS
══════════════════════════════════════════════════════════ */
.alerta-card {
  background: var(--bg-card);
  border: 1px solid var(--laranja);
  border-left: 4px solid var(--laranja);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.alerta-icon { font-size: 1.3rem; }
.alerta-body { flex: 1; }
.alerta-titulo  { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.alerta-detalhe { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* ══════════════════════════════════════════════════════════
   BANCO DE SOLUÇÕES
══════════════════════════════════════════════════════════ */
.solucao-categoria { margin-bottom: 20px; }
.solucao-cat-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.solucao-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.85rem;
  color: var(--text-primary);
}
.solucao-item:hover { background: var(--bg-hover); }
.solucao-item input[type=checkbox] { accent-color: var(--b2-teal); width: 15px; height: 15px; }

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.25s ease;
  max-width: 320px;
  pointer-events: auto;
  border-left: 3px solid var(--border);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-sucesso { border-left-color: var(--verde); }
.toast-erro    { border-left-color: var(--vermelho); }
.toast-aviso   { border-left-color: var(--laranja); }
.toast-info    { border-left-color: var(--b2-teal); }

/* ══════════════════════════════════════════════════════════
   FORMULÁRIOS & INPUTS GERAIS
══════════════════════════════════════════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════
   CÓDIGO / IDs
══════════════════════════════════════════════════════════ */
code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--b2-teal);
}

/* ══════════════════════════════════════════════════════════
   ERROS
══════════════════════════════════════════════════════════ */
.erro-page {
  background: var(--vermelho-dim);
  border: 1px solid var(--vermelho);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--vermelho);
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════
   PAGINAÇÃO
══════════════════════════════════════════════════════════ */
.paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.paginacao-btns { display: flex; gap: 6px; }

/* ══════════════════════════════════════════════════════════
   DETAIL GRID (cliente info)
══════════════════════════════════════════════════════════ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.detail-value { font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════════════════ */
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--verde); border-radius: 3px; transition: width 0.5s ease; }
.progress-pct { font-size: 0.75rem; color: var(--text-muted); min-width: 30px; }

/* ══════════════════════════════════════════════════════════
   SECTION DIVIDER
══════════════════════════════════════════════════════════ */
.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════
   PILL TABS (fora de modal)
══════════════════════════════════════════════════════════ */
.pill-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
}
.pill-tab {
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  user-select: none;
}
.pill-tab:hover { color: var(--text-primary); }
.pill-tab.ativo { background: var(--b2-teal); color: #fff; }
