/* ═══════════════════════════════════════════════════════════════
   Simpli Service Console — style.css
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --topbar-h: 52px;
  --topbar-bg: #0c1a2e;

  --bg:      #f3f4f6;
  --surface: #ffffff;
  --border:  #e5e7eb;

  --text:    #111827;
  --muted:   #6b7280;
  --subtle:  #9ca3af;

  --green:   #16a34a;
  --green-l: #dcfce7;
  --red:     #dc2626;
  --red-l:   #fee2e2;
  --blue:    #2563eb;
  --blue-l:  #dbeafe;
  --amber:   #d97706;
  --amber-l: #fef3c7;

  --purple:  #7c3aed;
  --purple-l:#ede9fe;

  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body.app {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--topbar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6aa;
  flex-shrink: 0;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #94a3b8;
}

.meta-item { color: #94a3b8; }
.meta-item strong { color: #e2e8f0; font-weight: 600; }
.meta-sep { color: #334155; }

.meta-link {
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0;
  transition: color .15s;
}
.meta-link:hover { color: #e2e8f0; }

.meta-menu { position: relative; }

.config-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  min-width: 180px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 200;
}
.config-dropdown.open { display: block; }

.cfg-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s;
}
.cfg-item:hover { background: #0f172a; color: #fff; }

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  transition: background .3s;
}
.conn-dot.online  { background: #22c55e; }
.conn-dot.offline { background: #ef4444; }

/* ══════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.section { display: none; padding: 24px; }
.section.active { display: block; }

/* ══════════════════════════════════════════════════════
   PAGE TABS (Por Protocolo / Por Posto)
   ══════════════════════════════════════════════════════ */
.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.page-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .15s, border-color .15s;
}
.page-tab:hover { color: var(--text); }
.page-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

.tab-count {
  background: #e5e7eb;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
}
.page-tab.active .tab-count {
  background: var(--blue-l);
  color: var(--blue);
}

/* ══════════════════════════════════════════════════════
   KPI CARDS
   ══════════════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: box-shadow .15s, transform .12s;
  box-shadow: var(--shadow-sm);
}
.kpi-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.kpi-card-total {
  border: 2px solid var(--border);
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.kpi-green  { color: var(--green); }
.kpi-red    { color: var(--red); }
.kpi-blue   { color: var(--blue); }
.kpi-amber  { color: var(--amber); }
.kpi-dark   { color: var(--text); }
.kpi-purple { color: var(--purple); }

.kpi-card-alunos { border-color: #ddd6fe; }

.kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 3px;
  text-transform: uppercase;
}
.kpi-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   CONFRONTAR BAR
   ══════════════════════════════════════════════════════ */
.confrontar-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.btn-confrontar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-confrontar svg { width: 14px; height: 14px; }
.btn-confrontar:hover { background: #6d28d9; }
.btn-confrontar:disabled { background: #a78bfa; cursor: not-allowed; }
.confrontar-info { font-size: 0.8rem; color: var(--muted); }
.confrontar-info.ok  { color: var(--green); font-weight: 600; }
.confrontar-info.err { color: var(--red);   font-weight: 600; }

/* ══════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════ */
.progress-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 500;
}
.progress-header span:first-child { color: var(--text); font-weight: 600; }

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  display: flex;
  overflow: hidden;
}
.progress-seg {
  height: 100%;
  transition: width .4s ease;
  min-width: 0;
}
.seg-green  { background: var(--green); }
.seg-red    { background: var(--red); }
.seg-blue   { background: var(--blue); }
.seg-amber  { background: var(--amber); }

