/* ============================================================
   MAIN.CSS — Variáveis, Reset, Layout, Tipografia, Sidebar
   Projeto Atingir MRF — Belgo Arames 2026
   Padrão Visual: Belgo Arames (BBP)
   ============================================================ */

/* --- Variáveis de Design — Padrão Belgo Arames --- */
:root {
  --bg:        #f5f7fa;
  --bg2:       #ffffff;
  --bg3:       #edf1f7;
  --bg4:       #e8ecf2;
  --card:      #ffffff;
  --card-hover:#f9fafb;
  --border:    #e2e8f0;
  --border-light: #cbd5e1;
  --text:      #1f2937;
  --text2:     #6b7280;
  --text3:     #9ca3af;
  --accent:    #003B4A;
  --accent2:   #006277;
  --accent3:   #00A799;
  --green:     #00A799;
  --green-bg:  rgba(0,167,153,.1);
  --yellow:    #FDB913;
  --yellow-bg: rgba(253,185,19,.1);
  --red:       #ED1C24;
  --red-bg:    rgba(237,28,36,.08);
  --orange:    #FF6C00;
  --orange-bg: rgba(255,108,0,.08);
  --purple:    #7c3aed;
  --purple-bg: rgba(124,58,237,.08);
  --sidebar-w: 270px;
  --header-h:  0px;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- Tipografia --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; }

/* --- Links --- */
a { color: var(--accent3); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ============================================================
   SIDEBAR — Gradiente Belgo Arames
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #003B4A 0%, #006277 100%);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #00A799, #00D4C5);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
  letter-spacing: 1px;
}
.sidebar-logo h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.sidebar-logo h1 span {
  color: #00D4C5;
}
.sidebar-meta {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}
.sidebar-badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
}
.sidebar-badge.year {
  background: rgba(0,167,153,.3);
  color: #fff;
}
.sidebar-badge.status {
  background: rgba(253,185,19,.2);
  color: #FDB913;
  border: 1px solid rgba(253,185,19,.3);
}

/* Nav */
.nav-section {
  padding: 16px 0 8px;
  flex: 1;
  overflow-y: auto;
}
.nav-group-title {
  padding: 6px 24px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.4);
  font-weight: 700;
  margin-top: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav-item.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-left-color: #FDB913;
}
.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: .7;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-item .nav-num {
  font-size: 10px;
  background: rgba(255,255,255,.1);
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: auto;
  font-weight: 600;
  color: rgba(255,255,255,.5);
}
.nav-item.active .nav-num {
  background: #FDB913;
  color: #003B4A;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 10px;
  color: rgba(255,255,255,.35);
  flex-shrink: 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

.page {
  display: none;
  padding: 36px 40px;
  max-width: 1440px;
  animation: fadeIn .4s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page header */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--text2);
  max-width: 700px;
}

/* Section titles */
.section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent3);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text2);
  margin: -10px 0 16px 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .page { padding: 24px; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-bottom: 1px solid var(--border);
  }
  .main { margin-left: 0; }
  .page { padding: 16px; }
}
