@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary:        #1B4332;
  --primary-light:  #2D6A4F;
  --primary-dark:   #0F2A1F;
  --accent:         #C9A84C;
  --accent-light:   #E8C97A;
  --accent-dark:    #A8872E;

  /* Light mode */
  --bg:             #F4F3EF;
  --bg-surface:     #FFFFFF;
  --bg-surface2:    #EEECe7;
  --border:         #E0DDD6;
  --text:           #1A1A18;
  /* Cinza escurecido de #6B6860 para #57544D: o contraste sobre os cards sobe
     de 5,56 para 7,55 (nível AAA) sem encostar no texto normal — a diferença
     entre os dois ainda é de 2,3x, então o secundário continua se lendo como
     secundário. Tons mais escuros passavam a se confundir com o texto comum. */
  --text-muted:     #57544D;
  /* Faltava definição: era usado em .obs-item-author, .pub-item-jornal e no
     texto da tabela de intimações, mas como não existia, esses elementos caíam
     na cor herdada. Fica entre o texto normal e o cinza. */
  --text-secondary: #3A3833;
  --sidebar-bg:     #142F24;
  --sidebar-text:   rgba(255,255,255,0.72);
  --sidebar-active-bg: rgba(201,168,76,0.16);
  --sidebar-hover:  rgba(255,255,255,0.06);
  --shadow:         0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.12);
  --input-bg:       #FFFFFF;
  --input-border:   #D4D0C8;
  --topbar-bg:      #FFFFFF;
  --overlay:        rgba(0,0,0,0.38);
  --badge-ok-bg:    rgba(16,185,129,0.1);
  --badge-ok-text:  #047857;
  --badge-off-bg:   rgba(185,28,28,0.08);
  --badge-off-text: #B91C1C;
}

[data-theme="dark"] {
  --bg:             #111111;
  --bg-surface:     #1A1A1A;
  --bg-surface2:    #242424;
  --border:         #303030;
  --text:           #EEEEEE;
  /* No tema escuro o equivalente a "escurecer" é CLAREAR: aqui o cinza fica
     sobre fundo preto, então baixar o tom reduziria a leitura em vez de
     melhorá-la. De #888888 para #9E9E9E o contraste vai de 4,91 para 6,50 —
     mesmo ganho de legibilidade pedido no tema claro. */
  --text-muted:     #9E9E9E;
  --text-secondary: #C6C6C6;
  --sidebar-bg:     #0D0D0D;
  --sidebar-text:   rgba(255,255,255,0.65);
  --sidebar-active-bg: rgba(201,168,76,0.14);
  --sidebar-hover:  rgba(255,255,255,0.05);
  --shadow:         0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.5);
  --input-bg:       #1E1E1E;
  --input-border:   #383838;
  --topbar-bg:      #1A1A1A;
  --overlay:        rgba(0,0,0,0.65);
  --badge-ok-bg:    rgba(16,185,129,0.15);
  --badge-ok-text:  #34D399;
  --badge-off-bg:   rgba(239,68,68,0.15);
  --badge-off-text: #F87171;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Base de todo o sistema: praticamente todos os tamanhos são em rem, então
   mexer aqui escala a interface inteira de forma proporcional. */
