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

:root {
  --primary: #1a3a5c;
  --primary-light: #2563a8;
  --bg: #f6f8fc;
  --sidebar-w: 230px;
}

body { background: var(--bg); font-family: 'Inter', 'Segoe UI', sans-serif; font-size: 0.95rem; }

/* LOGIN */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
}
.login-card {
  background: #fff;
  border-radius: 4px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.login-logo { font-size: 1.8rem; color: var(--primary); }
.login-title { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.login-subtitle { color: #6c757d; font-size: 0.82rem; }

/* LAYOUT */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #1e4268 0%, #152f4a 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand .brand-name { font-weight: 700; font-size: 1rem; }
.sidebar-brand .brand-sub  { font-size: 0.75rem; opacity: 0.65; }
.sidebar-nav { flex: 1; padding: 0.75rem 0; }
.sidebar .nav-item { margin: 0.1rem 0.6rem; }
.sidebar .nav-link {
  color: rgba(255,255,255,0.88) !important;
  border-radius: 3px;
  padding: 0.5rem 0.9rem;
  padding-left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.10);
  color: #fff !important;
}
.sidebar .nav-link.active {
  background: rgba(255,255,255,0.13);
  color: #fff !important;
  border-left-color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.sidebar-user {
  padding: 0.9rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

.main-content {
  margin-left: var(--sidebar-w);
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* CARDS */
.tool-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.tool-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(26,58,92,0.11);
  transform: translateY(-1px);
}

/* ANÁLISE */
.analysis-area {
  background: #fff;
  border-radius: 10px;
  padding: 1.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.drop-zone {
  border: 1px dashed #adb5bd;
  border-radius: 6px;
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: #6c757d;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: #f4f7fb;
}
.result-box {
  background: #f8f9fa;
  border-left: 3px solid var(--primary-light);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.7;
  max-height: 500px;
  overflow-y: auto;
}
.result-box.recurso { border-left-color: #dc3545; }
.result-box.anotar  { border-left-color: #198754; }

/* BADGE */
.badge-admin    { background: #1a3a5c; color: #fff; }
.badge-assessor { background: #6c757d; color: #fff; }

/* LOADING */
.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
}
.spinner-overlay.active { display: flex; }

/* TOAST */
.toast-container { z-index: 99999; }

/* TABLE */
.table-sm td, .table-sm th { vertical-align: middle; font-size: 0.88rem; }

/* CONFIANÇA */
.confidence-banner { transition: background 0.2s, border-color 0.2s; }
.conf-icon { min-width: 2rem; text-align: center; }

/* MARKDOWN */
.result-box h1, .result-box h2, .result-box h3 { font-size: 0.92rem; font-weight: 700; color: var(--primary); }
.result-box strong { color: #333; }

/* CARDS DOS PASSOS */
.card { border-radius: 8px; border-color: #e2e8f0; }
.card-header { font-size: 0.88rem; font-weight: 600; letter-spacing: 0.03em; border-radius: 8px 8px 0 0 !important; }
.card.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important; }

@media (max-width: 768px) {
  .sidebar { width: 100%; min-height: auto; position: relative; }
  .main-content { margin-left: 0; }
}

/* ── NEWS WIDGETS (dashboard) ──────────────────────────────── */
.news-widget {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}
.news-widget-header {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8faff;
}
.news-widget-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.news-widget-tabs {
  display: flex;
  background: #e9eef5;
  border-radius: 3px;
  padding: 2px;
  gap: 1px;
}
.news-widget-tab {
  background: none;
  border: none;
  padding: 0.18rem 0.6rem;
  font-size: 0.71rem;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.news-widget-tab.active { background: var(--primary); color: #fff; }
.news-item {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #f8faff; }
.news-item-source {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}
.news-item-title {
  font-size: 0.81rem;
  font-weight: 500;
  line-height: 1.4;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-title a { color: inherit; text-decoration: none; }
.news-item-title a:hover { color: var(--primary-light); }
.news-item-date { font-size: 0.63rem; color: #b0bec5; margin-top: 0.1rem; }

/* ═══════════════════════════════════════════════════════════════
   SITE ACADÊMICO — shandortorok.com.br
   ═══════════════════════════════════════════════════════════════ */

.site-body { background: #fff; font-family: 'Inter', 'Segoe UI', sans-serif; font-size: 0.95rem; }

/* NAVBAR DO SITE */
.site-navbar {
  background: var(--primary);
  padding: 0.65rem 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: box-shadow 0.2s;
}
.site-navbar.scrolled {
  box-shadow: 0 3px 18px rgba(0,0,0,0.28);
}
.site-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-nav-link {
  color: rgba(255,255,255,0.78) !important;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem !important;
  border-radius: 3px;
  transition: color 0.12s, background 0.12s;
}
.site-nav-link:hover, .site-nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
}
.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  padding: 0.22rem 0.65rem;
  border-radius: 3px;
  transition: border-color 0.12s, color 0.12s;
}
.lang-toggle:hover {
  border-color: #fff;
  color: #fff;
}

/* HERO */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1rem;
}
.hero-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
  text-transform: uppercase;
}
.hero-name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}
.hero-tagline {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.88;
  max-width: 540px;
}
.btn-hero-primary {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.88rem;
  transition: opacity 0.15s;
}
.btn-hero-primary:hover { opacity: 0.9; color: var(--primary); }
.btn-hero-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-hero-outline:hover { border-color: #fff; color: #fff; }

.hero-photo-wrapper { position: relative; display: inline-block; }
.hero-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.3);
  box-shadow: 0 6px 28px rgba(0,0,0,0.28);
}
.hero-photo-placeholder {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 4px solid rgba(255,255,255,0.2);
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.35);
}

/* SEÇÕES */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  display: inline-block;
  margin-bottom: 1.5rem;
}
.section-text {
  color: #444;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.site-section-alt { background: #f4f7fb; }

/* PAGE HEADER */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 0;
}
.page-header-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.page-header-sub {
  opacity: 0.75;
  font-size: 0.9rem;
  margin: 0;
}

/* RESEARCH CARDS (homepage) */
.research-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.research-card:hover {
  box-shadow: 0 4px 18px rgba(26,58,92,0.1);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.research-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8f0fe;
  margin-bottom: 1rem;
}
.research-icon {
  font-size: 1.4rem;
  color: var(--primary-light);
  line-height: 1;
}
.research-card-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.research-card-text { font-size: 0.85rem; color: #6c757d; line-height: 1.6; margin: 0; }

/* HIGHLIGHT CARDS (homepage) */
.highlight-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.5rem;
  transition: box-shadow 0.15s;
}
.highlight-card:hover { box-shadow: 0 2px 12px rgba(26,58,92,0.1); }
.highlight-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.highlight-tag-event { background: var(--primary-light); }
.highlight-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.highlight-text { font-size: 0.88rem; color: #555; line-height: 1.65; }
.highlight-link { font-size: 0.85rem; color: var(--primary-light); font-weight: 600; text-decoration: none; }
.highlight-link:hover { text-decoration: underline; }

/* RESEARCH PROJECT (pesquisas.html) */
.research-project-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary-light);
  border-radius: 6px;
  padding: 2rem;
}
.project-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-institution { font-size: 0.82rem; color: #6c757d; margin-top: 0.2rem; }
.project-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.project-text { color: #444; line-height: 1.75; margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tag {
  background: #e9f0f8;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* INTEREST CARDS (pesquisas.html) */
.interest-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.interest-icon { font-size: 1.4rem; color: var(--primary-light); min-width: 2rem; padding-top: 0.1rem; }
.interest-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 0.35rem; }
.interest-text { font-size: 0.85rem; color: #6c757d; line-height: 1.6; margin: 0; }

/* AFFILIATION (pesquisas.html) */
.affiliation-card {
  background: #f4f7fb;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.5rem;
}
.affiliation-name { font-weight: 700; color: var(--primary); font-size: 1rem; }
.affiliation-inst { font-size: 0.85rem; color: #6c757d; }
.affiliation-text { font-size: 0.88rem; color: #444; line-height: 1.7; margin: 0; }

/* PUBLICAÇÕES (publicacoes.html) */
.pub-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.pub-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.25rem;
}
.pub-book { background: var(--primary); }
.pub-article { background: #2e7d32; }
.pub-conf { background: var(--primary-light); }
.pub-workshop { background: #6c757d; }
.pub-year { font-size: 0.8rem; color: #6c757d; font-weight: 600; display: inline-block; }
.pub-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin: 0.4rem 0 0.2rem; }
.pub-meta { font-size: 0.85rem; color: #555; }
.pub-venue { font-size: 0.85rem; color: #6c757d; margin-bottom: 0.5rem; }
.pub-abstract { font-size: 0.85rem; color: #444; line-height: 1.65; margin-bottom: 0; }

/* TIMELINE (publicacoes.html) */
.timeline { border-left: 2px solid #e2e8f0; padding-left: 1.5rem; margin-left: 1rem; }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--primary-light);
}
.timeline-year { font-size: 0.75rem; font-weight: 700; color: #6c757d; margin-bottom: 0.4rem; }
.timeline-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin: 0.4rem 0 0.2rem; }
.timeline-venue { font-size: 0.83rem; color: #6c757d; }
.timeline-content { margin-top: -0.1rem; }

/* IA E DIREITO (ia-e-direito.html) */
.feature-card {
  background: #f4f7fb;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.25rem;
}
.feature-icon { font-size: 1.3rem; color: var(--primary-light); margin-bottom: 0.5rem; }
.feature-title { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.feature-text { font-size: 0.83rem; color: #555; line-height: 1.6; margin: 0; }
.ia-access-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #5d4037;
}
.stack-list { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #f4f7fb;
  border-radius: 4px;
  font-size: 0.88rem;
}
.stack-label { font-weight: 700; color: var(--primary); min-width: 110px; }
.stack-value { color: #444; }

/* CONTATO (contato.html) */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #f4f7fb;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
}
.contact-icon { font-size: 1.5rem; color: var(--primary-light); min-width: 2rem; text-align: center; }
.contact-label { font-size: 0.75rem; font-weight: 700; color: #6c757d; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.1rem; }
.contact-value { font-size: 0.92rem; color: var(--primary); font-weight: 500; text-decoration: none; }
a.contact-value:hover { text-decoration: underline; }

/* FOOTER DO SITE */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 1.5rem 0;
  margin-top: 0;
  font-size: 0.85rem;
}
.footer-name { font-weight: 700; color: #fff; font-size: 0.9rem; }
.footer-location { font-size: 0.8rem; }
.footer-links { display: flex; gap: 1.25rem; justify-content: flex-end; align-items: center; }
.footer-link { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; transition: color 0.12s; }
.footer-link:hover { color: #fff; }

/* FADE-IN ao scrollar */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 768px) {
  .hero-section { padding: 3rem 0 2.5rem; }
  .hero-name { font-size: 1.8rem; }
  .hero-photo, .hero-photo-placeholder { width: 180px; height: 180px; }
  .footer-links { justify-content: flex-start; margin-top: 0.5rem; }
}
