/* ============================================================
   TukeTulole - Estilos Globais
   Paleta: Azul #1A3A5C / #2E75B6 | Verde #1F7A4D | Laranja #E07B39
   ============================================================ */

:root {
  --primary:       #1E4A76;
  --primary-dark:  #0B2F5F;
  --secondary:     #1F7A4D;
  --accent:        #E67E22;
  --accent-light:  #F39C12;
  --bg:            #FFFFFF;
  --bg-soft:       #F7F9FC;
  --bg-card:       #FFFFFF;
  --text:          #0F172A;
  --text-muted:    #475569;
  --border:        #E2E8F0;
  --danger:        #DC2626;
  --success:       #16A34A;
  --warning:       #D97706;
  --shadow:        0 8px 20px rgba(0,0,0,.03), 0 2px 6px rgba(0,0,0,.05);
  --shadow-hover:  0 20px 30px -12px rgba(0,0,0,.12);
  --radius:        14px;
  --radius-lg:     28px;
  --transition:    .25s ease;
  --font:          'Inter', 'Segoe UI', Arial, sans-serif;
  --font-display:  'Montserrat', 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* Tipografia display — títulos, logo, navegação */
h1, h2, h3, .navbar-logo, .nav-link, .section-title,
.hero-title, .pillar-card h3, .card-title, .ap-logo,
.btn { font-family: var(--font-display); }

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.page { min-height: calc(100vh - 64px - 60px); padding: 2rem 0; }
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; color: var(--text); font-weight: 700; }

/* ── Navbar pública (glassmorphism) ───────────────────────── */
.navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,.05);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}
.navbar-logo {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.5px;
}
.navbar-logo span {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.navbar-nav a {
  color: var(--text);
  padding: .5rem .9rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.navbar-nav a:hover { color: var(--accent); background: rgba(230,126,34,.06); }
.navbar-nav a.active { color: var(--accent); background: rgba(230,126,34,.08); }

.navbar-actions { display: flex; align-items: center; gap: .5rem; }
.navbar-actions .btn-accent {
  border-radius: 999px;
  padding: .5rem 1.1rem;
  box-shadow: 0 4px 12px rgba(230,126,34,.25);
}

/* Dropdown (Conteúdos) */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.18);
  min-width: 220px;
  z-index: 200;
  list-style: none;
  padding: .5rem 0;
  border: 1px solid rgba(0,0,0,.04);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.1rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 0;
  background: none;
}
.nav-dropdown .dropdown-menu li a i { color: var(--accent); width: 18px; }
.nav-dropdown .dropdown-menu li a:hover { background: rgba(11,47,95,.04); color: var(--primary); }

/* Toggle modo escuro */
.dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--primary);
  padding: .4rem .55rem;
  border-radius: 50%;
  transition: background var(--transition), transform var(--transition);
}
.dark-mode-toggle:hover { background: rgba(11,47,95,.06); transform: rotate(15deg); }

.badge-notif {
  position: relative;
  display: inline-flex;
}
.badge-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .65rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 700;
}

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Sidebar / Mobile menu ──────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--primary-dark);
  z-index: 999;
  padding: 1rem;
  flex-direction: column;
  gap: .5rem;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,.85);
  padding: .75rem 1rem;
  border-radius: 8px;
  display: block;
}
.mobile-menu a:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.4rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font-display);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

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

