/* VÉRTICE — Admin CSS v3.0 — Sidebar azul Vértice + conteúdo claro */

/* ══ LAYOUT ══════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; background: var(--color-bg); }

/* ══ SIDEBAR ═════════════════════════════════════ */
.admin-sidebar {
  width: 240px; min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: var(--z-sticky);
  transition: transform var(--duration-base) var(--ease-out);
}

.sidebar-brand { display:flex; align-items:center; justify-content:center; padding:14px 16px;
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand img { width: 28px; height: 28px; object-fit: contain; }

.logo-name, .sidebar-brand .brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  color: #fff; letter-spacing: -0.02em;
}

.logo-symbol { font-size: 20px; color: #fff; }

.sidebar-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--sidebar-text-muted);
  padding: 16px 16px 6px; margin-top: 4px;
}

.sidebar-nav {
  flex: 1; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--sidebar-text); text-decoration: none;
  transition: all var(--duration-fast);
  position: relative;
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: var(--sidebar-hover-bg); color: #fff; }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: var(--sidebar-active-bg); color: #fff; font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: #00b8d4; border-radius: 0 3px 3px 0;
}

.nav-badge {
  margin-left: auto; background: var(--color-danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: var(--radius-full); min-width: 18px; text-align: center;
}

.sidebar-bottom {
  padding: 12px; border-top: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; gap: 8px;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.sidebar-user:hover { background: var(--sidebar-hover-bg); }

.user-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-avatar--sm { width: 26px; height: 26px; font-size: 10px; }

.user-info { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.user-name { font-size: var(--text-sm); font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: var(--text-xs); color: var(--sidebar-text-muted); text-transform: capitalize; }

.sidebar-logout {
  width: 100%; justify-content: center; color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm); padding: 7px; font-size: 13px; font-weight: 500;
}
.sidebar-logout:hover { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }

.sidebar-toggle {
  display: none; position: fixed; top: 12px; left: 12px;
  z-index: calc(var(--z-sticky) + 1); width: 38px; height: 38px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--sidebar-bg); border: none; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); cursor: pointer;
}
.sidebar-toggle span { display: block; width: 16px; height: 2px; background: #fff; border-radius: 2px; }

/* ══ CONTEÚDO PRINCIPAL ══════════════════════════ */
.admin-main {
  flex: 1; margin-left: 240px;
  padding: var(--space-xl);
  min-width: 0; background: var(--color-bg);
}

/* ══ PAGE HEADER ══════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-md); margin-bottom: var(--space-xl); flex-wrap: wrap;
}
.page-title { font-size: var(--text-2xl); font-weight: 800; color: var(--color-text); margin: 0; }
.page-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 3px; }
.page-header-actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }

/* ══ CARDS DE MÉTRICAS ════════════════════════════ */
.metrics-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md); margin-bottom: var(--space-xl);
}
.metric-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-lg);
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.metric-card:hover { box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.metric-label { font-size: var(--text-xs); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.metric-value { font-family: var(--font-body); font-size: 26px; font-weight: 800; color: var(--color-text); line-height: 1; }
.metric-value--warn    { color: var(--color-warn); }
.metric-value--info    { color: var(--color-info); }
.metric-value--success { color: var(--color-success); }
.metric-value--muted   { color: var(--color-text-muted); }
.metric-value--accent  { color: var(--color-accent); }
.metric-delta { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 4px; }

/* ══ FILTROS ══════════════════════════════════════ */
.filters-bar { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-lg); flex-wrap: wrap; }
.filter-search { position: relative; flex: 1; min-width: 180px; }
.filter-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--color-text-faint); pointer-events: none; }
.filter-input {
  width: 100%; padding: 8px 10px 8px 32px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); color: var(--color-text);
  font-size: var(--text-sm); outline: none; transition: border-color var(--duration-fast);
}
.filter-input:focus { border-color: var(--color-accent); }
.filter-select {
  padding: 8px 28px 8px 10px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  color: var(--color-text); font-size: var(--text-sm); outline: none; cursor: pointer;
  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.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color var(--duration-fast);
}
.filter-select:focus { border-color: var(--color-accent); }
.filter-count { font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; }
.filter-input--date { padding: 8px 10px; font-size: var(--text-sm); width: auto; }
.date-range { display: flex; align-items: center; gap: var(--space-xs); }
.date-range-sep { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ══ TABELA ══════════════════════════════════════ */
.table-wrap {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden; overflow-x: auto;
  box-shadow: var(--shadow-xs);
}
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table th {
  padding: 10px 14px; text-align: left; font-size: var(--text-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-muted); background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--color-border); color: var(--color-text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--color-surface-2); }
