/* ================================================================
   style-global.css  —  Sistema de Design DAF/PRPG
   Inspirado na linguagem visual do connectedpapers.com
   Identidade verde PRPG/UFG  |  Tipografia Roboto
   ================================================================ */

/* ----------------------------------------------------------------
   1. GOOGLE FONTS — Roboto (100 a 700)
   ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto:wght@100;300;400;500;700&display=swap');


/* ----------------------------------------------------------------
   2. TOKENS  —  Design Tokens do sistema DAF/PRPG
   ---------------------------------------------------------------- */
:root {

  /* Tipografia — Inter como principal, Roboto como fallback */
  --font-main:       'Inter', 'Roboto', sans-serif;
  --font-w-thin:     100;
  --font-w-light:    300;
  --font-w-regular:  400;
  --font-w-medium:   500;
  --font-w-semibold: 600;
  --font-w-bold:     700;

  /* Cor principal PRPG — verde institucional (obrigatório) */
  --color-primary:       #2E7D32;
  --color-primary-light: #2E7D3212;
  --color-primary-hover: #1B5E20;
  --color-primary-text:  #ffffff;

  /* Acento — dourado institucional UFG */
  --color-accent:        #CCB87A;
  --color-accent-light:  #CCB87A18;

  /* Texto — escala neutra refinada */
  --color-text:          #1a1a1a;
  --color-text-mid:      #6b6b6b;
  --color-text-muted:    #9e9e9e;
  --color-text-disabled: #d4d4d4;
  --color-placeholder:   #ababab;

  /* Superfícies — branco quente, minimalista */
  --color-bg:            #fafafa;
  --color-surface:       #f3f3f1;
  --color-surface-alt:   #eaeae8;
  --color-surface-dark:  #1a1a1a;

  /* Bordas — finas e discretas */
  --color-border:        #dcdcdc;
  --color-border-light:  #efefef;

  /* Semânticas */
  --color-positive:      #2E7D32;
  --color-negative:      #c0392b;
  --color-warning:       #d97706;
  --color-info:          #1976D2;

  /* Raios de borda */
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-pill: 100px;

  /* Sombras — sutis e refinadas */
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.05);
  --shadow-card:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover:  0 4px 14px rgba(0,0,0,0.09);
  --shadow-navbar: none;
  --shadow-md:     0 4px 18px rgba(0,0,0,0.07);

  /* Animação */
  --transition: all 0.2s ease;

  /* Espaçamento — generoso para estética premium */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  28px;
  --space-xl:  48px;
  --space-2xl: 80px;
}


/* ----------------------------------------------------------------
   3. RESET E BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: var(--font-w-regular);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ----------------------------------------------------------------
   3b. ACESSIBILIDADE — Focus visible global
   ---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}


/* ----------------------------------------------------------------
   4. TIPOGRAFIA
   ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 34px; font-weight: var(--font-w-light);   letter-spacing: -0.5px; }
h2 { font-size: 22px; font-weight: var(--font-w-regular); letter-spacing: -0.2px; }
h3 { font-size: 18px; font-weight: var(--font-w-medium);  }
h4 { font-size: 15px; font-weight: var(--font-w-medium);  }
h5 { font-size: 13px; font-weight: var(--font-w-medium);  }
h6 { font-size: 11px; font-weight: var(--font-w-semibold); letter-spacing: 0.4px; }

p { margin-bottom: var(--space-sm); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

small  { font-size: 12px; color: var(--color-text-mid); }
strong { font-weight: var(--font-w-bold); }
em     { font-style: italic; }

code, kbd, pre {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 2px 5px;
}


/* ----------------------------------------------------------------
   5. LAYOUT — Container e Grid
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-fluid {
  width: 96%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Flex helpers */
