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

/* ==========================================================================
   SiSCAM CAM / SEDUC-RO — MODELO 3: GRAPHITE MINIMAL (DESIGN SYSTEM v1.0)
   100% Visual Modernization — Dark Matte (#10141D, #151B26, #1B2230, #222B3B)
   ========================================================================== */
:root, [data-theme="graphite"] {
  color-scheme: dark;

  /* Template Base Tokens */
  --bg:      #10141D;
  --sidebar: #151B26;
  --surface: #1B2230;
  --raised:  #222B3B;
  --hover:   #293346;
  --line:    #30394A;
  --text:    #F2F5FA;
  --dim:     #B6C1D2;
  --muted:   #91A0B5;
  --blue:    #7795FF;
  --green:   #57D4AA;
  --amber:   #F5C36A;
  --red:     #FF7F8C;
  --radius:  14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* SiSCAM CAM | Graphite Design System Tokens */
  --gbz-bg:             #10141D;
  --gbz-sidebar:        #151B26;
  --gbz-surface:        #1B2230;
  --gbz-surface-raised: #222B3B;
  --gbz-surface-hover:  #293346;
  --gbz-input:          #151D29;
  --gbz-border:         #30394A;
  --gbz-border-strong:  #455169;
  --gbz-text:           #F2F5FA;
  --gbz-text-secondary: #B6C1D2;
  --gbz-text-muted:     #91A0B5;
  --gbz-primary:        #7795FF;
  --gbz-primary-hover:  #92A8FF;
  --gbz-primary-soft:   #293857;
  --gbz-success:        #57D4AA;
  --gbz-success-soft:   #173C37;
  --gbz-warning:        #F5C36A;
  --gbz-warning-soft:   #433521;
  --gbz-danger:         #FF7F8C;
  --gbz-danger-soft:    #47272F;
  --gbz-info:           #7CC7F9;
  --gbz-info-soft:      #203747;
  --gbz-radius-sm:      8px;
  --gbz-radius-md:      12px;
  --gbz-radius-lg:      16px;
  --gbz-shadow:         0 8px 28px rgba(0,0,0,.14);
  --gbz-space-1:        4px;
  --gbz-space-2:        8px;
  --gbz-space-3:        12px;
  --gbz-space-4:        16px;
  --gbz-space-5:        20px;
  --gbz-space-6:        24px;
  --gbz-space-8:        32px;
  --gbz-sidebar-width:  236px;
  --gbz-header-height:  64px;
  --gbz-font:           Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Mapeamento de compatibilidade total com os seletores existentes */
  --bg-primary:    #10141D;
  --bg-secondary:  #151B26;
  --bg-card:       #1B2230;
  --bg-card-hover: #293346;
  --border:        #30394A;
  --border-focus:  #7795FF;

  --blue:     #7795FF;
  --blue-dk:  #5372e7;
  --green:    #57D4AA;
  --yellow:   #F5C36A;
  --red:      #FF7F8C;
  --purple:   #92A8FF;
  --cyan:     #7CC7F9;
  --orange:   #F5C36A;

  --text-primary:   #F2F5FA;
  --text-secondary: #B6C1D2;
  --text-muted:     #91A0B5;

  --sidebar-w: 236px;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 28px rgba(0,0,0,0.18);
  --transition: all 0.2s ease;
}

/* Neutralização de tema alternativo: Exclusividade Graphite Minimal */
body.tema-claro {
  --bg-primary:    #10141D !important;
  --bg-secondary:  #151B26 !important;
  --bg-card:       #1B2230 !important;
  --bg-card-hover: #293346 !important;
  --border:        #30394A !important;
  --border-focus:  #7795FF !important;
  background: #10141D !important;
  color: #F2F5FA !important;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.sidebar-logo h1 {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-logo p {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 8px 4px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: #60a5fa;
  border-left: 3px solid #3b82f6;
  font-weight: 600;
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.1);
}

.nav-item .nav-icon { 
  font-size: 16px; 
  min-width: 22px; 
  text-align: center; 
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-item:hover .nav-icon,
.nav-item:focus-visible .nav-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 5px currentColor);
}

/* SUBMENUS & HIERARQUIA INSTITUCIONAL */
.sub-cam-container {
  background: rgba(15, 23, 42, 0.5);
  border-left: 2px solid rgba(59, 130, 246, 0.35);
  border-radius: 0 8px 8px 0;
  margin: 4px 0 6px 10px;
  padding: 4px 0 6px 4px;
}

/* Cabeçalhos de Gerência (GDSM, GMAC, PROALFA) */
.nav-gerencia-header {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  padding: 8px 12px !important;
  margin: 3px 0 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  border: 1px solid transparent !important;
}
.nav-gerencia-header:hover {
  transform: translateX(2px);
}
.nav-gerencia-header.open {
  background: rgba(255, 255, 255, 0.04);
}

