/* ============================================================
   SELECAO PETROBRAS DE JORNALISMO
   CSS Principal - Identidade Visual Petrobras
   Verde: #008542 | Amarelo: #FDC82F | Branco: #FFFFFF
   ============================================================ */

:root {
  --green:       #008542;
  --green-dark:  #005e2f;
  --green-light: #e8f5ee;
  --yellow:      #FDC82F;
  --yellow-dark: #e6b000;
  --white:       #FFFFFF;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-400:    #9ca3af;
  --gray-600:    #4b5563;
  --gray-800:    #1f2937;
  --red:         #dc2626;
  --blue:        #2563eb;
  --shadow:      0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius:      8px;
  --radius-lg:   12px;
  --transition:  all .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-50);
}

/* ============ UTILITÁRIOS ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ============ HEADER PUBLICO ============ */
.site-header {
  background: var(--green);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo .logo-text {
  color: var(--white);
  font-size: 13px;
  line-height: 1.3;
}
.site-logo .logo-text strong {
  display: block;
  font-size: 15px;
  color: var(--yellow);
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}
.site-nav a:hover { color: var(--yellow); }

/* Faixa amarela (sinal visual da Petrobras) */
.brand-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--yellow-dark) 100%);
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #00a854 100%);
  padding: 80px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(253, 200, 47, .06);
}
.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--yellow); }
.hero p {
  font-size: 17px;
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Contador regressivo */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 36px 0 0;
  flex-wrap: wrap;
}
.countdown-item {
  text-align: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 14px 22px;
  min-width: 80px;
}
.countdown-item .num {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--yellow);
  line-height: 1;
}
.countdown-item .lbl {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ============ BOTOES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary   { background: var(--yellow); color: var(--green-dark); border-color: var(--yellow); }
.btn-primary:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn-green     { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline   { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn-danger    { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-sm        { padding: 8px 16px; font-size: 13px; }
.btn-lg        { padding: 15px 32px; font-size: 17px; }
.btn-block     { display: flex; width: 100%; }

/* ============ CARDS ============ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
}
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ============ FORMULARIOS ============ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.form-label .required { color: var(--red); margin-left: 3px; }
.form-label .hint { font-weight: 400; color: var(--gray-400); font-size: 12px; margin-left: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  font-family: inherit;
  line-height: 1.5;
}
.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 133, 66, .12);
}
.form-control:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.form-control.is-error { border-color: var(--red); }

/* Contador de caracteres */
.char-counter {
  text-align: right;
  font-size: 12px;
  margin-top: 4px;
  color: var(--gray-400);
  transition: var(--transition);
}
.char-counter.warning { color: #f59e0b; }
.char-counter.danger  { color: var(--red); }

/* Upload area */
.upload-area {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--green);
  background: var(--green-light);
}
.upload-area .icon { font-size: 36px; color: var(--gray-400); margin-bottom: 12px; }
.upload-area p { color: var(--gray-600); font-size: 14px; }
.upload-area .link { color: var(--green); font-weight: 600; text-decoration: underline; }
.upload-success { border-style: solid; border-color: var(--green); background: var(--green-light); }

/* ============ TABELAS ============ */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--gray-50); }
.data-table tr:last-child td { border-bottom: none; }

/* ============ BADGES / STATUS ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.badge-green    { background: #dcfce7; color: #166534; }
.badge-yellow   { background: #fef9c3; color: #854d0e; }
.badge-red      { background: #fee2e2; color: #991b1b; }
.badge-blue     { background: #dbeafe; color: #1e40af; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }
.badge-purple   { background: #f3e8ff; color: #6b21a8; }

/* ============ ALERTAS ============ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning  { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.alert-info     { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============ SIDEBAR ADMIN ============ */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 256px;
  background: var(--green-dark);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform .3s ease;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo h1 { font-size: 14px; color: var(--yellow); font-weight: 700; }
.sidebar-logo p  { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 3px; }
.sidebar-nav { padding: 16px 0; }
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.35);
  padding: 12px 20px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: rgba(255,255,255,.07); color: var(--white); }
.sidebar-link.active {
  background: rgba(253,200,47,.12);
  color: var(--yellow);
  border-left-color: var(--yellow);
  font-weight: 600;
}
.sidebar-link .icon { width: 18px; text-align: center; font-size: 15px; }
.sidebar-link .badge-count {
  margin-left: auto;
  background: var(--yellow);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.main-content {
  flex: 1;
  margin-left: 256px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}
.topbar h2 { font-size: 18px; color: var(--gray-800); font-weight: 700; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--gray-600); }
.content-area { padding: 28px; flex: 1; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
}
.stat-card.yellow { border-left-color: var(--yellow); }
.stat-card.red    { border-left-color: var(--red); }
.stat-card.blue   { border-left-color: var(--blue); }
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--gray-800); line-height: 1; }
.stat-card .lbl { font-size: 13px; color: var(--gray-400); margin-top: 6px; }

/* Progress bar */
.progress-bar { background: var(--gray-200); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 20px; transition: width .5s ease; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.tab:hover { color: var(--green); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }

/* Stepper (inscricao) */
.stepper { display: flex; margin-bottom: 32px; position: relative; }
.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.step.active .step-num { background: var(--green); color: var(--white); }
.step.done .step-num   { background: var(--yellow); color: var(--green-dark); }
.step-label { font-size: 12px; color: var(--gray-400); text-align: center; max-width: 80px; line-height: 1.3; }
.step.active .step-label, .step.done .step-label { color: var(--gray-800); font-weight: 600; }

/* ============ FOOTER PUBLICO ============ */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.6);
  padding: 40px 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 32px;
}
.footer-grid h4 { color: var(--yellow); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-grid a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 14px; display: block; padding: 3px 0; transition: var(--transition); }
.footer-grid a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .5;
  transition: opacity .3s;
  text-decoration: none;
}
.footer-brand:hover { opacity: .8; }
.footer-brand-text { font-size: 11px; color: rgba(255,255,255,.6); }
.footer-brand-text strong { display: block; color: rgba(255,255,255,.75); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .hero { padding: 50px 20px 40px; }
  .site-nav { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stepper::before { display: none; }
  .step-label { display: none; }
  .container { padding: 0 16px; }
  .content-area { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .countdown { gap: 10px; }
  .countdown-item { padding: 10px 14px; min-width: 64px; }
  .countdown-item .num { font-size: 24px; }
}

/* ============ PRINT ============ */
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .btn, .no-print { display: none !important; }
  .main-content { margin: 0; }
  .content-area { padding: 0; }
  body { background: white; }
}

/* ============ ANIMACOES ============ */
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn .3s ease forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