html { font-size: 18.5px; }
body {
  font-family: 'Urbanist', sans-serif;
  /* Texto corrido em 500 no lugar do 400 padrão: o Urbanist é uma fonte de
     traço fino, e em 400 a leitura ficava lavada. Títulos e rótulos têm peso
     próprio (600/700/800), então o contraste da hierarquia se mantém. */
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 256px;
  min-width: 256px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(.4,0,.2,1), min-width 0.28s cubic-bezier(.4,0,.2,1);
  position: relative;
  z-index: 100;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar.collapsed { width: 64px; min-width: 64px; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: 68px;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Urbanist', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
}
.sidebar-logo-text {
  overflow: hidden; white-space: nowrap;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-logo-text { opacity: 0; }
.logo-firm  { display: block; font-size: 0.65rem; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.logo-name  { display: block; font-size: 0.88rem; font-weight: 700; color: #fff; line-height: 1.25; }

/* Nav */
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section {
  padding: 14px 16px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  transition: opacity 0.18s;
}
.sidebar.collapsed .nav-section { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
  position: relative;
  white-space: nowrap;
  margin: 1px 8px;
  border-radius: 8px;
}
.nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.92); }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: inherit;
}
.nav-icon svg { display: block; color: inherit; }
.nav-label {
  transition: opacity 0.18s;
  overflow: hidden;
  line-height: 1;
}
.sidebar.collapsed .nav-label { opacity: 0; }

/* Toggle */
.sidebar-footer {
  padding: 10px 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.toggle-btn {
  width: 100%;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex; align-items: center;
  gap: 8px;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
  overflow: hidden;
}
.toggle-btn:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.toggle-icon { flex-shrink: 0; display: flex; align-items: center; transition: transform 0.28s; }
.sidebar.collapsed .toggle-icon { transform: rotate(180deg); }
.toggle-label { transition: opacity 0.18s; }
.sidebar.collapsed .toggle-label { opacity: 0; }

/* ===== MAIN AREA ===== */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* TOPBAR */
.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.topbar-title { font-size: 1.05rem; font-weight: 700; flex: 1; letter-spacing: -0.01em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.14s;
}
.btn-icon:hover { background: var(--bg-surface2); border-color: var(--primary-light); color: var(--text); }
.btn-icon svg { display: block; }

/* ===== ALERTA DE INTIMAÇÕES (topbar) ===== */
.alert-menu { position: relative; }
.alert-menu .btn-icon { position: relative; }
.alert-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-surface);
}
.alert-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 300px;
  max-width: 88vw;
  z-index: 500;
  overflow: hidden;
}
.alert-dropdown.open { display: block; }
.alert-drop-header {
  padding: 12px 14px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.alert-drop-body { max-height: 260px; overflow-y: auto; }
.alert-drop-empty { padding: 18px 14px; text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.alert-drop-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border: none; background: none;
  text-align: left; cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.alert-drop-item:hover { background: var(--bg-surface2); }
.alert-drop-item + .alert-drop-item { border-top: 1px solid var(--border); }
.alert-drop-item-num { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.alert-drop-item-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.alert-drop-footer { border-top: 1px solid var(--border); }
.alert-drop-footer .user-drop-item { justify-content: center; font-weight: 600; color: var(--primary); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  letter-spacing: 0.02em;
}

/* CONTENT */
.content { flex: 1; overflow-y: auto; padding: 22px 24px; }
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* PAGE VIEWS */
.page { display: none; }
.page.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
/* Acompanha o body (500); em 400 ficaria mais leve que o texto comum. */
.page-header .sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.87rem;
  font-weight: 600;
  transition: all 0.14s;
  line-height: 1;
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-light); }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover   { background: var(--accent-dark); }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover  { background: var(--bg-surface2); border-color: var(--primary-light); }
.btn-danger   { background: #B91C1C; color: #fff; }
.btn-danger:hover   { background: #991B1B; }
.btn-ghost    { background: transparent; border: none; color: var(--text-muted); padding: 6px 8px; }
.btn-ghost:hover    { background: var(--bg-surface2); color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 0.8rem; }
.btn-xs { padding: 4px 9px; font-size: 0.76rem; }

/* ===== CARD ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ===== DASHBOARD ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(27,67,50,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  color: var(--primary);
}
[data-theme="dark"] .stat-icon-wrap { background: rgba(201,168,76,0.12); color: var(--accent-light); }
.stat-icon-wrap svg { display: block; }
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

/* ===== FILTERS ===== */
.filters-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.filter-search {
  display: flex; align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 12px; gap: 8px;
  flex: 1; min-width: 200px;
}
.filter-search input {
  background: none; border: none; outline: none;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.88rem; color: var(--text); width: 100%;
}
.filter-search input::placeholder { color: var(--text-muted); }
.filter-icon { color: var(--text-muted); display: flex; align-items: center; }
.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 28px 7px 11px;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.85rem; color: var(--text); outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236B6860' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ===== TABLE ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  background: var(--bg-surface2);
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s;
}
thead th.sortable:hover { color: var(--text); }
.sort-ind {
  display: inline-flex; align-items: center;
  margin-left: 5px;
  color: var(--border);
  vertical-align: middle;
  transition: color 0.12s;
}
thead th.sort-active .sort-ind { color: var(--accent); }
tbody tr {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-surface2); }
tbody td { padding: 11px 14px; vertical-align: middle; }

/* Client cell */
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-surface2);
  border: 1.5px solid var(--border);
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
  color: var(--text-muted);
}
.client-av img { width: 100%; height: 100%; object-fit: cover; }
.client-name { font-weight: 600; font-size: 0.87rem; }
.client-doc  { font-size: 0.76rem; color: var(--text-muted); margin-top: 1px; }
.td-muted { color: var(--text-muted); font-size: 0.84rem; }