.header-gdsm { color: #38bdf8 !important; }
.header-gdsm:hover, .header-gdsm:focus-visible {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  color: #7dd3fc !important;
}

.header-gmac { color: #34d399 !important; }
.header-gmac:hover, .header-gmac:focus-visible {
  background: rgba(52, 211, 153, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: #6ee7b7 !important;
}

.header-proalfa { color: #c084fc !important; }
.header-proalfa:hover, .header-proalfa:focus-visible {
  background: rgba(192, 132, 252, 0.12) !important;
  border-color: rgba(192, 132, 252, 0.3) !important;
  color: #e9d5ff !important;
}

/* Badges das Gerências */
.menu-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.badge-gdsm {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.badge-gmac {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
}
.badge-proalfa {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.4);
  color: #c084fc;
}
.badge-diarias {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

/* Sub-níveis de Formulários */
.sub-level-gdsm {
  border-left: 2px solid rgba(56, 189, 248, 0.35) !important;
  margin-left: 14px !important;
  padding-left: 8px !important;
  margin-bottom: 4px;
}
.sub-level-gmac {
  border-left: 2px solid rgba(52, 211, 153, 0.35) !important;
  margin-left: 14px !important;
  padding-left: 8px !important;
  margin-bottom: 4px;
}
.sub-level-proalfa {
  border-left: 2px solid rgba(192, 132, 252, 0.35) !important;
  margin-left: 14px !important;
  padding-left: 8px !important;
  margin-bottom: 4px;
}

/* Formulários / Itens (Nível 3) */
.nav-form-item {
  font-size: 12px !important;
  padding: 7px 10px !important;
  margin: 2px 0 !important;
  border-radius: 5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #cbd5e1 !important;
  transition: all 0.2s ease !important;
  text-decoration: none;
  border-left: 2px solid transparent !important;
}
.nav-form-item svg {
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.nav-form-item:hover, .nav-form-item:focus-visible {
  color: #ffffff !important;
  transform: translateX(3px) !important;
}
.nav-form-item:hover svg, .nav-form-item:focus-visible svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 5px currentColor);
}

.sub-level-gdsm .nav-form-item:hover,
.sub-level-gdsm .nav-form-item:focus-visible,
.sub-level-gdsm .nav-form-item.active {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #e0f2fe !important;
  border-left-color: #38bdf8 !important;
}

.sub-level-gmac .nav-form-item:hover,
.sub-level-gmac .nav-form-item:focus-visible,
.sub-level-gmac .nav-form-item.active {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #d1fae5 !important;
  border-left-color: #34d399 !important;
}

.sub-level-proalfa .nav-form-item:hover,
.sub-level-proalfa .nav-form-item:focus-visible,
.sub-level-proalfa .nav-form-item.active {
  background: rgba(192, 132, 252, 0.14) !important;
  color: #fae8ff !important;
  border-left-color: #c084fc !important;
}

.item-diarias:hover,
.item-diarias:focus-visible,
.item-diarias.active {
  background: rgba(251, 191, 36, 0.14) !important;
  color: #fef3c7 !important;
  border-left: 2px solid #fbbf24 !important;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* CONTEÚDO PRINCIPAL */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
.topbar {
  background: var(--gbz-sidebar, #151B26);
  border-bottom: 1px solid var(--border);
  min-height: var(--gbz-header-height, 64px);
  height: var(--gbz-header-height, 64px);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.topbar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.topbar-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

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

/* PAGE CONTAINER */
.page {
  padding: 28px;
  display: none;
}
.page.active { display: block; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.card:hover { border-color: rgba(255,255,255,0.12); }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
  width: 100%;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.blue::before   { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--green), #34d399); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--red), #f87171); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #c084fc); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* SUPER CARD FINANCEIRO */
.super-card {
  padding: 15px 20px !important;
}
@media (min-width: 1200px) {
  .super-card {
    grid-column: span 2;
  }
}

.super-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 4px;
}
.super-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.super-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.super-value {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  font-family: monospace;
}
.super-value.green { color: #34d399; }
.super-value.orange { color: #f97316; }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 4px;
}

.stat-card.blue   .stat-icon { background: rgba(59,130,246,0.15);  }
.stat-card.green  .stat-icon { background: rgba(16,185,129,0.15);  }
.stat-card.yellow .stat-icon { background: rgba(245,158,11,0.15);  }
.stat-card.red    .stat-icon { background: rgba(239,68,68,0.15);   }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.15);  }

.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; ; word-wrap: break-word; overflow-wrap: break-word; line-height: 1.25; text-align: center;}
.stat-value { font-size: 26px; font-weight: 800; ; text-align: center; font-size: 22px;}
.stat-card.blue   .stat-value { color: var(--blue); }
.stat-card.green  .stat-value { color: var(--green); }
.stat-card.yellow .stat-value { color: var(--yellow); }
.stat-card.red    .stat-value { color: var(--red); }
.stat-card.purple .stat-value { color: var(--purple); }

.stat-sub { font-size: 11px; color: var(--text-muted); }

/* ============================================
   TABELA
   ============================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

thead { background: var(--gbz-surface-raised, #222B3B); }

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gbz-text-secondary, #B6C1D2);
  background: var(--gbz-surface-raised, #222B3B);
  border-bottom: 1px solid var(--gbz-border, #30394A);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

th:hover { color: var(--gbz-text, #F2F5FA); }

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gbz-border, #30394A);
  color: var(--gbz-text, #F2F5FA);
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

tbody tr:hover { background: var(--gbz-surface-hover, #293346); }

tbody tr.linha-alerta td {
  border-top: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-bottom: 1px solid rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}
tbody tr.linha-alerta td:first-child {
  border-left: 4px solid #ef4444 !important;
}
tbody tr.linha-alerta td:last-child {
  border-right: 1px solid rgba(239, 68, 68, 0.4) !important;
}
tbody tr.linha-alerta:hover td {
  background: rgba(239, 68, 68, 0.2) !important;
}

.col-numero { font-family: monospace; font-size: 12px; color: var(--blue); min-width: 170px; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; word-break: normal; }
.col-municipio { font-weight: 500; color: var(--text-primary); }
.col-interessado { color: var(--text-primary); font-weight: 500; max-width: 220px; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; word-break: normal; }
.col-objeto { color: var(--text-secondary); min-width: 200px; word-wrap: break-word; overflow-wrap: break-word; word-break: normal; }
.col-valor { font-family: monospace; font-weight: 600; color: var(--green); text-align: right; white-space: nowrap !important; }

/* ============================================
   BADGES DE STATUS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-AUTORIZADO    { background: rgba(16,185,129,0.15);  color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-PAGO          { background: #10b981 !important; color: #ffffff !important; font-weight: 700 !important; border: 1px solid #059669 !important; box-shadow: 0 0 8px rgba(16,185,129,0.45) !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important; }
.badge-PENDENTE      { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-CONCLUIDO     { background: rgba(99,102,241,0.15);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.badge-CANCELADO     { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-ENCERRADO     { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.badge-NOTIFICADO    { background: rgba(249,115,22,0.15);  color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.badge-NOTIFICAR     { background: rgba(249,115,22,0.15);  color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
.badge-PRIORIDADE    { background: rgba(239,68,68,0.2);    color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.badge-REABERTO      { background: rgba(139,92,246,0.15);  color: #c084fc; border: 1px solid rgba(139,92,246,0.3); }
.badge-DUPLICADO     { background: rgba(100,116,139,0.1);  color: #64748b; border: 1px solid rgba(100,116,139,0.2); }
.badge-DEFAULT       { background: rgba(255,255,255,0.06); color: #94a3b8; border: 1px solid var(--border); }

/* ============================================
   FILTROS
   ============================================ */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.search-box input:focus { border-color: var(--blue); background: rgba(59,130,246,0.05); }
.search-box input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  right: 11px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

select {
  padding: 9px 32px 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

select:focus { border-color: var(--blue); }
select option { background: var(--gbz-surface-raised, #222B3B); color: var(--gbz-text, #F2F5FA); }

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gbz-primary, #7795FF);
  color: #0C1527;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(119, 149, 255, 0.25);
}
.btn-primary:hover {
  background: var(--gbz-primary-hover, #92A8FF);
  color: #0C1527;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(119, 149, 255, 0.35);
}

.btn-success {
  background: var(--gbz-success-soft, #173C37);
  color: var(--gbz-success, #57D4AA);
  border: 1px solid #255850;
  box-shadow: 0 4px 12px rgba(87, 212, 170, 0.2);
}
.btn-success:hover {
  background: #205049;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--gbz-danger-soft, #47272F);
  color: #FFD6DB;
  border: 1px solid #7C3E49;
}
.btn-danger:hover {
  background: #5c303a;
  color: #ffffff;
  opacity: 0.95;
}

.btn-ghost {
  background: var(--gbz-surface-raised, #222B3B);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--gbz-surface-hover, #293346);
  color: #ffffff;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ============================================
   FORMULÁRIO (SiSCAM CAM - GRAPHITE TEMPLATE)
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.form-group, .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-group.full { grid-column: 1 / -1; }

label, .field label, .form-group label {
  color: var(--dim, #B6C1D2);
  font-size: 11px;
  font-weight: 650;
  display: block;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
  text-transform: none;
}

.control,
.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="email"],
input[type="password"],
select {
  border: 1px solid #455169;
  border-radius: 9px;
  background: #151D29;
  color: var(--text, #F2F5FA);
  height: 40px;
  width: 100%;
  padding: 0 11px;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.control:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--blue, #7795FF);
  box-shadow: 0 0 0 2px rgba(119, 149, 255, 0.25);
  background: #151D29;
  outline: none;
}

.control::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: #728097;
}

.textarea,
textarea.form-control,
textarea {
  border: 1px solid #455169;
  border-radius: 9px;
  background: #151D29;
  color: var(--text, #F2F5FA);
  padding: 12px;
  min-height: 90px;
  resize: vertical;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line, #30394A);
}

/* Template Grids & Sections */
.formgrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 15px;
}
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
.span6 { grid-column: span 6; }
.span8 { grid-column: span 8; }
.span9 { grid-column: span 9; }
.span12 { grid-column: span 12; }

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line, #30394A);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin-bottom: 18px;
}
.tab {
  background: transparent;
  color: var(--muted, #91A0B5);
  padding: 10px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab:hover {
  color: var(--text, #F2F5FA);
}
.tab.selected, .tab.active {
  color: var(--blue, #7795FF);
  border-color: var(--blue, #7795FF);
  font-weight: 750;
}

.toggle {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  color: var(--dim, #B6C1D2);
  cursor: pointer;
}
.toggle input {
  accent-color: var(--blue, #7795FF);
}

.minirows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini {
  background: var(--raised, #222B3B);
  padding: 13px;
  border-radius: 10px;
  border: 1px solid var(--line, #30394A);
}
.mini small {
  display: block;
  color: var(--muted, #91A0B5);
  font-size: 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mini b {
  font-size: 17px;
  color: var(--text, #F2F5FA);
}

.timeline {
  border-left: 1px solid #46536b;
  margin-left: 7px;
  padding: 0 0 0 21px;
}
.event {
  position: relative;
  margin: 0 0 21px;
}
.event:before {
  content: '';
  position: absolute;
  left: -27px;
  top: 2px;
  background: var(--blue, #7795FF);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface, #1B2230);
}
.event b {
  font-size: 12px;
  display: block;
  color: var(--text, #F2F5FA);
}
.event small {
  display: block;
  color: var(--muted, #91A0B5);
  margin-top: 3px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #3c4b64;
  border-radius: 10px;
  background: #212e42;
  color: var(--dim, #B6C1D2);
  font-size: 11px;
  line-height: 1.5;
}

.steps {
  display: flex;
  align-items: center;
  gap: 5px;
}
.steps span {
  width: 28px;
  height: 7px;
  border-radius: 20px;
  background: #374055;
}
.steps .done {
  background: var(--green, #57D4AA);
}
.steps .current {
  background: var(--blue, #7795FF);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 7, 13, 0.75);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--gbz-surface, #1B2230);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 18px 24px;
  background: var(--gbz-surface-raised, #222B3B);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 700; }

.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.modal-body { padding: 24px; }

/* ============================================
   CHARTS GRID
   ============================================ */
.charts-grid,
.main-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.main-charts-grid {
  grid-template-columns: repeat(3, 1fr);
}

.alerts-acessos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.alert-card-premium {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border-left: 4px solid var(--text-muted);
}

.alert-item.warning { border-left-color: #f59e0b; }
.alert-item.danger { border-left-color: #ef4444; }

.alert-item .alert-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
}
.alert-item.warning .alert-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.alert-item.danger .alert-icon { background: rgba(239,68,68,0.15); color: #ef4444; }

.alert-item .alert-text {
  flex: 1;
}

.alert-item .alert-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.alert-item .alert-value {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  font-family: monospace;
}


.chart-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.pagination-info { color: var(--text-muted); }

.pagination-controls { display: flex; gap: 6px; align-items: center; }

.page-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: var(--transition);
  font-family: inherit;
}

.page-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============================================
   SEÇÃO DE IMPORTAÇÃO
   ============================================ */
.import-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.import-zone:hover, .import-zone.drag-over {
  border-color: var(--blue);
  background: rgba(59,130,246,0.05);
}
.import-zone .import-icon { font-size: 48px; margin-bottom: 12px; }
.import-zone h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.import-zone p { color: var(--text-muted); font-size: 13px; }

/* ============================================
   NOTIFICAÇÃO TOAST
   ============================================ */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 10000005 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: all !important;
}

.toast {
  background: #1e2d4a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 320px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================
   DETALHE PROCESSO
   ============================================ */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-numero {
  font-family: monospace;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 4px;
}

.detail-nome {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-item label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.info-item p { font-size: 14px; color: var(--text-primary); margin-top: 4px; font-weight: 500; }

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .charts-grid, .main-charts-grid { grid-template-columns: 1fr; }
  .charts-grid .chart-card, .main-charts-grid .chart-card { height: 460px !important; }
}

@media (max-width: 600px) {
  .page { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page.active { animation: fadeIn 0.25s ease; }

/* BARRA DE PROGRESSO */
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.5s ease;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }

/* HEADER SEÇÃO */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 { font-size: 18px; font-weight: 700; }
.section-header p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* CHIP DE FILTRO ATIVO */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 20px;
  font-size: 12px;
  color: var(--blue);
}

.filter-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* LOADER */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* PREFIXO — badge de código de prioridade */
.badge-prefixo {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.5px;
  background: rgba(99,179,237,0.12);
  color: #63b3ed;
  border: 1px solid rgba(99,179,237,0.25);
  white-space: nowrap;
}

/* INDICAÇÃO — discreto, quase invisível */
.indicado-txt {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.55;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* HIGHLIGHT BUSCA */
mark {
  background: rgba(245,158,11,0.3);
  color: var(--yellow);
  border-radius: 2px;
  padding: 0 2px;
}

.input-currency { text-align: right; }

@media print {
  * { font-family: Arial, sans-serif !important; }
  thead { display: table-header-group !important; }
  .print-only-layout { padding-top: 0; }
  tr, .no-page-break { page-break-inside: avoid !important; break-inside: avoid !important; }

  @page { size: A4 landscape; }

  .sidebar, .topbar, .filters-bar, .pagination, #export-buttons, .action-editor, .btn {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  body, .dashboard {
    background: white !important;
    color: black !important;
  }
  table {
    border-collapse: collapse !important;
    width: 100% !important;
  }
  th, td {
    border: 1px solid #ddd !important;
    color: black !important;
  }
  .badge { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }
}


@media print {
  @page { margin: 10mm 10mm; }
  body { padding: 0; }
  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  .print-header img {
    height: 45px;
  }
  .print-header .print-meta {
    text-align: right;
    font-size: 12px;
  }
  .print-footer {
    display: block !important;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    border-top: 1px solid #ccc;
    padding-top: 5px;
    margin-top: 20px;
  }
}
.print-header, .print-footer {
  display: none;
}


@media print {
  .page-number::after {
    counter-increment: page;
    content: "Página " counter(page);
  }
}

/* ==================== PRINT LAYOUTS (DETALHADO / ANALISE) ==================== */
@media print {
  body.print-mode-detalhado .sidebar,
  body.print-mode-detalhado .topbar,
  body.print-mode-detalhado .section-header,
  body.print-mode-detalhado .filters-bar,
  body.print-mode-detalhado .table-wrap,
  body.print-mode-detalhado .pagination,
  body.print-mode-detalhado #export-buttons,
  body.print-mode-detalhado .charts-grid,
  body.print-mode-detalhado .dashboard,
  body.print-mode-detalhado > section:not(#page-processos) {
    display: none !important;
  }
  
  body.print-mode-detalhado #print-layout-detalhado {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
  }

  body.print-mode-analise .sidebar,
  body.print-mode-analise .topbar,
  body.print-mode-analise .section-header,
  body.print-mode-analise .filters-bar,
  body.print-mode-analise .table-wrap,
  body.print-mode-analise .pagination,
  body.print-mode-analise #export-buttons,
  body.print-mode-analise .charts-grid,
  body.print-mode-analise .dashboard,
  body.print-mode-analise > section:not(#page-processos),
  body.print-mode-sintetico .sidebar,
  body.print-mode-sintetico .topbar,
  body.print-mode-sintetico .section-header,
  body.print-mode-sintetico .filters-bar,
  body.print-mode-sintetico .table-wrap,
  body.print-mode-sintetico .pagination,
  body.print-mode-sintetico #export-buttons,
  body.print-mode-sintetico .charts-grid,
  body.print-mode-sintetico .dashboard,
  body.print-mode-sintetico > section:not(#page-processos) {
    display: none !important;
  }

  body.print-mode-analise #print-layout-analise,
  body.print-mode-sintetico #print-layout-sintetico {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
  }
  
  /* Reset padding for print */
  body.print-mode-detalhado, body.print-mode-analise, body.print-mode-sintetico {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Table borders in detalhado */
  .print-table-detalhado th, .print-table-detalhado td {
    border: 1px solid #ccc !important;
  }
}

@media print {
  .watermark-print { display: none !important; }
}
@media screen {
  .watermark-print {
    display: none !important;
  }
}

@media print {
  #seduc-news-ticker-container,
  #btn-restore-news-ticker,
  .news-ticker-container,
  #siscam-modal-root,
  .siscam-modal-overlay {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
  }
}

/* ==================== NOVO FOOTER FIXO E PAGINACAO ==================== */
@media print {
}

@media print { .col-numero { white-space: nowrap !important; } }

@media print {
  body.print-mode-padrao .sidebar,
  body.print-mode-padrao .topbar,
  body.print-mode-padrao .section-header,
  body.print-mode-padrao .filters-bar,
  body.print-mode-padrao .table-wrap,
  body.print-mode-padrao .pagination,
  body.print-mode-padrao #export-buttons,
  body.print-mode-padrao .charts-grid,
  body.print-mode-padrao .dashboard,
  body.print-mode-padrao > section:not(#page-processos) {
    display: none !important;
  }

  body.print-mode-padrao #print-layout-padrao {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
  }
}

  /* ====== CABECALHO FIXO QUE REPETE EM TODAS AS PAGINAS ====== */
  .fixed-print-header-el {
    display: none;
  }
  @media print {
    .fixed-print-header-el {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: white;
      z-index: 9999;
    }
    
  }

/* ====== CONTROLE DE ACESSO LEITOR ====== */
body.role-leitor .action-editor,
body.role-leitor th:nth-child(10),
body.role-leitor td:nth-child(10) {
  display: none !important;
}

/* ============================================================
   RESPONSIVIDADE (MOBILE-FRIENDLY)
   ============================================================ */
@media (max-width: 768px) {
  /* Layout */
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -240px; /* Hide sidebar offscreen */
    width: 240px;
    height: 100vh;
    z-index: 1000;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
  }

  .sidebar.open {
    left: 0 !important; /* Slide in sidebar */
  }

  .main-content {
    margin-left: 0 !important;
  }

  /* Hamburger Menu Toggle */
  .sidebar-toggle {
    display: block !important;
  }

  /* Topbar */
  .topbar {
    padding: 10px 16px;
  }
  
  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .user-profile {
    margin-left: 8px !important;
    padding-left: 8px !important;
  }

  .topbar-actions #user-name, 
  .topbar-actions #user-role {
    display: none; /* Hide name/role text on very small screens to save space */
  }

  .topbar-actions .btn-danger {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .stat-card {
    padding: 12px !important;
  }

  .stat-card .stat-value {
    font-size: 20px !important;
  }

  .stat-card .stat-label {
    font-size: 11px !important;
  }

  /* Charts Grid */
  .charts-grid,
  .main-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .charts-grid .chart-card,
  .main-charts-grid .chart-card {
    height: 380px !important; /* Make charts shorter on mobile */
  }

  /* Processos por Prefixo grid */
  div[style*="grid-template-columns:1fr 320px"], 
  .prefixo-loc-grid {
    grid-template-columns: 1fr !important;
  }

  /* Filters Bar */
  .filters-bar {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  
  .filters-bar > * {
    width: 100% !important;
    max-width: none !important;
  }

  /* Table responsiveness */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 800px; /* Force minimum width to enable horizontal scroll rather than squishing columns */
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 16px 12px;
  }

  /* Form Grid */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .form-group.full {
    grid-column: span 1 !important;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions button {
    width: 100%;
  }

  /* Modal Details */
  .modal {
    width: 95% !important;
    max-height: 90vh !important;
    margin: 10px auto;
  }
  
  .modal-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==================== CONTROLE DE ACESSO (ADM ONLY) ==================== */
body:not(.role-adm) .action-adm,
body:not(.role-adm) #container-filtro-executivo,
body:not(.role-adm) #filtro-executivo,
body:not(.role-adm) #group-form-executivo,
body:not(.role-adm) #form-executivo {
  display: none !important;
}

/* ==================== CONTROLE DE ACESSO (REPORTS - ADM/GERENTE/EDITOR) ==================== */
body:not(.role-adm):not(.role-gerente):not(.role-editor) .action-report {
  display: none !important;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444; /* Red for OFF */
  transition: .3s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input:checked + .slider {
  background-color: #10b981; /* Green for ON */
}
input:checked + .slider:before {
  transform: translateX(22px);
}

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.switch-label {
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

/* Card de Compartilhamento */
.sharing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.sharing-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition);
}
.sharing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}
.sharing-card h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text-primary);
}
.sharing-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}
.qrcode-container {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  margin-bottom: 12px;
  width: 174px;
  height: 174px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qrcode-container img {
  width: 150px;
  height: 150px;
  display: block;
  filter: brightness(0.95); /* Keep QR code slightly readable but not blindingly bright */
}
.phone-share-form {
  width: 100%;
  max-width: 320px;
  text-align: left;
}
.phone-share-form .form-group {
  margin-bottom: 12px;
}

/* Responsive Prefixo & Localização Grid */
.prefixo-loc-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .prefixo-loc-grid {
    grid-template-columns: 1fr;
  }
}

/* ROLAGEM E CONGELAMENTO DA TABELA DE PROCESSOS */
#page-processos {
  display: none;
}
#page-processos.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px); /* Altura da tela menos o Topbar */
  box-sizing: border-box;
  padding: 8px 16px 6px 16px !important;
  overflow: hidden;
}

#page-repetidos {
  display: none;
}
#page-repetidos.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px);
  box-sizing: border-box;
  padding: 8px 16px 6px 16px !important;
  overflow: hidden;
}

#page-processos .section-header {
  flex-shrink: 0;
  margin-bottom: 12px;
}

#page-processos .filters-bar {
  flex-shrink: 0;
  margin-bottom: 16px;
}

#page-processos .table-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 12px;
}

#page-processos .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#page-processos .table-wrap table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
  box-shadow: inset 0 -1px 0 var(--border);
}

#page-processos .pagination {
  flex-shrink: 0;
  margin-top: 0;
}

/* RESPONSIVIDADE PARA TELAS MENORES */
@media (max-width: 600px) {
  #page-processos {
    height: calc(100vh - 58px);
    padding: 16px 16px 10px;
  }
}

/* ROLAGEM E CONGELAMENTO DA TELA DE ACESSOS */
#page-acessos {
  display: none;
}
#page-acessos.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px); /* Altura da tela menos o Topbar */
  box-sizing: border-box;
  padding: 8px 16px 6px 16px !important;
  overflow: hidden;
}

#page-acessos .section-header {
  flex-shrink: 0;
  margin-bottom: 12px;
}

#page-acessos .card {
  flex-shrink: 0;
  margin-bottom: 16px;
}

#page-acessos .table-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 12px;
}

#page-acessos .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#page-acessos .table-wrap table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
  box-shadow: inset 0 -1px 0 var(--border);
}

/* RESPONSIVIDADE ADICIONAL PARA ACESSOS */
@media (max-width: 600px) {
  #page-acessos {
    height: calc(100vh - 58px);
    padding: 16px 16px 10px;
  }
}

/* ============================================================
   COLLAPSIBLE FORMS & FILTERS (PIN SYSTEM)
   ============================================================ */
.filters-bar.collapsed {
  display: none !important;
}

.card.collapsed form,
.card.collapsed > form {
  display: none !important;
}

.card.collapsed {
  padding: 12px 20px !important;
  margin-bottom: 12px !important;
}

/* ============================================================
   RESPONSIVIDADE E BOTÕES HEADER NO CELULAR
   ============================================================ */
@media (max-width: 768px) {
  /* Altera comportamento do flex da seção de header no celular */
  .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .section-header > div {
    width: 100% !important;
    flex: none !important;
  }

  /* Faz os botões dividirem o espaço em grid de 2x2 no celular */
  .header-buttons, 
  .section-header .header-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    flex: none !important;
  }

  /* Diminui fonte e padding dos botões de ação no celular */
  .header-buttons .btn {
    padding: 8px 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
    justify-content: center !important;
  }

  /* Oculta os textos dos botões se a tela for muito estreita, mantendo apenas ícones/emojis */
  @media (max-width: 480px) {
    .btn-text {
      display: none !important;
    }
    .header-buttons .btn {
      padding: 10px 4px !important;
      font-size: 14px !important;
    }
  }
}

/* ============================================================
   PROCESSO MARCADO
   ============================================================ */
tr.linha-marcada {
  background: rgba(59, 130, 246, 0.08) !important;
  border-left: 4px solid #3b82f6 !important;
}

tr.linha-marcada:hover {
  background: rgba(59, 130, 246, 0.12) !important;
}

/* ============================================================
   PROCESSO PAGO - DESTAQUE EM VERDE SÓLIDO (v1.2.75)
   ============================================================ */
tbody tr.linha-pago td {
  background: rgba(16, 185, 129, 0.1) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.35) !important;
}
tbody tr.linha-pago td:first-child {
  border-left: 4px solid #10b981 !important;
}
tbody tr.linha-pago:hover td {
  background: rgba(16, 185, 129, 0.18) !important;
}

.badge-marca {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: bold;
}

/* ============================================================
   DESTAQUE DO CALENDÁRIO
   ============================================================ */
#form-data::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1) sepia(1) saturate(5) hue-rotate(185deg); /* neon blue highlight */
  background-color: rgba(59, 130, 246, 0.2);
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
}

#form-data::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(59, 130, 246, 0.4);
  transform: scale(1.1);
}

/* Autorizacoes Toggle */
.autorizacao-toggles {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #ef4444; /* Vermelho por padrão quando ligado (pendente) */
}

input:focus + .slider {
  box-shadow: 0 0 1px #ef4444;
}

.autorizacao-toggles.all-on input:checked + .slider {
  background-color: #10b981; /* Verde APENAS quando todos estão ON */
}

.autorizacao-toggles.all-on input:focus + .slider {
  box-shadow: 0 0 1px #10b981;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.filtro-toggles {
  margin-top: 0;
  padding: 4px 8px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 38px;
  align-items: center;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 12px;
  font-weight: bold;
  color: #64748b;
  transition: color 0.3s ease;
}

input:checked ~ .toggle-text {
  color: #10b981;
}

/* Borda dos processos */
.process-row.border-autorizado {
  border-left: 4px solid #10b981 !important;
}

.process-row.border-pendente {
  border-left: 4px solid #ef4444 !important;
}


/* ============================================================
   GBZ v1.2.77 - COLUNAS ANCORADAS: CHECKBOX (left: 0) E PREFIXO (left: 40px)
   ============================================================ */
.table-wrap th:first-child,
.table-wrap td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 25 !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  background-color: var(--surface, #1B2230) !important;
}

.table-wrap th[data-sort="prefixo"],
.table-wrap td.col-prefixo {
  position: sticky !important;
  left: 40px !important;
  z-index: 25 !important;
  width: 75px !important;
  min-width: 75px !important;
  max-width: 75px !important;
  background-color: var(--surface, #1B2230) !important;
  border-right: 2px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.5) !important;
  padding: 4px 2px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.table-wrap thead th:first-child {
  z-index: 35 !important;
  background-color: var(--surface-raised, #222B3B) !important;
}

.table-wrap thead th[data-sort="prefixo"] {
  z-index: 35 !important;
  background-color: var(--surface-raised, #222B3B) !important;
}

tbody tr:hover td:first-child,
tbody tr:hover td.col-prefixo {
  background-color: var(--hover, #293346) !important;
}

tbody tr.linha-alerta td:first-child,
tbody tr.linha-alerta td.col-prefixo {
  background-color: #24141d !important;
}

tbody tr.linha-pago td:first-child,
tbody tr.linha-pago td.col-prefixo {
  background-color: #0d2624 !important;
}

/* Prefixo invisível na tela principal (mesmo para admin) - revelado no hover */
.prefixo-mini-chip .badge-prefixo-sigla,
.prefixo-mini-chip .badge-prefixo-normal,
.prefixo-mini-chip .badge-prefixo-alert {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.prefixo-cell-container:hover .badge-prefixo-sigla,
.prefixo-cell-container:hover .badge-prefixo-normal,
.prefixo-cell-container:hover .badge-prefixo-alert,
.table-wrap td.col-prefixo:hover .badge-prefixo-sigla,
.table-wrap td.col-prefixo:hover .badge-prefixo-normal,
.table-wrap td.col-prefixo:hover .badge-prefixo-alert {
  opacity: 1 !important;
  visibility: visible !important;
}
.prefixo-cell-container:hover .prefixo-mini-chip,
.table-wrap td.col-prefixo:hover .prefixo-mini-chip {
  background: rgba(56,189,248,0.14) !important;
  border-color: rgba(56,189,248,0.45) !important;
  box-shadow: 0 0 8px rgba(56,189,248,0.35) !important;
}
.prefixo-cell-container:hover .prefixo-hover-card,
.table-wrap td.col-prefixo:hover .prefixo-cell-container .prefixo-hover-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
thead th {
  z-index: 20;
}

/* Custom Multi-Select Checkbox Styles */
.custom-multiselect {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.custom-multiselect-btn {
  background: var(--gbz-input, #151D29);
  border: 1px solid var(--gbz-border-strong, #455169);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--gbz-text, #F2F5FA);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  min-height: 38px;
}
.custom-multiselect-btn.has-selection {
  border-color: var(--gbz-primary, #7795FF);
  background: var(--gbz-primary-soft, #293857);
}
.custom-multiselect-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-multiselect-arrow {
  margin-left: 8px;
  color: var(--gbz-text-muted, #91A0B5);
}
.custom-multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: none;
  overflow: hidden;
  background: var(--gbz-surface, #1B2230);
  border: 1px solid var(--gbz-border, #30394A);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  padding: 4px;
}
.custom-multiselect-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gbz-text, #F2F5FA);
}
.custom-multiselect-item:hover {
  background: var(--gbz-surface-hover, #293346);
}
.custom-multiselect-item input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}
.custom-multiselect-empty {
  padding: 8px;
  text-align: center;
  color: var(--gbz-text-muted, #91A0B5);
  font-size: 13px;
}

.custom-multiselect-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--gbz-border, #30394A);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--gbz-surface-raised, #222B3B);
  position: sticky;
  top: -4px;
  z-index: 10;
  margin: -4px -4px 4px -4px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.custom-multiselect-action {
  color: #38bdf8;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.2s;
}
.custom-multiselect-action:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* ============================================================
   GRID DE FILTROS COM 6 E 5 COLUNAS PADRONIZADAS (100% LARGURA)
   ============================================================ */
.filter-row-grid-6,
.filter-row-grid-5 {
  display: grid !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: center !important;
  margin-top: 6px !important;
}

.filter-row-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.filter-row-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.filter-row-grid-6 > *,
.filter-row-grid-5 > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.filter-row select,
.filter-row-grid-6 select,
.filter-row-grid-5 select {
  height: 38px !important;
  min-height: 38px !important;
  line-height: 20px !important;
  padding: 8px 30px 8px 10px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  width: 100% !important;
}

.filter-row .custom-multiselect,
.filter-row-grid-6 .custom-multiselect,
.filter-row-grid-5 .custom-multiselect {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.filter-row .custom-multiselect-btn,
.filter-row-grid-6 .custom-multiselect-btn,
.filter-row-grid-5 .custom-multiselect-btn {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.filter-row .custom-multiselect-text,
.filter-row-grid-6 .custom-multiselect-text,
.filter-row-grid-5 .custom-multiselect-text {
  font-size: 12px !important;
  font-weight: 700 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.filter-row-grid-6 .btn-limpar-grid,
.btn-limpar-grid {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 11.5px !important;
  cursor: pointer !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.filter-row-grid-6 .btn-limpar-grid:hover,
.btn-limpar-grid:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 1200px) {
  .filter-row-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .filter-row-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .filter-row-grid-6,
  .filter-row-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  .filter-row-grid-6,
  .filter-row-grid-5 {
    grid-template-columns: 1fr !important;
  }
}



/* ==================== ORCAMENTO PRINT MODE ==================== */
@media print {
  body.print-mode-orcamento {
    background: #fff !important;
    color: #000 !important;
  }
  body.print-mode-orcamento .sidebar,
  body.print-mode-orcamento .topbar,
  body.print-mode-orcamento .orc-buttons,
  body.print-mode-orcamento .section-header {
    display: none !important;
  }
  body.print-mode-orcamento #page-orcamento {
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.print-mode-orcamento .orc-card,
  body.print-mode-orcamento .orc-filters,
  body.print-mode-orcamento .orc-filter-row,
  body.print-mode-orcamento .orc-preset-filters,
  body.print-mode-orcamento .orc-charts,
  body.print-mode-orcamento .orc-chart-box,
  body.print-mode-orcamento .orc-table-container {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  body.print-mode-orcamento .orc-card-label,
  body.print-mode-orcamento .orc-card-sub,
  body.print-mode-orcamento .orc-filters label,
  body.print-mode-orcamento .orc-preset-filters span {
    color: #333 !important;
  }
  body.print-mode-orcamento .orc-card-value {
    color: #000 !important;
  }
  body.print-mode-orcamento table.orc-table th {
    background: #f1f5f9 !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
  }
  body.print-mode-orcamento table.orc-table td {
    color: #000 !important;
    border: 1px solid #ddd !important;
  }
  
  body.print-mode-orcamento canvas {
    filter: invert(1) hue-rotate(180deg) brightness(1.2);
  }

  body.print-mode-orcamento .orc-filters select,
  body.print-mode-orcamento .orc-preset-btn {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
}


/* =========================================================
   HIERARQUIA & SUBMENUS AGRUPADOS (NOVA VERSÃO v1.2.19)
   ========================================================= */

/* Containers com agrupamento por linha vertical (Estilo CAM) */
.sub-cam-container {
  background: rgba(15, 23, 42, 0.5);
  border-left: 2px solid rgba(59, 130, 246, 0.35);
  border-radius: 0 8px 8px 0;
  margin: 4px 0 6px 10px;
  padding: 4px 0 6px 4px;
}

.sub-orcamento-container {
  background: rgba(15, 23, 42, 0.5);
  border-left: 2px solid rgba(34, 197, 94, 0.35);
  border-radius: 0 8px 8px 0;
  margin: 4px 0 6px 10px;
  padding: 4px 0 6px 4px;
}

.sub-escolas-container {
  background: rgba(15, 23, 42, 0.5);
  border-left: 2px solid rgba(251, 146, 60, 0.35);
  border-radius: 0 8px 8px 0;
  margin: 4px 0 6px 10px;
  padding: 4px 0 6px 4px;
}

.sub-config-container {
  background: rgba(15, 23, 42, 0.5);
  border-left: 2px solid rgba(168, 85, 247, 0.35);
  border-radius: 0 8px 8px 0;
  margin: 4px 0 6px 10px;
  padding: 4px 0 6px 4px;
}

/* Melhorias de Foco Global na Navegação */
.nav-form-item:focus-visible,
.nav-item:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6), 0 0 12px rgba(59, 130, 246, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Itens de Orçamento */
.item-orcamento:hover,
.item-orcamento:focus-visible,
.item-orcamento.active {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #dcfce7 !important;
  border-left: 2px solid #22c55e !important;
}

/* Itens de Diárias */
.item-diarias:hover,
.item-diarias:focus-visible,
.item-diarias.active {
  background: rgba(251, 191, 36, 0.14) !important;
  color: #fef3c7 !important;
  border-left: 2px solid #fbbf24 !important;
}

/* Itens de Escolas & Mapas */
.item-escolas:hover,
.item-escolas:focus-visible,
.item-escolas.active {
  background: rgba(251, 146, 60, 0.14) !important;
  color: #ffedd5 !important;
  border-left: 2px solid #fb923c !important;
}

.item-mapa-escolas:hover,
.item-mapa-escolas:focus-visible,
.item-mapa-escolas.active {
  background: rgba(6, 182, 212, 0.14) !important;
  color: #cffafe !important;
  border-left: 2px solid #06b6d4 !important;
}

/* Itens de Configurações */
.item-acessos:hover,
.item-acessos:focus-visible,
.item-acessos.active {
  background: rgba(167, 139, 250, 0.14) !important;
  color: #ede9fe !important;
  border-left: 2px solid #a78bfa !important;
}

.item-senha:hover,
.item-senha:focus-visible,
.item-senha.active {
  background: rgba(244, 63, 94, 0.14) !important;
  color: #ffe4e6 !important;
  border-left: 2px solid #f43f5e !important;
}


/* =========================================================
   ESTILOS PAINEL TERMINAL & SISTEMA INFO (v1.2.20)
   ========================================================= */
.sheet-link-card:hover div {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4) !important;
  background: rgba(30, 41, 59, 0.9) !important;
}
#cmd-terminal-box ::-webkit-scrollbar {
  width: 6px;
}
#cmd-terminal-box ::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 102, 0.3);
  border-radius: 3px;
}

/* Barra Lateral Retroiluminada do Terminal CMD (GBZ - v1.2.22) */
.cmd-scrollable-table::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.cmd-scrollable-table::-webkit-scrollbar-track {
  background: #020603;
  border-left: 1px solid rgba(0, 255, 102, 0.2);
}
.cmd-scrollable-table::-webkit-scrollbar-thumb {
  background: #00ff66;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
}
.cmd-scrollable-table::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}
#modal-contra-notificacao.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

@media print {
  body.print-mode-padrao-adm .sidebar,
  body.print-mode-padrao-adm .topbar,
  body.print-mode-padrao-adm .section-header,
  body.print-mode-padrao-adm .filters-bar,
  body.print-mode-padrao-adm .table-wrap,
  body.print-mode-padrao-adm .pagination,
  body.print-mode-padrao-adm #export-buttons,
  body.print-mode-padrao-adm .charts-grid,
  body.print-mode-padrao-adm .dashboard,
  body.print-mode-padrao-adm .modal-overlay,
  body.print-mode-padrao-adm #page-processos,
  body.print-mode-padrao-adm .page {
    display: none !important;
  }

  body.print-mode-padrao-adm #print-layout-padrao-adm {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: white !important;
  }
}

@media print {
  body.print-mode-padrao-adm-2 .sidebar,
  body.print-mode-padrao-adm-2 .topbar,
  body.print-mode-padrao-adm-2 .section-header,
  body.print-mode-padrao-adm-2 .filters-bar,
  body.print-mode-padrao-adm-2 .table-wrap,
  body.print-mode-padrao-adm-2 .pagination,
  body.print-mode-padrao-adm-2 #export-buttons,
  body.print-mode-padrao-adm-2 .charts-grid,
  body.print-mode-padrao-adm-2 .dashboard,
  body.print-mode-padrao-adm-2 .modal-overlay,
  body.print-mode-padrao-adm-2 #page-processos,
  body.print-mode-padrao-adm-2 .page {
    display: none !important;
  }

  body.print-mode-padrao-adm-2 #print-layout-padrao-adm-2 {
    display: block !important;
    position: static !important;
    width: 100% !important;
    background: white !important;
  }
}

@media print {
  body.print-mode-padrao-adm-2 tr.group-header-digito,
  body.print-mode-padrao-adm-2 tr.group-header-digito td {
    background-color: #008080 !important;
    color: #ffffff !important;
    border-color: #005f5f !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* MultiSelect Focus & Scrollbar Enhancements */
.custom-multiselect-btn:focus,
.custom-multiselect-btn:focus-visible {
  outline: none !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
  background: rgba(15, 23, 42, 0.9) !important;
}

.custom-multiselect-dropdown {
  overflow: hidden !important;
  max-height: none !important;
}

.custom-multiselect-dropdown::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.custom-multiselect-items-container::-webkit-scrollbar {
  width: 6px;
}
.custom-multiselect-items-container::-webkit-scrollbar-track {
  background: #0f172a;
}
.custom-multiselect-items-container::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}
.custom-multiselect-items-container::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* 4 Botões de Módulos Rápidos na Barra Lateral */
.sidebar-quick-modules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 12px 18px 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.quick-module-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.8px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.quick-module-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  filter: brightness(1.15);
}
.quick-module-btn:active {
  transform: translateY(0);
}
.quick-module-btn.btn-mod-gdsm {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}
.quick-module-btn.btn-mod-gdsm:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}
.quick-module-btn.btn-mod-gmac {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}
.quick-module-btn.btn-mod-gmac:hover {
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.3);
}
.quick-module-btn.btn-mod-proalfa {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(168, 85, 247, 0.15) 100%);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
}
.quick-module-btn.btn-mod-proalfa:hover {
  border-color: #c084fc;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.3);
}
.quick-module-btn.btn-mod-orcamento {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}
.quick-module-btn.btn-mod-orcamento:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}

/* Item Financeiro e Efeito de Foco */
.nav-item.item-financeiro {
  position: relative;
  transition: all 0.25s ease;
}
.nav-item.item-financeiro:hover,
.nav-item.item-financeiro:focus-visible,
.nav-item.item-financeiro.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%) !important;
  color: #34d399 !important;
  box-shadow: inset 3px 0 0 #10b981, 0 0 16px rgba(16, 185, 129, 0.25) !important;
}
.nav-item.item-financeiro:focus {
  outline: none;
}
.nav-item.item-financeiro svg {
  transition: transform 0.2s ease, filter 0.2s ease;
}
.nav-item.item-financeiro:hover svg,
.nav-item.item-financeiro.active svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px #34d399);
}

/* Efeito de Destaque no Formulário Financeiro */
.financeiro-input-focus:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
  background: #0f172a !important;
}

/* Alinhamento Estrito na Mesma Linha do Grupo Dígito e Parâmetros = <> */
.filtro-digito-container {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  height: 38px !important;
  width: auto !important;
  flex: 0 0 auto !important;
}
.filtro-digito-container > div:first-child {
  width: 170px !important;
  flex-shrink: 0 !important;
}
.btn-group-param-digito {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  height: 38px !important;
  flex-shrink: 0 !important;
}

/* Modal WhatsApp Share Responsivo */
.modal-whatsapp-share {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 14px !important;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7) !important;
  max-width: 960px !important;
  width: 95vw !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.modal-whatsapp-share img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

@media (max-width: 768px) {
  .modal-whatsapp-share {
    width: 98vw !important;
    padding: 14px !important;
  }
}

/* ============================================================
   BARRA DE ROLAGEM HORIZONTAL E VERTICAL NOS FORMULÁRIOS DE DADOS
   (Permite observar a extensão da base de dados em todos os forms)
   ATENÇÃO: Apenas nos contêineres de tabelas/dados, não na barra de parâmetros
   ============================================================ */

/* Confinamento estrito e rolagem horizontal suave nos dados de todos os formulários */
.table-wrap,
.gdsm-table-wrap,
.gmac-table-wrap,
.data-table-wrap,
.table-responsive,
#escolas-table-wrap,
#te-table-wrap {
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-width: auto !important;
  scrollbar-color: #2563eb #090e1a !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Barra horizontal destacada (12px) com trilho escuro e controle deslizante azul */
.table-wrap::-webkit-scrollbar,
.gdsm-table-wrap::-webkit-scrollbar,
.gmac-table-wrap::-webkit-scrollbar,
.data-table-wrap::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
#escolas-table-wrap::-webkit-scrollbar,
#te-table-wrap::-webkit-scrollbar {
  height: 12px !important;
  width: 10px !important;
}

.table-wrap::-webkit-scrollbar-track,
.gdsm-table-wrap::-webkit-scrollbar-track,
.gmac-table-wrap::-webkit-scrollbar-track,
.data-table-wrap::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
#escolas-table-wrap::-webkit-scrollbar-track,
#te-table-wrap::-webkit-scrollbar-track {
  background: #090e1a !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.table-wrap::-webkit-scrollbar-thumb,
.gdsm-table-wrap::-webkit-scrollbar-thumb,
.gmac-table-wrap::-webkit-scrollbar-thumb,
.data-table-wrap::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
#escolas-table-wrap::-webkit-scrollbar-thumb,
#te-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
  border-radius: 6px !important;
  border: 2px solid #090e1a !important;
  min-width: 60px !important;
  min-height: 40px !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4) !important;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.gdsm-table-wrap::-webkit-scrollbar-thumb:hover,
.gmac-table-wrap::-webkit-scrollbar-thumb:hover,
.data-table-wrap::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
#escolas-table-wrap::-webkit-scrollbar-thumb:hover,
#te-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.7) !important;
}

.table-wrap::-webkit-scrollbar-corner,
.gdsm-table-wrap::-webkit-scrollbar-corner,
.gmac-table-wrap::-webkit-scrollbar-corner,
.data-table-wrap::-webkit-scrollbar-corner,
.table-responsive::-webkit-scrollbar-corner,
#escolas-table-wrap::-webkit-scrollbar-corner,
#te-table-wrap::-webkit-scrollbar-corner {
  background: #090e1a !important;
}

/* Fixação da coluna Município nas tabelas GDSM no Scroll Horizontal */
.gdsm-table-wrap th.col-municipio-sticky {
  position: sticky !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 25 !important;
  background: #1e293b !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4) !important;
}

.gdsm-table-wrap td.col-municipio-sticky {
  position: sticky !important;
  left: 0 !important;
  z-index: 5 !important;
  background: #0f172a !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4) !important;
}

.gdsm-table-wrap tr:hover td.col-municipio-sticky {
  background: #1e293b !important;
}

/* Confinamento de viewport nos formulários GDSM */
#page-gdsm-regimes,
#page-gdsm-demais,
#page-gdsm-doacoes,
#page-gdsm-novoregime {
  display: none;
}

#page-gdsm-regimes.active,
#page-gdsm-demais.active,
#page-gdsm-doacoes.active,
#page-gdsm-novoregime.active {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 68px) !important;
  max-height: calc(100vh - 68px) !important;
  box-sizing: border-box !important;
  padding: 8px 16px 6px 16px !important;
  overflow: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}

#page-gdsm-regimes .section-header,
#page-gdsm-demais .section-header,
#page-gdsm-doacoes .section-header,
#page-gdsm-novoregime .section-header {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
}

#page-gdsm-regimes .filters-bar,
#page-gdsm-demais .filters-bar,
#page-gdsm-doacoes .filters-bar,
#page-gdsm-novoregime .filters-bar {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
}

#page-gdsm-regimes .action-toolbar-scroll,
#page-gdsm-demais .action-toolbar-scroll,
#page-gdsm-doacoes .action-toolbar-scroll,
#page-gdsm-novoregime .action-toolbar-scroll {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
  padding: 2px 2px 4px 2px !important;
}