/* ══════════════════════════════════════════════════════
   TOOLBAR (SEARCH + FILTERS)
   ══════════════════════════════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.filter-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.filter-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.filter-btn:hover { background: #f9fafb; color: var(--text); border-color: #d1d5db; }
.filter-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ══════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-info {
  padding: 10px 18px;
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f9fafb; }

.data-table td {
  padding: 11px 14px;
  vertical-align: middle;
  color: var(--text);
}

.proto-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.88rem;
}
.proto-link:hover { text-decoration: underline; }

.cell-bold  { font-weight: 600; color: var(--text); }
.cell-muted { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.status-bsf-text {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Badges de Fase ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-liberado {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.badge-recebida {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.badge-processando {
  background: var(--blue-l);
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.badge-aguardando {
  background: var(--amber-l);
  color: #92400e;
  border-color: #fde68a;
}

/* ── Step badges (1º E-MAIL, PLANILHA, etc.) ──────────────── */
.step-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.step-ok      { background: #dcfce7; color: #166534; }
.step-pending { background: #fef3c7; color: #92400e; }
.step-warn    { background: #dbeafe; color: #1e40af; }
.step-empty   { color: var(--subtle); background: none; font-size: 0.85rem; }

.step-dt {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
}

.sla-cell {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Tickets provisórios (sem protocolo) ─────────── */
.row-sem-protocolo td { background: #fffbeb; }
.row-sem-protocolo:hover td { background: #fef3c7 !important; }

.proto-temp {
  display: inline-flex;
  flex-direction: column;
  cursor: pointer;
  gap: 2px;
}
.proto-temp-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #fde68a;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.proto-temp-hint {
  font-size: 0.7rem;
  color: #b45309;
  font-style: italic;
}
.proto-temp:hover .proto-temp-badge { background: #fbbf24; }

/* ── Célula CAD. ALUNOS clicável ──────────────────── */
.cad-cell {
  cursor: pointer;
  position: relative;
}
.cad-cell:hover .step-badge { opacity: .8; }
.cad-qty {
  font-size: 0.7rem;
  color: var(--purple);
  font-weight: 700;
  margin-top: 2px;
}
.cad-add-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}

/* ── Login overlay ──────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--topbar-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  width: 360px;
  padding: 40px 36px;
  background: #0f2744;
  border: 1px solid #1e3a5f;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 28px;
  padding-left: 24px;
}
.login-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}
.login-form .form-control {
  background: #0c1a2e;
  border-color: #1e3a5f;
  color: #e2e8f0;
}
.login-form .form-control::placeholder { color: #475569; }
.login-form .form-control:focus { border-color: #3b82f6; }
.login-error {
  display: block;
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 6px;
  min-height: 18px;
}
.login-portal-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: none;
}
.login-portal-link:hover { color: #94a3b8; }

/* ── Modal Alunos ──────────────────────────────── */
.alunos-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.alunos-modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  width: 720px;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.alunos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.alunos-modal-header strong { font-size: 0.95rem; }
.alunos-modal-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}
.alunos-modal-body {
  overflow-y: auto;
  padding: 0;
  flex: 1;
}
.alunos-loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.alunos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.alunos-table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.alunos-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text);
}
.alunos-table tr:last-child td { border-bottom: none; }
.alunos-table tr:hover td { background: #f9fafb; }
.aluno-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.aluno-status-aprovado { background: #dcfce7; color: #166534; }
.aluno-status-outro    { background: #fef3c7; color: #92400e; }
.cpf-masked { font-family: monospace; letter-spacing: 0.05em; color: var(--muted); }

/* ── Modal CAD. ALUNOS ──────────────────────────── */
.cad-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cad-modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: 340px;
  overflow: hidden;
}
.cad-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.cad-modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.cad-modal-close:hover { background: #f3f4f6; color: var(--text); }
.cad-modal-body {
  padding: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
.cad-modal-body label { display: block; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.cad-modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #f9fafb;
}

.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: #e5e7eb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.pill-count.multi { background: var(--blue-l); color: var(--blue); }

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-size: 0.88rem;
}

mark {
  background: #fef08a;
  border-radius: 2px;
  padding: 0 1px;
  color: inherit;
}

/* ══════════════════════════════════════════════════════
   BACK BAR + SECTION TITLE
   ══════════════════════════════════════════════════════ */
.back-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.back-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.back-btn:hover { background: var(--surface); color: var(--text); }
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════
   FORM CARD
   ══════════════════════════════════════════════════════ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
}

.form-title  { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.form-subtitle { font-size: 0.85rem; color: var(--muted); }

.import-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.import-cols {
  margin-bottom: 20px;
  font-size: 0.83rem;
  color: var(--muted);
}
.col-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.col-tag {
  padding: 3px 10px;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
}
.col-tag.req {
  background: var(--blue-l);
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.import-note { font-size: 0.78rem; color: var(--subtle); margin-top: 4px; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 20px;
}
.drop-zone:hover, .drop-zone--over { border-color: var(--blue); background: #f0f6ff; }
.drop-zone--has-file { border-color: var(--green); background: #f0fdf4; }
.drop-icon   { font-size: 2rem; margin-bottom: 8px; }
.drop-text   { font-size: 0.88rem; color: var(--text); }
.drop-sub    { font-size: 0.78rem; color: var(--subtle); margin-top: 4px; }

.preview-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.form-control {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn-primary {
  padding: 9px 20px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-secondary {
  padding: 9px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .15s;
}
.btn-secondary:hover { background: #f9fafb; }

.import-result {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 12px;
}
.import-result--ok  { background: var(--green-l); color: #166534; border: 1px solid #bbf7d0; }
.import-result--err { background: var(--red-l); color: #991b1b; border: 1px solid #fecaca; }

/* Simpli Status Card */
.simpli-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  margin-bottom: 20px;
}
.simpli-status-icon { font-size: 1.2rem; color: var(--green); }
.simpli-status-info { display: flex; flex-direction: column; gap: 2px; }
.simpli-status-total { font-weight: 700; font-size: 0.88rem; color: #166534; }
.simpli-status-date  { font-size: 0.78rem; color: #6b7280; }

/* ══════════════════════════════════════════════════════
   ANALYTICS
   ══════════════════════════════════════════════════════ */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.analytics-block { }
.analytics-block h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.a-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.83rem;
}
.a-label   { width: 140px; flex-shrink: 0; color: var(--muted); }
.a-bar-wrap { flex: 1; height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.a-bar     { height: 100%; border-radius: 4px; transition: width .4s; }
.a-num     { width: 54px; text-align: right; font-weight: 600; white-space: nowrap; }

/* ══════════════════════════════════════════════════════
   TABELA PROTOCOLO — layout compacto para caber no quadro
   ══════════════════════════════════════════════════════ */
#table-protocolo .data-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.79rem;
}

#table-protocolo .data-table thead th {
  padding: 8px 8px;
  font-size: 0.68rem;
  overflow: hidden;
  white-space: nowrap;
}

#table-protocolo .data-table td {
  padding: 8px 8px;
  overflow: hidden;
}

/* larguras das colunas (12 colunas) */
#table-protocolo .data-table th:nth-child(1)  { width: 7%;  } /* PROTOCOLO     */
#table-protocolo .data-table th:nth-child(2)  { width: 14%; } /* CNPJ/CLIENTE  */
#table-protocolo .data-table th:nth-child(3)  { width: 10%; } /* RESPONSÁVEL   */
#table-protocolo .data-table th:nth-child(4)  { width: 8%;  } /* CONTATO       */
#table-protocolo .data-table th:nth-child(5)  { width: 6%;  } /* SOLICITAÇÃO   */
#table-protocolo .data-table th:nth-child(6)  { width: 8%;  } /* FASE          */
#table-protocolo .data-table th:nth-child(7)  { width: 8%;  } /* 1º E-MAIL     */
#table-protocolo .data-table th:nth-child(8)  { width: 8%;  } /* PLANILHA      */
#table-protocolo .data-table th:nth-child(9)  { width: 8%;  } /* 2º E-MAIL     */
#table-protocolo .data-table th:nth-child(10) { width: 9%;  } /* CAD. ALUNOS   */
#table-protocolo .data-table th:nth-child(11) { width: 7%;  } /* SLA FINAL     */
#table-protocolo .data-table th:nth-child(12) { width: 7%;  } /* AÇÕES         */

/* células de texto: corta com reticências */
#table-protocolo .data-table td:nth-child(2),
#table-protocolo .data-table td:nth-child(3),
#table-protocolo .data-table td:nth-child(4) {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* step-badges menores nessa tabela */
#table-protocolo .step-badge { font-size: 0.65rem; padding: 2px 5px; }
#table-protocolo .step-dt    { font-size: 0.65rem; }

/* ══════════════════════════════════════════════════════
   BOTÃO EXPORTAR
   ══════════════════════════════════════════════════════ */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  color: var(--green);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn-export svg { width: 13px; height: 13px; }
.btn-export:hover { background: #f0fdf4; border-color: var(--green); }

/* ══════════════════════════════════════════════════════
   COLUNA AÇÕES NA TABELA
   ══════════════════════════════════════════════════════ */
.th-actions {
  text-align: center !important;
  width: 80px;
}

.actions-cell {
  text-align: center;
  white-space: nowrap;
  padding: 8px 10px !important;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: background .12s, color .12s;
}
.action-btn svg { width: 13px; height: 13px; }
.action-btn:hover { color: var(--text); }

.action-edit:hover  { background: var(--blue-l);  color: var(--blue); }
.action-delete:hover{ background: var(--red-l);   color: var(--red);  }
.action-toggle-off:hover { background: var(--amber-l); color: var(--amber); }
.action-toggle-on:hover  { background: var(--green-l); color: var(--green); }

/* ══════════════════════════════════════════════════════
   BOTÃO AMBER (reenviar e-mail)
   ══════════════════════════════════════════════════════ */
.btn-amber {
  padding: 9px 16px;
  background: #fff8e1;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-amber:hover    { background: #fef3c7; }
.btn-amber:disabled { opacity: .6; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   BOTÃO DANGER
   ══════════════════════════════════════════════════════ */
.btn-danger {
  padding: 9px 20px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: #b91c1c; }

/* ══════════════════════════════════════════════════════
   MODAL EDITAR TICKET (mais largo que cad-modal padrão)
   ══════════════════════════════════════════════════════ */
#editModal .cad-modal,
#createUserModal .cad-modal,
#changePwModal .cad-modal {
  max-width: calc(100vw - 40px);
}
#editModal .cad-modal-body .form-row { margin-bottom: 12px; }
#editModal .cad-modal-body .form-group label { margin-bottom: 4px; }