.flex           { display: flex; }
.flex-col       { display: flex; flex-direction: column; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm    { gap: var(--space-sm); }
.flex-gap-md    { gap: var(--space-md); }
.flex-gap-lg    { gap: var(--space-lg); }
.flex-wrap      { flex-wrap: wrap; }


/* ----------------------------------------------------------------
   6. CARTÕES / CARDS
   ---------------------------------------------------------------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-sm {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
}

.card-header {
  font-size: 13px;
  font-weight: var(--font-w-medium);
  color: var(--color-text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
}

/* KPI card — usado nos dashboards */
.kpi-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.kpi-card .kpi-label {
  font-size: 13px;
  font-weight: var(--font-w-medium);
  color: var(--color-text-mid);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kpi-card .kpi-value {
  font-size: 30px;
  font-weight: var(--font-w-light);
  color: var(--color-text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-card .kpi-sub {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Destaque verde */
.kpi-card.destaque {
  background: var(--color-primary);
  color: var(--color-primary-text);
  border-color: var(--color-primary-hover);
}

.kpi-card.destaque .kpi-label,
.kpi-card.destaque .kpi-value,
.kpi-card.destaque .kpi-sub {
  color: var(--color-primary-text);
}

/* Destaque dourado */
.kpi-card.accent {
  border-color: var(--color-accent);
}


/* ----------------------------------------------------------------
   7. BOTÕES
   ---------------------------------------------------------------- */

/* Primário — pílula verde */
.btn-primario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  height: 35px;
  padding: 0 var(--space-lg);
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: var(--font-w-medium);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primario:hover {
  background: var(--color-primary-hover);
  color: #fff;
  text-decoration: none;
}

.btn-primario:active  { background: var(--color-primary-hover); filter: brightness(0.9); }
.btn-primario:disabled,
.btn-primario[disabled] { background: var(--color-text-disabled); cursor: not-allowed; }

/* Outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--color-bg);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  height: 35px;
  padding: 0 var(--space-lg);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: var(--font-w-medium);
  transition: var(--transition);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

/* Ghost — só hover de superfície */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: transparent;
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  height: 33px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--color-surface);
  text-decoration: none;
}

/* Pill de ação na navbar (equivalente ao btn do Connected Papers) */
.navbar-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  height: 33px;
  padding: 0 var(--space-md);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: var(--font-w-medium);
  transition: var(--transition);
  text-decoration: none;
}

.navbar-btn:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Variantes de tamanho */
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 42px; padding: 0 28px; font-size: 16px; }

/* Botão destrutivo */
.btn-danger {
  background: var(--color-negative);
  color: #fff;
  border-radius: var(--radius-pill);
  height: 35px;
  padding: 0 var(--space-lg);
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 14px;
  transition: var(--transition);
}

.btn-danger:hover { background: #a93226; }


/* ----------------------------------------------------------------
   8. FORMULÁRIOS / INPUTS
   ---------------------------------------------------------------- */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-md);
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  appearance: none;
}

textarea {
  height: auto;
  min-height: 80px;
  padding: var(--space-sm) var(--space-md);
  resize: vertical;
}

.input::placeholder,
input::placeholder,
textarea::placeholder { color: var(--color-placeholder); }

.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.input:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--color-surface);
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

/* Label */
.label, label {
  display: block;
  font-size: 13px;
  font-weight: var(--font-w-medium);
  color: var(--color-text-mid);
  margin-bottom: var(--space-xs);
}

/* Campo de formulário completo */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

/* Mensagens de validação */
.form-error   { font-size: 12px; color: var(--color-negative);  margin-top: 2px; }
.form-success { font-size: 12px; color: var(--color-positive);  margin-top: 2px; }
.form-hint    { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }


/* ----------------------------------------------------------------
   9. TABELAS
   ---------------------------------------------------------------- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: var(--color-surface);
  color: var(--color-text-mid);
  font-size: 12px;
  font-weight: var(--font-w-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
  color: var(--color-text);
}

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

.table tbody tr:hover td {
  background: var(--color-surface);
}

.table-sm th, .table-sm td { padding: 7px 10px; }

/* Colunas numéricas */
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }


/* ----------------------------------------------------------------
   10. BADGES / PILLS
   ---------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--font-w-medium);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-green  { background: #e8f5e9; color: #2E7D32; }
.badge-red    { background: #fdecea; color: #c0392b; }
.badge-yellow { background: #fef9e7; color: #b7770d; }
.badge-blue   { background: #e3f2fd; color: #1565C0; }
.badge-gray   { background: var(--color-surface); color: var(--color-text-mid); }
.badge-gold   { background: var(--color-accent-light); color: #7d6025; }

/* Ponto de status */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  flex-shrink: 0;
}

.dot-green  { background: var(--color-positive); }
.dot-red    { background: var(--color-negative); }
.dot-yellow { background: var(--color-warning);  }
.dot-gray   { background: var(--color-text-muted); }


/* ----------------------------------------------------------------
   11. ALERTAS / BANNERS
   ---------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert-success {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1B5E20;
}

.alert-error {
  background: #fdecea;
  border-color: #ef9a9a;
  color: #7f0000;
}

.alert-warning {
  background: #fef9e7;
  border-color: #f9e79f;
  color: #7d4e00;
}

.alert-info {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #0d47a1;
}

/* Banner informativo discreto */
.info-bar {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--color-text-mid);
}