#gdsm-table-container-regimes,
#gdsm-table-container-demais,
#gdsm-table-container-doacoes,
#gdsm-table-container-novoregime {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin-bottom: 4px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Largura mínima das tabelas para rolagem completa da base de dados */
#page-processos .table-wrap table {
  min-width: 100% !important;
}

#page-repetidos .table-wrap table {
  min-width: 100% !important;
}

/* ============================================================
   PADRÃO UNIVERSAL 100% SEMPRE - RESPONSIVO (DESKTOP, TABLET, MOBILE) (v1.2.72)
   Regra: Largura 100% sempre; Botões, busca e parâmetros SEMPRE visíveis;
   Barras de rolagem aparecem SOMENTE quando necessário (ferramentas auxiliares).
   ============================================================ */

/* Confinamento da aplicação */
.app-layout {
  display: flex !important;
  min-height: 100vh !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.main-content {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  min-width: 0 !important;
  flex: 1 !important;
  width: calc(100% - var(--sidebar-w, 260px)) !important;
  max-width: calc(100% - var(--sidebar-w, 260px)) !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* REGRA DE OURO PARA TODOS OS FORMULÁRIOS / PÁGINAS ATIVAS (IDÊNTICO À IMAGEM 2) */
.page {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.page.active,
#page-processos.active,
#page-repetidos.active,
#page-gdsm-regimes.active,
#page-gdsm-demais.active,
#page-gdsm-doacoes.active,
#page-gdsm-novoregime.active,
#page-gmac-aee.active,
#page-gmac-onibus.active,
#page-gmac-embarcacoes.active,
#page-gmac-equipamentos.active,
#page-gmac-computadores.active,
#page-gmac-veiculos.active,
#page-escolas.active,
#page-transporte.active,
#page-diarias.active,
#page-orcamento.active,
#page-financeiro.active,
#page-proalfa-alunos.active,
#page-proalfa-professores.active {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--header-height, 68px)) !important;
  max-height: calc(100vh - var(--header-height, 68px)) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 16px 6px 16px !important;
  overflow: hidden !important;
}

/* 1. TOPO: BADGES E INDICADORES (SEMPRE VISÍVEL) */
.section-header,
#page-processos .section-header,
#page-repetidos .section-header {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 2. CAMPOS DE BUSCA E PARÂMETROS (SEMPRE VISÍVEL) */
.filters-bar,
.filter-row,
.orc-filters-bar,
.search-box-bar,
#page-processos .filters-bar,
#page-repetidos .filters-bar,
#gdsm-filters-bar-regimes,
#gdsm-filters-bar-demais,
#gdsm-filters-bar-doacoes,
#gdsm-filters-bar-novoregime {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

/* 3. BARRA HORIZONTAL DE AÇÕES E BOTÕES (SEMPRE VISÍVEL) */
.action-toolbar-scroll,
#processos-actions-toolbar,
#gdsm-actions-toolbar-regimes,
#gdsm-actions-toolbar-demais,
#gdsm-actions-toolbar-doacoes,
#gdsm-actions-toolbar-novoregime {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 2px 0 4px 0 !important;
}

/* 4. ÁREA DE TABELAS / DADOS: OCUPA O RESTANTE COM ROLAGEM SOMENTE QUANDO NECESSÁRIO */
.table-wrap,
.gdsm-table-wrap,
.gmac-table-wrap,
.data-table-wrap,
.table-responsive,
#page-processos .table-wrap,
#page-repetidos .table-wrap,
#escolas-table-wrap,
#te-table-wrap {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin-bottom: 4px !important;
  border-radius: var(--radius, 10px) !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-card, rgba(15, 23, 42, 0.8)) !important;
}

