/* ===== VARIAVEIS ===== */
:root {
  --sidebar-w: 240px;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #2563eb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: system-ui, -apple-system, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: 14px; border: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
table { border-collapse: collapse; width: 100%; }
.hidden { display: none !important; }

/* ===== LAYOUT ===== */
#app { height: 100%; display: flex; }

/* LOGIN */
#login-page {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}
.login-card {
  background: var(--card); border-radius: 12px; padding: 40px;
  width: 360px; box-shadow: 0 20px 40px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* MAIN LAYOUT */
#main-layout { flex: 1; display: flex; overflow: hidden; }

/* SIDEBAR */
#sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg); display: flex;
  flex-direction: column; flex-shrink: 0; overflow-y: auto;
}
.sidebar-header {
  padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo { font-size: 16px; font-weight: 700; color: #f8fafc; }
.sidebar-sub { font-size: 11px; color: var(--sidebar-text); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section { padding: 8px 16px 4px; font-size: 10px; font-weight: 600;
  color: #475569; text-transform: uppercase; letter-spacing: .08em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  color: var(--sidebar-text); border-radius: 0; transition: all .15s;
  cursor: pointer; font-size: 13.5px;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.nav-item.active { background: rgba(37,99,235,.2); color: #93c5fd; border-right: 3px solid var(--sidebar-active); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,.06);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-name { font-size: 13px; color: #e2e8f0; font-weight: 500; }
.user-role { font-size: 11px; color: var(--sidebar-text); }
.btn-logout {
  margin-top: 10px; width: 100%; padding: 7px; background: rgba(255,255,255,.05);
  color: var(--sidebar-text); border-radius: 6px; font-size: 12px; text-align: center;
  border: 1px solid rgba(255,255,255,.08);
}
.btn-logout:hover { background: rgba(220,38,38,.15); color: #fca5a5; border-color: rgba(220,38,38,.3); }

/* CONTENT AREA */
#content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#topbar, .topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px; display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0;
}
.breadcrumb { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb span:last-child { color: var(--text); font-weight: 500; }
.breadcrumb-sep { color: var(--border); }
#page-content { flex: 1; overflow-y: auto; padding: 24px; }
.page-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== CARDS ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 32px; font-weight: 700; margin: 8px 0 4px; line-height: 1; }
.kpi-sub { font-size: 12px; color: var(--text-muted); }
.kpi-card.kpi-primary .kpi-value { color: var(--primary); }
.kpi-card.kpi-success .kpi-value { color: var(--success); }
.kpi-card.kpi-warning .kpi-value { color: var(--warning); }
.kpi-card.kpi-danger .kpi-value { color: var(--danger); }

/* ===== TABELAS ===== */
.table-wrap { overflow-x: auto; }
.data-table th, .data-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th { font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; }
.data-table td.quebra { white-space: normal; min-width: 160px; }   /* textos longos (fase 10) */
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-rascunho    { background: #f1f5f9; color: #475569; }
.badge-em_revisao  { background: #fef3c7; color: #92400e; }
.badge-aprovado    { background: #dcfce7; color: #166534; }
.badge-devolvido   { background: #fee2e2; color: #991b1b; }
.badge-ativo       { background: #dbeafe; color: #1e40af; }
.badge-encerrado   { background: #f1f5f9; color: #475569; }
.badge-suspenso    { background: #fef3c7; color: #92400e; }
.badge-arquivado   { background: #f1f5f9; color: #64748b; }
.badge-Postulatoria { background: #dbeafe; color: #1e40af; }
.badge-Instrutoria  { background: #ede9fe; color: #5b21b6; }
.badge-Decisoria    { background: #ffedd5; color: #c2410c; }
.badge-Recursal     { background: #fee2e2; color: #991b1b; }
.badge-Execucao     { background: #f0fdf4; color: #166534; }
.badge-comprovado      { background: #dcfce7; color: #166534; }
.badge-controvertido   { background: #fef3c7; color: #92400e; }
.badge-incontroverso   { background: #dbeafe; color: #1e40af; }
.badge-refutado        { background: #fee2e2; color: #991b1b; }
.badge-sem-cnj         { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; font-style: italic; }

/* Banner: processo sem numero CNJ */
.banner-sem-cnj {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; margin-bottom: 16px;
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
}
.banner-sem-cnj-texto { font-size: 13px; }
.banner-sem-cnj-titulo { font-weight: 600; color: #92400e; }
.banner-sem-cnj-sub   { font-size: 12px; color: #b45309; margin-top: 2px; }
.badge-lei             { background: #dbeafe; color: #1e40af; }
.badge-jurisprudencia  { background: #ede9fe; color: #5b21b6; }
.badge-sumula          { background: #fce7f3; color: #9d174d; }
.badge-doutrina        { background: #ffedd5; color: #c2410c; }
.badge-principio       { background: #dcfce7; color: #166534; }
.badge-juntada   { background: #dcfce7; color: #166534; }
.badge-pendente  { background: #fef3c7; color: #92400e; }
.badge-vencido   { background: #fee2e2; color: #991b1b; }
.badge-aberta    { background: #e0f2fe; color: #075985; }
.badge-atribuida { background: #ede9fe; color: #5b21b6; }
.badge-em_execucao { background: #dbeafe; color: #1e40af; }
.badge-bloqueada { background: #fee2e2; color: #991b1b; }
.badge-concluida { background: #dcfce7; color: #166534; }
.badge-cancelada { background: #f1f5f9; color: #475569; }
.badge-devolvida { background: #ffedd5; color: #9a3412; }
.badge-indeferida { background: #fee2e2; color: #991b1b; }
.badge-produzida { background: #dbeafe; color: #1e40af; }

/* ===== BOTOES ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 6px; font-weight: 500; font-size: 13px; transition: all .15s;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: #16a34a; color: white; }
.btn-success:hover { background: #15803d; }
.btn-warning { background: #d97706; color: white; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-ghost { background: transparent; color: var(--primary); padding: 4px 8px; font-size: 12px; }
.btn-ghost:hover { background: #eff6ff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px; border-radius: 6px; background: transparent; }
.btn-icon:hover { background: #f1f5f9; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== FORMULARIOS ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }
label { font-size: 12px; font-weight: 600; color: #334155; text-transform: uppercase; letter-spacing: .04em; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  outline: none; width: 100%; background: white; color: var(--text);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-dialog {
  background: var(--card); border-radius: 12px; width: 100%; max-width: 680px;
  max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-lg { max-width: 860px; }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); line-height: 1; padding: 4px; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--text-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===== TIMELINE DE MOVIMENTACOES ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute; left: -24px; top: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--primary); border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-date { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.timeline-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.timeline-tipo { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text); }
.timeline-user { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== FATOS / MEMORIAIS ===== */
.fato-card {
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px;
  background: white; overflow: hidden;
}
.fato-header {
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border); background: #f8fafc; cursor: pointer;
}
.fato-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary);
  color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fato-titulo { font-weight: 600; font-size: 13px; flex: 1; }
.fato-badges { display: flex; gap: 6px; }
.fato-actions { display: flex; gap: 6px; margin-left: auto; }
.fato-body { padding: 16px; }
.fato-desc { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 12px; }
.fato-meta { display: flex; gap: 16px; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; flex-wrap: wrap; }
.fato-meta span { display: flex; align-items: center; gap: 4px; }
.fato-comment { background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 10px 12px; font-size: 12px; color: #92400e; margin-top: 8px; }

/* PROVAS */
.provas-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.prova-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; font-size: 12px;
}
.prova-icon { font-size: 16px; }
.prova-desc { flex: 1; }
.prova-tipo { color: var(--text-muted); }

/* ESTRATEGICO */
.chance-bar-wrap { margin: 12px 0; }
.chance-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.chance-bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.chance-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width .5s; }
.cenarios-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 16px; }
.cenario-card { border-radius: 8px; padding: 14px; font-size: 12px; line-height: 1.6; }
.cenario-card.otimista { background: #dcfce7; border: 1px solid #bbf7d0; color: #14532d; }
.cenario-card.realista { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e3a8a; }
.cenario-card.pessimista { background: #fee2e2; border: 1px solid #fecaca; color: #7f1d1d; }
.cenario-titulo { font-weight: 700; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* FILTROS */
.filter-bar {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: flex-end;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 140px; }

/* ===== TOAST ===== */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); max-width: 320px;
  transform: translateX(120%); transition: transform .3s; opacity: 0;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { background: #166534; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-info { background: #1e40af; color: white; }

/* ===== CONFIRM DIALOG ===== */
.confirm-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 1100;
}
.confirm-box {
  background: white; border-radius: 10px; padding: 24px; max-width: 380px;
  width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.confirm-title { font-weight: 700; margin-bottom: 8px; }
.confirm-msg { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== MISC ===== */
.section-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-muted { color: var(--text-muted); font-size: 12px; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-8 { margin-top: 8px; }
.mb-16 { margin-bottom: 16px; }
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.info-item span { font-size: 13px; color: var(--text); }
.info-item.span-2 { grid-column: span 2; }
.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swot-card { border-radius: 8px; padding: 14px; }
.swot-card.fortes { background: #dcfce7; border: 1px solid #bbf7d0; }
.swot-card.fracos { background: #fee2e2; border: 1px solid #fecaca; }
.swot-card.riscos { background: #fef3c7; border: 1px solid #fde68a; }
.swot-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.swot-card.fortes .swot-label { color: #14532d; }
.swot-card.fracos .swot-label { color: #7f1d1d; }
.swot-card.riscos .swot-label { color: #78350f; }
.swot-text { font-size: 12px; line-height: 1.6; }
.provisao-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.provisao-value { font-size: 28px; font-weight: 700; color: var(--danger); }
.provisao-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.argumento-card { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; background: white; }
.argumento-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.argumento-num { font-size: 11px; font-weight: 700; color: var(--primary); min-width: 24px; }
.argumento-titulo { font-weight: 600; font-size: 13px; flex: 1; }
.argumento-tese { font-size: 12px; color: var(--text); line-height: 1.6; margin-bottom: 8px; }
.argumento-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.argumento-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fatos-vinculados { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fato-tag { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 10px; padding: 2px 8px; border-radius: 999px; }

/* ESTRATEGIA RECOMENDADA */
.estrategia-badge { padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; display: inline-block; margin-bottom: 16px; }
.estrategia-litigio_agressivo { background: #fee2e2; color: #991b1b; }
.estrategia-acordo { background: #dcfce7; color: #166534; }
.estrategia-recurso { background: #fef3c7; color: #92400e; }
.estrategia-aguardar { background: #f1f5f9; color: #475569; }

/* ADVOGADOS GRID */
.advs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 0; }
.adv-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.adv-card-avatar { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 22px; font-weight: 700; flex-shrink: 0; margin: 0 auto; }
.adv-card-info { text-align: center; }
.adv-card-nome { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.adv-card-perfil { margin-bottom: 4px; }
.adv-card-oab { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.adv-card-email { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.adv-card-actions { display: flex; gap: 8px; justify-content: center; }

/* CONTAS IA */
.conta-card { transition: opacity .2s; }
.conta-inativa { opacity: .55; }
.conta-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.conta-icon { font-size: 28px; }
.conta-body { border-top: 1px solid var(--border); padding-top: 12px; }
.conta-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.conta-spec { background: #f8fafc; border-radius: 6px; padding: 8px 10px; }
.conta-spec-label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 2px; }
.conta-spec-valor { font-size: 13px; font-weight: 600; }
.conta-spec-valor code { background: #e2e8f0; border-radius: 4px; padding: 1px 5px; font-size: 11px; }

/* NAV SECTIONS */
.nav-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 16px 16px 4px; }

/* MEMORIAIS — classes complementares */
.fato-card-header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); background: #f8fafc; flex-wrap: wrap; }
.fato-card-body { padding: 16px; }
.fato-card-provas { padding: 12px 16px; border-top: 1px solid var(--border); background: #fafafa; }
.fato-numero { font-weight: 700; font-size: 12px; color: var(--primary); }
.argumento-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.argumento-card-body { font-size: 13px; line-height: 1.6; }
.callout-revisao { background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 10px 12px; font-size: 12px; color: #92400e; margin-top: 8px; }
.swot-cell { border-radius: 8px; padding: 14px; }
.swot-cell ul { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.8; }
.swot-forcas { background: #dcfce7; border: 1px solid #bbf7d0; }
.swot-fraquezas { background: #fee2e2; border: 1px solid #fecaca; }
.swot-oportunidades { background: #dbeafe; border: 1px solid #bfdbfe; }
.swot-ameacas { background: #fef3c7; border: 1px solid #fde68a; }
.swot-forcas .swot-label { color: #14532d; }
.swot-fraquezas .swot-label { color: #7f1d1d; }
.swot-oportunidades .swot-label { color: #1e3a8a; }
.swot-ameacas .swot-label { color: #78350f; }
.cenario-label { font-weight: 700; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cenario-otimista { background: #dcfce7; border: 1px solid #bbf7d0; color: #14532d; border-radius: 8px; padding: 14px; font-size: 12px; line-height: 1.6; }
.cenario-realista { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 8px; padding: 14px; font-size: 12px; line-height: 1.6; }
.cenario-pessimista { background: #fee2e2; border: 1px solid #fecaca; color: #7f1d1d; border-radius: 8px; padding: 14px; font-size: 12px; line-height: 1.6; }

/* ===== MEMORIAL DE FATOS ===== */
.memorial-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; gap:12px; }
.memorial-titulo { font-size:18px; font-weight:700; color:var(--text); }
.memorial-subtitulo { font-size:12px; color:var(--text-muted); margin-top:3px; }

.fato-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:16px; overflow:hidden; }
.fato-card-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#f8fafc; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:8px; }
.fato-numero { font-size:13px; font-weight:800; color:var(--primary); letter-spacing:.04em; }
.fato-card-body { padding:16px 20px; }
.fato-titulo-fato { font-size:15px; font-weight:700; color:var(--text); margin-bottom:10px; }
.fato-meta { display:flex; gap:20px; margin-bottom:12px; flex-wrap:wrap; }
.fato-meta-item { display:flex; flex-direction:column; gap:2px; }
.fato-meta-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
.fato-descricao-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin-bottom:6px; }
.fato-descricao-texto { font-size:13px; line-height:1.7; color:var(--text); white-space:pre-wrap; }

.fato-card-provas { padding:12px 20px 16px; border-top:1px solid var(--border); background:#fafbfc; }
.fato-provas-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.fato-provas-titulo { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
.provas-lista { display:flex; flex-direction:column; gap:6px; }
.prova-item { display:flex; align-items:center; gap:10px; padding:8px 12px; background:#fff; border:1px solid var(--border); border-radius:6px; flex-wrap:wrap; }
.prova-tipo { display:flex; align-items:center; gap:6px; min-width:110px; }
.prova-icone { font-size:15px; }
.prova-label-tipo { font-size:12px; font-weight:600; color:var(--text); }
.prova-desc { flex:1; font-size:12px; color:var(--text); min-width:150px; }
.prova-acoes { display:flex; align-items:center; gap:6px; margin-left:auto; }

/* ===== DATAJUD ===== */
.timeline-novo { background: #eff6ff; border-left: 3px solid #2563eb; }
.timeline-dot-novo { background: var(--primary) !important; box-shadow: 0 0 0 3px #bfdbfe; }
.tr-vencido { background: #fff5f5; }
.alerta-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  margin-left: auto; padding: 0 5px;
}
.nav-item { position: relative; }

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.span-2, .form-grid.span-3 { grid-column: span 1; }
  .cenarios-grid { grid-template-columns: 1fr; }
  .swot-grid { grid-template-columns: 1fr; }
}

/* ===== CRONÔMETRO (fase 4a) ===== */
.cronometro-widget { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cronometro-widget.hidden { display: none; }
.cronometro-relogio { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--success); }
.cronometro-relogio.pausado { color: var(--warning); }
.cronometro-titulo { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: var(--text); }
.mb-8 { margin-bottom: 8px; }

/* ===== RADAR DE PRAZOS (fase 4.5a) ===== */
.radar-faixas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.radar-faixa { border-radius: var(--radius); padding: 14px 16px; cursor: pointer; border: 2px solid transparent; }
.radar-faixa.ativa { border-color: var(--text); }
.radar-faixa-num { font-size: 30px; font-weight: 700; line-height: 1; }
.radar-faixa-rotulo { font-weight: 600; margin-top: 6px; }
.radar-faixa-desc { font-size: 12px; opacity: .85; }
.faixa-normal { background: #dcfce7; color: #14532d; }
.faixa-atencao { background: #dbeafe; color: #1e3a8a; }
.faixa-amarelo { background: #fef9c3; color: #713f12; }
.faixa-vermelho { background: #fee2e2; color: #7f1d1d; }
.faixa-negro { background: #111827; color: #f9fafb; }
.faixa-vencido { background: #4c0519; color: #ffe4e6; }
.faixa-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.radar-aviso { background: #fef3c7; border: 1px solid #f59e0b; color: #78350f; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.radar-aviso-info { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