.data-table--compact td, .data-table--compact th { padding: 9px 12px; }
.col-sortable { cursor: pointer; user-select: none; }
.col-sortable:hover { color: var(--color-text); }
.col-sorted { color: var(--color-accent); }
.sort-icon { display: inline-block; margin-left: 4px; vertical-align: middle; opacity: .4; }
.col-sorted .sort-icon { opacity: 1; }
.col-sorted-desc .sort-icon { transform: rotate(180deg); }
.col-actions { width: 80px; text-align: right; }
.table-empty { text-align: center; padding: 48px 24px; color: var(--color-text-muted); font-size: var(--text-sm); }
.table-empty--error { color: var(--color-danger); }
.table-loading-row td { padding: var(--space-xl); }
.table-skeleton { display: flex; flex-direction: column; gap: 8px; }

/* ══ PAGINAÇÃO ════════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: var(--space-lg) 0; flex-wrap: wrap; }
.page-btn { padding: 6px 11px; border-radius: var(--radius-xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); background: var(--color-surface); border: 1px solid var(--color-border); cursor: pointer; transition: all var(--duration-fast); }
.page-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.page-btn--active { background: var(--gradient-accent); color: #fff; border-color: transparent; }
.page-ellipsis { padding: 6px 8px; color: var(--color-text-faint); font-size: var(--text-sm); }

/* ══ SEÇÃO ════════════════════════════════════════ */
.section-header { display: flex; align-items: baseline; gap: var(--space-md); margin: var(--space-xl) 0 var(--space-md); }
.section-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; margin: 0; }
.section-count { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ══ GRÁFICOS ═════════════════════════════════════ */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.chart-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs); }
.chart-card--wide { grid-column: 1 / -1; }
.chart-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--color-border); display: flex; align-items: baseline; gap: var(--space-md); }
.chart-title { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; margin: 0; }
.chart-subtitle { font-size: var(--text-xs); color: var(--color-text-muted); }
.chart-body { padding: 16px 20px; min-height: 160px; }
.chart-loading, .chart-empty { display: flex; align-items: center; justify-content: center; min-height: 140px; color: var(--color-text-muted); font-size: var(--text-sm); }

/* Barras verticais */
.bar-chart--vertical { display: flex; align-items: flex-end; gap: 5px; height: 140px; padding-bottom: 26px; overflow-x: auto; }
.bar-col { flex: 1; min-width: 24px; max-width: 48px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; position: relative; }
.bar-col:hover .bar-tooltip { opacity: 1; transform: translateY(0); }
.bar-tooltip { position: absolute; top: -26px; background: var(--color-text); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; opacity: 0; transform: translateY(4px); transition: opacity .15s; pointer-events: none; white-space: nowrap; }
.bar-fill { width: 100%; background: var(--gradient-accent); border-radius: 3px 3px 0 0; transition: height .4s var(--ease-out); min-height: 2px; }
.bar-label { position: absolute; bottom: -20px; font-size: 10px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44px; text-align: center; }

/* Barras horizontais */
.hbar-chart { display: flex; flex-direction: column; gap: var(--space-sm); }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: var(--space-sm); }
.hbar-label { font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; background: var(--color-surface-2); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--gradient-accent); border-radius: 999px; transition: width .4s var(--ease-out); }
.hbar-val { font-size: var(--text-sm); font-weight: 600; text-align: right; }

/* Stacked */
.stacked-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: var(--space-lg); }
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-label { flex: 1; color: var(--color-text-muted); }
.legend-val { font-weight: 600; }
.legend-pct { font-weight: 400; color: var(--color-text-muted); font-size: 11px; }