.btn-secondary{ background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-secondary:hover{ filter: brightness(1.1); }

.btn-accent   { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px rgba(230,126,34,.25); }
.btn-accent:hover   { background: #D35400; border-color: #D35400; box-shadow: 0 8px 18px rgba(230,126,34,.35); }

.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover  { background: var(--primary); color: #fff; }

.btn-ghost    { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover    { background: var(--bg); }

.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.card-text { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem;
             display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: .75rem; font-size: .78rem; color: var(--text-muted); }

/* ── Grid ───────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Formulários ────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.form-control {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,117,182,.15);
}
.form-control::placeholder { color: #aaa; }
.form-error { color: var(--danger); font-size: .8rem; margin-top: .3rem; }
.form-hint  { color: var(--text-muted); font-size: .8rem; margin-top: .3rem; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* ── Alertas ────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  border-left: 4px solid transparent;
  margin-bottom: 1rem;
}
.alert-success { background: #ECFDF5; color: #065F46; border-color: var(--success); }
.alert-danger  { background: #FEF2F2; color: #991B1B; border-color: var(--danger); }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: var(--warning); }
.alert-info    { background: #EFF6FF; color: #1E40AF; border-color: var(--primary); }

/* ── Badges / Tags ──────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-primary  { background: #DBEAFE; color: var(--primary-dark); }
.badge-success  { background: #DCFCE7; color: #15803D; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-gray     { background: #F3F4F6; color: #374151; }

/* ── Tabelas ────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 700; color: var(--primary-dark); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: #F9FAFB; }

/* ── Paginação ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-top: 2rem; }
.pagination button {
  padding: .4rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  transition: all var(--transition);
}
.pagination button.active, .pagination button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.4rem; color: var(--text-muted); line-height: 1; }
.modal-body  { padding: 1.5rem; }
.modal-footer{ padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Toast ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--primary-dark);
  color: #fff;
  padding: .85rem 1.25rem;
  border-radius: 8px;
  font-size: .875rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 260px;
  max-width: 380px;
  animation: slideIn .3s ease;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ── Hero (storytelling) ────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 12% 30%, rgba(30,74,118,.06), transparent 60%),
    radial-gradient(circle at 88% 70%, rgba(230,126,34,.05), transparent 55%);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 820px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--primary-dark), #2C5282);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.5px;
}
.hero-title span { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.hero-subtitle {
  font-size: 1.15rem;
  color: #2c3e50;
  max-width: 620px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Section ────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: inline-block;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
  margin-top: .5rem;
}

/* ── 4 pilares (Artigos / Livros / Cursos / Oportunidades) ─ */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  margin: 1rem 0 3rem;
}
.pillar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.03);
  text-decoration: none;
  color: inherit;
  display: block;
}
.pillar-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}
.pillar-icon {
  font-size: 2.6rem;
  color: var(--accent);
  margin-bottom: 1.1rem;
  display: inline-flex;
  width: 72px; height: 72px;
  align-items: center; justify-content: center;
  background: rgba(230,126,34,.08);
  border-radius: 50%;
}
.pillar-card h3 {
  font-size: 1.2rem;
  margin-bottom: .4rem;
  color: var(--text);
  font-weight: 700;
}
.pillar-card p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.5;
}
.pillar-cta {
  margin-top: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  font-size: .88rem;
}

