/* ============================================================
   GECON – Gestão de Cobrança | Stylesheet
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;

  --sidebar-w: 250px;
  --sidebar-collapsed: 72px;

  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: width .25s ease;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: .5px; }
.logo-sub { font-size: 10px; color: var(--text-light); }

.sidebar-toggle {
  background: none; border: none; color: var(--text-light);
  cursor: pointer; padding: 4px; font-size: 16px;
  transition: color .2s;
}
.sidebar-toggle:hover { color: #fff; }

.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 12px 8px;
}

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  color: var(--text-light); text-transform: uppercase;
  padding: 16px 10px 6px; white-space: nowrap; overflow: hidden;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: #94a3b8; cursor: pointer; text-decoration: none;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: all .18s; margin-bottom: 2px; position: relative;
}
.nav-item i { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }

.badge {
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 99px;
  min-width: 18px; text-align: center;
}
.badge-alert { background: var(--danger); }
.badge-warn { background: var(--warning); }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 11px; color: var(--text-light); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s ease;
}

.topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.breadcrumb { font-size: 15px; font-weight: 600; color: var(--text); }
.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 18px; cursor: pointer; color: var(--text-muted);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 12px; color: var(--text-muted); }
.btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px; padding: 6px;
  position: relative; transition: color .2s;
}
.btn-icon:hover { color: var(--primary); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ============================================================
   PAGE
   ============================================================ */
.page-container { flex: 1; padding: 24px; }

.page { display: none; animation: fadeIn .2s ease; }
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-blue { border-left-color: var(--primary); }
.kpi-green { border-left-color: var(--success); }
.kpi-red { border-left-color: var(--danger); }
.kpi-orange { border-left-color: var(--warning); }

.kpi-icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.kpi-blue .kpi-icon { background: var(--primary-light); color: var(--primary); }
.kpi-green .kpi-icon { background: var(--success-light); color: var(--success); }
.kpi-red .kpi-icon { background: var(--danger-light); color: var(--danger); }
.kpi-orange .kpi-icon { background: var(--warning-light); color: var(--warning); }

.kpi-info { display: flex; flex-direction: column; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-size: 20px; font-weight: 800; color: var(--text); margin: 2px 0; }
.kpi-sub { font-size: 11px; color: var(--text-light); }

/* ============================================================
   CHARTS
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px; margin-bottom: 24px;
}
.chart-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-header h3 { font-size: 14px; font-weight: 600; }
.chart-badge {
  font-size: 10px; font-weight: 600; background: var(--primary-light);
  color: var(--primary); padding: 3px 8px; border-radius: 99px;
}

/* ============================================================
   DASHBOARD TABLES
   ============================================================ */
.dashboard-tables {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.dash-table-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.dash-table-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.dash-table-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dash-table-header h3 i { color: var(--primary); }
.link-more { font-size: 12px; color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 500; }
.link-more:hover { text-decoration: underline; }

.dash-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.dash-item:last-child { border-bottom: none; }
.dash-item-left { display: flex; flex-direction: column; }
.dash-item-name { font-weight: 500; }
.dash-item-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dash-item-right { text-align: right; }
.dash-item-value { font-weight: 700; color: var(--danger); }
.dash-item-date { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   TOOLBAR / FILTERS
   ============================================================ */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  flex: 1; min-width: 200px;
}
.search-box i { color: var(--text-muted); }
.search-box input {
  border: none; outline: none; flex: 1;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text);
  background: transparent;
}
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-group select, select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: var(--text);
  outline: none; cursor: pointer;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: #f8fafc; border-bottom: 2px solid var(--border); }