/* ══ LOGIN ════════════════════════════════════════ */
.page-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--sidebar-bg); padding: var(--space-md); position: relative; overflow: hidden;
}
.page-login::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 20%, rgba(0,184,212,0.15), transparent),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(21,101,192,0.2), transparent);
  pointer-events: none;
}
.login-scene { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.login-bg-mark { position: fixed; right: -60px; bottom: -60px; font-size: 300px; opacity: 0.04; color: #fff; font-family: var(--font-display); font-weight: 800; pointer-events: none; user-select: none; }
.login-card { background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: 0 24px 80px rgba(0,0,0,0.4); overflow: hidden; }
.login-card::before { content: ''; display: block; height: 4px; background: var(--gradient-brand); }
.login-card-header { padding: 28px 28px 20px; text-align: center; background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); }
.login-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.login-brand-logo { width: 36px; height: 36px; object-fit: contain; }
.login-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-title { font-size: var(--text-2xl); font-weight: 800; color: var(--color-text); margin-bottom: 4px; }
.login-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); }
.login-form { padding: 24px 28px; display: flex; flex-direction: column; gap: var(--space-md); }
.login-alert { display: flex; align-items: center; gap: var(--space-sm); padding: 10px 14px; background: var(--color-danger-bg); border: 1px solid var(--color-danger); border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--color-danger); }
.login-alert[hidden] { display: none !important; }
.login-card-footer { padding: 16px 28px; border-top: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; gap: var(--space-md); font-size: var(--text-sm); flex-wrap: wrap; }
.login-theme-row { display: flex; justify-content: flex-end; padding: 12px 16px 0; }
.success-icon { display: flex; justify-content: center; margin-bottom: var(--space-md); }
.form-alert--error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid rgba(220,38,38,0.2); }

/* ══ CÉLULA USUÁRIO ══════════════════════════════ */
.user-cell { display: flex; align-items: center; gap: var(--space-sm); }
.badge--you { background: var(--color-accent-dim); color: var(--color-accent); font-size: 10px; padding: 1px 6px; border-radius: var(--radius-full); text-transform: uppercase; }
.badge-dot { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-sm); }
.badge-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot-color, #888); flex-shrink: 0; }

/* ══ KANBAN ══════════════════════════════════════ */
.kanban-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); flex-wrap: wrap; gap: var(--space-sm); }
.kanban-toggle { display: flex; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }
.kanban-toggle-btn { padding: 7px 14px; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); cursor: pointer; transition: all var(--duration-fast); border: none; background: none; }
.kanban-toggle-btn.active { background: var(--gradient-accent); color: #fff; }

.kanban-board { display: flex; gap: var(--space-md); overflow-x: auto; padding-bottom: var(--space-md); align-items: flex-start; min-height: 500px; }
.kanban-col { flex-shrink: 0; width: 270px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); display: flex; flex-direction: column; box-shadow: var(--shadow-xs); }
.kanban-col-header { padding: 12px 14px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.kanban-col-title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); }
.kanban-col-count { background: var(--color-surface-2); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 700; padding: 1px 7px; border-radius: var(--radius-full); }
.kanban-col--pending  .kanban-col-header { border-top: 3px solid var(--color-warn); }
.kanban-col--progress .kanban-col-header { border-top: 3px solid var(--color-info); }
.kanban-col--done     .kanban-col-header { border-top: 3px solid var(--color-success); }
.kanban-col--cancel   .kanban-col-header { border-top: 3px solid var(--color-danger); }
.kanban-cards { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.kanban-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: all var(--duration-fast); }
.kanban-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card-protocol { font-family: var(--font-mono); font-size: 10px; color: var(--color-accent); margin-bottom: 5px; font-weight: 600; }
.kanban-card-dept { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 3px; }
.kanban-card-nome { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: 8px; line-height: 1.3; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-xs); color: var(--color-text-faint); }
.kanban-empty { text-align: center; padding: 32px var(--space-md); color: var(--color-text-faint); font-size: var(--text-sm); }