/* Contêineres de tabela do GDSM e GMAC */
#gdsm-table-container-regimes,
#gdsm-table-container-demais,
#gdsm-table-container-doacoes,
#gdsm-table-container-novoregime,
#tabela-container-aee,
#tabela-container-onibus,
#tabela-container-embarcacoes,
#tabela-container-equipamentos,
#tabela-container-computadores,
#tabela-container-veiculos {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin-bottom: 4px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
}

/* 5. TABELAS: LARGURA 100% COM COMPATIBILIDADE RESPONSIVA */
.table-wrap table,
.gdsm-table-wrap table,
.gmac-table-wrap table,
.data-table-wrap table,
#page-processos .table-wrap table,
#page-repetidos .table-wrap table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* 6. PAGINAÇÃO: FIXA NA BASE (SEMPRE VISÍVEL) */
.pagination,
#page-processos .pagination,
#page-repetidos .pagination {
  flex-shrink: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

/* 7. BARRAS DE ROLAGEM COMO FERRAMENTAS AUXILIARES (APARECEM SOMENTE QUANDO NECESSÁRIO) */
.table-wrap::-webkit-scrollbar,
.gdsm-table-wrap::-webkit-scrollbar,
.gmac-table-wrap::-webkit-scrollbar,
.data-table-wrap::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
#escolas-table-wrap::-webkit-scrollbar,
#te-table-wrap::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