/* Badge */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700;
}
.badge-ok   { background: var(--badge-ok-bg);   color: var(--badge-ok-text); }
.badge-off  { background: var(--badge-off-bg);  color: var(--badge-off-text); }
.badge-gray { background: var(--bg-surface2);   color: var(--text-muted); }
.badge-warn { background: rgba(201,168,76,0.15); color: var(--accent-dark); }
.badge-info { background: rgba(59,130,246,0.12); color: #2563EB; }

[data-theme="dark"] .badge-warn { color: var(--accent-light); }
[data-theme="dark"] .badge-info { color: #60A5FA; }

/* Action buttons */
.row-actions { display: flex; gap: 4px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted);
}
.pag-btns { display: flex; gap: 3px; }
.pag-btn {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 4px 9px;
  cursor: pointer;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  transition: all 0.12s;
}
.pag-btn:hover, .pag-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 500;
  align-items: flex-start; justify-content: center;
  padding: 28px 10%;
  overflow: hidden;           /* overlay NÃO rola — só o corpo do modal rola */
  backdrop-filter: blur(3px);
  box-sizing: border-box;
}
.modal-overlay.open { display: flex; }
.modal, .modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 56px); /* 28px topo + 28px base */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes skel-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skel-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-surface2) 25%, var(--border) 50%, var(--bg-surface2) 75%);
  background-size: 800px 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
.modal-header {
  padding: 18px 26px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
/* Os títulos de popup usam <h2 class="modal-title"> e até aqui não tinham
   regra nenhuma — ficavam no tamanho padrão do navegador para h2 (1.5em),
   o que era frágil (qualquer reset mudaria o layout). Agora é explícito e
   um pouco maior que a proporção do resto, como pedido. */
.modal-header .modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 20px; line-height: 1;
  transition: background 0.12s;
}
.modal-close:hover { background: var(--bg-surface2); color: var(--text); }
.modal-body {
  padding: 24px 26px;
  overflow-y: auto;           /* só o corpo rola */
  flex: 1;
  min-height: 0;              /* necessário para flex + overflow funcionar */
}
.modal-footer {
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  background: var(--bg-surface);
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}

/* Form section headers */
.form-section {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 14px;
}
.form-section:first-child { margin-top: 0; }
/* Subtítulo de seção dentro dos popups ("DADOS DO CLIENTE", "VALORES"…).
   Ganha um degrau a mais que o escalonamento geral. */
.form-section-label {
  font-size: 0.85rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--accent); white-space: nowrap;
}
.form-section-line {
  flex: 1; height: 1px; background: var(--border);
}

/* ===== FORM ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.f-full { grid-column: 1 / -1; }
.f-group { display: flex; flex-direction: column; gap: 5px; }
.f-group label {
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.f-group input, .f-group select, .f-group textarea {
  background: var(--bg-surface2);
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 9px 11px;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.9rem; color: var(--text);
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
  width: 100%;
}
.f-group input:focus, .f-group select:focus, .f-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.1);
}
[data-theme="dark"] .f-group input:focus,
[data-theme="dark"] .f-group select:focus,
[data-theme="dark"] .f-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.f-group input[readonly] { background: var(--bg-surface); color: var(--text-muted); cursor: default; border-color: var(--border); }
.f-group textarea { resize: vertical; min-height: 76px; }
.f-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236B6860' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.f-section { grid-column: 1/-1; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding-top: 6px; }
.f-divider { grid-column: 1/-1; border: none; border-top: 1px solid var(--border); }

/* CEP row */
.cep-row { display: flex; gap: 8px; align-items: center; }
.cep-row input { flex: 1; }
.cep-row .f-group { flex: 1; }

