/* ============================================================
   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);
}

/* ── Botão de sync manual na topbar ─────────────────────────── */
.btn-sync-manual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 0;
  transition: color .2s, background .2s, border-color .2s, transform .15s;
  position: relative;
}
.btn-sync-manual:hover {
  color: var(--primary);
  background: var(--primary-light, #eff6ff);
  border-color: var(--primary);
}
.btn-sync-manual:active {
  transform: scale(0.9);
}
/* Indicador: tem alterações pendentes */
.btn-sync-manual.tem-pendentes {
  color: var(--warning, #d97706);
  border-color: var(--warning, #d97706);
  background: #fffbeb;
}
.btn-sync-manual.tem-pendentes::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  background: var(--warning, #d97706);
  border-radius: 50%;
  border: 1.5px solid #fff;
}
/* Animação de rotação enquanto sincroniza */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.btn-sync-manual.syncing .fas {
  animation: spin 0.8s linear infinite;
}
.btn-sync-manual.syncing {
  color: var(--primary);
  pointer-events: none;
  opacity: 0.7;
}

/* ============================================================
   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%; }

/* DEVEDOR EDIT FORM (dentro do modal de detalhes) */
.dev-edit-form { padding: 4px 0; }
.dev-edit-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dev-edit-section-title i { color: var(--primary); }
.dev-edit-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* MODAL DEVEDOR — títulos de seção */
.modal-dev-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.modal-dev-section-title i { color: var(--primary); font-size: 12px; }

/* ============================================================
   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; }

/* ── WIZARD COMPACTO (10 passos) ─────────────────────────────── */
.wz-progress-compact {
  overflow-x: auto; padding-bottom: 4px;
  gap: 0; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 0;
}
.wz-progress-compact .wz-step-dot { width: 22px; height: 22px; font-size: 10px; }
.wz-progress-compact .wz-step span { font-size: 9px; }
.wz-progress-compact .wz-step-line { min-width: 10px; }

/* Credores */
.wz-credores-list { display: flex; flex-direction: column; gap: 10px; }
.wz-credor-card {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: all .15s;
  background: var(--surface); position: relative;
}
.wz-credor-card input[type=checkbox] { display: none; }
.wz-credor-card.selected { border-color: #16a34a; background: #f0fdf4; }
.wz-credor-card:hover { border-color: #16a34a; }
.wz-credor-info { flex: 1; }
.wz-credor-info strong { display: block; font-size: 13px; font-weight: 700; }
.wz-credor-info span { display: block; font-size: 11px; color: var(--text-muted); }
.wz-credor-check-icon { color: #d1d5db; font-size: 18px; }
.wz-credor-card.selected .wz-credor-check-icon { color: #16a34a; }

/* Partes lista (devedores/alunos) */
.wz-partes-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.wz-parte-tag {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.wz-parte-tag div { display: flex; flex-direction: column; gap: 2px; }
.wz-parte-tag strong { font-size: 13px; }
.wz-parte-tag span { font-size: 11px; color: var(--text-muted); }
.wz-tag-remove {
  border: none; background: #fee2e2; color: #dc2626;
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 10px; flex-shrink: 0;
}
.wz-empty-partes { font-size: 12px; color: var(--text-muted); padding: 10px; text-align: center; }

/* Typeahead */
.wz-typeahead-wrap { position: relative; }
.wz-typeahead-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .15s;
}
.wz-typeahead-input:focus { border-color: var(--primary); }
.wz-typeahead-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  max-height: 200px; overflow-y: auto;
}
.wz-dd-item {
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: 13px; transition: background .1s;
}
.wz-dd-item:last-child { border-bottom: none; }
.wz-dd-item:hover { background: var(--primary-light); }
.wz-dd-item strong { display: block; }
.wz-dd-item span { font-size: 11px; color: var(--text-muted); }
.wz-novo-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 12px; color: #92400e; margin-top: 6px;
}

/* Processo */
.wz-processo-list { display: flex; flex-direction: column; gap: 8px; }
.wz-processo-option {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; transition: all .15s; background: var(--surface);
}
.wz-processo-option input[type=radio] { display: none; }
.wz-processo-option.selected { border-color: var(--primary); background: var(--primary-light); }
.wz-processo-option div { display: flex; flex-direction: column; gap: 2px; }
.wz-processo-option strong { font-size: 13px; }
.wz-processo-option span { font-size: 11px; color: var(--text-muted); }

/* Débitos table */
.wz-debitos-table { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.wz-debitos-header {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 8px 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted);
}
.wz-debito-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer; border-top: 1px solid var(--border);
  font-size: 12px; transition: background .1s;
}
.wz-debito-row input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.wz-debito-row.selected { background: #fef3c7; }
.wz-debito-manual-row { background: #f9fafb; border-radius: 6px; padding: 8px; margin-bottom: 6px; border: 1px dashed var(--border); }
.wz-total-debitos {
  display: flex; justify-content: space-between; align-items: center;
  background: #fee2e2; border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; font-weight: 600; border: 1px solid #fca5a5;
}

/* Renegociação resumo */
.wz-reneg-resumo {
  background: var(--bg); border-radius: var(--radius-sm); padding: 14px;
  display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border);
}

/* Switch SISBAJUD */
.wz-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.wz-switch input { opacity: 0; width: 0; height: 0; }
.wz-switch-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #d1d5db; border-radius: 24px; transition: .2s;
}
.wz-switch-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s;
}
.wz-switch input:checked + .wz-switch-slider { background: #16a34a; }
.wz-switch input:checked + .wz-switch-slider:before { transform: translateX(20px); }

/* Revisão full-width */
.wz-review-item.full { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ── Formulário inline de cadastro (Devedor / Aluno não encontrado) ─ */
.wz-inline-cadastro {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  animation: slideDown .2s ease;
}
.wz-inline-cadastro-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  flex-wrap: wrap;
}
.wz-inline-cadastro-header span { flex: 1; }
.wz-inline-fechar {
  background: none; border: none; cursor: pointer;
  color: #92400e; font-size: 14px; padding: 2px 6px;
  border-radius: 4px; transition: background .1s;
}
.wz-inline-fechar:hover { background: #fde68a; }
.wz-inline-aluno .wz-inline-cadastro-header { color: #5b21b6; }
.wz-inline-aluno { background: #f5f3ff; border-color: #c4b5fd; }
.req { color: #dc2626; font-size: 11px; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Máscara CNJ – indicador de formato válido ───────────────── */
#wzCnjValido { pointer-events: none; }
input.input-error { border-color: #dc2626 !important; background: #fff5f5 !important; }

/* ── Cronograma de parcelas ──────────────────────────────────── */
.wz-cronograma {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.wz-cron-item {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 8px; font-size: 11px;
  text-align: center; gap: 2px;
}
.wz-cron-item span:first-child { color: var(--text-muted); font-size: 10px; }
.wz-cron-item strong { font-size: 12px; color: #374151; }

/* ── Resumo renegociação ─────────────────────────────────────── */
.wz-sum-row {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 13px; padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.wz-sum-row:last-child { border-bottom: none; }
.wz-sum-row.total { font-size: 14px; padding-top: 8px; }
.wz-sum-row span { color: var(--text-muted); }
.wz-sum-row strong { font-weight: 700; }

/* Btn-green */
.btn-green {
  background: #dcfce7 !important; color: #16a34a !important;
  border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
  padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: 'Inter', sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-green:hover { background: #bbf7d0 !important; }

/* ── Botão "Criar Acordo" na coluna de Processos ─────────────── */
.btn-acordo-processo {
  background: #16a34a !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  border: none !important;
  cursor: pointer !important;
  transition: background .15s, transform .1s !important;
  box-shadow: 0 1px 3px rgba(22,163,74,.25) !important;
}
.btn-acordo-processo:hover {
  background: #15803d !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(22,163,74,.35) !important;
}
.btn-acordo-processo i { font-size: 11px; }

/* ─── Acordos Gerados – tabela melhorada ─────────────────────── */
.acrd-td-partes { max-width: 180px; }
.acrd-credoras { font-size: 12px; font-weight: 600; color: #1e40af; line-height: 1.5; }
.acrd-nome-tag {
  display: inline-block;
  background: #fce7f3;
  color: #be185d;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  margin: 1px 2px;
  white-space: nowrap;
}
.acrd-aluno-tag { background: #ede9fe; color: #7c3aed; }
.acrd-status-sel {
  min-width: 110px;
  max-width: 150px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ─── Botões de ação dos acordos ─────────────────────────────── */
.btn-acrd-fluxo {
  background: #ede9fe !important;
  color: #7c3aed !important;
  border: 1px solid #c4b5fd !important;
}
.btn-acrd-fluxo:hover {
  background: #7c3aed !important;
  color: #fff !important;
}
.btn-acrd-edit {
  background: #dbeafe !important;
  color: #2563eb !important;
  border: 1px solid #93c5fd !important;
}
.btn-acrd-edit:hover {
  background: #2563eb !important;
  color: #fff !important;
}

/* ─── Modal Fluxo / Timeline ─────────────────────────────────── */
.fluxo-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.fluxo-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}
.fluxo-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: -10px;
  width: 2px;
  background: #e5e7eb;
  z-index: 0;
}
.fluxo-step:last-child::before { display: none; }
.fluxo-dot {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid #e5e7eb;
  position: relative;
  z-index: 1;
  transition: all .2s;
}
.fluxo-step.done .fluxo-dot {
  background: var(--dot-color, #7c3aed);
  color: #fff;
  border-color: var(--dot-color, #7c3aed);
}
.fluxo-step.current .fluxo-dot {
  background: var(--dot-color, #7c3aed);
  color: #fff;
  border-color: var(--dot-color, #7c3aed);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot-color, #7c3aed) 20%, transparent);
  animation: pulse-dot .8s ease-in-out infinite alternate;
}
@keyframes pulse-dot {
  from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-color, #7c3aed) 20%, transparent); }
  to   { box-shadow: 0 0 0 6px color-mix(in srgb, var(--dot-color, #7c3aed) 10%, transparent); }
}
.fluxo-step.done::before { background: var(--dot-color, #e5e7eb); }
.fluxo-info { flex: 1; padding-top: 4px; }
.fluxo-info strong { display: block; font-size: 13px; color: #374151; }
.fluxo-step.done .fluxo-info strong { color: #111827; }
.fluxo-step.current .fluxo-info strong { color: #7c3aed; font-weight: 700; }
.fluxo-info span { font-size: 11px; color: #6b7280; margin-top: 1px; display: block; }

/* copy-badge */
.copy-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #dbeafe; color: #2563eb; border-radius: 4px;
  width: 20px; height: 20px; font-size: 10px; cursor: pointer;
  transition: background .15s;
}
.copy-badge:hover { background: #bfdbfe; }

@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; }
  .wz-debitos-header { display: none; }
  .wz-debito-row { flex-wrap: wrap; }
}

/* ============================================================
   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(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .stats-overview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats-overview { grid-template-columns: 1fr; }
}
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 5px;
  border-left: 4px solid var(--primary);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.stat-card-label {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.stat-card-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-card-sub { font-size: 11px; color: var(--text-muted); }

/* DASHBOARD SECTION TITLE */
.dash-section-title {
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.dash-section-title i { color: var(--primary); }

/* DASHBOARD CHARTS ROW */
.dash-charts-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) {
  .dash-charts-row { grid-template-columns: 1fr; }
}

/* 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; }

/* ══════════════════════════════════════════════════════════════
   PAGINAÇÃO DE PROCESSOS (e tabelas futuras)
   ══════════════════════════════════════════════════════════════ */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-top: none;
  border-radius: 0 0 10px 10px;
  font-size: 13px;
}

/* Info "1–10 de 604 processos" */
.pg-info {
  color: var(--text-muted, #64748b);
  white-space: nowrap;
}

/* Grupo de botões de navegação */
.pg-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Botão de página */
.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #1e293b);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1;
}
.pg-btn:hover:not(:disabled):not(.active) {
  background: var(--primary-light, #eff6ff);
  border-color: var(--primary, #3b82f6);
  color: var(--primary, #3b82f6);
}
.pg-btn.active {
  background: var(--primary, #3b82f6);
  border-color: var(--primary, #3b82f6);
  color: #fff;
  cursor: default;
}
.pg-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Reticências entre páginas */
.pg-ellipsis {
  padding: 0 4px;
  color: var(--text-muted, #94a3b8);
  user-select: none;
  line-height: 32px;
}

/* Seletor de itens por página */
.pg-ipp select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #1e293b);
  font-size: 13px;
  cursor: pointer;
}
.pg-ipp select:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
}

/* Responsividade */
@media (max-width: 640px) {
  .pagination-container {
    justify-content: center;
  }
  .pg-info { width: 100%; text-align: center; }
  .pg-ipp  { width: 100%; display: flex; justify-content: center; }
}

@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); }

/* ─── STATUS PILL ─── */
.zapi-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.zapi-status-pill.ativo   { background: #dcfce7; color: #16a34a; }
.zapi-status-pill.inativo { background: #fee2e2; color: #dc2626; }

/* ─── PAINEL DE STATUS DAS CREDENCIAIS ─── */
.zapi-status-bar {
  padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; margin-bottom: 16px;
}
.zapi-status-bar-title {
  font-size: 12px; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.zapi-fonte-badge {
  margin-left: auto; font-size: 10px; font-weight: 400; color: #94a3b8;
  background: #f1f5f9; border: 1px solid #e2e8f0; padding: 1px 8px; border-radius: 10px;
}
.zapi-cred-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.zapi-cred-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.zapi-cred-badge.ok  { background: #dcfce7; color: #16a34a; }
.zapi-cred-badge.err { background: #fee2e2; color: #dc2626; }

/* ─── PAINEL STATUS AO VIVO ─── */
.zapi-live-panel {
  border: 1px solid #dbeafe; border-radius: 8px; overflow: hidden; margin-bottom: 4px;
}
.zapi-live-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: #eff6ff;
  font-size: 12px; font-weight: 700; color: #1d4ed8;
}
.zapi-live-result {
  padding: 10px 14px; font-size: 13px; min-height: 36px;
  display: flex; align-items: center;
}
.zapi-live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.zapi-live-badge.conectado    { background: #dcfce7; color: #16a34a; }
.zapi-live-badge.desconectado { background: #fee2e2; color: #dc2626; }
.zapi-live-badge.verificando  { background: #eff6ff; color: #2563eb; }

/* ─── BTN EXTRA SMALL ─── */
.btn-xs {
  padding: 3px 10px; font-size: 11px; font-weight: 600; border-radius: 6px;
  border: 1px solid #bfdbfe; background: #fff; color: #2563eb; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.btn-xs:hover { background: #dbeafe; }
.btn-xs:disabled { opacity: .55; cursor: not-allowed; }

/* ─── PAINEL LIVE: HEADER COM MÚLTIPLOS BOTÕES ─── */
.zapi-live-header { flex-wrap: wrap; gap: 6px; }
.zapi-live-result { flex-wrap: wrap; align-items: flex-start; }

/* ─── BADGE PULSANTE "CONECTADO" ─── */
@keyframes zapi-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}
.zapi-live-badge.conectado {
  animation: zapi-pulse 2.5s infinite;
}

/* ─── TIMESTAMP ATUALIZAÇÃO ─── */
#zapiLiveTs {
  font-size: 10px; color: #93c5fd; font-style: italic;
}

/* ─── TOOLTIP DEBUG ─── */
.btn-ghost[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #f8fafc; font-size: 10px; padding: 3px 8px;
  border-radius: 4px; white-space: nowrap; pointer-events: none; z-index: 99;
}

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

/* ============================================================
   v3.2 — MODAL DETALHES ENTIDADE (Devedor / Aluno)
   ============================================================ */

/* Grid de campos dentro do modal */
.det-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.det-field { display: flex; flex-direction: column; gap: 4px; }
.det-field.det-field-half { grid-column: span 1; }
.det-field label { font-size: 12px; font-weight: 600; color: var(--text-muted, #64748b); }
.det-field input, .det-field select {
  padding: 8px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text, #1e293b);
  transition: border-color .15s, box-shadow .15s;
}
.det-field input:focus, .det-field select:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.det-field input[readonly] {
  background: #f8fafc;
  color: #94a3b8;
  cursor: default;
}

/* Seções extras dentro do modal */
.det-section {
  padding: 12px 0 4px;
  border-top: 1px solid var(--border, #e2e8f0);
  margin-top: 4px;
}
.det-section label { font-size: 12px; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 8px; }
.det-alunos-existentes { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.det-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: #ede9fe; color: #6d28d9;
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 12px; border: 1px solid #c4b5fd;
}
.det-responsavel-nome {
  font-size: 14px; font-weight: 600; color: var(--text);
  padding: 6px 10px; background: #f8fafc;
  border-radius: 6px; border: 1px solid var(--border);
}

/* Botão Editar no rodapé do modal (amarelo/âmbar) */
.btn-warning {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm, 6px);
  background: #f59e0b; color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background .15s;
}
.btn-warning:hover { background: #d97706; }

/* Responsividade do grid */
@media (max-width: 600px) {
  .det-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v3.2 — CARDS DE PROCESSOS NO DASHBOARD
   ============================================================ */
.dash-proc-cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.dash-proc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius, 10px);
  border: 1.5px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.dash-proc-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.dash-proc-icon { font-size: 22px; flex-shrink: 0; }
.dash-proc-info { display: flex; flex-direction: column; gap: 1px; }
.dash-proc-label { font-size: 11px; font-weight: 600; color: var(--text-muted, #64748b); white-space: nowrap; }
.dash-proc-num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.dash-proc-pct { font-size: 10px; color: #94a3b8; }

@media (max-width: 640px) {
  .dash-proc-cards-wrap { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   v3.2 — TOGGLE SWITCH (Notificações)
   ============================================================ */
.det-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}
.det-toggle input { opacity: 0; width: 0; height: 0; }
.det-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background .25s;
}
.det-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  left: 3px;
  bottom: 3px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .25s;
}
.det-toggle input:checked + .det-toggle-slider { background: #16a34a; }
.det-toggle input:checked + .det-toggle-slider::before { transform: translateX(18px); }
.det-toggle input:disabled + .det-toggle-slider { opacity: .5; cursor: not-allowed; }

/* Notificações: cards de seção */
.notif-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notif-card.notif-green { border-left: 4px solid #16a34a; background: #f0fdf4; }
.notif-card.notif-blue  { border-left: 4px solid #3b82f6; background: #eff6ff; }
.notif-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}

/* ============================================================
   v3.2 — FILTRO INADIMPLÊNCIA — select no toolbar
   ============================================================ */
#filterInadimplencia {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
#filterInadimplencia:focus { outline: none; border-color: var(--primary, #3b82f6); }

/* ============================================================
   PROCESSOS v3.1 — Componentes de UI avançados
   ============================================================ */

/* ── Exibição compacta de múltiplos alunos na tabela ── */
.alunos-compacto {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}
.aluno-principal {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.aluno-unico {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 160px;
}
.alunos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  flex-shrink: 0;
  cursor: help;
  transition: background .15s;
}
.alunos-badge:hover { background: #4f46e5; }
/* Tooltip nativo via title: já funciona, mas melhoramos hover */
.alunos-compacto:hover .aluno-principal { color: var(--primary); }

/* ── Tags de alunos nos modais ── */
.alunos-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  padding: 4px 0 2px;
}
.aluno-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  border: 1px solid #c4b5fd;
  transition: background .15s;
}
.aluno-tag:hover { background: #ddd6fe; }
.aluno-tag button {
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 50%;
  transition: color .15s, background .15s;
}
.aluno-tag button:hover { color: #dc2626; background: #fee2e2; }

/* ── Autocomplete Wrapper ── */
.ac-wrap {
  position: relative;
}
.ac-wrap input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.ac-wrap input[type="text"]:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}
.ac-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--text);
  transition: background .1s;
}
.ac-item:hover { background: #eff6ff; color: var(--primary); }
.ac-item:first-child { border-radius: 8px 8px 0 0; }
.ac-item:last-child  { border-radius: 0 0 8px 8px; }
.form-hint {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* ── Botão handshake (criação de acordo) ── */
.btn-handshake {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #6ee7b7 !important;
  transition: background .15s, transform .1s !important;
}
.btn-handshake:hover {
  background: #059669 !important;
  color: #fff !important;
  border-color: #059669 !important;
  transform: scale(1.08) !important;
}
.btn-handshake i { font-size: 13px; }

/* ── Seção de Observações no modal de edição ── */
.obs-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px 2px 6px;
  margin-bottom: 10px;
}
.obs-empty {
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}
.obs-item {
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-left: 3px solid var(--primary, #3b82f6);
  border-radius: 6px;
  padding: 8px 12px;
  transition: box-shadow .15s;
}
.obs-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.obs-texto {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 5px;
}
.obs-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}
.obs-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.obs-del-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: auto;
  transition: color .15s, background .15s;
}
.obs-del-btn:hover { color: #dc2626; background: #fee2e2; }
.obs-add-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.obs-add-row input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  transition: border-color .15s;
}
.obs-add-row input[type="text"]:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59,130,246,.15);
}
.btn-obs-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--primary, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  transition: background .15s;
}
.btn-obs-add:hover { background: #2563eb; }

/* Scrollbar fina para obs-lista */
.obs-lista::-webkit-scrollbar { width: 4px; }
.obs-lista::-webkit-scrollbar-track { background: transparent; }
.obs-lista::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* ── Responsividade para modais de processo ── */
@media (max-width: 600px) {
  .aluno-principal { max-width: 80px; }
  .aluno-unico { max-width: 100px; }
  .obs-add-row { flex-direction: column; }
  .btn-obs-add { justify-content: center; }
}

/* ============================================================
   v3.2 — ITEM 7 — BOTÃO "GERAR EM LOTE" (parcelas)
   ============================================================ */
.btn-lote {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn-lote:hover {
  background: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.btn-lote:active {
  transform: scale(.97);
  box-shadow: none;
}
.btn-lote i { font-size: 13px; }

/* ── Badge de Renegociado em acordos ── */
.badge-renegociado {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef9c3;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  margin-top: 4px;
  white-space: nowrap;
}

/* ============================================================
   v3.2 — ITEM 8 — ABAS CONFIGURAÇÕES CONSOLIDADAS
   ============================================================ */
/* Tab Índices + Parâmetros (consolidada) */
#tab-indices-params .params-grid {
  margin-top: 20px;
}
#tab-indices-params .config-card + .config-card {
  margin-top: 20px;
}

/* Separador visual entre seções dentro da tab consolidada */
.cfg-section-divider {
  height: 1px;
  background: var(--border, #e2e8f0);
  margin: 24px 0;
}

/* ============================================================
   v3.2 — ITEM 10 — SETORES
   ============================================================ */
.setor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.setor-toolbar input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}
.setor-toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
#listSetores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
}
.setor-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0c4a6e;
  cursor: default;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.setor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14,165,233,.2);
  background: #e0f2fe;
}
.setor-card .setor-del {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.setor-card .setor-del:hover { color: #dc2626; background: #fee2e2; }
.setor-card.setor-default { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
.setor-card.setor-default:hover { background: #ddd6fe; box-shadow: 0 4px 12px rgba(124,58,237,.2); }

/* Select de setor no modal de tarefas */
.setor-select {
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  transition: border-color .15s;
}
.setor-select:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* ── Métricas de Tarefas por Setor ── */
.metricas-tarefas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metrica-setor-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .15s;
}
.metrica-setor-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.metrica-setor-nome {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.metrica-setor-total {
  font-size: 22px;
  font-weight: 800;
  color: var(--text, #1e293b);
  line-height: 1;
}
.metrica-setor-sub {
  font-size: 12px;
  color: var(--text-muted, #64748b);
}
.metrica-setor-bar {
  height: 4px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 4px;
}
.metrica-setor-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary, #3b82f6);
  transition: width .4s ease;
}

@media (max-width: 640px) {
  .metricas-tarefas { grid-template-columns: 1fr 1fr; }
  #listSetores { gap: 6px; }
  .setor-card { font-size: 12px; padding: 6px 10px; }
}

/* ============================================================
   v3.3 — PAINEL ADMINISTRATIVO ÍNDICES & PARÂMETROS
   ============================================================ */

/* Banner de acesso restrito */
.admin-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 20px;
}
.admin-banner i { font-size: 16px; flex-shrink: 0; }

/* Badge Admin no cabeçalho do card */
.badge-admin-only {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Grid de estatísticas TJDFT */
.indices-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.indices-stat-item {
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.indices-stat-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.indices-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text, #1e293b);
  line-height: 1.1;
}

/* Row de upload */
.import-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.import-file-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px dashed var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s;
}
.import-file-input:hover { border-color: var(--primary, #3b82f6); }
.import-file-input:focus { outline: none; border-color: var(--primary, #3b82f6); }

/* Caixa de resultado de importação */
.import-result-box {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.import-result-loading { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.import-result-ok      { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.import-result-err     { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Grid de cards de índices cadastrados */
.indices-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.indice-card {
  background: #fafafa;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  transition: box-shadow .15s;
}
.indice-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.07); }
.indice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.indice-card-sigla {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary, #3b82f6);
}
.indice-card-count {
  font-size: 11px;
  background: #dbeafe;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.indice-card-fonte {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 10px;
}
.indice-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.indice-mini-table th {
  text-align: left;
  padding: 4px 6px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.indice-mini-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #f1f5f9;
}
.indice-mini-table tr:last-child td { border-bottom: none; }
.indice-card-more {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}
.indice-card-empty {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 10px 0;
}

/* Form grid de adição individual */
.indices-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* Override de parâmetros no modal de parcela */
.params-override-section {
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 14px;
}
.params-override-title {
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.params-override-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.params-override-grid .form-group label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

@media (max-width: 640px) {
  .indices-stats-grid { grid-template-columns: 1fr 1fr; }
  .indices-cards-grid { grid-template-columns: 1fr; }
  .indices-form-grid  { grid-template-columns: 1fr 1fr; }
  .import-upload-row  { flex-direction: column; align-items: stretch; }
  .params-override-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   v3.3 — MEU PERFIL COMPACTO (layout 2 colunas + cards)
   ============================================================ */

/* Grid principal da aba Meu Perfil */
.perfil-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  align-items: start;
}

/* Card de dados pessoais ocupa coluna inteira na 1ª linha */
.perfil-card { margin-top: 0 !important; }
.perfil-card:first-child { grid-column: 1 / -1; }  /* Dados pessoais: largura total */

/* Card de senha fica embaixo dos dados e ao lado das notifições */
.perfil-card-senha { grid-column: 1; }

/* Formulário compacto dentro do card de dados pessoais */
.perfil-form-compact { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.pfc-row { display: flex; gap: 10px; }
.pfc-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pfc-full { flex: 1 1 100%; }
.pfc-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pfc-group input,
.pfc-group select {
  padding: 7px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
.pfc-group input:focus,
.pfc-group select:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

/* Divisor inline dentro do card de perfil (separa dados de senha) */
.pfc-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
  color: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pfc-divider::before,
.pfc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #e2e8f0);
}
.pfc-divider span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Card de Notificações compacto */
.notif-compact { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.notif-compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.notif-compact-row:last-of-type { border-bottom: none; }
.notif-compact-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notif-compact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.notif-compact-info strong { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-compact-info small  { font-size: 11px; color: var(--text-muted); }
.notif-compact-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Badge "Em breve" inline */
.badge-em-breve {
  font-size: 10px;
  background: #dbeafe;
  color: #2563eb;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
  margin-left: 4px;
}

/* Responsivo — meu perfil em coluna única em telas menores */
@media (max-width: 480px) {
  .pfc-row { flex-direction: column; }
  .perfil-grid-layout { max-width: 100%; }
}

/* ============================================================
   v3.3 — TABELA TJDFT PAGINADA
   ============================================================ */
.tjdft-paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted, #64748b);
}
.tjdft-paginacao-info { font-weight: 600; }
.tjdft-paginacao-btns { display: flex; gap: 4px; }
.tjdft-pag-btn {
  padding: 4px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.tjdft-pag-btn:hover { background: #f0f9ff; border-color: #7dd3fc; }
.tjdft-pag-btn.active {
  background: var(--primary, #3b82f6);
  color: #fff;
  border-color: var(--primary, #3b82f6);
  font-weight: 700;
}
.tjdft-pag-btn:disabled { opacity: .4; cursor: default; }

/* Aba Índices & Parâmetros herda o estilo cfg-tab-admin (vermelho) automaticamente */