/* ══ FIELD BUILDER ════════════════════════════════ */
.field-builder { display: flex; flex-direction: column; gap: var(--space-sm); }
.field-builder-item { display: flex; align-items: center; gap: var(--space-sm); padding: 8px 12px; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: grab; }
.drag-handle { color: var(--color-text-faint); flex-shrink: 0; }
.field-builder-label { flex: 1; font-size: var(--text-sm); font-weight: 500; }
.field-builder-type { font-size: var(--text-xs); color: var(--color-text-muted); background: var(--color-surface); padding: 1px 7px; border-radius: var(--radius-xs); border: 1px solid var(--color-border); }

/* ══ MÉTRICAS FINANCEIRAS ═════════════════════════ */
.fin-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: var(--space-md); margin-bottom: var(--space-xl); }
.fin-kpi { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 12px; position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.fin-kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.fin-kpi--green::before  { background: var(--color-success); }
.fin-kpi--red::before    { background: var(--color-danger); }
.fin-kpi--blue::before   { background: var(--color-info); }
.fin-kpi--yellow::before { background: var(--color-warn); }
.fin-kpi-label { font-size: 10px; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.fin-kpi-value { font-family: var(--font-body) !important; font-size: 11px; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.fin-kpi-sub { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 4px; }
.fin-kpi--green  .fin-kpi-value { color: var(--color-success); }
.fin-kpi--red    .fin-kpi-value { color: var(--color-danger); }
.fin-kpi--blue   .fin-kpi-value { color: var(--color-info); }
.fin-kpi--yellow .fin-kpi-value { color: var(--color-warn); }
.exec-bar { height: 4px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; margin-top: 5px; }
.exec-bar-fill { height: 100%; border-radius: 999px; background: var(--gradient-accent); transition: width .4s; }

/* ══ DRE ══════════════════════════════════════════ */
.dre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.dre-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-lg); box-shadow: var(--shadow-xs); }
.dre-card-title { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-md); }
.dre-card--rec  .dre-card-title { color: var(--color-success); }
.dre-card--desp .dre-card-title { color: var(--color-danger); }
.dre-item { display: flex; align-items: center; gap: var(--space-sm); padding: 7px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.dre-item:last-child { border-bottom: none; }
.dre-item-icon { font-size: 14px; flex-shrink: 0; }
.dre-item-nome { flex: 1; color: var(--color-text-muted); }
.dre-item-val { font-weight: 600; }
.dre-total { display: flex; justify-content: space-between; padding: var(--space-sm) 0 0; font-weight: 700; border-top: 2px solid var(--color-border); margin-top: 4px; }
.dre-resultado { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-lg); display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); box-shadow: var(--shadow-xs); }
.dre-resultado-label { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 600; }
.dre-resultado-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.dre-resultado-value--pos { color: var(--color-success); }
.dre-resultado-value--neg { color: var(--color-danger); }
.pill-rec  { background: var(--color-success-bg); color: var(--color-success); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-desp { background: var(--color-danger-bg);  color: var(--color-danger);  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }

/* ══ ABAS FINANCEIRAS ════════════════════════════ */
.fin-tabs { display: flex; gap: 3px; margin-bottom: var(--space-xl); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 4px; width: fit-content; flex-wrap: wrap; box-shadow: var(--shadow-xs); }
.fin-tab { padding: 7px 16px; border-radius: var(--radius-xs); font-size: var(--text-xs); font-weight: 600; cursor: pointer; border: none; color: var(--color-text-muted); background: none; transition: all var(--duration-fast); }
.fin-tab:hover { background: var(--color-surface-2); color: var(--color-text); }
.fin-tab.active { background: var(--gradient-accent); color: #fff; }
.fin-panel { display: none; }
.fin-panel.active { display: block; }
.fin-chart-wrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-xl); margin-bottom: var(--space-xl); box-shadow: var(--shadow-xs); }
.fin-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); flex-wrap: wrap; gap: var(--space-sm); }
.fin-chart-title  { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; }
.fin-chart-legend { display: flex; gap: var(--space-md); font-size: var(--text-xs); }
.fin-legend-dot   { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; vertical-align: middle; }
.fin-bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-bottom: 28px; overflow-x: auto; }
.fin-bar-group { flex: 1; min-width: 36px; display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative; }
.fin-bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; cursor: default; position: relative; transition: height .4s var(--ease-out); }
.fin-bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--color-text); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; pointer-events: none; z-index: 10; }
.fin-bar--rec  { background: var(--color-success); opacity: .8; }
.fin-bar--desp { background: var(--color-danger);  opacity: .8; }
.fin-bar--proj { background: var(--color-info);    opacity: .3; }
.fin-bar-label { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--color-text-muted); white-space: nowrap; }