/* ── Tabs + carrossel horizontal ──────────────────────────── */
.tabs {
  display: flex;
  gap: .5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.tab-btn {
  background: none;
  border: none;
  padding: .75rem 1.1rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: .92rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  color: #4a5568;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.carousel-container {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}
.carousel-container::-webkit-scrollbar { height: 6px; }
.carousel-container::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

.content-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.content-card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.content-card .badge {
  background: #fef3e6;
  color: var(--accent);
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: .25rem .75rem;
  display: inline-block;
  width: max-content;
}
.content-card .card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: .75rem 0 .35rem;
  color: var(--text);
}
.content-card .meta {
  font-size: .78rem;
  color: #718096;
  margin: .35rem 0;
}
.content-card .btn-card {
  margin-top: auto;
  background: none;
  border: 1px solid #e2e8f0;
  padding: .55rem 0;
  width: 100%;
  border-radius: 60px;
  font-weight: 500;
  font-family: var(--font-display);
  cursor: pointer;
  transition: .2s;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  display: block;
}
.content-card .btn-card:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.empty-placeholder {
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  color: #4a5568;
  flex: 1;
}

/* ── Jornada académica (recomendação) ─────────────────────── */
.journey {
  background: linear-gradient(120deg, #eef2f9, #ffffff);
  border-radius: 48px;
  padding: 2.5rem 2rem;
  margin: 3rem 0;
  text-align: center;
}
.journey .journey-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: .25rem;
}
.journey h3 { margin: .75rem 0 .35rem; font-size: 1.4rem; color: var(--text); }
.journey p { color: var(--text-muted); }
.rec-card {
  background: #fff;
  max-width: 460px;
  margin: 1.25rem auto 0;
  padding: 1rem 1.25rem;
  border-radius: 60px;
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: center;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.rec-card button {
  background: rgba(230,126,34,.08);
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.rec-card button:hover { background: rgba(230,126,34,.18); transform: scale(1.08); }
.rec-card button:active { transform: scale(.95); }

/* ── Footer público ───────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: #cbd5e0;
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
  border-radius: 32px 32px 0 0;
}
.site-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.site-footer .footer-brand strong { color: #fff; }
.site-footer .footer-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-footer .footer-links a {
  color: #cbd5e0;
  text-decoration: none;
  font-size: .9rem;
  transition: color var(--transition);
}
.site-footer .footer-links a:hover { color: var(--accent); }
.site-footer .footer-badges {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .78rem;
}
.site-footer .footer-badges a {
  color: rgba(203,213,224,.85);
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer .footer-badges a:hover { color: var(--accent); }
.site-footer .footer-badges i { color: var(--accent); margin-right: .35rem; }

/* ── Modo escuro (apenas público) ─────────────────────────── */
/* Regra: TODOS os textos devem ficar brancos/legíveis sobre fundo escuro. */
body.dark {
  background: #0B1220;
  color: #FFFFFF;
}

/* Default: qualquer elemento textual herda branco */
body.dark p,
body.dark span,
body.dark a,
body.dark li,
body.dark td,
body.dark th,
body.dark label,
body.dark small,
body.dark strong,
body.dark em,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 { color: #FFFFFF; }

/* Texto secundário ainda visível */
body.dark .text-muted,
body.dark .card-text,
body.dark .card-meta,
body.dark .form-hint,
body.dark .meta,
body.dark .ap-user-role,
body.dark .footer-badges { color: #CBD5E1 !important; }

/* Navbar translúcida sobre fundo escuro */
body.dark .navbar {
  background: rgba(15,23,42,.92);
  border-bottom-color: rgba(255,255,255,.08);
}
body.dark .navbar-logo { background: linear-gradient(135deg, #fff, #cbd5e1); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.dark .navbar-logo span { color: var(--accent); -webkit-text-fill-color: var(--accent); }
body.dark .navbar-nav a { color: #FFFFFF; }
body.dark .navbar-nav a:hover { color: var(--accent-light); background: rgba(230,126,34,.12); }
body.dark .dark-mode-toggle { color: #FFFFFF; }
body.dark .dark-mode-toggle:hover { background: rgba(255,255,255,.1); }

/* Cartões (pilar, content, journey, generic) */
body.dark .pillar-card,
body.dark .content-card,
body.dark .rec-card,
body.dark .card,
body.dark .modal,
body.dark .empty-placeholder {
  background: #1E293B;
  border-color: rgba(255,255,255,.06);
  color: #FFFFFF;
}
body.dark .pillar-card h3,
body.dark .content-card .card-title,
body.dark .card-title,
body.dark .modal-title,
body.dark .page-title,
body.dark .section-title { color: #FFFFFF; }
body.dark .pillar-cta { color: var(--accent-light); }

/* Botões outline e ghost: contorno e texto claros */
body.dark .btn-outline { color: #FFFFFF; border-color: #FFFFFF; }
body.dark .btn-outline:hover { background: #FFFFFF; color: var(--primary-dark); }
body.dark .btn-ghost { color: #CBD5E1; }
body.dark .btn-ghost:hover { background: rgba(255,255,255,.08); color: #FFFFFF; }

/* Hero */
body.dark .hero {
  background:
    radial-gradient(circle at 12% 30%, rgba(255,255,255,.04), transparent 60%),
    radial-gradient(circle at 88% 70%, rgba(230,126,34,.10), transparent 55%);
}
body.dark .hero-title {
  background: linear-gradient(135deg, #FFFFFF, #93C5FD);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.dark .hero-subtitle { color: #E2E8F0; }

/* Jornada */
body.dark .journey {
  background: linear-gradient(120deg, #0F172A, #1E293B);
}

/* Dropdown */
body.dark .nav-dropdown .dropdown-menu {
  background: #1E293B;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.6);
}
body.dark .nav-dropdown .dropdown-menu li a { color: #FFFFFF; }
body.dark .nav-dropdown .dropdown-menu li a:hover { background: rgba(255,255,255,.08); color: var(--accent-light); }

/* Tabs */
body.dark .tabs { border-bottom-color: rgba(255,255,255,.1); }
body.dark .tab-btn { color: #CBD5E1; }
body.dark .tab-btn:hover { color: var(--accent-light); }
body.dark .tab-btn.active { color: var(--accent-light); border-bottom-color: var(--accent-light); }

/* Tabelas */
body.dark table { color: #FFFFFF; }
body.dark th { background: #0F172A; color: #FFFFFF; border-bottom-color: rgba(255,255,255,.1); }
body.dark td { border-bottom-color: rgba(255,255,255,.08); }
body.dark tr:hover td { background: rgba(255,255,255,.04); }

/* Formulários */
body.dark .form-control {
  background: #0F172A;
  border-color: rgba(255,255,255,.15);
  color: #FFFFFF;
}
body.dark .form-control::placeholder { color: rgba(255,255,255,.4); }
body.dark .form-label { color: #FFFFFF; }

/* Badges (manter cores informativas mas fundo um pouco mais opaco) */
body.dark .badge-primary { background: rgba(59,130,246,.15); color: #BFDBFE; }
body.dark .badge-success { background: rgba(34,197,94,.15);  color: #BBF7D0; }
body.dark .badge-warning { background: rgba(234,179,8,.15);  color: #FDE68A; }
body.dark .badge-danger  { background: rgba(220,38,38,.18);  color: #FCA5A5; }
body.dark .badge-gray    { background: rgba(255,255,255,.08); color: #E5E7EB; }
body.dark .content-card .badge { background: rgba(230,126,34,.18); color: #FCD9B6; }

/* Footer */
body.dark .site-footer { background: #050B17; }
body.dark .site-footer .footer-links a { color: #E2E8F0; }
body.dark .site-footer .footer-links a:hover { color: var(--accent-light); }

/* Alertas — manter contraste */
body.dark .alert-success { background: rgba(34,197,94,.12);  color: #DCFCE7; border-color: #22C55E; }
body.dark .alert-danger  { background: rgba(220,38,38,.12);  color: #FECACA; border-color: #EF4444; }
body.dark .alert-warning { background: rgba(234,179,8,.12);  color: #FDE68A; border-color: #EAB308; }
body.dark .alert-info    { background: rgba(59,130,246,.12); color: #BFDBFE; border-color: #3B82F6; }

/* ── Sidebar layout ─────────────────────────────────────── */
.layout-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}
.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}
.sidebar-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .75rem; }
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem;
  border-radius: 6px;
  font-size: .875rem;
  color: var(--text);
  transition: background var(--transition);
}
.sidebar-nav li a:hover, .sidebar-nav li a.active { background: #EFF6FF; color: var(--primary); }

/* ── Inbox ──────────────────────────────────────────────── */
.message-list { display: flex; flex-direction: column; gap: .75rem; }
.message-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.message-item:hover { border-color: var(--primary); }
.message-item.unread { border-color: var(--accent); background: #FFFBF5; }
.message-sender { font-weight: 700; font-size: .9rem; }
.message-subject { font-size: .875rem; color: var(--text-muted); margin-top: .2rem; }
.message-date { font-size: .75rem; color: var(--text-muted); margin-top: .4rem; }

/* ── Progresso ──────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width .5s ease;
}

/* ── Admin Panel Layout ─────────────────────────────────── */
body.admin-mode .navbar,
body.admin-mode footer,
body.admin-mode .mobile-menu { display: none !important; }

body.admin-mode { background: #F0F4F8; }

#admin-frame {
  display: flex;
  min-height: 100vh;
}
#admin-frame.hidden { display: none; }

/* Sidebar */
.ap-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s ease;
}
.ap-logo {
  padding: 1.25rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: -.01em;
}
.ap-logo span { color: var(--accent); }
.ap-logo small {
  font-size: .65rem;
  font-weight: 500;
  background: rgba(255,255,255,.15);
  padding: .15rem .4rem;
  border-radius: 4px;
  color: rgba(255,255,255,.8);
  letter-spacing: .03em;
}

.ap-nav { flex: 1; padding: 1rem 0; }
.ap-nav-group { margin-bottom: 1.5rem; }
.ap-nav-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  padding: 0 1.25rem;
  margin-bottom: .35rem;
}
.ap-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem 1.25rem;
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.ap-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.ap-nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-left-color: var(--accent);
  font-weight: 600;
}
.ap-nav-link .nav-icon { width: 18px; text-align: center; font-style: normal; }

.ap-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.ap-user-info {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .75rem;
}
.ap-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .875rem; color: #fff;
  flex-shrink: 0;
}
.ap-user-name { font-size: .825rem; font-weight: 600; color: #fff; }
.ap-user-role { font-size: .7rem; color: rgba(255,255,255,.5); }
.ap-footer-links { display: flex; flex-direction: column; gap: .4rem; }
.ap-footer-link {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  padding: .4rem .5rem;
  border-radius: 6px;
  display: flex; align-items: center; gap: .5rem;
}
.ap-footer-link:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Main content area */
.ap-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.ap-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ap-breadcrumb {
  font-size: .875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ap-breadcrumb strong { color: var(--text); font-weight: 600; }
.ap-topbar-actions { display: flex; align-items: center; gap: .75rem; }
.ap-public-link {
  font-size: .8rem;
  padding: .35rem .85rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; align-items: center; gap: .4rem;
}
.ap-public-link:hover { border-color: var(--primary); color: var(--primary); }
.ap-logout-btn {
  font-size: .8rem;
  padding: .35rem .75rem;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(220,38,38,.3);
  color: var(--danger);
  cursor: pointer;
}
.ap-logout-btn:hover { background: #FEF2F2; }
.ap-content {
  flex: 1;
  padding: 1.5rem;
}

/* Mobile admin sidebar toggle */
.ap-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text);
  padding: .25rem;
}
@media (max-width: 900px) {
  .ap-sidebar { transform: translateX(-100%); }
  .ap-sidebar.open { transform: translateX(0); }
  .ap-main { margin-left: 0; }
  .ap-mobile-toggle { display: block; }
  .ap-content { padding: 1rem; }
  .ap-topbar { padding: 0 1rem; }
}
/* Sidebar backdrop on mobile */
@media (max-width: 900px) {
  body.admin-mode .ap-sidebar.open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: -1;
  }
}

/* ── Offline banner ─────────────────────────────────────── */
#offline-banner {
  display: none;
  background: var(--warning);
  color: #fff;
  text-align: center;
  padding: .5rem;
  font-size: .875rem;
  font-weight: 600;
}
body.offline #offline-banner { display: block; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 1.25rem;
  font-size: .85rem;
  margin-top: auto;
}
footer a { color: rgba(255,255,255,.85); }
footer a:hover { color: #fff; }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  .hamburger { display: block; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-title { font-size: 1.9rem; }
  .page-title { font-size: 1.35rem; }
  .modal { max-height: 95vh; }
}

/* ── Utilitários ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: .8rem; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.mt-1   { margin-top: .5rem; }
.mt-2   { margin-top: 1rem; }
.mt-3   { margin-top: 1.5rem; }
.mb-2   { margin-bottom: 1rem; }
.mb-3   { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.flex-wrap { flex-wrap: wrap; }

/* ── Loading spinner ────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000;
}

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: .25rem; }
.tab-btn {
  padding: .65rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: var(--font);
  font-weight: 600;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover  { color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Search bar ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: .5rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .4rem .6rem;
}
.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
}
.search-bar button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .35rem .85rem;
  cursor: pointer;
  font-size: .85rem;
}

/* ── Share Bar ─────────────────────────────────────────────── */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}
.share-label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.share-btn {
  padding: .35rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: opacity .15s;
}
.share-wa   { background: #25D366; color: #fff; }
.share-fb   { background: #1877F2; color: #fff; }
.share-tw   { background: #000;    color: #fff; }
.share-li   { background: #0A66C2; color: #fff; }
.share-copy { background: var(--border); color: var(--text); }
.share-btn:hover { opacity: .82; }

/* ── Analytics Bar Charts ──────────────────────────────────── */
.bar-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}
.bar-label {
  min-width: 90px;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width .5s ease;
}
.bar-value {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}

/* ── Vendas / Marketplace ──────────────────────────────────── */
.product-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}
.product-body { padding: 1rem; }
.product-cat  { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: .35rem; }
.product-title{ font-weight: 700; font-size: 1rem; margin-bottom: .4rem; line-height: 1.3; }
.product-price{ font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.product-meta { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; }
.badge-estado-produto { padding: .2rem .55rem; border-radius: 8px; font-size: .72rem; font-weight: 700; }
.estado-novo           { background: #d1fae5; color: #065f46; }
.estado-usado_bom      { background: #fef3c7; color: #92400e; }
.estado-usado_aceitavel{ background: #fee2e2; color: #991b1b; }