/* Phone list in client form */
.phone-list { display: flex; flex-direction: column; gap: 6px; }
.phone-row { display: flex; gap: 6px; align-items: center; }
.phone-row input { flex: 1; }
.btn-rm-phone {
  flex-shrink: 0; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; color: var(--text-muted); transition: border-color .15s, color .15s;
}
.btn-rm-phone:hover { border-color: #ef4444; color: #ef4444; }
.btn-add-phone {
  margin-top: 5px; width: 100%; background: none;
  border: 1px dashed var(--border); border-radius: 6px;
  padding: 5px 12px; font-size: 13px; color: var(--primary); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-add-phone:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }

/* Photo upload */
.photo-row { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 4px; }
.photo-wrap { flex-shrink: 0; }
.photo-circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--bg-surface2);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.14s;
}
.photo-circle:hover { border-color: var(--accent); }
.photo-circle img { width: 100%; height: 100%; object-fit: cover; display: none; }
.photo-circle img.loaded { display: block; }
.photo-placeholder { display: flex; color: var(--text-muted); }
.photo-placeholder svg { display: block; }
.photo-info p { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }

/* (tabs removed — modal now uses single scrollable layout) */

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 50px 20px; color: var(--text-muted);
}
.empty-icon { margin: 0 auto 14px; width: 52px; height: 52px; opacity: 0.35; }
.empty-icon svg { display: block; width: 52px; height: 52px; }
.empty-state h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.empty-state p { font-size: 0.84rem; }

/* ===== TOAST ===== */
.toast-wrap {
  position: fixed; bottom: 22px; right: 22px; z-index: 1000;
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.87rem; font-weight: 500;
  animation: tIn 0.22s ease, tOut 0.28s ease 2.5s forwards;
  pointer-events: all; min-width: 210px;
}
.toast-ok  { border-left: 3px solid #059669; }
.toast-err { border-left: 3px solid #B91C1C; }
.toast-inf { border-left: 3px solid var(--accent); }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.toast-ok  .toast-dot { background: #059669; }
.toast-err .toast-dot { background: #B91C1C; }
.toast-inf .toast-dot { background: var(--accent); }
@keyframes tIn  { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:translateX(0); } }
@keyframes tOut { to   { opacity:0; transform:translateX(14px); } }

/* ===== CONFIRM ===== */
.confirm-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--overlay); z-index: 600;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.confirm-overlay.open { display: flex; }
.confirm-box {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 26px;
  max-width: 360px; width: 92%;
  box-shadow: var(--shadow-lg); text-align: center;
  animation: slideUp 0.18s ease;
}
.confirm-icon { margin: 0 auto 12px; color: var(--text-muted); }
.confirm-icon svg { display: block; }
.confirm-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 7px; }
.confirm-box p  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }
.confirm-btns   { display: flex; gap: 8px; justify-content: center; }