/* ══ RESPONSIVIDADE ══════════════════════════════ */
@media(max-width:1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card--wide { grid-column: 1; }
  .dre-grid { grid-template-columns: 1fr; }
}
@media(max-width:768px) {
  .admin-sidebar { transform: translateX(-100%); width: 260px; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-toggle { display: flex; }
  .admin-main { margin-left: 0; padding: var(--space-md); padding-top: 60px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: unset; }
  .kanban-board { flex-direction: column; }
  .kanban-col { width: 100%; }
}
@media(max-width:480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 22px; }
  .fin-kpi-value { font-size: 11px; font-family: var(--font-body) !important; }
}
.metric-tile-value{font-family:var(--font-body);font-size:26px;font-weight:800;color:var(--color-text);line-height:1}.metric-tile{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-lg);box-shadow:var(--shadow-xs)}
.nav-badge:empty{display:none}








#deptAdminGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:24px}
.dept-admin-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:12px;overflow:hidden;box-shadow:var(--shadow-xs);transition:box-shadow .15s,transform .15s}
.dept-admin-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.dept-admin-card-header{padding:16px 18px;border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,rgba(21,101,192,0.04),rgba(0,184,212,0.04))}
.dept-admin-card-info{display:flex;align-items:center;gap:8px}
.dept-admin-card-title{font-family:var(--font-display);font-size:15px;font-weight:700;color:var(--color-text)}
.dept-admin-card-actions{display:flex;gap:6px}
.dept-admin-card-body{padding:14px 18px;font-size:12px;color:var(--color-text-muted)}
.dept-admin-card-email{font-size:12px;color:var(--color-text-muted);margin-top:2px}
#campoDepts{display:block}.perfil-admin #campoDepts{display:none}

/* ── Dashboard extras ── */
.metric-desc { font-size: 11px; color: var(--color-text-muted); margin-top: 6px; line-height: 1.45; }
.dash-fin-sep { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.dash-fin-sep-line { flex: 1; height: 1px; background: var(--color-border); }
.dash-fin-sep-lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.dash-fin-sep-lbl svg { color: var(--color-warn); }
.dash-fin-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-fin-leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--color-text-muted); }
.dash-fin-leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dash-fin-leg-sq { width: 12px; height: 4px; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.dash-chart-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--color-border-soft); }
.dash-chart-row:last-child { border-bottom: none; }
.dash-chart-lbl { font-size: 11px; color: var(--color-text-muted); width: 72px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-chart-lbl--warn { color: var(--color-warn); font-weight: 600; }
.dash-chart-track { flex: 1; background: var(--color-surface-2); border-radius: 4px; overflow: hidden; }
.dash-chart-fill { border-radius: 4px; min-width: 2px; }
.dash-chart-val { font-size: 11px; color: var(--color-text-muted); width: 52px; text-align: right; flex-shrink: 0; }
.dash-chart-val--warn { color: var(--color-warn); font-weight: 600; }
.dash-chart-val--proj { font-style: italic; opacity: .45; }
.dash-bg-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dash-bg-row:last-child { margin-bottom: 0; }
.dash-bg-lbl { font-size: 11px; color: var(--color-text-muted); width: 32px; flex-shrink: 0; text-align: right; }
.dash-bg-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.dash-bg-bar { height: 8px; border-radius: 2px; min-width: 2px; }
.dash-bg-val { font-size: 11px; color: var(--color-text-muted); width: 48px; text-align: right; flex-shrink: 0; }
.dash-kpi-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.dash-kpi-mini { background: var(--color-surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.dash-kpi-mini-lbl { font-size: 10px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 3px; }
.dash-kpi-mini-val { font-size: 15px; font-weight: 700; }
.dash-sect-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); font-weight: 700; margin-bottom: 8px; }
.dept-name-cell { display: flex; align-items: center; gap: 7px; }
.dept-color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dept-pct-bar { display: flex; align-items: center; gap: 6px; }
.dept-pct-track { flex: 1; height: 5px; background: var(--color-surface-3); border-radius: 3px; overflow: hidden; }
.dept-pct-fill { height: 100%; border-radius: 3px; }
.dept-pct-txt { font-size: 11px; color: var(--color-text-muted); width: 28px; text-align: right; }

/* ── Barra de filtros solicitações ── */
.sol-filter-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 16px; flex-wrap: nowrap; overflow-x: auto; }
.sol-filter-select { height: 34px; padding: 0 8px; font-size: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.sol-filter-input { height: 34px; padding: 0 10px; font-size: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); }
.sol-filter-search { flex: 1; min-width: 180px; }
.sol-filter-date { width: 130px; flex-shrink: 0; }
.sol-filter-select:focus, .sol-filter-input:focus { outline: none; border-color: var(--color-accent); }