/* ----------------------------------------------------------------
   11b. PAGINAÇÃO — Componente unificado
   ---------------------------------------------------------------- */
.pag-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  flex-wrap: wrap;
}

.pag-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: var(--font-w-medium);
  cursor: pointer;
  transition: var(--transition);
}

.pag-btn:hover:not(:disabled) {
  background: var(--color-surface);
  border-color: var(--color-border);
}

.pag-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pag-btn:disabled {
  color: var(--color-text-disabled);
  cursor: not-allowed;
}

.pag-info {
  font-size: 13px;
  font-weight: var(--font-w-medium);
  color: var(--color-text-mid);
}


/* ----------------------------------------------------------------
   12. BARRA DE PROGRESSO
   ---------------------------------------------------------------- */
.progress-bg {
  width: 100%;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.progress-fill.accent { background: var(--color-accent); }
.progress-fill.danger { background: var(--color-negative); }


/* ----------------------------------------------------------------
   13. SEPARADORES / DIVISORES
   ---------------------------------------------------------------- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-md) 0;
}

.divider-vertical {
  display: inline-block;
  width: 1px;
  height: 30px;
  background: var(--color-border);
  opacity: 0.4;
  margin: 0 var(--space-sm);
  vertical-align: middle;
}

.section-title {
  font-size: 11px;
  font-weight: var(--font-w-semibold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-light);
}


/* ----------------------------------------------------------------
   14. UTILITÁRIOS — Texto
   ---------------------------------------------------------------- */
.val-positivo   { color: var(--color-positive); font-weight: var(--font-w-medium); }
.val-negativo   { color: var(--color-negative); font-weight: var(--font-w-medium); }
.val-neutro     { color: var(--color-text-mid); }
.texto-muted    { color: var(--color-text-mid); }
.texto-pequeno  { font-size: 12px; }
.texto-grande   { font-size: 18px; }
.peso-leve      { font-weight: var(--font-w-light); }
.peso-medio     { font-weight: var(--font-w-medium); }
.peso-negrito   { font-weight: var(--font-w-bold); }
.maiusculas     { text-transform: uppercase; letter-spacing: 0.5px; }
.centralizado   { text-align: center; }
.truncar        { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moeda          { font-variant-numeric: tabular-nums; }
.tabnum         { font-variant-numeric: tabular-nums; }

/* Tabular nums em KPI values globalmente */
.kpi-value, .kpi-card .kpi-value,
[class*="kpi-val"], [class*="kpi-value"] {
  font-variant-numeric: tabular-nums;
}


/* ----------------------------------------------------------------
   15. UTILITÁRIOS — Espaçamento
   ---------------------------------------------------------------- */
.mt-xs { margin-top:    var(--space-xs); }
.mt-sm { margin-top:    var(--space-sm); }
.mt-md { margin-top:    var(--space-md); }
.mt-lg { margin-top:    var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-sm  { padding:       var(--space-sm); }
.p-md  { padding:       var(--space-md); }
.p-lg  { padding:       var(--space-lg); }


/* ----------------------------------------------------------------
   16. UTILITÁRIOS — Display
   ---------------------------------------------------------------- */
.hidden   { display: none !important; }
.d-block  { display: block; }
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }


/* ----------------------------------------------------------------
   17. LOADING / ESQUELETO
   ---------------------------------------------------------------- */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-border-light) 50%, var(--color-surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
  color: transparent !important;
}

.skeleton-text  { height: 14px; border-radius: var(--radius-sm); margin-bottom: 6px; }
.skeleton-title { height: 24px; width: 60%; border-radius: var(--radius-sm); }


/* ----------------------------------------------------------------
   18. SCROLL PERSONALIZADO
   ---------------------------------------------------------------- */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }


/* ----------------------------------------------------------------
   19. RESPONSIVO
   ---------------------------------------------------------------- */

/* Tablet  ≤ 768px */
@media (max-width: 768px) {
  h1 { font-size: 26px; letter-spacing: -0.3px; }
  h2 { font-size: 19px; }

  .container,
  .container-wide,
  .container-narrow { padding: 0 var(--space-sm); }

  .kpi-card .kpi-value { font-size: 24px; }

  .table-wrapper { font-size: 13px; }
}

@media (max-width: 480px) {
  h1 { font-size: 22px; }

  .btn-primario,
  .btn-outline { width: 100%; justify-content: center; }
}