/* ===== COMING SOON ===== */
.coming-soon { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.cs-icon { margin: 0 auto 18px; color: var(--text-muted); opacity: 0.3; }
.cs-icon svg { display: block; width: 56px; height: 56px; }
.coming-soon h2 { font-size: 1.35rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.coming-soon p  { max-width: 360px; margin: 0 auto 20px; font-size: 0.88rem; line-height: 1.6; }

/* ===== MOBILE ===== */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 99;
}
.sidebar-backdrop.open { display: block; }
@media (max-width: 768px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
  .content { padding: 14px; }
  .form-grid, .form-grid.g3 { grid-template-columns: 1fr; }
  .f-full { grid-column: 1; }
  .modal-overlay { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 0 14px; }
}

/* ===== DASHBOARD CHARTS ===== */
/* Uma coluna desde que o gráfico de status dos processos foi removido — com
   1fr 1fr, o card restante ficava com metade da linha vazia ao lado. */
.dash-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.dash-chart-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
@media (max-width: 680px) { .dash-charts { grid-template-columns: 1fr; } }

/* ===== BUBBLE IMPORT ===== */
.bbl-step-list { display: flex; flex-direction: column; gap: 10px; }
.bbl-step { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; transition: border-color 0.15s; }
.bbl-step-header { display: flex; align-items: center; gap: 14px; }
.bbl-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.bbl-step-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.bbl-step-desc { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }
.bbl-btn { margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.bbl-step-prog { font-size: 0.79rem; color: var(--text-muted); margin-top: 10px; min-height: 18px; padding-left: 42px; }
.bbl-step-prog.ok { color: var(--primary); font-weight: 600; }
.bbl-step-prog.err { color: var(--danger); }

/* ===== OBSERVATIONS ===== */
.obs-list { margin-bottom: 12px; }

.obs-item {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
}
.obs-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.obs-item-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.obs-item-meta { flex: 1; line-height: 1.3; }
.obs-item-author { font-weight: 600; color: var(--text-secondary); }
.obs-item-date { display: block; font-size: 0.72rem; margin-top: 1px; }
.obs-item-del {
  background: none; border: none;
  color: var(--badge-off-text);
  cursor: pointer; padding: 4px;
  border-radius: 4px; opacity: 0.5;
  display: flex; align-items: center;
}
.obs-item-del:hover { opacity: 1; background: var(--bg-surface3); }
.obs-item-body {
  font-size: 0.87rem; line-height: 1.65;
  color: var(--text-primary);
  word-break: break-word;
  white-space: pre-wrap;
}
.obs-item-body * { max-width: 100%; }

.obs-empty {
  text-align: center; padding: 20px;
  color: var(--text-muted); font-size: 0.83rem;
  font-style: italic;
}

/* Editor */
.obs-editor-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.obs-editor-label {
  padding: 8px 14px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
}
.obs-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 5px 10px;
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.obs-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 7px; cursor: pointer;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  min-width: 26px; min-height: 26px;
}
.obs-btn:hover { background: var(--bg-surface3); border-color: var(--border); }
.obs-btn.obs-txt { font-size: 0.78rem; font-weight: 600; }
.obs-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; flex-shrink: 0; }
/* ── Paleta de cores do editor de observações ────────────────────────────── */
.obs-color-menu { position: relative; display: inline-flex; }
/* Faixa sob o ícone mostrando a cor escolhida por último */
.obs-color-atual {
  display: block; width: 13px; height: 3px; border-radius: 2px;
  background: #202124; margin-left: 3px; align-self: flex-end;
}
.obs-color-menu .obs-btn { gap: 0; flex-direction: column; padding: 3px 6px 2px; }

.obs-color-pop {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 2200;
  width: max-content;
}
.obs-color-pop.open { display: block; }
.obs-color-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px;
}
.obs-swatch {
  width: 24px; height: 24px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 5px; cursor: pointer; padding: 0;
  transition: transform .1s, box-shadow .1s;
}
.obs-swatch:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px var(--primary);
}
.obs-color-outra {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-muted); cursor: pointer;
}
.obs-color-outra input[type="color"] {
  width: 24px; height: 24px; border: none;
  border-radius: 5px; cursor: pointer; padding: 0; background: none;
}
.obs-marca-limpar {
  width: 100%; margin-top: 8px; padding-top: 8px;
  border: none; border-top: 1px solid var(--border);
  background: none; cursor: pointer;
  font-family: inherit; font-size: 0.75rem; color: var(--text-muted);
  text-align: center;
}
.obs-marca-limpar:hover { color: var(--text); }
.obs-input {
  min-height: 110px; padding: 12px 14px;
  outline: none; font-family: inherit;
  font-size: 0.88rem; line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-surface);
}
.obs-input:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted); pointer-events: none;
  display: block;
}
.obs-editor-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface2);
  border-top: 1px solid var(--border);
}
.obs-info { flex: 1; font-size: 0.74rem; color: var(--text-muted); font-style: italic; }