/* ── Logo Vértice ── */
.sidebar-brand img { mix-blend-mode: screen; filter: brightness(1.1); }
.login-brand-logo { mix-blend-mode: multiply; }

/* ── 2FA ── */
.btn-2fa-option { display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); cursor:pointer; text-align:left; transition:all var(--duration-fast); color:var(--color-text); }
.btn-2fa-option:hover { border-color:var(--color-accent); background:var(--color-surface-2); }
.login-alert--success { background:var(--color-success-bg); color:var(--color-success); border-color:var(--color-success); }

/* ── Upload area ── */
.upload-area { position:relative; border:2px dashed var(--color-border); border-radius:var(--radius-md); padding:24px; text-align:center; cursor:pointer; transition:border-color var(--duration-fast); }
.upload-area:hover { border-color:var(--color-accent); }
.anexo-tag { display:inline-flex; align-items:center; gap:6px; background:var(--color-surface-2); border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:4px 10px; font-size:12px; }
.anexo-tag button { background:none; border:none; cursor:pointer; color:var(--color-text-muted); font-size:14px; line-height:1; padding:0; }

/* ── Timeline vertical solicitações ── */
.sol-timeline-v { display:flex; flex-direction:column; gap:0; }
.sol-tl-item { display:flex; gap:10px; padding-bottom:16px; position:relative; }
.sol-tl-item:last-child { padding-bottom:0; }
.sol-tl-left { display:flex; flex-direction:column; align-items:center; flex-shrink:0; width:16px; }
.sol-tl-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; border:2px solid #fff; box-shadow:0 0 0 2px var(--color-border); }
.sol-tl-dot--pendente     { background:var(--color-warn); box-shadow:0 0 0 2px var(--color-warn); }
.sol-tl-dot--em_andamento { background:var(--color-info); box-shadow:0 0 0 2px var(--color-info); }
.sol-tl-dot--concluido    { background:var(--color-success); box-shadow:0 0 0 2px var(--color-success); }
.sol-tl-dot--cancelado    { background:var(--color-danger); box-shadow:0 0 0 2px var(--color-danger); }
.sol-tl-line { flex:1; width:2px; background:var(--color-border); margin-top:4px; }
.sol-tl-content { flex:1; padding-top:0; }
.sol-tl-status { font-size:12px; font-weight:600; color:var(--color-text); line-height:1.3; }
.sol-tl-date { font-size:11px; color:var(--color-text-muted); margin-top:2px; }
.sol-tl-note { font-size:11px; color:var(--color-text-muted); margin-top:4px; font-style:italic; }

/* ── Botão trocar senha sidebar ── */
#btnTrocarSenha { color: var(--sidebar-text) !important; border-color: var(--sidebar-border) !important; background: rgba(255,255,255,.06) !important; }
#btnTrocarSenha:hover { background: rgba(255,255,255,.15) !important; color: #fff !important; }
