/* ============================================================
   O RELOJOEIRO DE BRESLAU — Design System
   ============================================================ */

:root {
  --ivory:              rgba(245, 240, 232, 0.86);
  --ivory-dark:         rgba(234, 228, 213, 0.84);
  --ivory-mid:          rgba(237, 231, 217, 0.85);
  --ivory-paper:        rgba(250, 246, 239, 0.88);
  --teal:               #1C3A3F;
  --teal-mid:           #2A5158;
  --teal-light:         #3D6B72;
  --teal-pale:          #D0E2E4;
  --terracotta:         #8B3A2F;
  --terracotta-light:   #A04535;
  --terracotta-pale:    #F0DDD9;
  --warm-gray:          #8C7B6B;
  --warm-gray-light:    #B5A898;
  --warm-gray-dark:     #5C4D3F;
  --text:               #0E0A06;
  --text-secondary:     #2A1A0C;
  --border:             #D4CBBB;
  --border-light:       #E8E0D0;
  --font-serif:         Georgia, 'Times New Roman', serif;
  --font-sans:          system-ui, -apple-system, Arial, sans-serif;
  --radius:             4px;
  --radius-sm:          2px;
  --shadow:             0 2px 8px rgba(26,20,16,0.10);
  --shadow-lg:          0 8px 24px rgba(26,20,16,0.12);
}

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

html {
  scroll-behavior: smooth;
}

/* ── Imagem de fundo: anda com o scroll, mostra o relógio e as engrenagens ── */
html {
  background-color: #C8B898; /* sépia — preenche laterais e abaixo da imagem */
  background-image: url('/assets/images/fundo-site.png');
  background-repeat: no-repeat;
  background-position: center top;
  /* 100% de largura → altura proporcional → imagem inteira visível ao scrollar */
  background-size: 100% auto;
  background-attachment: scroll;
}

/* Mobile: cover preenche a tela toda (imagem portrait cabe bem em viewport portrait) */
@media (max-width: 767px) {
  html {
    background-size: cover;
    background-position: center top;
  }
}

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Véu sépia fixo e suave — suaviza a textura sem apagar a imagem */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(240, 230, 210, 0.32);
  pointer-events: none;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-serif); margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container-editorial {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Evita overflow horizontal nas seções públicas sem quebrar position:fixed */
.site-header,
.site-footer,
section {
  max-width: 100%;
  overflow-x: hidden;
}

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.ml-auto { margin-left: auto; }
.mx-auto { margin: 0 auto; }
.mt-auto { margin-top: auto; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }
.flex-shrink-0 { flex-shrink: 0; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:col-span-2 { grid-column: span 2; }
  .lg\:col-span-3 { grid-column: span 3; }
}

/* ── Tipografia editorial ── */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8B3A2F;
  font-weight: 600;
}

/* Nav cards minimalistas — sem fundo, apenas borda superior */
.nav-card-minimal:hover {
  border-top-color: rgba(139,58,47,.7) !important;
}
.nav-card-minimal:hover svg {
  stroke: #8B3A2F;
}
.nav-card-minimal:hover p:first-child {
  color: #8B3A2F !important;
}

.prose-editorial { font-family: var(--font-serif); font-size: 1.0625rem; line-height: 1.85; color: var(--text-secondary); }
.prose-editorial h2 { font-size: 1.5rem; color: var(--teal); margin: 2rem 0 1rem; }
.prose-editorial p { margin-bottom: 1.25rem; }
.prose-editorial strong { color: var(--text); }

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Terracotta — CTA principal, quente, sem frio */
.btn-terracotta {
  background: #8B3A2F;
  color: #F5EDE0;
  border-color: transparent;
}
.btn-terracotta:hover {
  background: #7A3228;
  box-shadow: 0 2px 16px rgba(139,58,47,.35);
}

/* Primário — marrom escuro quente (admin / contextos neutros) */
.btn-primary {
  background: #2C1A0E;
  color: #F0E8D8;
  border-color: transparent;
}
.btn-primary:hover {
  background: #3D2614;
  box-shadow: 0 2px 12px rgba(44,26,14,.28);
}

/* Secundário — outline, funciona sobre fundos escuros (hero, timeline) */
.btn-secondary {
  background: transparent;
  color: rgba(240,232,210,.85);
  border-color: rgba(240,232,210,.28);
}
.btn-secondary:hover {
  background: rgba(240,232,210,.08);
  border-color: rgba(240,232,210,.55);
}