/* ===== PUBLICAÇÕES (somente leitura) ===== */
.pub-list { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.pub-empty { font-size:0.83rem; color:var(--text-muted); font-style:italic; text-align:center; padding:18px 0; }
.pub-item { border:1px solid var(--border); border-radius:10px; overflow:hidden; background:var(--bg-surface); }
.pub-item-header { display:flex; align-items:center; gap:8px; padding:8px 12px; background:var(--bg-surface2); border-bottom:1px solid var(--border); flex-wrap:wrap; }
.pub-item-icon { color:var(--text-muted); flex-shrink:0; }
.pub-item-jornal { font-size:0.78rem; font-weight:600; color:var(--text-secondary); }
.pub-item-sep { color:var(--border); }
.pub-item-num { font-size:0.75rem; color:var(--text-muted); }
.pub-item-date { margin-left:auto; font-size:0.75rem; color:var(--text-muted); white-space:nowrap; }
.pub-item-rodape { padding:5px 12px; font-size:0.72rem; color:var(--text-muted); background:var(--bg-surface2); border-bottom:1px solid var(--border); }
.pub-item-body { padding:10px 12px; font-size:0.82rem; color:var(--text-primary); white-space:pre-wrap; word-break:break-word; line-height:1.55; max-height:260px; overflow-y:auto; }
.anexo-abrir-btn { margin-left:auto; font-size:0.72rem; font-weight:600; color:var(--primary); background:none; border:1px solid var(--primary); border-radius:5px; padding:2px 8px; cursor:pointer; white-space:nowrap; transition:background .15s,color .15s; }
.anexo-abrir-btn:hover:not(:disabled) { background:var(--primary); color:#fff; }
.anexo-abrir-btn:disabled { opacity:0.5; cursor:default; }

/* ===== SUBNUM CHIPS ===== */
.subnum-wrap { border:1px solid var(--border); border-radius:8px; padding:6px 8px; background:var(--bg-surface); }
.subnum-chips { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:5px; }
.subnum-chips:empty { margin-bottom:0; }
.subnum-chip { display:inline-flex; align-items:center; gap:5px; background:var(--primary); color:#fff; font-size:0.75rem; font-family:monospace; padding:3px 10px 3px 10px; border-radius:20px; }
.subnum-chip-del { background:none; border:none; color:#fff; cursor:pointer; padding:0; line-height:1; font-size:15px; opacity:0.75; display:flex; align-items:center; }
.subnum-chip-del:hover { opacity:1; }
.subnum-input-row { display:flex; gap:6px; align-items:center; }
.subnum-input-row input { flex:1; border:none; outline:none; background:transparent; font-size:0.83rem; color:var(--text-primary); padding:2px 4px; min-width:0; }

/* ===== USUÁRIOS ===== */
.user-tipo-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:6px; }
.user-tipo-opt { cursor:pointer; }
.user-tipo-opt input[type=radio] { display:none; }
.user-tipo-card { display:flex; flex-direction:column; align-items:center; gap:4px; padding:14px 10px; border:2px solid var(--border); border-radius:10px; text-align:center; transition:border-color .15s, background .15s; }
.user-tipo-card small { font-size:0.7rem; color:var(--text-muted); line-height:1.3; }
.user-tipo-opt input:checked + .user-tipo-card { border-color:var(--primary); background:color-mix(in srgb, var(--primary) 8%, transparent); }
.perm-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:8px; }
.perm-item { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; cursor:pointer; font-size:0.85rem; }
.perm-item input[type=checkbox] { accent-color:var(--primary); width:15px; height:15px; }

.badge-superadmin { background:color-mix(in srgb,#7c3aed 15%,transparent); color:#7c3aed; border:1px solid #7c3aed; padding:2px 8px; border-radius:20px; font-size:0.72rem; font-weight:600; }
.badge-admin { background:color-mix(in srgb,var(--primary) 12%,transparent); color:var(--primary); border:1px solid var(--primary); padding:2px 8px; border-radius:20px; font-size:0.72rem; font-weight:600; }
.badge-usuario { background:color-mix(in srgb,#0891b2 12%,transparent); color:#0891b2; border:1px solid #0891b2; padding:2px 8px; border-radius:20px; font-size:0.72rem; font-weight:600; }
.badge-ativo { color:#16a34a; }
.badge-inativo { color:#dc2626; }

/* ===== RASTREABILIDADE ===== */
.log-acao { display:inline-block; padding:2px 8px; border-radius:20px; font-size:0.72rem; font-weight:600; }
.log-cadastrou { background:color-mix(in srgb,#16a34a 12%,transparent); color:#16a34a; }
.log-alterou   { background:color-mix(in srgb,#d97706 12%,transparent); color:#d97706; }
.log-excluiu   { background:color-mix(in srgb,#dc2626 12%,transparent); color:#dc2626; }
.log-importou  { background:color-mix(in srgb,#0891b2 12%,transparent); color:#0891b2; }
.log-acessou   { background:color-mix(in srgb,var(--text-muted) 12%,transparent); color:var(--text-muted); }

/* ===== LOGIN SCREEN ===== */
#loginScreen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
/* Spinner: shown while Firebase resolves auth state */
#loginScreen .login-spinner-wrap { display: flex; flex-direction:column; align-items:center; gap:20px; }
#loginScreen .login-card          { display: none; }
/* Form mode: shown when user is NOT authenticated */
#loginScreen.login-form-mode .login-spinner-wrap { display: none; }
#loginScreen.login-form-mode .login-card          { display: flex; }
/* Busy: dim during sign-in attempts */
#loginScreen.auth-busy .login-card { opacity:0.6; pointer-events:none; }

/* Spinner elements */
.login-spinner-logo {
  width: 48px; height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.login-spinner-ring {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: nsb-spin 0.75s linear infinite;
}
@keyframes nsb-spin { to { transform: rotate(360deg); } }

/* Login card */
.login-card {
  flex-direction: column;
  width: 100%; max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.login-logo-mark {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.04em; flex-shrink: 0;
}
.login-logo-text strong { display:block; font-size:0.95rem; font-weight:700; color:var(--text); }
.login-logo-text span   { font-size:0.75rem; color:var(--text-muted); }
.login-heading { font-size:1.25rem; font-weight:700; color:var(--text); margin-bottom:4px; }
.login-sub     { font-size:0.82rem; color:var(--text-muted); margin-bottom:24px; }

.login-error {
  min-height: 18px;
  font-size: 0.8rem;
  color: #dc2626;
  margin: 8px 0 4px;
}
.login-submit {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.login-submit:hover { opacity: 0.9; }

/* ===== INTIMAÇÕES ===== */
.intim-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.intim-value {
  font-size: 0.88rem;
  font-weight: 500;
}
.intim-texto {
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
}
#intimTbody tr { cursor: pointer; }
#intimTbody tr:hover td { background: var(--bg-surface2); }

.login-forgot {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.login-forgot:hover { color: var(--primary); }

/* ===== TOPBAR USER MENU ===== */
.user-menu {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.user-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  flex-shrink: 0;
}
.user-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 500;
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-drop-info {
  padding: 12px 14px 10px;
}
.user-drop-name  { display:block; font-size:0.85rem; font-weight:600; color:var(--text); }
.user-drop-email { display:block; font-size:0.75rem; color:var(--text-muted); margin-top:2px; }
.user-drop-divider { border-top: 1px solid var(--border); margin: 0; }
.user-drop-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: none; border: none;
  color: var(--text); font-family: inherit; font-size: 0.85rem;
  cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.user-drop-item:hover { background: var(--bg-surface2); }

/* ── Combobox de cliente (busca por digitação) ── */
.combo-wrap { position: relative; }
.combo-wrap input[type="text"] {
  background: var(--bg-surface2);
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 9px 32px 9px 11px;
  font-family: 'Urbanist', sans-serif;
  font-size: 0.9rem; color: var(--text);
  outline: none; width: 100%;
  transition: border-color 0.14s, box-shadow 0.14s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236B6860' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  box-sizing: border-box;
}
.combo-wrap input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.1);
}
[data-theme="dark"] .combo-wrap input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0; right: 0;
  background: var(--bg-surface2);
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  max-height: 230px;
  overflow-y: auto;
  list-style: none;
  margin: 0; padding: 4px 0;
  z-index: 2000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
.combo-list.open { display: block; }
.combo-list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.1s;
}
.combo-list li:hover,
.combo-list li.combo-active { background: var(--bg-surface); }
.combo-list li.combo-empty { color: var(--text-muted); cursor: default; font-style: italic; }