.table-wrap::-webkit-scrollbar-track,
.gdsm-table-wrap::-webkit-scrollbar-track,
.gmac-table-wrap::-webkit-scrollbar-track,
.data-table-wrap::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
#escolas-table-wrap::-webkit-scrollbar-track,
#te-table-wrap::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 4px !important;
}

.table-wrap::-webkit-scrollbar-thumb,
.gdsm-table-wrap::-webkit-scrollbar-thumb,
.gmac-table-wrap::-webkit-scrollbar-thumb,
.data-table-wrap::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
#escolas-table-wrap::-webkit-scrollbar-thumb,
#te-table-wrap::-webkit-scrollbar-thumb {
  background: #3b82f6 !important;
  border-radius: 4px !important;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.gdsm-table-wrap::-webkit-scrollbar-thumb:hover,
.gmac-table-wrap::-webkit-scrollbar-thumb:hover,
.data-table-wrap::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
#escolas-table-wrap::-webkit-scrollbar-thumb:hover,
#te-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #60a5fa !important;
}

/* ============================================================
   RESPONSIVIDADE: TABLET E CELULAR
   ============================================================ */
@media (max-width: 1024px) {
  .main-content {
    width: 100% !important;
    max-width: 100% !important;
  }
  .page.active,
  #page-processos.active {
    padding: 8px 10px 4px 10px !important;
    height: calc(100vh - 60px) !important;
  }
  .filter-row {
    gap: 6px !important;
  }
  .action-toolbar-scroll {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .action-toolbar-scroll .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column !important;
  }
  .sidebar {
    width: 100% !important;
  }
  .main-content {
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .page.active,
  #page-processos.active {
    height: auto !important;
    min-height: calc(100vh - 58px) !important;
    overflow-y: auto !important;
    padding: 8px 8px 14px 8px !important;
  }
  .table-wrap,
  .gdsm-table-wrap,
  .gmac-table-wrap,
  .data-table-wrap {
    flex: none !important;
    height: 55vh !important;
    min-height: 250px !important;
  }
  .action-toolbar-scroll .btn {
    padding: 8px 10px !important;
    font-size: 11px !important;
    height: 36px !important;
  }
}