.data-table th {
  padding: 12px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); white-space: nowrap; text-align: left;
}
.data-table td {
  padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.empty-cell {
  text-align: center; color: var(--text-muted);
  padding: 40px 20px !important; font-size: 13px; line-height: 1.8;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 99px; white-space: nowrap;
}
.status-avencer { background: #dbeafe; color: #1d4ed8; }
.status-vencido { background: var(--danger-light); color: var(--danger); }
.status-pago { background: var(--success-light); color: var(--success); }
.status-parcial { background: var(--warning-light); color: var(--warning); }
.status-cancelado { background: #f1f5f9; color: var(--text-muted); }
.status-emandamento { background: #ede9fe; color: var(--purple); }
.status-acordo { background: var(--success-light); color: var(--success); }
.status-homologado { background: #d1fae5; color: #065f46; }
.status-suspenso { background: var(--warning-light); color: var(--warning); }
.status-arquivado { background: #f1f5f9; color: var(--text-muted); }

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.action-btns { display: flex; gap: 4px; }
.btn-action {
  width: 28px; height: 28px; border-radius: 6px;
  border: none; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-edit { background: var(--primary-light); color: var(--primary); }
.btn-edit:hover { background: var(--primary); color: #fff; }
.btn-delete { background: var(--danger-light); color: var(--danger); }
.btn-delete:hover { background: var(--danger); color: #fff; }
.btn-view { background: #f0fdf4; color: var(--success); }
.btn-view:hover { background: var(--success); color: #fff; }
.btn-wpp { background: #dcfce7; color: #16a34a; }
.btn-wpp:hover { background: #16a34a; color: #fff; }
.btn-pay { background: #ede9fe; color: var(--purple); }
.btn-pay:hover { background: var(--purple); color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 9px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.btn-ghost:hover { background: var(--bg); }
.btn-sm {
  font-size: 12px; padding: 6px 12px; border-radius: 6px;
  border: none; cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.btn-green { background: var(--success-light); color: var(--success); }
.btn-green:hover { background: var(--success); color: #fff; }

/* ============================================================
   MINI KPI ROW
   ============================================================ */
.mini-kpi-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.mini-kpi {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px; min-width: 140px;
}
.mini-kpi-label { font-size: 11px; color: var(--text-muted); }
.mini-kpi-val { font-size: 16px; font-weight: 700; }

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.kanban-col {
  background: var(--bg); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.kanban-col-header {
  padding: 12px 16px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.kanban-pending { background: #fef9c3; color: #854d0e; }
.kanban-progress { background: #dbeafe; color: #1e40af; }
.kanban-done { background: #dcfce7; color: #166534; }
.kanban-count {
  background: rgba(0,0,0,.12); border-radius: 99px;
  padding: 1px 8px; font-size: 11px; margin-left: auto;
}
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kanban-card {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border-left: 3px solid transparent;
}
.kanban-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kanban-card.priority-Alta { border-left-color: var(--danger); }
.kanban-card.priority-Média { border-left-color: var(--warning); }
.kanban-card.priority-Baixa { border-left-color: var(--success); }
.kanban-card-title { font-size: 13px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.kanban-card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kanban-tag {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 99px;
}

/* ============================================================
   MENSAGENS WHATSAPP
   ============================================================ */
.mensagens-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.mensagens-templates h3,
.mensagens-lista h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.mensagens-templates h3 i { color: #25d366; }
.template-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.template-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.template-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
}
.badge-lembrete { background: var(--primary-light); color: var(--primary); }
.badge-atraso { background: var(--warning-light); color: var(--warning); }
.badge-judicial { background: var(--danger-light); color: var(--danger); }
.template-dias { font-size: 11px; color: var(--text-muted); }
.template-body {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px; font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; color: var(--text);
  border: 1px solid var(--border); margin-bottom: 10px;
  min-height: 90px; outline: none;
  font-family: 'Inter', sans-serif;
}
.template-body:focus { border-color: var(--primary); }

.wpp-row {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.wpp-info { display: flex; flex-direction: column; }
.wpp-name { font-weight: 600; font-size: 13px; }
.wpp-details { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.btn-wpp-send {
  background: #25d366; color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s;
}
.btn-wpp-send:hover { background: #128c7e; transform: translateY(-1px); }

/* ============================================================
   CONFIGURAÇÕES
   ============================================================ */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.config-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.config-card:first-child { grid-column: 1 / -1; }
.config-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.config-card-header h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.config-card-header h3 i { color: var(--primary); }
.config-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

.config-params { display: flex; flex-direction: column; gap: 12px; }
.param-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.param-row label { font-size: 13px; color: var(--text); font-weight: 500; }
.param-input-group { display: flex; align-items: center; gap: 6px; }
.param-input-group input {
  width: 90px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 13px; text-align: right; outline: none;
}
.param-input-group input:focus { border-color: var(--primary); }
.param-input-group span { font-size: 13px; color: var(--text-muted); }
.param-row select { min-width: 100px; }

.tags-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.tag-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.tag-remove {
  cursor: pointer; font-size: 13px; line-height: 1;
  color: var(--primary); opacity: .6;
}
.tag-remove:hover { opacity: 1; }

/* ============================================================
   CALC PREVIEW
   ============================================================ */
.calc-preview {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border-radius: var(--radius-sm); padding: 16px;
  margin-top: 16px; border: 1px solid var(--border);
}
.calc-preview h4 {
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.calc-grid { display: flex; flex-direction: column; gap: 6px; }
.calc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 4px 0;
}
.calc-row span { color: var(--text-muted); }
.calc-row strong { font-weight: 600; }
.total-row {
  border-top: 2px solid var(--border); margin-top: 4px; padding-top: 8px;
}
.total-row span { font-weight: 700; font-size: 14px; color: var(--text); }
.total-row strong { font-size: 16px; color: var(--danger); }
.honorarios-row span { color: var(--primary); font-weight: 500; }
.honorarios-row strong { color: var(--primary); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,.5); z-index: 2000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px); padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface); border-radius: var(--radius);
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 680px; }
.modal-xl { max-width: 860px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-header h2 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 16px;
  cursor: pointer; color: var(--text-muted); padding: 4px;
  transition: color .2s;
}
.modal-close:hover { color: var(--danger); }
.modal-body {
  padding: 20px 24px; overflow-y: auto; flex: 1;
}
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0;
}

/* ============================================================
   FORM
   ============================================================ */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'Inter', sans-serif;
  font-size: 13px; color: var(--text); outline: none; background: var(--surface);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state-small {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; color: var(--text-muted); font-size: 13px;
}
.empty-state-small i { font-size: 16px; }

/* ============================================================
   DEVEDOR DETALHE
   ============================================================ */
.devedor-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-section { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; }
.detail-section.full { grid-column: 1 / -1; }
.detail-section h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }
.detail-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: var(--text-muted); }
.detail-row strong { font-weight: 600; text-align: right; max-width: 60%; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500;
  min-width: 240px; animation: toastIn .25s ease;
  color: #fff; max-width: 340px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
.toast-warn { background: var(--warning); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: 1fr; }
  .dashboard-tables { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .mensagens-container { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .config-card:first-child { grid-column: 1; }
}

@media (max-width: 768px) {
  .sidebar { width: 0; transform: translateX(-100%); }
  .sidebar.open { width: var(--sidebar-w); transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .page-header { flex-direction: column; }
  .devedor-detail-grid { grid-template-columns: 1fr; }
  .detail-section.full { grid-column: 1; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-container { padding: 12px; }
  .topbar { padding: 0 12px; }
}

/* ============================================================
   LOGIN
   ============================================================ */
#loginScreen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; min-height: 100vh;
}
.login-bg {
  width: 42%; background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #1e3a5f 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px; position: relative; overflow: hidden;
}
.login-bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,.2) 0%, transparent 60%);
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: auto; z-index: 1; }
.login-brand-icon {
  width: 64px; height: 64px; background: var(--primary); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(37,99,235,.4);
}
.login-brand h1 { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: 1px; margin: 0; }
.login-brand p { color: #94a3b8; font-size: 14px; margin: 0; }
.login-tagline {
  display: flex; align-items: center; gap: 10px; z-index: 1;
  color: #64748b; font-size: 12px; margin-top: 48px;
}
.login-tagline i { color: #2563eb; }

.login-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #f8fafc; padding: 32px;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
}
.login-card-header { text-align: center; margin-bottom: 32px; }
.login-logo-sm {
  width: 52px; height: 52px; background: var(--primary-light);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--primary); margin: 0 auto 14px;
}
.login-card-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.login-card-header p { color: var(--text-muted); font-size: 13px; margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.login-field select,
.login-field input {
  padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.login-field select:focus,
.login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.login-pass-wrap { position: relative; }
.login-pass-wrap input { width: 100%; padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 14px; padding: 4px;
}
.toggle-pass:hover { color: var(--primary); }
.login-error {
  background: var(--danger-light); border: 1px solid #fecaca;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--danger);
  display: flex; align-items: center; gap: 8px;
}
.login-btn {
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 13px; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', sans-serif; transition: all .2s; margin-top: 4px;
}
.login-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-hint {
  margin-top: 20px; padding: 10px 14px; background: #f8fafc;
  border-radius: 8px; font-size: 11px; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 7px; line-height: 1.5;
}
.login-hint code { background: var(--border); padding: 1px 5px; border-radius: 4px; font-size: 10px; }

/* TOPBAR USER */
.topbar-user { position: relative; cursor: pointer; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; transition: opacity .2s;
}
.topbar-avatar:hover { opacity: .85; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  min-width: 180px; z-index: 600; overflow: hidden;
}
.user-dropdown-header {
  padding: 12px 16px; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.user-dropdown-item {
  padding: 10px 16px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; color: var(--danger);
  transition: background .15s;
}
.user-dropdown-item:hover { background: var(--danger-light); }

/* RESPONSIVO LOGIN */
@media (max-width: 768px) {
  .login-bg { display: none; }
  .login-panel { padding: 16px; background: #f8fafc; }
  .login-card { padding: 28px 20px; }
}

/* ============================================================
   WIZARD DE ACORDOS
   ============================================================ */
.wz-progress {
  display: flex; align-items: center; gap: 0; width: 100%;
}
.wz-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.wz-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; transition: all .2s;
}
.wz-step span { font-size: 10px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.wz-step.active .wz-step-dot { background: var(--primary); color: #fff; }
.wz-step.active span { color: var(--primary); font-weight: 700; }
.wz-step.done .wz-step-dot { background: var(--success); color: #fff; }
.wz-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 4px; margin-bottom: 16px; }

.wz-section { margin-bottom: 20px; }
.wz-section h4 {
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 8px;
}

/* Tipo de acordo */
.wz-tipo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wz-tipo-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center; transition: all .2s;
  background: var(--surface);
}
.wz-tipo-card input[type="radio"] { display: none; }
.wz-tipo-card:hover { border-color: var(--primary); background: var(--primary-light); }
.wz-tipo-card.selected { border-color: var(--primary); background: var(--primary-light); }
.wz-tipo-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.wz-tipo-card strong { font-size: 13px; }
.wz-tipo-card span { font-size: 11px; color: var(--text-muted); }

/* Devedor preview */
.wz-devedor-preview {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-light); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 8px; border: 1px solid #bfdbfe;
}
.wz-prev-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.wz-prev-info { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.wz-prev-info strong { font-size: 14px; }

/* Parcelas check */
.parcelas-check-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.parcela-check-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; border: 1.5px solid transparent;
  transition: all .15s;
}
.parcela-check-row input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.parcela-check-row.selected { background: var(--primary-light); border-color: var(--primary); }
.parcela-check-info { flex: 1; }
.parcela-check-info strong { display: block; font-size: 13px; }
.parcela-check-info span { font-size: 11px; color: var(--text-muted); }
.parcela-check-val { font-weight: 700; color: var(--danger); white-space: nowrap; }

/* Condições */
.wz-condicoes-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.wz-debito-summary {
  background: var(--bg); border-radius: var(--radius-sm); padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.wz-sum-row { display: flex; justify-content: space-between; font-size: 13px; }
.wz-sum-row.total { border-top: 2px solid var(--border); padding-top: 8px; margin-top: 4px; }
.wz-sum-row.total span { font-weight: 700; }

/* Cronograma */
.wz-cronograma { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wz-cron-item {
  background: var(--bg); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 11px; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.wz-cron-item strong { font-size: 12px; color: var(--primary); }

/* Revisão */
.wz-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wz-review-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm);
  font-size: 13px;
}
.wz-review-item span { color: var(--text-muted); }
.wz-review-item.total-rev { grid-column: 1 / -1; background: var(--primary-light); border: 1px solid #bfdbfe; }

/* ACORDOS PAGE */
.acordos-intro { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.acordo-feature-card {
  background: var(--surface); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); text-align: center; display: flex;
  flex-direction: column; align-items: center; gap: 12px;
  border: 1.5px solid transparent; transition: all .2s;
}
.acordo-feature-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.acordo-feat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.acordo-feature-card h4 { font-size: 15px; font-weight: 700; margin: 0; }
.acordo-feature-card p { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.acordos-dica {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; color: #78350f;
}
.acordos-dica i { color: #d97706; font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.acordos-dica strong { color: #92400e; }

@media (max-width: 900px) {
  .acordos-intro { grid-template-columns: 1fr; }
  .wz-tipo-grid { grid-template-columns: 1fr; }
  .wz-condicoes-grid { grid-template-columns: 1fr; }
  .wz-review-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BUSCA GLOBAL
   ============================================================ */
.global-search-wrap { position: relative; }
.global-search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm); padding: 6px 12px;
  min-width: 280px; animation: fadeIn .15s ease;
}
.global-search-box input {
  border: none; outline: none; flex: 1;
  font-family: 'Inter', sans-serif; font-size: 13px;
}
.global-search-box i { color: var(--primary); }
.global-search-close { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.global-search-close:hover { color: var(--danger); }
.global-search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 340px; z-index: 500;
  max-height: 380px; overflow-y: auto;
  border: 1px solid var(--border);
}
.sr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--primary-light); }
.sr-item-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.sr-item-info { flex: 1; }
.sr-item-title { font-weight: 600; }
.sr-item-sub { font-size: 11px; color: var(--text-muted); }
.sr-header {
  padding: 8px 14px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.sr-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   PAINEL DE ALERTAS
   ============================================================ */
.alert-panel {
  position: absolute; top: 48px; right: 16px;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 320px; z-index: 500;
  border: 1px solid var(--border); max-height: 400px; overflow-y: auto;
}
.alert-panel-header {
  padding: 12px 16px; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.alert-panel-header i { color: var(--warning); }
.alert-item {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; cursor: pointer; transition: background .15s;
}
.alert-item:hover { background: var(--bg); }
.alert-item:last-child { border-bottom: none; }
.alert-item-name { font-weight: 600; margin-bottom: 2px; }
.alert-item-detail { color: var(--text-muted); }
.alert-item.urgente .alert-item-name { color: var(--danger); }
.alert-item.proximo .alert-item-name { color: var(--warning); }

/* ============================================================
   CONFIGURAÇÕES V2 — TABS
   ============================================================ */
.cfg-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  background: var(--surface); padding: 6px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.cfg-tab {
  padding: 8px 16px; border: none; background: none;
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: all .18s;
  display: flex; align-items: center; gap: 6px;
}
.cfg-tab:hover { background: var(--bg); color: var(--text); }
.cfg-tab.active { background: var(--primary); color: #fff; }
.cfg-tab-panel { display: none; }
.cfg-tab-panel.active { display: block; animation: fadeIn .2s ease; }

/* CONFIG DESC BOX */
.config-desc-box {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 12.5px; color: #1e40af; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}
.config-desc-box i { margin-top: 2px; flex-shrink: 0; }

/* FATOR STATS */
.fator-stats-row {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.fator-stat {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 12px; flex: 1; min-width: 120px;
}
.fator-stat strong { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.fator-stat span { color: var(--text-muted); }

/* FATOR BAR */
.fator-bar-wrap { width: 80px; height: 6px; background: var(--border); border-radius: 3px; }
.fator-bar { height: 6px; border-radius: 3px; background: var(--primary); transition: width .3s; }

/* PARÂMETROS V2 */
.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.param-row-v2 {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg); border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.param-icon-wrap {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
}
.param-info { flex: 1; }
.param-info label { font-size: 13px; font-weight: 600; display: block; }
.param-info small { font-size: 11px; color: var(--text-muted); }

/* SIMULADOR */
.sim-result {
  margin-top: 16px; background: linear-gradient(135deg,#eff6ff,#f0fdf4);
  border-radius: var(--radius-sm); padding: 16px;
  border: 1px solid var(--border); animation: fadeIn .2s ease;
}
.sim-result .calc-row { padding: 3px 0; }

/* EQUIPE */
.adv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.adv-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.adv-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.adv-info { flex: 1; }
.adv-name { font-weight: 600; font-size: 13px; }
.adv-meta { font-size: 11px; color: var(--text-muted); }
.adv-actions { display: flex; gap: 4px; }

/* RESUMO POR ADVOGADO */
.adv-resumo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.adv-resumo-item:last-child { border-bottom: none; }
.adv-resumo-bar-wrap {
  flex: 1; height: 8px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.adv-resumo-bar { height: 8px; border-radius: 4px; background: var(--primary); }

/* STATS OVERVIEW */
.stats-overview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 16px;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-card-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-card-value { font-size: 24px; font-weight: 800; }
.stat-card-sub { font-size: 11px; color: var(--text-muted); }

/* EXPORT */
.export-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 12px; }
.export-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid transparent; transition: all .2s;
}
.export-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.export-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.export-info { flex: 1; }
.export-info strong { display: block; font-size: 13px; font-weight: 600; }
.export-info span { font-size: 11px; color: var(--text-muted); }
.export-btn {
  font-size: 11px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.export-all-row {
  margin-top: 20px; display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}

/* TABLE FOOTER TOTALIZADOR */
.table-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 20px; padding: 10px 14px;
  background: #f8fafc; border-top: 2px solid var(--border);
  font-size: 13px; font-weight: 600; flex-wrap: wrap;
}
.table-footer span { color: var(--text-muted); font-weight: 400; }
.table-footer strong { color: var(--text); }

/* TOOLTIP */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: #1e293b; color: #fff;
  font-size: 11px; padding: 4px 8px; border-radius: 5px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s; z-index: 999;
}
[data-tip]:hover::after { opacity: 1; }

/* COPY BADGE */
.copy-badge {
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--primary); padding: 2px 6px;
  background: var(--primary-light); border-radius: 4px; transition: all .15s;
}
.copy-badge:hover { background: var(--primary); color: #fff; }

/* INADIMPLÊNCIA INDICATOR */
.inadimp-bar { height: 4px; border-radius: 2px; margin-top: 4px; background: var(--border); }
.inadimp-fill { height: 4px; border-radius: 2px; }

/* HISTÓRICO PAGAMENTOS */
.hist-timeline { display: flex; flex-direction: column; gap: 0; }
.hist-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.hist-item:last-child { border-bottom: none; }
.hist-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.hist-dot-pago { background: var(--success); }
.hist-dot-parcial { background: var(--warning); }
.hist-dot-vencido { background: var(--danger); }
.hist-info { flex: 1; }
.hist-title { font-weight: 600; }
.hist-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.hist-val { font-weight: 700; text-align: right; }

@media (max-width: 1100px) {
  .params-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cfg-tabs { gap: 2px; }
  .cfg-tab { font-size: 12px; padding: 7px 10px; }
  .cfg-tab span { display: none; }
  .export-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   MELHORIAS v3 — Login + Acordos + WhatsApp + Dropdown
   ============================================================ */

/* Login card: shake animation para senha incorreta */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-10px); }
  40%      { transform: translateX(10px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
.login-card.shake { animation: shake .45s ease; }

/* Dropdown itens – cor padrão (não vermelho) para ações normais */
.user-dropdown-item:not(:last-child) {
  color: var(--text);
}
.user-dropdown-item:not(:last-child):hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Select inline de status na tabela de acordos */
.status-select-inline {
  appearance: none;
  -webkit-appearance: none;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  transition: all .15s;
}
.status-select-inline:hover { opacity: .85; }
.status-select-inline:focus { box-shadow: 0 0 0 2px rgba(37,99,235,.2); }

/* Tabela de acordos: cards de ação rápida mobile */
@media (max-width: 768px) {
  .acordos-intro { grid-template-columns: 1fr; }
}

/* Hint de senhas no login */
.login-hint code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: monospace;
}

/* Modal alterar senha */
#modalChangePwd .form-group { margin-bottom: 14px; }
#cpwdError { border-left: 3px solid #dc2626; }

/* Badge de acordos — padrão azul/roxo */
#badge-acordos {
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 5px;
}

/* WhatsApp link na tabela */
td a[href^="https://wa.me"] { white-space: nowrap; }
td a[href^="https://wa.me"] i { margin-right: 4px; }

/* ============================================================
   GERENCIAMENTO DE USUÁRIOS
   ============================================================ */

/* Aba Admin especial */
.cfg-tab-admin {
  background: linear-gradient(135deg, #fef2f2, #fff7ed) !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-weight: 700;
}
.cfg-tab-admin:hover, .cfg-tab-admin.active {
  background: #dc2626 !important;
  color: #fff !important;
}
.cfg-tab-admin-badge {
  display: inline-flex; align-items: center;
  background: #dc2626; color: #fff;
  font-size: 8px; font-weight: 800;
  padding: 1px 5px; border-radius: 4px;
  margin-left: 4px; text-transform: uppercase; letter-spacing: .5px;
}
.cfg-tab-admin.active .cfg-tab-admin-badge { background: #fff; color: #dc2626; }

/* Nível badge */
.nivel-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}

/* Legenda de níveis */
.niveis-legenda {
  margin: 16px 0; padding: 14px 16px;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.nivel-leg-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.niveis-leg-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.nivel-leg-item {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
}
.nivel-leg-item small { font-size: 10px; color: var(--text-muted); }

/* Avatar pequeno na tabela */
.user-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff; flex-shrink: 0;
}

/* Badge "Você" */
.badge-voce {
  display: inline-block;
  background: var(--primary-light); color: var(--primary);
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: 4px; margin-left: 4px; text-transform: uppercase;
}

/* Linha de usuário inativo */
.row-inactive { opacity: 0.55; }
.row-inactive:hover { opacity: 0.85; }

/* Pontos de permissão */
.nivel-perms-mini { display: flex; gap: 3px; flex-wrap: wrap; }
.perm-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; cursor: help;
}
.perm-dot.perm-ok  { background: #dcfce7; color: #16a34a; }
.perm-dot.perm-no  { background: #fee2e2; color: #dc2626; }

/* Perms list no preview */
.perms-list { display: flex; flex-direction: column; gap: 5px; }
.perm-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; padding: 4px 8px; border-radius: 5px;
}
.perm-item.perm-ok  { background: #f0fdf4; color: #166534; }
.perm-item.perm-no  { background: #fef2f2; color: #991b1b; }
.perm-item i { font-size: 11px; flex-shrink: 0; }

/* Dropdown divider */
.user-dropdown-divider {
  height: 1px; background: var(--border); margin: 4px 0;
}

/* Cores preset no modal */
.cor-preset {
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; display: inline-block;
  border: 2px solid transparent; transition: transform .15s;
}
.cor-preset:hover { transform: scale(1.2); border-color: #fff; box-shadow: 0 0 0 2px #64748b; }

/* Acesso negado */
.acesso-negado {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px;
  text-align: center; color: var(--text-muted);
}
.acesso-negado i { font-size: 48px; margin-bottom: 16px; color: var(--border); }
.acesso-negado h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

@media (max-width: 768px) {
  .niveis-leg-grid { gap: 6px; }
  #modalUsuario .modal { grid-template-columns: 1fr; }
}

/* ============================================================
   FEATURES v4 — Lote, Agendamento, Timeline, Auditoria
   ============================================================ */

/* ── GERAÇÃO EM LOTE ── */
.lote-preview-header {
  font-size: 13px; font-weight: 600; color: #7c3aed;
  padding: 8px 12px; background: #f5f3ff; border-radius: 8px 8px 0 0;
  border: 1px solid #ddd6fe;
}
.lote-preview-list {
  border: 1px solid #ddd6fe; border-top: none;
  border-radius: 0 0 8px 8px; max-height: 260px; overflow-y: auto;
}
.lote-preview-item {
  display: grid; grid-template-columns: 44px 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 7px 12px; font-size: 12px;
  border-bottom: 1px solid #f1f5f9; transition: background .1s;
}
.lote-preview-item:hover { background: #f8fafc; }
.lote-preview-item:last-child { border-bottom: none; }
.lote-num  { font-weight: 700; color: #7c3aed; }
.lote-desc { color: #374151; font-weight: 500; }
.lote-venc { color: #64748b; font-size: 11px; white-space: nowrap; }
.lote-val  { font-weight: 700; color: #2563eb; white-space: nowrap; }

/* ── AGENDAMENTO DE COBRANÇA ── */
.agend-info-box {
  background: #f1f5f9; border-radius: 8px; padding: 10px 14px;
  font-size: 13px; border-left: 3px solid #2563eb;
}
.agend-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 12px; border-radius: 7px;
  border: 1px solid var(--border); margin-bottom: 6px; font-size: 12px;
  background: var(--surface); transition: background .15s;
}
.agend-item:hover { background: #f8fafc; }
.agend-enviado { opacity: .65; background: #f0fdf4 !important; }
.badge-enviado {
  display: inline-flex; align-items: center;
  background: #dcfce7; color: #16a34a;
  font-size: 10px; font-weight: 700; padding: 1px 7px;
  border-radius: 10px; margin-left: 6px;
}
.badge-pendente {
  display: inline-flex; align-items: center;
  background: #fef9c3; color: #854d0e;
  font-size: 10px; font-weight: 700; padding: 1px 7px;
  border-radius: 10px; margin-left: 6px;
}

/* ── TIMELINE DE ACORDO ── */
.tl-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 14px; background: #f8fafc;
  border-radius: 10px; margin-bottom: 20px;
}
.tl-meta-item {
  font-size: 12px; color: #64748b;
  display: flex; align-items: center; gap: 6px;
}
.tl-meta-item i { color: var(--primary); }
.tl-meta-item strong { color: var(--text); }

.tl-steps { display: flex; flex-direction: column; gap: 0; position: relative; }
.tl-step {
  display: flex; align-items: flex-start; gap: 14px;
  position: relative; padding-bottom: 4px;
}
.tl-step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--border); color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
  z-index: 2; transition: all .3s;
}
.tl-done .tl-step-dot {
  color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 5px currentColor;
}
.tl-current .tl-step-dot { animation: pulse-ring 2s infinite; }
@keyframes pulse-ring {
  0%,100% { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 5px currentColor; }
  50% { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 9px currentColor, 0 0 0 13px transparent; }
}
.tl-step-line {
  position: absolute; left: 17px; top: 36px;
  width: 2px; height: 28px; background: var(--border);
  z-index: 1; transition: background .3s;
}
.tl-line-done { background: var(--primary) !important; }
.tl-last { display: none; }
.tl-step-info {
  flex: 1; padding: 6px 0 28px; font-size: 13px; font-weight: 600;
}
.tl-future .tl-step-info { color: #94a3b8; font-weight: 400; }
.tl-step-badge-current {
  display: inline-flex; background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; margin-left: 8px; vertical-align: middle;
}
.tl-step-badge-future {
  display: inline-flex; background: var(--border); color: #64748b;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: 10px; margin-left: 8px; vertical-align: middle;
}
.tl-actions {
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px;
}
.btn-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: opacity .15s; white-space: nowrap;
}
.btn-sm:hover { opacity: .85; }
.btn-sm.btn-primary { background: var(--primary); color: #fff; }
.btn-sm.btn-danger  { background: #dc2626; color: #fff; }
.btn-sm.btn-green   { background: #16a34a; color: #fff; }

/* ── AUDITORIA ── */
#auditoriaBody tr td { font-size: 12px; }
#auditoriaBody tr:hover { background: #f8fafc; }

/* ── HISTÓRICO DE MENSAGENS ── */
#historicoMensagensContainer { animation: fadeIn .2s ease; }
#historicoMensagensBody td   { font-size: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .tl-meta { grid-template-columns: 1fr; }
  .lote-preview-item { grid-template-columns: 36px 1fr auto; }
  .lote-preview-item .lote-venc { display: none; }
}

/* ============================================================
   IMPORTAÇÃO CSV
   ============================================================ */

/* Botão de importar (verde-azulado) */
.btn-import {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  background: #0891b2; color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-import:hover  { background: #0e7490; }
.btn-import:active { transform: scale(.97); }

/* Stepper de passos */
.import-stepper {
  display: flex; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: #f8fafc; gap: 0;
}
.import-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: #94a3b8;
  flex: 1; justify-content: center;
}
.import-step.active { color: var(--primary); }
.import-step.done   { color: var(--success); }
.imp-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0; transition: all .25s;
}
.active .imp-step-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 3px #dbeafe; }
.done   .imp-step-dot { background: var(--success); color: #fff; }
.imp-step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; }

/* Painéis internos */
.import-panel { padding: 20px 24px; }

/* Duas colunas do passo 1 */
.import-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 640px) { .import-two-col { grid-template-columns: 1fr; } }

.import-box {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
}
.import-box h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; }
.import-box p  { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.6; }
.import-box-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* Botão baixar modelo */
.btn-download-model {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: background .15s;
  align-self: flex-start;
}
.btn-download-model:hover { background: var(--primary-dark); }

/* Lista de colunas do modelo */
.import-cols-preview { margin-top: 6px; }
.imp-cols-title {
  font-size: 11px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px;
}
.imp-col-row {
  display: flex; gap: 8px; align-items: baseline;
  padding: 4px 0; border-bottom: 1px dashed #f1f5f9; font-size: 11px;
}
.imp-col-name {
  font-family: monospace; font-weight: 700; color: #374151;
  white-space: nowrap; min-width: 140px;
}
.imp-col-name.imp-col-obrig { color: #dc2626; }
.imp-col-desc { color: #64748b; line-height: 1.5; }

/* Dropzone */
.import-dropzone {
  position: relative; border: 2px dashed #c7d2fe; border-radius: var(--radius);
  padding: 30px 16px; text-align: center; cursor: pointer;
  background: #f8faff; transition: all .2s; font-size: 13px; color: #64748b;
  min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.import-dropzone:hover, .import-dropzone.dragover {
  border-color: var(--primary); background: #eff6ff;
}
.import-dropzone small { font-size: 11px; color: #94a3b8; }

/* Info arquivo selecionado */
.import-file-info {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 7px;
  padding: 8px 12px; font-size: 12px; font-weight: 600; color: #16a34a;
}
.import-file-info span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Erro upload */
.import-error {
  background: #fee2e2; border-left: 3px solid #dc2626; border-radius: 6px;
  padding: 10px 12px; font-size: 12px; color: #991b1b; display: none;
}

/* Dicas */
.import-tips {
  margin-top: 16px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.imp-tips-title {
  font-size: 12px; font-weight: 700; color: #92400e; margin-bottom: 8px;
}
.imp-tip { font-size: 12px; color: #78350f; margin-bottom: 4px; line-height: 1.5; }
.imp-tip:last-child { margin-bottom: 0; }

/* Estatísticas do preview */
.import-preview-stats {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.imp-stat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.imp-stat-total { background: #f1f5f9; color: #475569; }
.imp-stat-ok    { background: #dcfce7; color: #166534; }
.imp-stat-erro  { background: #fee2e2; color: #991b1b; }
.imp-stat-aviso { background: #fef9c3; color: #854d0e; }

/* Listas de erros e avisos */
.imp-erros-list, .imp-avisos-list {
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; font-size: 12px;
}
.imp-erros-list  { background: #fee2e2; border-left: 3px solid #dc2626; }
.imp-avisos-list { background: #fef9c3; border-left: 3px solid #d97706; }
.imp-erros-title  { font-weight: 700; color: #991b1b; margin-bottom: 6px; }
.imp-avisos-title { font-weight: 700; color: #92400e; margin-bottom: 6px; }
.imp-erro-item  { color: #7f1d1d; margin-bottom: 3px; line-height: 1.5; }
.imp-aviso-item { color: #78350f; margin-bottom: 3px; line-height: 1.5; }
.imp-ok-msg {
  background: #dcfce7; border-left: 3px solid #16a34a; border-radius: 8px;
  padding: 12px 14px; font-size: 13px; font-weight: 600; color: #166534; margin-bottom: 12px;
}

/* Tabela de preview */
.import-preview-table { font-size: 11px; }
.import-preview-table th { font-size: 10px; padding: 6px 8px; white-space: nowrap; }
.import-preview-table td { padding: 5px 8px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.imp-row-erro  { background: #fff5f5 !important; }
.imp-row-aviso { background: #fffbeb !important; }
.imp-row-ok    { background: #f0fdf4 !important; }
.imp-cell-erro { color: #dc2626 !important; font-weight: 700; }

/* Badges de status por linha */
.imp-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 800;
}
.imp-badge-ok    { background: #dcfce7; color: #16a34a; }
.imp-badge-erro  { background: #fee2e2; color: #dc2626; }
.imp-badge-aviso { background: #fef9c3; color: #d97706; }

/* Barra de progresso */
.import-progress-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 20px 0;
}
.import-progress-icon { font-size: 40px; }
.import-progress-title { font-size: 15px; font-weight: 600; color: var(--text); }
.import-progress-bar-wrap {
  width: 100%; max-width: 400px; height: 8px;
  background: var(--border); border-radius: 4px; overflow: hidden;
}
.import-progress-bar {
  height: 100%; background: linear-gradient(90deg, #2563eb, #16a34a);
  border-radius: 4px; transition: width .2s ease;
}

/* Resultado final */
.import-final {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; text-align: center; padding: 16px 0;
}
.import-final-icon { font-size: 56px; line-height: 1; }
.import-final-ok   .import-final-icon { color: #16a34a; }
.import-final-parcial .import-final-icon { color: #d97706; }
.import-final h3 { font-size: 18px; font-weight: 700; margin: 0; }
.import-final-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.imp-final-stat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 700;
}
.imp-final-ok  { background: #dcfce7; color: #166534; }
.imp-final-err { background: #fee2e2; color: #991b1b; }
.import-erros-detail {
  width: 100%; max-width: 480px; text-align: left;
  background: #fef2f2; border-radius: 8px; padding: 10px 14px;
  font-size: 12px; color: #7f1d1d;
}
.import-erros-detail summary {
  cursor: pointer; font-weight: 600; color: #dc2626; padding: 2px 0;
}
.import-erros-detail-body { margin-top: 8px; line-height: 1.7; }

/* Validação summary */
.import-validation-summary { margin-bottom: 12px; }

/* Preview header */
/* ============================================================
   LOGIN — Novas features: 3 abas, cadastro, equipe, OAB
   ============================================================ */

/* Card mais largo para suportar o formulário de cadastro */
.login-card-wide { max-width: 500px !important; }

/* Abas do login */
.login-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  background: #f1f5f9; border-radius: 10px; padding: 4px;
}
.login-tab {
  flex: 1; padding: 9px 6px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; font-size: 12px;
  font-weight: 600; color: #64748b; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all .2s; white-space: nowrap;
}
.login-tab.active {
  background: #fff; color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.login-tab:hover:not(.active) { color: var(--text); background: #e2e8f0; }

/* Painéis das abas */
.login-tab-panel { display: block; }

/* Link buttons dentro do login */
.login-link-btn {
  background: none; border: none; color: var(--primary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; padding: 4px 8px;
  border-radius: 6px; transition: background .15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.login-link-btn:hover { background: var(--primary-light); }

/* Features list no painel esquerdo do login */
.login-features {
  margin-top: 32px; display: flex; flex-direction: column; gap: 10px; z-index: 1;
}
.login-feature-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #94a3b8;
}
.login-feature-item i { color: #22c55e; font-size: 12px; flex-shrink: 0; }

/* Força de senha */
.senha-strength-bar { height: 4px; border-radius: 4px; margin-top: 4px; transition: all .3s; }

/* ── EQUIPE — grid de advogados ── */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-top: 14px;
}
.equipe-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: box-shadow .2s, transform .2s; position: relative;
}
.equipe-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.equipe-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.equipe-info { flex: 1; min-width: 0; }
.equipe-nome { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.equipe-cargo { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.equipe-oab {
  font-size: 11px; font-weight: 600; color: var(--primary);
  margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
}
.equipe-stats {
  display: flex; gap: 10px; font-size: 11px; color: var(--text-muted);
}
.equipe-stats span { display: flex; align-items: center; gap: 4px; }
.equipe-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 16px; opacity: .6;
}

/* Filtros de usuários */
.users-filtros button { transition: all .15s; }
.users-filtros button:hover { opacity: .85; }

/* Badge "Você" na tabela de usuários */
.badge-voce {
  display: inline-block; background: var(--primary-light);
  color: var(--primary); font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle;
}

/* Senha: indicador de força */
.cad-pass-strength { height: 4px; border-radius: 4px; margin-top: 6px; transition: width .3s, background .3s; }

/* ─── NOVOS ELEMENTOS DE LOGIN (sem abas no topo) ─── */
.login-links-row {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap; margin-top: 14px;
}
.login-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #94a3b8; margin: 10px 0 8px;
  display: flex; align-items: center; gap: 6px;
}

/* ─── TOGGLE SWITCH PARA Z-API ─── */
.zapi-toggle {
  position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer;
}
.zapi-toggle input { opacity: 0; width: 0; height: 0; }
.zapi-toggle-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 22px;
  transition: background .25s;
}
.zapi-toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  left: 3px; bottom: 3px; background: #fff;
  transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.zapi-toggle input:checked + .zapi-toggle-slider { background: #25d366; }
.zapi-toggle input:checked + .zapi-toggle-slider::before { transform: translateX(18px); }

@media (max-width: 640px) {
  .login-card-wide { padding: 24px 18px !important; }
  .equipe-grid { grid-template-columns: 1fr; }
}
.import-preview-header { margin-bottom: 10px; }