/* Ghost — outline quente, funciona sobre fundos claros/pergaminho */
.btn-ghost {
  background: transparent;
  color: #5C3A22;
  border-color: rgba(92,58,34,.30);
}
.btn-ghost:hover {
  background: rgba(92,58,34,.06);
  border-color: rgba(92,58,34,.50);
}

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.6875rem; }
.btn-lg { padding: 0.875rem 2.25rem; font-size: 0.8125rem; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 10px;
}
.badge-teal      { background: rgba(160,82,45,.11);  color: #7A3A1A; border: 1px solid rgba(160,82,45,.28); }
.badge-terracotta{ background: rgba(139,58,47,.10);  color: #8B3A2F; border: 1px solid rgba(139,58,47,.30); }
.badge-warm      { background: rgba(92,58,34,.07);   color: #5C3A22; border: 1px solid rgba(92,58,34,.20); }

/* ── Cards ── */
.editorial-card {
  background: var(--ivory-paper);
  border: 1px solid rgba(160,82,45,.15);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.editorial-card:hover {
  box-shadow: 0 2px 14px rgba(44,26,14,.10);
  border-color: rgba(160,82,45,.32);
}

/* ── Formulários ── */
.field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  color: #1A0E06;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.field-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: #2C1A0E;
  background: var(--ivory-paper);
  border: 1px solid rgba(160,82,45,.22);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  border-color: rgba(139,58,47,.55);
  box-shadow: 0 0 0 3px rgba(139,58,47,.08);
}
.field-textarea { resize: vertical; min-height: 120px; }

/* ── Header do site ── */
.site-header {
  background: rgba(22, 13, 6, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Nav desktop */
.site-desktop-nav {
  display: none; /* oculto no mobile, ativo no desktop */
  align-items: center;
  gap: 1.75rem;
}
@media (min-width: 1024px) {
  .site-desktop-nav { display: flex; }
}

.site-nav-link {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.8);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.site-nav-link:hover,
.site-nav-link.active {
  color: var(--terracotta-light);
  border-bottom-color: var(--terracotta);
}
.site-nav-link-ebook {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory);
  text-decoration: none;
  background: var(--terracotta);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s;
  white-space: nowrap;
}
.site-nav-link-ebook:hover { opacity: 0.85; }

/* Botão de busca no header */
.site-search-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: rgba(245,240,232,.8);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.site-search-btn:hover { color: var(--ivory); }
.site-search-label { display: none; }
@media (min-width: 1024px) {
  .site-search-label { display: inline; }
}

/* ── Footer do site ── */
.site-footer {
  background: rgba(22, 13, 6, 0.80);
  color: rgba(240, 232, 210, 0.90);
  border-top: 1px solid rgba(160, 82, 45, 0.4);
}
.footer-newsletter {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.footer-newsletter-inner {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .footer-newsletter-inner { grid-template-columns: 1fr 1fr; align-items: center; }
}
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .footer-links { grid-template-columns: repeat(4, 1fr); }
}

/* ── Navegação móvel fixa no rodapé ── */
.mobile-bottom-nav {
  /* Sempre fixo no mobile — JS esconde no desktop */
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(22, 13, 6, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(160, 82, 45, 0.3);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 16px rgba(0,0,0,.25);
}
@media (min-width: 1024px) {
  .mobile-bottom-nav { display: none !important; }
}
.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: .625rem .25rem;
  min-height: 60px;
  text-decoration: none;
  color: rgba(245,240,232,.5);
  font-family: var(--font-sans);
  font-size: .575rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  /* reset <button> defaults */
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.mobile-bottom-nav__item svg { display: block; flex-shrink: 0; }
.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item.is-active {
  color: var(--ivory);
  background: rgba(255,255,255,.08);
}
.mobile-bottom-nav__item.is-active { color: var(--ivory); }
.mobile-bottom-nav__item.is-active svg { stroke: #c1584a; }

/* Body padding para não sobrepor conteúdo no mobile */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Bottom sheet (overlay + drawer) ── */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mob-overlay.open { display: block; }

.mob-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: rgba(28, 17, 8, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(160, 82, 45, 0.3);
  padding: 0 1.25rem 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0,0,0,.35);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mob-sheet.open { transform: translateY(0); }

.mob-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(160,82,45,.4);
  border-radius: 2px;
  margin: .75rem auto .5rem;
  flex-shrink: 0;
}
.mob-sheet-close {
  position: absolute;
  top: .75rem;
  right: 1rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(160,82,45,.25);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(240,232,210,.6);
  -webkit-appearance: none;
  appearance: none;
}
.mob-sheet-title {
  font-family: var(--font-sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(196,133,90,.8);
  text-align: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.mob-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem 1rem;
  margin-bottom: .5rem;
}
.mob-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  padding: .75rem .5rem;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(160,82,45,.18);
  transition: background .15s, border-color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.mob-sheet-item:hover,
.mob-sheet-item:active {
  background: rgba(255,255,255,.10);
  transform: scale(.97);
}
.mob-sheet-item.is-active {
  background: rgba(160,82,45,.15);
  border-color: rgba(160,82,45,.5);
}
.mob-sheet-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(160,82,45,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: rgba(240,232,210,.75);
}
.mob-sheet-item.is-active .mob-sheet-item-icon {
  background: rgba(160,82,45,.3);
  border-color: rgba(160,82,45,.6);
  color: #F0E8D8;
}
.mob-sheet-item span {
  font-family: var(--font-sans);
  font-size: .6rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(240,232,210,.55);
  text-align: center;
  line-height: 1.2;
}
.mob-sheet-item.is-active span { color: rgba(240,232,210,.9); font-weight: 600; }

/* ── Admin Sidebar ── */
.admin-layout { display: flex; height: 100vh; overflow: hidden; background: var(--ivory-dark); }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--teal);
  display: flex;
  flex-direction: column;
}
.admin-sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar-logo h2 {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 2px;
}
.admin-sidebar-logo p {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
}
.admin-nav-group {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.3);
  font-weight: 500;
  padding: 0 1.25rem;
  margin: 1.5rem 0 0.5rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: rgba(245,240,232,0.65);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(255,255,255,0.08);
  color: var(--ivory);
}
.admin-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.admin-topbar {
  background: var(--ivory-paper);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.admin-main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.5rem; }

/* ── Responsive admin — handled in section below ── */

/* ── Foto frame ── */
.photo-frame {
  border: 1px solid var(--border);
  background: var(--ivory-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

/* ── Separador ornamental ── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--border);
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Alertas ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
}
.alert-error   { background: var(--terracotta-pale); border: 1px solid var(--terracotta); color: var(--terracotta); }
.alert-success { background: var(--teal-pale);      border: 1px solid var(--teal);       color: var(--teal-mid); }

/* ── Tabela admin ── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  font-weight: 500;
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--ivory-dark);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--ivory-dark); }

/* ── Stat card ── */
.stat-card {
  background: var(--ivory-paper);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-card .label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.stat-card .value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
}

/* ── Timeline ── */
.timeline-item { display: flex; align-items: flex-start; gap: 1.5rem; padding-left: 1rem; }
.timeline-year {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: rgba(210, 185, 145, 0.75);
  font-weight: 400;
  font-style: italic;
  min-width: 3.5rem;
  text-align: right;
  padding-top: 1px;
}
.timeline-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(200, 165, 110, 0.6);
  flex-shrink: 0;
  margin-top: 8px;
  margin-left: calc(3rem - 3px);
}
.timeline-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: rgba(245, 238, 225, 0.92);
  line-height: 1.55;
  padding-left: 0.5rem;
}

/* ── Pagination ── */
.pagination { display: flex; gap: 0.25rem; align-items: center; }
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s;
}
.pagination a { color: var(--text-secondary); border: 1px solid var(--border); }
.pagination a:hover { background: var(--ivory-dark); }
.pagination .current { background: var(--teal); color: var(--ivory); border: none; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN — layout, sidebar e bottom nav mobile
   ═══════════════════════════════════════════════════════════════ */

/* Nav interna da sidebar: scroll quando necessário */
.admin-sidebar nav {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.admin-sidebar nav::-webkit-scrollbar { width: 4px; }
.admin-sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* Form grid admin */
.admin-form-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 768px) {
  .admin-form-grid { grid-template-columns: 340px 1fr; }
}

/* Scroll horizontal para tabelas */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > * { min-width: 580px; }

/* Topbar admin */
.admin-topbar { gap: .75rem; flex-wrap: nowrap; }

/* ── Admin bottom nav (mobile only) ── */
.admin-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(22, 13, 6, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(160, 82, 45, 0.3);
  box-shadow: 0 -2px 16px rgba(0,0,0,.25);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 1024px) {
  .admin-bottom-nav { display: none !important; }
}
.admin-bottom-nav__item {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: .625rem .25rem;
  min-height: 60px;
  text-decoration: none;
  color: rgba(245,240,232,.45);
  font-family: var(--font-sans);
  font-size: .575rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  /* reset <button> defaults */
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.admin-bottom-nav__item svg { display: block; flex-shrink: 0; }
.admin-bottom-nav__item:hover,
.admin-bottom-nav__item.is-active {
  color: var(--ivory);
  background: rgba(255,255,255,.08);
}
.admin-bottom-nav__item.is-active { color: var(--ivory); }
.admin-bottom-nav__item.is-active svg { stroke: #c1584a; }
.admin-bottom-nav__badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  background: var(--terracotta);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: .6rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Mobile admin (<1024px): oculta sidebar, mostra bottom nav */
@media (max-width: 1023px) {
  .admin-sidebar { display: none; }
  .admin-topbar { position: sticky; top: 0; z-index: 10; }
  .admin-main { padding: 1rem; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .admin-form-grid { grid-template-columns: 1fr; }
  .stat-card .value { font-size: 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — utilitários e site público
   ═══════════════════════════════════════════════════════════════ */

/* Grid extras */
@media (min-width: 480px) {
  .xs\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Desktop largo */
@media (min-width: 1440px) {
  .container-editorial { max-width: 1280px; }
  .admin-sidebar { width: 264px; }
  .admin-main { padding: 2rem 2.5rem; }
  .admin-form-grid { grid-template-columns: 360px 1fr; }
}

/* Acervo: foto grid */
@media (min-width: 1024px) {
  .photo-grid-lg { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 639px) {
  .photo-frame img,
  .photo-card .photo-frame img { height: 180px !important; }
}

/* Home — cards de navegação */
@media (max-width: 479px) {
  .nav-cards-grid { grid-template-columns: 1fr !important; }

}

/* Botões full-width mobile */
@media (max-width: 479px) {
  .btn-mobile-full { width: 100% !important; justify-content: center; }
}

/* Seções públicas: menos padding no mobile */
@media (max-width: 639px) {
  .section-sm-pad { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
}