/* ============================================================
   GBZ v1.2.73 - REGRA DE OURO: ROLAGEM VERTICAL SOB DEMANDA
   Sempre que o conteúdo de qualquer página exceder a tela,
   aciona a barra de rolagem vertical personalizada suave.
   ============================================================ */
.page.active,
#page-processos.active,
#page-repetidos.active,
#page-sistema-info.active,
#page-configuracoes.active,
#page-escola-detalhes.active,
#page-dashboard.active,
#page-gdsm-regimes.active,
#page-gdsm-demais.active,
#page-gdsm-doacoes.active,
#page-gdsm-novoregime.active,
#page-gmac-aee.active,
#page-gmac-onibus.active,
#page-gmac-embarcacoes.active,
#page-gmac-equipamentos.active,
#page-gmac-computadores.active,
#page-gmac-veiculos.active,
#page-gmac-reordenamento.active,
#page-gmac-cooperacao.active,
#page-escolas.active,
#page-transporte.active,
#page-diarias.active,
#page-orcamento.active,
#page-financeiro.active,
#page-proalfa-alunos.active,
#page-proalfa-professores.active {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--header-height, 68px)) !important;
  max-height: calc(100vh - var(--header-height, 68px)) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 16px 8px 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: #3b82f6 rgba(15, 23, 42, 0.6) !important;
}