/* ----------------------------------------------------------------
   FOOTER PADRÃO
   ---------------------------------------------------------------- */
.footer-padrao {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  padding: 18px 32px;
  margin-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-left {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.2px;
}
.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.footer-right a {
  font-size: 12px;
  color: var(--color-text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-right a:hover {
  color: var(--color-primary);
}
.footer-divider {
  width: 1px;
  height: 14px;
  background: var(--color-border);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .footer-padrao {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .footer-right {
    gap: 6px 12px;
  }
  .footer-divider {
    display: none;
  }
}


/* ----------------------------------------------------------------
   20. NAVBAR — Cabeçalho PRPG/UFG
   ---------------------------------------------------------------- */
.top-navbar {
  height: 60px;
  min-height: 60px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 200;
  font-family: var(--font-main);
  gap: 16px;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.navbar-brand {
  font-family: var(--font-main);
  font-weight: var(--font-w-semibold);
  font-size: 16px;
  color: var(--color-primary);
  white-space: nowrap;
  letter-spacing: -0.1px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end;
}

.navbar-links a {
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
  line-height: 1.4;
}

.navbar-links a:hover {
  background-color: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
}

.navbar-links a.active {
  color: var(--color-primary);
  font-weight: var(--font-w-medium);
}

.nav-sep {
  height: 30px;
  width: 1px;
  background: var(--color-text);
  opacity: 0.2;
  margin: 0 6px;
  flex-shrink: 0;
}

.nav-btn-destaque {
  background: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
  border-radius: var(--radius-pill) !important;
  height: 33px;
  display: inline-flex !important;
  align-items: center;
  padding: 0 18px !important;
  font-weight: var(--font-w-medium);
  transition: var(--transition) !important;
}

.nav-btn-destaque:hover {
  background: var(--color-primary) !important;
  color: var(--color-primary-text) !important;
  text-decoration: none;
}

.nav-btn-destaque.active {
  background: var(--color-primary) !important;
  color: var(--color-primary-text) !important;
}

.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.navbar-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: var(--radius-xs);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar-hamburger.open span:nth-child(2) { opacity: 0; }
.navbar-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 150;
}

.navbar-overlay.open { display: block; }

.nav-dropdown { position: relative; }

.nav-dropdown-btn {
  font-size: 16px;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-dropdown-btn:hover { background-color: var(--color-surface); }

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  padding-top: 6px;
  right: 0;
  background: var(--color-bg);
  width: max-content;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  z-index: 50;
  overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown-content.open { display: block; }

.nav-dropdown-content a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 0;
  transition: var(--transition);
}

.nav-dropdown-content a:hover {
  background: var(--color-surface);
  text-decoration: none;
}

@media (max-width: 767px) {
  .top-navbar { padding: 0 16px; }
  .navbar-brand { font-size: 15px; }
  .navbar-hamburger { display: flex; }

  .navbar-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 60px;
    right: -290px;
    bottom: 0;
    width: 280px;
    background: var(--color-bg);
    padding: 8px 0;
    z-index: 99;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.14);
    gap: 0;
    overflow-y: auto;
    transition: right 0.28s ease;
  }

  .navbar-links.open { right: 0; }

  .navbar-links a {
    width: 100%;
    min-height: 50px;
    font-size: 18px;
    padding: 0 24px;
    border-radius: 0;
    display: flex !important;
    align-items: center;
  }

  .nav-sep { display: none; }

  .nav-btn-destaque {
    border-radius: 0 !important;
    height: 50px;
    width: 100%;
  }

  /* Dropdown de Projetos no menu mobile */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-btn {
    width: 100%;
    min-height: 50px;
    font-size: 18px;
    padding: 0 24px;
    border-radius: 0;
    justify-content: flex-start;
  }

  /* Desativa abertura por hover no mobile (só JS via .open) */
  .nav-dropdown:hover .nav-dropdown-content {
    display: none;
  }

  /* Dropdown vira lista inline — evita clipping do overflow-y: auto */
  .nav-dropdown-content {
    position: static;
    box-shadow: none;
    border-radius: 0;
    min-width: unset;
    width: 100%;
    background: var(--color-surface);
    overflow: visible;
    padding-top: 0;
  }

  .nav-dropdown:hover .nav-dropdown-content.open,
  .nav-dropdown-content.open {
    display: block;
  }

  .nav-dropdown-content a {
    padding: 14px 24px 14px 40px;
    font-size: 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-dropdown-content a:last-child {
    border-bottom: none;
  }

  /* Botão dark mode — mesmo estilo dos links no menu mobile */
  .darkmode-toggle {
    width: 100%;
    min-height: 50px;
    font-size: 22px;
    padding: 0 24px;
    border-radius: 0;
    justify-content: flex-start;
    border: none;
    background: transparent;
    text-align: left;
  }
}


/* ----------------------------------------------------------------
   21. DARK MODE — Paleta própria via CSS custom properties
   ---------------------------------------------------------------- */

/* Transição suave em todas as superfícies ao trocar tema */
html {
  transition:
    background-color .25s ease,
    color            .25s ease;
}

/* ── Paleta noturna — VS Code Dark+ inspired, legibilidade ────── */
html.darkmode {

  /* Verde PRPG — menta mais legível sobre fundo escuro */
  --color-primary:       #4EC9B0;
  --color-primary-light: rgba(78, 201, 176, 0.12);
  --color-primary-hover: #5ED5BC;
  --color-primary-text:  #ffffff;

  /* Dourado UFG — mais vivo no escuro */
  --color-accent:        #c9a84c;
  --color-accent-light:  rgba(201, 168, 76, 0.12);

  /* Texto — hierarquia clara, sem branco puro, sem cinza invisível */
  --color-text:          #D4D4D4;
  --color-text-mid:      #9E9E9E;
  --color-text-muted:    #808080;
  --color-text-disabled: #4A4A4A;
  --color-placeholder:   #6A6A6A;

  /* Superfícies — escuro mas não preto puro (reduz halation) */
  --color-bg:            #1E1E1E;
  --color-surface:       #252526;
  --color-surface-alt:   #2D2D2D;
  --color-surface-dark:  #181818;

  /* Bordas — visíveis sem agredir */
  --color-border:        #3E3E42;
  --color-border-light:  #2D2D2D;

  /* Semânticas — dessaturadas para conforto */
  --color-positive:      #4EC9B0;
  --color-negative:      #F48771;
  --color-warning:       #CCA700;
  --color-info:          #4FC1FF;

  /* Sombras — mínimas no dark (bordas fazem o trabalho) */
  --shadow-sm:     none;
  --shadow-card:   0 0 0 1px #3E3E42;
  --shadow-hover:  0 0 0 1px rgba(78, 201, 176, 0.30);
  --shadow-navbar: none;
  --shadow-md:     0 4px 16px rgba(0,0,0,0.40);

  /* Variáveis extras usadas no repositório */
  --prpg-green:      #4EC9B0;
  --prpg-green-dim:  rgba(78, 201, 176, 0.08);
}

/* ── Base ─────────────────────────────────────────────────────── */
html.darkmode body {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ── Logo da Escola de Pós — colorida, precisa ser preta no claro */
img.navbar-logo-img[alt="Escola de Pós"] {
  filter: brightness(0);
}

/* ── Todas as logos — branco no dark mode ─────────────────────── */
html.darkmode img.navbar-logo-img {
  filter: invert(1);
}

html.darkmode img.navbar-logo-img[alt="Escola de Pós"] {
  filter: brightness(0) invert(1);
}

/* ── Navbar ───────────────────────────────────────────────────── */
html.darkmode .top-navbar {
  background: var(--color-surface-dark);
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
}
html.darkmode .navbar-links a { color: var(--color-text-muted); }
html.darkmode .navbar-links a:hover,
html.darkmode .navbar-links a.active { color: var(--color-text); }

html.darkmode .navbar-overlay {
  background: rgba(0, 0, 0, 0.55);
}

/* Painel dropdown da navbar */
html.darkmode .nav-dropdown-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
html.darkmode .nav-dropdown-content a { color: var(--color-text-muted); }
html.darkmode .nav-dropdown-content a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

/* Menu mobile */
html.darkmode .navbar-links {
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
}

/* ── Inputs e selects ─────────────────────────────────────────── */
html.darkmode input,
html.darkmode select,
html.darkmode textarea {
  background: #3C3C3C;
  color: var(--color-text);
  border-color: var(--color-border);
}

html.darkmode input:focus,
html.darkmode select:focus,
html.darkmode textarea:focus {
  border-color: #007ACC;
  box-shadow: 0 0 0 1px #007ACC;
}

html.darkmode input::placeholder,
html.darkmode textarea::placeholder {
  color: var(--color-placeholder);
}

/* ── Badges — fundo translúcido, texto colorido ──────────────── */
html.darkmode .badge-green  { background: rgba(78,201,176,.12);  color: #4EC9B0; border: 1px solid rgba(78,201,176,.30); }
html.darkmode .badge-red    { background: rgba(244,135,113,.10); color: #F48771; border: 1px solid rgba(244,135,113,.25); }
html.darkmode .badge-yellow { background: rgba(204,167,0,.10);   color: #CCA700; border: 1px solid rgba(204,167,0,.25); }
html.darkmode .badge-blue   { background: rgba(79,193,255,.10);  color: #4FC1FF; border: 1px solid rgba(79,193,255,.25); }
html.darkmode .badge-gray   { background: var(--color-surface-alt); color: var(--color-text-mid); }
html.darkmode .badge-gold   { background: rgba(201,168,76,.10); color: #c9a84c; border: 1px solid rgba(201,168,76,.25); }

/* ── Alertas ──────────────────────────────────────────────────── */
html.darkmode .alert-success { background: rgba(78,201,176,.08);  border-color: rgba(78,201,176,.25);  color: #4EC9B0; }
html.darkmode .alert-error   { background: rgba(244,135,113,.08); border-color: rgba(244,135,113,.25); color: #F48771; }
html.darkmode .alert-warning { background: rgba(204,167,0,.08);   border-color: rgba(204,167,0,.25);   color: #CCA700; }
html.darkmode .alert-info    { background: rgba(79,193,255,.08);  border-color: rgba(79,193,255,.25);  color: #4FC1FF; }

/* ── Tabelas ─────────────────────────────────────────────────── */
html.darkmode thead th {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border-bottom-color: var(--color-border);
}
html.darkmode tbody td {
  border-bottom-color: var(--color-border-light);
  color: var(--color-text);
}
html.darkmode tbody tr:hover {
  background: #2A2D2E;
}

/* ── Links ────────────────────────────────────────────────────── */
html.darkmode a { color: #4FC1FF; }
html.darkmode a:hover { color: #6DCBFF; }

/* ── Headings ─────────────────────────────────────────────────── */
html.darkmode h1, html.darkmode h2, html.darkmode h3,
html.darkmode strong { color: #E0E0E0; }

/* ── Footer ───────────────────────────────────────────────────── */
html.darkmode .footer-padrao {
  background: var(--color-surface-dark);
  border-top-color: var(--color-border);
}

html.darkmode .footer-left      { color: var(--color-text-muted); }
html.darkmode .footer-right a   { color: var(--color-text-mid); }
html.darkmode .footer-right a:hover { color: var(--color-primary); }
html.darkmode .footer-divider   { background: var(--color-border); }

/* ── Scrollbar ────────────────────────────────────────────────── */
html.darkmode ::-webkit-scrollbar-track { background: transparent; }
html.darkmode ::-webkit-scrollbar-thumb { background: #424242; border-radius: 4px; }
html.darkmode ::-webkit-scrollbar-thumb:hover { background: #555555; }

/* ── Barras de progresso ─────────────────────────────────────── */
html.darkmode .barra-progresso-bg { background: #3E3E42; }
html.darkmode .barra-progresso-fill { background: #4EC9B0; box-shadow: none; }

/* ── Botão de toggle claro/escuro ─────────────────────────────── */
.darkmode-toggle {
  min-width: 61px;
  max-width: 61px;
  cursor: pointer;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text);
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.darkmode-toggle:hover { background: var(--color-surface); }


/* ================================================================
   22. MOBILE UX HARDENING — Touch, Typography, Layout
   ================================================================ */

/* ── P1: Touch targets mínimo 44px em mobile ── */
@media (max-width: 768px) {
  .btn-primario, .btn-outline, .btn-ghost,
  .navbar-btn, .btn-danger,
  button:not(.navbar-hamburger):not(.darkmode-toggle),
  summary,
  [role="button"] {
    min-height: 44px;
  }
}

/* ── P2: iOS zoom fix — inputs 16px em mobile ── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* ── P3: Breakpoint 480px — padding e layout ── */
@media (max-width: 480px) {
  .container,
  .container-wide,
  .container-fluid,
  .container-narrow {
    padding: 0 12px;
  }

  h1 { font-size: 20px; }
  h2 { font-size: 17px; }
  h3 { font-size: 15px; }
}

/* ── P4: Tabelas — scroll horizontal com indicador ── */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── P5: Pagination buttons — min 44px ── */
@media (max-width: 768px) {
  .btn-paginacao,
  .btn-page,
  .pag-btn,
  .page-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