/* Garante que o painel de informações do sistema role perfeitamente até o fim */
#page-sistema-info.active {
  overflow-y: auto !important;
  padding-bottom: 30px !important;
}

/* Barra de rolagem estilizada para as páginas quando ativadas */
.page.active::-webkit-scrollbar,
#page-sistema-info::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

.page.active::-webkit-scrollbar-track,
#page-sistema-info::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 4px !important;
}

.page.active::-webkit-scrollbar-thumb,
#page-sistema-info::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
  background: #3b82f6 !important;
  border-radius: 4px !important;
}

.page.active::-webkit-scrollbar-thumb:hover,
#page-sistema-info::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
  background: #60a5fa !important;
}

/* ============================================================
   GBZ v1.2.75 - MOBILE: CÉLULAS TRUNCADAS (9 DÍGITOS) COM BALÃO POPUP
   ============================================================ */
.mobile-cell-view {
  display: none !important;
}
.desktop-cell-view {
  display: inline !important;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .desktop-cell-view {
    display: none !important;
  }
  .mobile-cell-view {
    display: inline-flex !important;
    align-items: center;
    max-width: 100%;
  }
  .table-wrap th[data-sort="numero"],
  .table-wrap td.col-numero {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 120px !important;
    font-size: 11px !important;
  }
  .table-wrap th[data-sort="interessado"],
  .table-wrap td.col-interessado {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 130px !important;
    font-size: 11px !important;
  }
  .table-wrap th[data-sort="objeto"],
  .table-wrap td.col-objeto {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 130px !important;
    font-size: 11px !important;
  }
  .table-wrap th[data-sort="status"],
  .table-wrap td.col-status {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 110px !important;
    font-size: 10px !important;
  }
  .table-wrap th[data-sort="localizacao"],
  .table-wrap td.col-localizacao {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 105px !important;
    font-size: 11px !important;
  }
}

body.funcao-mobile-ativa .desktop-cell-view {
  display: none !important;
}
body.funcao-mobile-ativa .mobile-cell-view {
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
}
body.funcao-mobile-ativa .table-wrap th[data-sort="numero"],
body.funcao-mobile-ativa .table-wrap td.col-numero {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 120px !important;
  font-size: 11px !important;
}
body.funcao-mobile-ativa .table-wrap th[data-sort="interessado"],
body.funcao-mobile-ativa .table-wrap td.col-interessado {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 130px !important;
  font-size: 11px !important;
}
body.funcao-mobile-ativa .table-wrap th[data-sort="objeto"],
body.funcao-mobile-ativa .table-wrap td.col-objeto {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 130px !important;
  font-size: 11px !important;
}
body.funcao-mobile-ativa .table-wrap th[data-sort="status"],
body.funcao-mobile-ativa .table-wrap td.col-status {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 110px !important;
  font-size: 10px !important;
}
body.funcao-mobile-ativa .table-wrap th[data-sort="localizacao"],
body.funcao-mobile-ativa .table-wrap td.col-localizacao {
  width: 95px !important;
  min-width: 95px !important;
  max-width: 105px !important;
  font-size: 11px !important;
}

.mobile-cell-wrap {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 2px;
}

.btn-lupa-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 4px;
  line-height: 1.1;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.btn-lupa-mobile:hover,
.btn-lupa-mobile:active {
  background: rgba(56, 189, 248, 0.4);
  transform: scale(1.1);
}

.btn-calendario-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-calendario-mobile:hover,
.btn-calendario-mobile:active {
  background: rgba(56, 189, 248, 0.45);
  transform: scale(1.1);
}

/* Balão flutuante para visualização de conteúdo completo no mobile */
.balao-conteudo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000010 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: fadeInBalao 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.balao-conteudo-card {
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 16px rgba(56, 189, 248, 0.25);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.balao-conteudo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.balao-conteudo-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.balao-conteudo-close:hover {
  color: #ffffff;
}

.balao-conteudo-body {
  padding: 18px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #f8fafc;
  word-break: break-word;
  max-height: 60vh;
  overflow-y: auto;
  user-select: text;
  background: #090d16;
}

.balao-conteudo-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px;
  background: #1e293b;
  border-top: 1px solid #334155;
}

.btn-balao-copiar {
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-balao-copiar:hover {
  background: #475569;
}

.btn-balao-ok {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-balao-ok:hover {
  background: #0369a1;
}

@keyframes fadeInBalao {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Tabela Financeira / Orçamentária - Ajuste de Colunas e Dimensionamento */
#page-orcamento .orc-table-main,
#page-orcamento table,
#page-financeiro table {
  table-layout: auto !important;
  min-width: 1150px !important;
  width: 100% !important;
  border-collapse: collapse !important;
}

#page-orcamento th,
#page-orcamento td,
#page-financeiro th,
#page-financeiro td {
  box-sizing: border-box !important;
}

/* Colunas com larguras proporcionais e alinhamentos */
#page-orcamento .orc-table-main th:nth-child(1),
#page-orcamento .orc-table-main td:nth-child(1) {
  width: 110px !important;
  min-width: 110px !important;
}

#page-orcamento .orc-table-main th:nth-child(2),
#page-orcamento .orc-table-main td:nth-child(2) {
  width: 145px !important;
  min-width: 145px !important;
}

#page-orcamento .orc-table-main th:nth-child(3),
#page-orcamento .orc-table-main td:nth-child(3) {
  width: 95px !important;
  min-width: 95px !important;
}

#page-orcamento .orc-table-main th:nth-child(4),
#page-orcamento .orc-table-main td:nth-child(4) {
  min-width: 210px !important;
}

/* Colunas de Valores (Dotação, Empenhado, Anulado, Executado, Saldo Líq.): largura padrão fixa no limite da máscara */
#page-orcamento .orc-table-main th:nth-child(5),
#page-orcamento .orc-table-main td:nth-child(5),
#page-orcamento .orc-table-main th:nth-child(6),
#page-orcamento .orc-table-main td:nth-child(6),
#page-orcamento .orc-table-main th:nth-child(7),
#page-orcamento .orc-table-main td:nth-child(7),
#page-orcamento .orc-table-main th:nth-child(8),
#page-orcamento .orc-table-main td:nth-child(8),
#page-orcamento .orc-table-main th:nth-child(9),
#page-orcamento .orc-table-main td:nth-child(9) {
  width: 115px !important;
  min-width: 115px !important;
  max-width: 115px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-family: monospace !important;
}

/* Coluna % Exec */
#page-orcamento .orc-table-main th:nth-child(10),
#page-orcamento .orc-table-main td:nth-child(10) {
  width: 105px !important;
  min-width: 105px !important;
  max-width: 105px !important;
}





/* BALAO AVISO CANCELADOS */
.balao-aviso-cancelados {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  height: 34px;
  box-sizing: border-box;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 8px;
  color: #fca5a5;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
  animation: pulsoAvisoCancelado 2s infinite;
}

.balao-aviso-cancelados:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #f87171;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.balao-aviso-cancelados .balao-icon {
  font-size: 14px;
  line-height: 1;
}

.balao-aviso-cancelados .balao-num {
  font-weight: 800;
  font-size: 14px;
  color: #fee2e2;
}

@keyframes pulsoAvisoCancelado {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Especificação Técnica dos Combos de Infraestrutura */
.combo-desc-box {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 9px;
  margin-top: 6px;
  min-height: 48px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  word-break: break-word;
}

/* ============================================================
   MODAL PROFISSIONAL . : SiSCAM : . & DESTAQUE DE CAMPO
   ============================================================ */
.siscam-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  animation: siscamFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes siscamFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.siscam-modal-card {
  background: linear-gradient(145deg, #0f172a 0%, #090e1a 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.92), 0 0 25px rgba(56, 189, 248, 0.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.siscam-modal-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.siscam-modal-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.siscam-modal-badge-title {
  color: #38bdf8;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  font-family: 'Segoe UI', monospace, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.siscam-delta {
  font-size: 16px;
  line-height: 1;
  color: #38bdf8;
  display: inline-block;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  font-weight: 900;
}
.siscam-modal-subtag {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.siscam-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.siscam-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.siscam-modal-body {
  padding: 20px 22px;
  color: #e2e8f0;
  font-size: 13.5px;
  line-height: 1.6;
  max-height: 70vh;
  overflow-y: auto;
}
.siscam-modal-footer {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding: 13px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.siscam-modal-btn-ok {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  padding: 9px 26px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  letter-spacing: 0.5px;
  transition: all 0.2s;
  min-width: 90px;
  text-align: center;
}
.siscam-modal-btn-ok:hover, .siscam-modal-btn-ok:focus {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.75);
  transform: translateY(-1px);
  outline: none;
}
.siscam-modal-btn-sucesso {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.siscam-modal-btn-sucesso:hover, .siscam-modal-btn-sucesso:focus {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.75);
}
.campo-foco-destaque {
  outline: 2.5px solid #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.85) !important;
  border-color: #38bdf8 !important;
  animation: pulsoCampoFoco 1.6s ease-in-out;
}
@keyframes pulsoCampoFoco {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Escala de Processo (0 a 10) Slider Customizado com Número dentro da Bola */
.escala-slider-track-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-width: 180px;
  height: 36px;
  display: flex;
  align-items: center;
}
#form-escala {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  transition: background 0.2s ease;
}
#form-escala::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  box-shadow: none;
}
#form-escala::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  box-shadow: none;
}
#escala-thumb-ball {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 7px rgba(0,0,0,0.7);
  border: 2px solid #ffffff;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  font-family: monospace;
  transition: left 0.05s ease-out;
  z-index: 10;
}
.escala-tick {
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.escala-tick:hover {
  transform: translateX(-50%) scaleY(1.3) !important;
  background: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8) !important;
}




/* Buscador Instantâneo por Escala Dupla (v1.134 - Imagem de X a Y) */
.filtro-escala-range-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent !important;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  pointer-events: none;
  z-index: 20;
}
.filtro-escala-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}
.filtro-escala-range-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}
#filtro-escala-ball-min, #filtro-escala-ball-max {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  pointer-events: auto !important;
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), outline 0.15s, box-shadow 0.15s, border-color 0.15s;
  font-family: monospace;
  user-select: none;
  z-index: 23;
}
#filtro-escala-ball-min:focus, #filtro-escala-ball-max:focus {
  outline: none;
}
.filtro-escala-ball-active {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 1), 0 0 8px #38bdf8, 0 4px 12px rgba(0,0,0,0.6) !important;
  transform: translate(-50%, -50%) scale(1.35) !important;
  z-index: 40 !important;
  border-color: #38bdf8 !important;
}
.escala-tick-filtro {
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.escala-tick-filtro:hover {
  transform: translateX(-50%) scaleY(1.3) !important;
  background: #38bdf8 !important;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8) !important;
}

/* Animação de Alerta Enorme Piscando - Inadimplente */
@keyframes animPiscarInadimplente {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(239, 68, 68, 0.95));
  }
  50% {
    opacity: 0.15;
    transform: scale(0.97);
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.2));
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(239, 68, 68, 0.95));
  }
}
.texto-inadimplente-piscando {
  animation: animPiscarInadimplente 0.6s infinite alternate ease-in-out !important;
}

/* Barra de Escala para Relatórios de Impressão (v1.3.117 - Imagem 1 e 3) */
.relatorio-escala-container {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.relatorio-escala-track {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.relatorio-escala-thumb {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.relatorio-escala-text {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
/* ============================================================
   RESPONSIVIDADE TELA DE LOGIN & BANNER WHATSAPP SUPORTE (SiSCAM)
   ============================================================ */
@media (max-width: 820px) {
  .login-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .login-banner-link {
    max-width: 320px !important;
    max-height: 400px !important;
  }
  .login-banner-link img {
    max-height: 380px !important;
  }
}

/* Badge Versão Topbar Sempre Visível */
#badge-versao-topbar {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ============================================================
   BADGE SiSCAM COM DELTA (∴ SiSCAM ∴) NOS FORMS E CABEÇALHOS
   ============================================================ */
.siscam-badge-delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.75);
  font-family: 'Segoe UI', Inter, monospace, sans-serif;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  transition: all 0.2s ease;
}
.siscam-badge-delta:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}
.siscam-badge-delta .siscam-delta {
  font-size: 15px;
  line-height: 1;
  color: #38bdf8;
  display: inline-block;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.95);
  font-weight: 900;
}
