:root {
  --blue-900: #0a2540;
  --blue-700: #1c4f80;
  --blue-500: #2f7cc6;
  --bg: #fdfbf7;
  --surface: #ffffff;
  --surface-2: #faf6f0;
  --text: #2d2a26;
  --muted: #6b635a;
  --line: #e8e2d9;
  --shadow: 0 12px 32px rgba(45, 42, 38, 0.12);
  --radius: 18px;
  --accent: #d97b3d;
  --accent-warm: #c4612d;
  --green: #5a8c5a;
  --olive: #6b7d5a;
  --terracotta: #c4785a;
  --cream: #fdf8f3;
  --sand: #f3ede4;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Outfit:wght@400;500;600;700&display=swap');

::selection {
  background: var(--terracotta);
  color: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ──────────────────────────────────────────────────────────────────────────
   SIDEBAR — CSS isolado em assets/css/sidebar.css
   NÃO adicione regras de sidebar aqui; editar sidebar.css
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 850px) {
  html, body {
    overflow-x: hidden; /* Previne o corte lateral da tela */
    width: 100%;
    position: relative;
  }

  html {
    font-size: 80% !important; /* Versão mais desampliada conforme solicitado pelo usuário */
    -webkit-text-size-adjust: 100%;
  }
  
  .portal-main {
    padding: 0.7rem 0.5rem 1.5rem !important;
    overflow-x: hidden;
  }

  .topbar-inner {
    padding: 0.4rem 0.6rem !important;
    gap: 0.5rem !important;
  }

  /* Evita quebras em elementos pequenos e garante que caibam */
  .hero-chip, .company-badge, .company-chip, .badge {
    white-space: nowrap;
    font-size: 0.65rem !important;
  }

  .section-header h2 {
    font-size: 1.15rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  body.portal-body {
    background-attachment: scroll;
  }
}
  
  body.portal-body {
    background-attachment: scroll;
  }
}

[x-cloak] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

body.portal-body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(217, 123, 61, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(91, 140, 90, 0.05) 0%, transparent 40%),
    var(--bg);
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.business-directory > * {
  animation: fadeInUp 0.5s ease backwards;
}

.business-directory > *:nth-child(1) { animation-delay: 0.05s; }
.business-directory > *:nth-child(2) { animation-delay: 0.12s; }
.business-directory > *:nth-child(3) { animation-delay: 0.19s; }

.category-group {
  animation: fadeInUp 0.5s ease backwards;
}

.directory-groups > section:nth-child(1) { animation-delay: 0.08s; }
.directory-groups > section:nth-child(2) { animation-delay: 0.16s; }
.directory-groups > section:nth-child(3) { animation-delay: 0.24s; }
.directory-groups > section:nth-child(4) { animation-delay: 0.32s; }

.category-card {
  animation: scaleIn 0.4s ease backwards;
}

.category-grid > a:nth-child(1) { animation-delay: 0.02s; }
.category-grid > a:nth-child(2) { animation-delay: 0.04s; }
.category-grid > a:nth-child(3) { animation-delay: 0.06s; }
.category-grid > a:nth-child(4) { animation-delay: 0.08s; }
.category-grid > a:nth-child(5) { animation-delay: 0.1s; }
.category-grid > a:nth-child(6) { animation-delay: 0.12s; }
.category-grid > a:nth-child(7) { animation-delay: 0.14s; }
.category-grid > a:nth-child(8) { animation-delay: 0.16s; }
.category-grid > a:nth-child(9) { animation-delay: 0.18s; }
.category-grid > a:nth-child(10) { animation-delay: 0.2s; }

h1,
h2,
h3,
h4,
h5 {
  font-family: Poppins, sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(232, 226, 217, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(45, 42, 38, 0.08);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--blue-900);
}

.brand img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(18, 43, 78, 0.2));
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #2a3a4a;
  font-weight: 600;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 226, 238, 0.95);
  box-shadow: 0 8px 18px rgba(14, 39, 67, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.main-nav a:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: #cddced;
  box-shadow: 0 12px 26px rgba(14, 39, 67, 0.12);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef5fc, #f8fbff);
  color: var(--blue-700);
  font-size: 0.82rem;
  flex: 0 0 auto;
}

.nav-label {
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-form input {
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
}

.announce-btn {
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent), #efb12f);
  color: #24190a;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
}

.mobile-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(18, 43, 78, 0.12);
  border-radius: 999px;
  background: linear-gradient(140deg, #0a2540, #1f5b92);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 0.95rem;
  box-shadow: 0 10px 24px rgba(14, 39, 67, 0.18);
}

.mobile-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 0.8rem;
}

body.mobile-menu-lock {
  overflow: hidden;
}

.mobile-panel a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.92rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 8px 18px rgba(14, 39, 67, 0.06);
}

.mobile-item-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #edf4fb, #f9fbff);
  color: var(--blue-700);
  flex: 0 0 auto;
}

.mobile-item-label {
  flex: 1;
}

.portal-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.15rem 1rem 2rem;
}

.portal-shell {
  display: grid;
  gap: 1rem;
}

.hero-section {
  border-radius: 26px;
  border: 1px solid rgba(10, 37, 64, 0.12);
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: 100%;
  max-width: 760px;
  padding: 2rem;
  color: #f7fbff;
}

.hero-kicker {
  display: inline-flex;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(186, 218, 252, 0.6);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: rgba(8, 35, 61, 0.36);
}

.hero-copy h1 {
  margin: 0.8rem 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0.9rem 0 0;
  max-width: 58ch;
  color: #dce9f7;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.btn-primary,
.btn-secondary,
.btn-highlight {
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  padding: 0.7rem 1.05rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
  background: linear-gradient(140deg, #0a2540, #1f5b92);
  color: #ffffff;
}

.btn-secondary {
  border: 1px solid rgba(220, 235, 250, 0.55);
  color: #eaf3ff;
  background: rgba(9, 33, 57, 0.45);
}

.btn-highlight {
  background: linear-gradient(140deg, var(--accent), #f2c25f);
  color: #291b07;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(3, 18, 35, 0.24);
}

.highlight-strip,
.portal-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.highlight-strip h2,
.section-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--blue-900);
}

.highlight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.highlight-item {
  border: 1px solid #d6e3f0;
  border-radius: 14px;
  padding: 0.8rem;
  background: linear-gradient(160deg, #f9fcff, #eef5fc);
}

.highlight-item span {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-700);
  font-weight: 700;
}

.highlight-item p {
  margin: 0.45rem 0 0;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.section-header a {
  text-decoration: none;
  font-weight: 700;
  color: var(--blue-500);
}

.news-grid,
.event-grid,
.classified-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.news-card,
.classified-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.news-card:hover,
.classified-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(14, 39, 67, 0.16);
}

.news-card img,
.classified-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
}

.news-card div,
.classified-card div {
  padding: 0.8rem;
}

.news-card h3,
.classified-card h3 {
  margin: 0;
  font-size: 1.06rem;
}

.news-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.home-jobs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-job-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #f7fbff);
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
  position: relative;
}

.home-job-badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border-radius: 999px;
  background: #dcf3e2;
  color: #0c6a45;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.home-job-card h3 {
  margin: 0;
  padding-right: 4.2rem;
  font-size: 1.06rem;
}

.home-job-company {
  margin: 0;
  color: var(--blue-700);
  font-weight: 600;
}

.home-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.home-job-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe5ee;
  border-radius: 999px;
  background: #f7fbff;
  color: #4f657a;
  font-size: 0.78rem;
  padding: 0.28rem 0.55rem;
}

.home-job-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-job-footer small {
  color: var(--muted);
}

.home-job-footer .btn-secondary {
  color: var(--blue-900);
  background: #edf4fb;
  border: 1px solid #d7e4ef;
}

.classified-card strong {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 1.02rem;
  color: var(--blue-700);
}

.classified-card .btn-secondary {
  margin-top: 0.7rem;
  display: inline-flex;
}

.classified-detail-shell {
  display: grid;
  gap: 1rem;
}

.classified-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  padding: 1rem;
}

.classified-detail-gallery {
  display: grid;
  gap: 0.8rem;
}

.classified-detail-hero {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.classified-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.65rem;
}

.classified-detail-thumbs a {
  display: block;
}

.classified-detail-thumbs img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.classified-detail-info {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.classified-detail-price {
  font-size: 2rem;
  color: var(--blue-700);
}

.classified-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.9rem;
  color: var(--muted);
}

.classified-detail-description {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  padding: 1rem;
}

.classified-detail-description h3 {
  margin: 0 0 0.5rem;
}

.classified-public-shell {
  display: grid;
  gap: 1rem;
}

.classified-public-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #d6e4f2;
  border-radius: 24px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5fc 100%);
  box-shadow: 0 18px 42px rgba(19, 58, 94, 0.08);
  padding: 1.25rem 1.35rem;
}

.classified-public-hero h2 {
  margin: 0.35rem 0 0.45rem;
}

.classified-public-hero p {
  max-width: 780px;
  margin: 0;
  color: #5f7890;
}

.classified-public-hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.classified-auth-grid,
.classified-public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.classified-public-card {
  display: grid;
  gap: 0.9rem;
  width: 100%;
}

.classified-public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.classified-public-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.classified-public-editor {
  display: grid;
  gap: 0.95rem;
}

.classified-public-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.classified-public-actions form {
  margin: 0;
}

.classified-auth-message {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  border: 1px solid #d8e4ef;
}

.classified-auth-message.is-success {
  background: #edf9f3;
  color: #0c6a45;
  border-color: #bfebd3;
}

.classified-auth-message.is-error {
  background: #fff2f2;
  color: #8d2525;
  border-color: #f3cccc;
}

.classified-auth-message ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.classified-public-list {
  gap: 0.8rem;
}

.classified-public-shell > .classified-public-card,
.classified-public-shell > .classified-auth-message,
.classified-public-shell > .classified-public-topbar {
  width: min(100%, 1100px);
}

.classified-public-shell > .classified-public-card {
  justify-self: stretch;
}

.classified-owned-card {
  border: 1px solid #dbe7f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.classified-owned-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.classified-owned-head h3 {
  margin: 0;
}

.event-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
  padding: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.event-date {
  width: max-content;
  border-radius: 10px;
  background: var(--blue-900);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.32rem 0.6rem;
}

.event-card h3 {
  margin: 0;
}

.event-card p {
  margin: 0;
  color: var(--muted);
}

.event-card a {
  margin-top: 0.3rem;
  width: max-content;
  text-decoration: none;
  font-weight: 700;
  color: var(--green);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.nested-section {
  height: 100%;
}

.simple-list {
  display: grid;
  gap: 0.7rem;
}

.simple-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
  padding: 0.85rem;
  display: grid;
  gap: 0.3rem;
}

.simple-card h3 {
  margin: 0;
  font-size: 1rem;
}

.simple-card p {
  margin: 0;
  color: var(--muted);
}

.simple-card strong {
  color: var(--blue-700);
}

.simple-card a {
  margin-top: 0.2rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--blue-500);
}

.whats-link {
  color: var(--green) !important;
}

.rank-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.rank-list li {
  border-bottom: 1px dashed #dbe6f1;
  padding-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.rank-list a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  text-decoration: none;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1rem;
  box-shadow: 0 14px 24px rgba(17, 94, 52, 0.35);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  background: rgba(255, 255, 255, 0.78);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.business-directory {
  display: grid;
  gap: 1.5rem;
}

.directory-head {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(196, 120, 90, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(91, 140, 90, 0.06) 0%, transparent 50%),
    linear-gradient(160deg, #fffefb, #faf6f0);
  box-shadow: 0 8px 32px rgba(45, 42, 38, 0.08), 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.4rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.directory-head::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(217, 123, 61, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.directory-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--terracotta);
  font-family: var(--font-body);
}

.directory-head h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.65rem, 3.2vw, 2.5rem);
  color: #2d2a26;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.directory-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  background: linear-gradient(135deg, #fdf8f3, #f8f2eb);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
}

.directory-search {
  display: grid;
  gap: 0.6rem;
  align-content: center;
}

.directory-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.82rem 1rem;
  font-size: 0.95rem;
  background: #fff;
  font-family: var(--font-body);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.directory-search input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(196, 120, 90, 0.12);
}

.directory-search button,
.directory-search a {
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  padding: 0.72rem 0.9rem;
  font-family: var(--font-body);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.directory-search button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--terracotta), #d4896a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 120, 90, 0.3);
}

.directory-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 120, 90, 0.4);
}

.directory-search a {
  background: linear-gradient(135deg, var(--olive), #7a9170);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 140, 90, 0.25);
}

.directory-search a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 140, 90, 0.35);
}

.menu-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.insight-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 8px 18px rgba(10, 37, 64, 0.09);
}

.insight-box h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--blue-900);
}

.insight-chips {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.insight-chips a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: #294a68;
  border: 1px solid #d9e4ef;
  background: #f6fbff;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.insight-chips span {
  margin-left: 0.25rem;
  opacity: 0.7;
}

.directory-groups {
  display: grid;
  gap: 1.2rem;
}

.category-group {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: 
    linear-gradient(180deg, #fffefb 0%, #faf6f0 100%);
  padding: 1.1rem;
  position: relative;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.category-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 42, 38, 0.1);
}

.category-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.category-group h2 {
  margin: 0;
  font-size: 1.08rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-group p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-body);
}

.category-group-head > span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--sand);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.theme-blue { border-left: 4px solid #4a7c9b; }
.theme-yellow { border-left: 4px solid #b8956a; }
.theme-green { border-left: 4px solid var(--olive); }
.theme-red { border-left: 4px solid var(--terracotta); }

.theme-blue h2 { color: #3d6a85; }
.theme-yellow h2 { color: #9a7a52; }
.theme-green h2 { color: var(--olive); }
.theme-red h2 { color: #a65d42; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.category-card {
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
  min-height: 152px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--olive));
  opacity: 0;
  transition: opacity 260ms ease;
}

.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 32px rgba(45, 42, 38, 0.14);
  border-color: #d4c9bc;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card.is-active {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 2px rgba(196, 120, 90, 0.15);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #fdf8f3, #f5ede5);
  border: 1px solid var(--line);
  transition: transform 260ms ease, background 260ms ease;
}

.category-card:hover .category-icon {
  transform: scale(1.12) rotate(-4deg);
  background: linear-gradient(135deg, #fff8f3, #faf3eb);
}

.category-body h3 {
  margin: 0;
  font-size: 0.94rem;
  color: #2d2a26;
  font-family: var(--font-body);
  font-weight: 600;
}

.category-body p {
  margin: 0.28rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-family: var(--font-body);
  line-height: 1.4;
}

.category-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: auto;
}

.category-meta .count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--terracotta);
  background: #fdf5f0;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-family: var(--font-body);
}

.category-meta .badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.18rem 0.44rem;
  font-family: var(--font-body);
}

.category-meta .badge.top {
  color: var(--olive);
  background: #f4f7f2;
}

.company-listing {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: 
    linear-gradient(180deg, #fffefb 0%, #faf6f0 50%, #f5f0e8 100%);
  box-shadow: 0 8px 24px rgba(45, 42, 38, 0.08);
  padding: 1.2rem;
}

.listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.listing-head h2 {
  margin: 0;
  color: #2d2a26;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.listing-head a {
  text-decoration: none;
  font-weight: 600;
  color: var(--terracotta);
  font-size: 0.9rem;
  transition: color 180ms ease;
}

.listing-head a:hover {
  color: #a65d42;
}

.subcategory-filter {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.subcategory-filter strong {
  color: #2d2a26;
  font-size: 0.86rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.subcategory-filter a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all 200ms ease;
}

.subcategory-filter a:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  background: #fdf8f5;
}

.subcategory-filter a span {
  display: inline-flex;
  margin-left: 0.35rem;
  color: #a09588;
  font-size: 0.75rem;
}

.subcategory-filter a.is-active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.subcategory-filter a.is-active span {
  color: rgba(255,255,255,0.8);
}

.listing-category {
  margin-top: 1.2rem;
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

.listing-category header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.listing-category h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #2d2a26;
  font-family: var(--font-display);
  font-weight: 600;
}

.listing-category header span {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--olive);
  background: #f4f7f2;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-family: var(--font-body);
}

.listing-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.company-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0;
  display: grid;
  gap: 0;
  transition: transform 240ms ease, box-shadow 240ms ease;
  overflow: hidden;
}

.company-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(45, 42, 38, 0.12);
}

.company-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: linear-gradient(135deg, #f5ede5, #ebe3d8);
  margin-bottom: 0;
  position: relative;
}

.company-media::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}

.company-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #b8a898;
}

.company-card-content {
  padding: 0.85rem;
  display: grid;
  gap: 0.4rem;
}

.company-card h4 {
  margin: 0;
  font-size: 1rem;
  color: #2d2a26;
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
}

.company-card p {
  margin: 0;
  color: var(--terracotta);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.company-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-body);
}

.company-card .company-phone {
  color: var(--olive);
  font-weight: 600;
}

.company-card a {
  margin-top: 0.5rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #5a8c5a, #6b9c6b);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  display: inline-flex;
  justify-content: center;
  font-family: var(--font-body);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.company-card a:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(90, 140, 90, 0.35);
}

.company-badges {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

.company-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-family: var(--font-body);
}

.company-badge.featured {
  background: linear-gradient(135deg, #f5a400, #ffc448);
  color: #3d2e00;
}

.company-badge.metric {
  background: rgba(255,255,255,0.92);
  color: var(--olive);
  border: 1px solid var(--line);
}

.company-insight {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem !important;
  color: #a09588 !important;
  background: #fdfbf9;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.empty-state {
  margin: 2rem 0;
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
  font-family: var(--font-body);
  padding: 2rem;
  background: #fdfbf9;
  border-radius: 16px;
  border: 1px dashed var(--line);
}

/* Desktop: garante que o painel mobile nunca apareça independente do estado do Alpine.js */
@media (min-width: 1101px) {
  .mobile-panel {
    display: none !important;
  }
}

@media (max-width: 1100px) {
  .topbar {
    transition: background 180ms ease, box-shadow 180ms ease;
  }

  .main-nav,
  .search-form {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .topbar-inner {
    grid-template-columns: 1fr auto;
  }

  .topbar-actions {
    gap: 0.4rem;
  }

  .topbar.is-mobile-open {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    z-index: 120;
    width: 50vw;
    height: 100vh;
    background:
      radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 28%),
      linear-gradient(180deg, rgba(14, 58, 109, 0.92), rgba(9, 39, 79, 0.88));
    border-bottom: 0;
    backdrop-filter: blur(18px);
  }

  .topbar.is-mobile-open .topbar-inner {
    grid-template-columns: 1fr auto;
    padding-bottom: 0.65rem !important;
  }

  .topbar.is-mobile-open .brand {
    color: #fff;
  }

  .topbar.is-mobile-open .brand-copy small {
    color: rgba(255, 255, 255, 0.72);
  }

  .topbar.is-mobile-open .mobile-toggle {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
  }

  .topbar.is-mobile-open .mobile-panel {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: calc(50vw - 2rem);
    max-width: 380px;
    margin: 0 1rem 1rem auto;
    padding: 0.15rem 0 0;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
    border-top: 0;
  }

  .topbar.is-mobile-open .mobile-panel a {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
  }

  .topbar.is-mobile-open .mobile-item-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .brand img {
    width: 56px;
    height: 56px;
  }

  .hero-copy {
    padding: 1.35rem;
  }

  .directory-head,
  .menu-insights {
    grid-template-columns: 1fr;
  }

  .directory-head {
    padding: 1rem;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-grid-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .highlight-list,
  .news-grid,
  .event-grid,
  .home-jobs-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .classified-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .classified-detail-card {
    grid-template-columns: 1fr;
  }

  .classified-auth-grid,
  .classified-public-grid {
    grid-template-columns: 1fr;
  }

  .classified-public-hero,
  .classified-public-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .portal-main {
    padding: 0.9rem 0.7rem 2rem;
  }

  .hero-section {
    min-height: 260px;
    border-radius: 18px;
  }

  .hero-copy {
    padding: 1rem 1rem 1.1rem;
  }

  .hero-copy h1 {
    font-size: 1.6rem;
    line-height: 1.08;
    max-width: 12ch;
  }

  .hero-copy p {
    font-size: 0.88rem;
    max-width: 34ch;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 135px;
  }

  .highlight-strip,
  .portal-section {
    border-radius: 14px;
    padding: 0.85rem;
  }

  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
  }

  .event-grid,
  .home-jobs-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
  }

  .classified-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .news-card img {
    height: 112px;
  }

  .classified-card img {
    height: 112px;
  }

  .news-card div {
    padding: 0.7rem;
  }

  .classified-card div {
    padding: 0.7rem;
  }

  .news-card h3 {
    font-size: 0.95rem;
  }

  .news-card p {
    font-size: 0.8rem;
  }

  .home-job-card {
    padding: 0.85rem;
  }

  .home-job-card h3 {
    font-size: 0.95rem;
    padding-right: 3.4rem;
  }

  .home-job-meta span,
  .home-job-excerpt,
  .home-job-footer small {
    font-size: 0.76rem;
  }

  .home-job-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-job-footer .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .floating-whatsapp {
    right: 12px;
    bottom: 12px;
    padding: 0.62rem 0.85rem;
    font-size: 0.9rem;
  }

  .directory-head h1 {
    font-size: 1.4rem;
  }

  .directory-head {
    gap: 0.8rem;
  }

  .admin-grid-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

.company-form-page {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.company-form-head h1 {
  margin: 0.3rem 0 0;
  color: var(--blue-900);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.company-form-head p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.company-form-kicker {
  margin: 0;
  color: var(--blue-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-alert {
  margin-top: 0.9rem;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-weight: 600;
}

.form-alert.ok {
  background: #e8f9f0;
  color: #0d7a4f;
  border: 1px solid #b7ebd2;
}

.form-alert.error {
  background: #fff1f1;
  color: #9d2f2f;
  border: 1px solid #f3c6c6;
}

.company-form {
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: #27405a;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  border: 1px solid #d3e2ee;
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #fbfdff;
}

.form-grid textarea {
  resize: vertical;
}

.form-grid small {
  color: #b43434;
  font-size: 0.76rem;
  font-weight: 700;
}

.form-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.form-actions button,
.form-actions a {
  border: 0;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.form-actions button {
  background: linear-gradient(140deg, #0c2f50, #1f5f99);
  color: #fff;
  cursor: pointer;
}

.form-actions a {
  background: #edf4fc;
  color: #1f456b;
}

@media (max-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.hero-section {
  transition: background-image 600ms ease-in-out;
}

.admin-app {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1rem;
}

.admin-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.admin-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.admin-brand strong {
  display: block;
  font-family: Poppins, sans-serif;
  color: var(--blue-900);
}

.admin-brand small {
  color: var(--muted);
}

.admin-nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.admin-nav a {
  text-decoration: none;
  color: #26394d;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  background: linear-gradient(140deg, #e9f2fd, #dcecff);
  color: var(--blue-700);
}

.admin-cta {
  display: block;
  margin-top: 1rem;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(140deg, var(--accent), #f3bf49);
  color: #251a08;
  padding: 0.65rem;
  border-radius: 10px;
}

.admin-content {
  display: grid;
  gap: 0.9rem;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #ffffff, #f6fbff);
  border-radius: 16px;
  padding: 1rem;
}

.admin-topbar p {
  margin: 0;
  color: var(--blue-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.admin-topbar h1 {
  margin: 0.2rem 0 0;
  color: var(--blue-900);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-admin {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-900);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-highlight-admin {
  background: linear-gradient(140deg, var(--blue-700), var(--blue-500));
  color: #fff;
  border-color: transparent;
}

.admin-grid-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-stat,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0.95rem;
}

.admin-stat h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.admin-stat strong {
  display: block;
  margin-top: 0.5rem;
  font-family: Poppins, sans-serif;
  font-size: 1.8rem;
  color: var(--blue-900);
}

.admin-panel h2 {
  margin: 0 0 0.7rem;
  color: var(--blue-900);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: #2c3f54;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.admin-form-grid label:has(textarea),
.admin-form-grid label:last-child {
  grid-column: 1 / -1;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.editor-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.editor-layout {
  display: grid;
  grid-template-columns: 230px 1fr 270px;
  gap: 0.75rem;
}

.editor-toolbox,
.editor-canvas,
.editor-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fcff;
  padding: 0.75rem;
}

.editor-toolbox ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.editor-toolbox li {
  border: 1px solid #d6e4f2;
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-weight: 600;
  cursor: grab;
}

.editor-canvas {
  min-height: 340px;
  display: grid;
  gap: 0.55rem;
}

.editor-block {
  border: 1px dashed #9fbcda;
  background: #fff;
  border-radius: 10px;
  padding: 0.6rem;
  cursor: move;
}

.editor-block.is-dragging {
  opacity: 0.5;
}

.preview-box {
  min-height: 180px;
  border: 1px dashed #bdd0e6;
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
}

.history-box {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.history-box button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.6rem;
  font-weight: 600;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-list a,
.chip-list span {
  border: 1px solid #cfe0f1;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: #f5fbff;
  text-decoration: none;
  color: #24405a;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-grid-cards,
  .admin-form-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Admin SaaS V2 */
.admin-shell {
  max-width: 1440px;
  overflow-x: visible;
}

.admin-login-card {
  max-width: 520px;
  margin: 4rem auto;
  background: #fff;
  border: 1px solid #d9e4ef;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(15, 42, 72, 0.14);
}

.admin-login-card h1 {
  margin: 0;
  color: #0e2b4a;
}

.admin-login-card p {
  margin-top: 0.55rem;
  color: #5b6b7a;
}

.admin-login-error {
  color: #b42318;
  font-weight: 700;
}

.admin-login-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.admin-login-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.admin-login-form input {
  border: 1px solid #cfe0f1;
  border-radius: 10px;
  padding: 0.68rem 0.72rem;
}

.admin-login-form button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #1f5f99, #2f7cc6);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}

.admin-saas {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

.admin-saas-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  min-height: calc(100vh - 120px);
  border: 1px solid #d6e3f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #0f2741, #163f67 40%, #164d82);
  color: #d6e8fa;
  padding: 0.9rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.8rem;
}

.admin-saas-sidebar.is-collapsed {
  grid-template-columns: 1fr;
  width: 86px;
}

.admin-saas-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-saas-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}

.admin-saas-brand strong {
  display: block;
  color: #fff;
  font-size: 0.92rem;
}

.admin-saas-brand span {
  color: #c3d9ef;
  font-size: 0.74rem;
}

.admin-collapse-btn {
  border: 1px solid rgba(185, 212, 238, 0.35);
  background: rgba(17, 47, 78, 0.45);
  color: #d8ecff;
  border-radius: 10px;
  padding: 0.38rem;
  cursor: pointer;
}

.admin-saas-nav {
  display: grid;
  gap: 0.35rem;
}

.admin-saas-nav a {
  text-decoration: none;
  color: #e3f1ff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 12px;
  padding: 0.56rem 0.62rem;
  border: 1px solid transparent;
}

.admin-saas-nav a .icon {
  width: 24px;
  text-align: center;
}

.admin-saas-nav a.is-active,
.admin-saas-nav a:hover {
  background: rgba(108, 174, 237, 0.2);
  border-color: rgba(178, 219, 255, 0.28);
}

.admin-saas-sidebar-bottom {
  display: grid;
  gap: 0.4rem;
}

.admin-saas-sidebar-bottom a {
  text-decoration: none;
  color: #f0f8ff;
  border: 1px solid rgba(190, 219, 245, 0.4);
  border-radius: 10px;
  padding: 0.52rem 0.58rem;
  text-align: center;
  font-weight: 700;
}

.admin-saas-main {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.admin-saas-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.9rem;
  border: 1px solid #d7e5f3;
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(145deg, #fff, #f7fbff);
  box-shadow: 0 14px 28px rgba(17, 45, 77, 0.1);
}

.admin-saas-topbar p {
  margin: 0;
  color: #3f7cbc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-saas-topbar h1 {
  margin: 0.3rem 0 0;
  color: #102f4d;
}

.admin-saas-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-global-search input {
  width: 360px;
  border: 1px solid #cfe0f1;
  border-radius: 999px;
  padding: 0.62rem 0.86rem;
  background: #fff;
}

.admin-primary-btn,
.ghost-btn {
  border-radius: 10px;
  padding: 0.58rem 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-primary-btn {
  border: 0;
  background: linear-gradient(145deg, #1f5f99, #2f7cc6);
  color: #fff;
}

.ghost-btn {
  border: 1px solid #cfe0f1;
  background: #fff;
  color: #21415f;
}

.admin-grid-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.metric-card {
  border: 1px solid #d5e4f2;
  border-radius: 14px;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 12px 24px rgba(14, 41, 71, 0.08);
}

.metric-card p {
  margin: 0;
  color: #59728a;
  font-size: 0.78rem;
}

.metric-card strong {
  display: block;
  margin-top: 0.4rem;
  color: #0f2e4b;
  font-size: 1.7rem;
  font-family: Inter, sans-serif;
}

.admin-panels-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.75rem;
}

.admin-panel-card {
  border: 1px solid #d7e5f3;
  border-radius: 14px;
  background: #fff;
  padding: 0.86rem;
  box-shadow: 0 12px 24px rgba(12, 38, 64, 0.08);
}

.admin-panel-card h2 {
  margin: 0;
  color: #123253;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.latest-item {
  border: 1px solid #dfebf7;
  border-radius: 10px;
  padding: 0.55rem;
  margin-top: 0.5rem;
  display: grid;
  gap: 0.2rem;
}

.latest-item span {
  color: #58728a;
  font-size: 0.86rem;
}

.bar-item,
.quality-item {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.58rem;
}

.bar-track {
  background: #e6f0fa;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(145deg, #2c78c0, #52a4f2);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}

.filter-grid input,
.filter-grid select {
  border: 1px solid #d0e2f3;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

.wizard-steps {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.wizard-steps span {
  border-radius: 999px;
  border: 1px solid #d4e5f6;
  background: #f5faff;
  color: #385674;
  font-size: 0.78rem;
  padding: 0.35rem 0.58rem;
  font-weight: 700;
}

.wizard-steps span.is-active {
  background: #1f5f99;
  color: #fff;
  border-color: #1f5f99;
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.admin-form-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.admin-form-modern label {
  display: grid;
  gap: 0.28rem;
  font-weight: 600;
  color: #2c4258;
}

.admin-form-modern input,
.admin-form-modern textarea,
.admin-form-modern select {
  border: 1px solid #d0e2f3;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font: inherit;
}

.admin-form-modern .col-span-2 {
  grid-column: 1 / -1;
}

.wizard-smart-actions,
.wizard-footer {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.review-box {
  border: 1px dashed #c7dbef;
  border-radius: 10px;
  padding: 0.75rem;
  background: #f9fcff;
}

.admin-table-modern-wrapper {
  position: relative;
}

.table-skeleton {
  display: grid;
  gap: 0.45rem;
}

.table-skeleton span {
  display: block;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf4fb 0%, #dfeaf6 50%, #edf4fb 100%);
  background-size: 240% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.admin-table-modern {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.admin-table-modern th,
.admin-table-modern td {
  padding: 0.6rem 0.45rem;
  border-bottom: 1px solid #e4eef8;
  vertical-align: top;
}

.admin-table-modern th {
  text-align: left;
  color: #50708e;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-table-modern td input,
.admin-table-modern td select {
  width: 100%;
  border: 1px solid #d4e3f2;
  border-radius: 8px;
  padding: 0.42rem 0.5rem;
  font: inherit;
}

.cell-company {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.5rem;
}

.company-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d3e3f2;
}

.company-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f7ff;
}

.status-badge {
  display: inline-flex;
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 0.16rem 0.45rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.status-badge.is-aprovado,
.status-badge.is-ativo,
.status-badge.is-publicado {
  background: #dbf5e7;
  color: #0d6a46;
}

.status-badge.is-inativo {
  background: #fde7e7;
  color: #8a1b1b;
}

.status-badge.is-destaque {
  background: #fff2cc;
  color: #835b00;
}

.status-badge.is-rascunho,
.status-badge.is-expirado {
  background: #eef3f8;
  color: #5e7387;
}

.status-badge.is-vendido {
  background: #e8e1ff;
  color: #5b3fb3;
}

.row-actions {
  display: flex;
  gap: 0.3rem;
}

.row-actions button {
  border: 1px solid #d2e2f2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
}

.row-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2e2f2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  text-decoration: none;
}

.save-status {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #5e7b96;
}

.mobile-company-cards {
  display: none;
  gap: 0.6rem;
}

.company-mobile-card {
  border: 1px solid #d7e5f3;
  border-radius: 12px;
  padding: 0.7rem;
}

.table-pagination {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.table-pagination button {
  border: 1px solid #d0e2f3;
  background: #fff;
  border-radius: 8px;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
}

.table-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  min-width: 220px;
  max-width: 380px;
  border-radius: 10px;
  color: #fff;
  background: #1c4f80;
  padding: 0.68rem 0.82rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 160ms ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.is-error {
  background: #9d1c1c;
}

.admin-toast.is-ok {
  background: #0d7c53;
}

.muted {
  color: #5f7890;
}

.admin-categories-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-mini-form {
  display: grid;
  gap: 0.75rem;
}

.admin-mini-form label {
  display: grid;
  gap: 0.35rem;
  color: #1f3552;
  font-weight: 600;
}

.panel-header-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.import-btn {
  cursor: pointer;
}

.field-hint {
  color: #4f6682;
  font-size: 0.75rem;
  line-height: 1.4;
}

.cat-card {
  border: 1px solid #d5e5f5;
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 0.8rem;
  background: #f8fbff;
}

.cat-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.cat-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #163253;
}

.cat-ramo h4 {
  margin: 0.45rem 0;
  font-size: 0.86rem;
  color: #355677;
}

.cat-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #c8dcef;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  background: #fff;
  font-size: 0.82rem;
}

.cat-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 0.8rem;
}

.upload-dropzone {
  margin-top: 0.55rem;
  border: 2px dashed #b9d4ec;
  border-radius: 12px;
  padding: 0.85rem;
  color: #33597d;
  background: #f5fbff;
}

.upload-dropzone:focus {
  outline: 0;
  border-color: #2f7dc4;
  box-shadow: 0 0 0 3px rgba(47, 125, 196, 0.15);
}

.company-profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.classified-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.classified-admin-main {
  display: grid;
  gap: 0.9rem;
}

.classified-form-card,
.classified-preview-panel {
  border: 1px solid #d7e5f3;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 42px rgba(19, 58, 94, 0.08);
  padding: 1rem;
}

.classified-card-head,
.classified-preview-header,
.classified-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.classified-card-head h3,
.classified-preview-header h3 {
  margin: 0;
  color: #153659;
}

.classified-section-tag {
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: #eaf4ff;
  color: #245f95;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.classified-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.classified-flags label,
.classified-inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #d6e6f5;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  font-weight: 600;
}

.classified-inline-check input,
.classified-flags input {
  width: auto !important;
}

.classified-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.classified-gallery-field {
  display: grid;
  gap: 0.6rem;
}

.classified-gallery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 0.8rem;
  color: #1f3552;
}

.classified-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.classified-gallery-item {
  border: 1px solid #d8e6f3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: grid;
  grid-template-rows: 170px auto;
}

.classified-gallery-item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  background: #eef4fa;
}

.classified-gallery-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem;
}

.classified-gallery-actions button {
  flex: 1 1 auto;
  min-height: 34px;
  border: 1px solid #c3d8eb;
  border-radius: 10px;
  background: #f7fbff;
  color: #254565;
  font-weight: 700;
  cursor: pointer;
}

.classified-gallery-empty {
  border: 1px dashed #c5d9eb;
  border-radius: 14px;
  background: #f6fbff;
  padding: 1rem;
  color: #5d7994;
  text-align: center;
}

.classified-thumb-card {
  border: 1px solid #d8e6f3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.classified-thumb-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.classified-thumb-actions {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
}

.classified-thumb-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4b6782;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.classified-file-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #bed4e8;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  background: #f4faff;
  cursor: pointer;
  font-weight: 700;
  color: #1d4f83 !important;
}

.classified-form-errors {
  border: 1px solid #f2c8c8;
  background: #fff2f2;
  color: #8c2323;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.classified-form-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
}

.classified-form-footer {
  border-top: 1px solid #e2edf7;
  padding-top: 1rem;
  flex-wrap: wrap;
}

.classified-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: #5b7995;
  font-size: 0.86rem;
}

.classified-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.classified-preview-card {
  overflow: hidden;
  border-radius: 20px;
  background: #0f2f4d;
  color: #fff;
  box-shadow: 0 16px 32px rgba(15, 47, 77, 0.16);
}

.classified-preview-image-wrap {
  position: relative;
  min-height: 220px;
  background: #dce8f4;
}

.classified-preview-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.classified-preview-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.classified-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.classified-badge.is-category {
  background: rgba(7, 35, 59, 0.72);
}

.classified-badge.is-status {
  background: rgba(255, 255, 255, 0.88);
  color: #16395d;
}

.classified-badge.is-highlight {
  background: #ffd65c;
  color: #5b3b00;
}

.classified-badge.is-urgent {
  background: #f25555;
  color: #fff;
}

.classified-preview-body {
  padding: 1rem 1rem 1.15rem;
  display: grid;
  gap: 0.7rem;
}

.classified-preview-body h4 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.classified-preview-price {
  font-size: 1.45rem;
  color: #ffd65c;
}

.classified-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
}

.classified-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #17aa67, #0a8f57);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.9rem 1rem;
}

@media (max-width: 1180px) {
  .admin-saas {
    grid-template-columns: 1fr;
  }

  .admin-saas-sidebar {
    position: static;
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .admin-grid-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-panels-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .admin-global-search input {
    width: 100%;
  }

  .admin-saas-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-form-modern,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .admin-table-modern {
    display: none;
  }

  .mobile-company-cards {
    display: grid;
  }

  .admin-grid-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-profile-layout {
    grid-template-columns: 1fr;
  }

  .classified-admin-layout {
    grid-template-columns: 1fr;
  }
}

.company-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 1.25rem;
}

.company-editor-step { display: none; }
.company-editor-step.is-active { display: block; }
.company-form-card,
.media-slot-card {
  border: 1px solid rgba(47, 94, 149, 0.12);
  border-radius: 24px;
  background: #fff;
  padding: 1.2rem;
  box-shadow: 0 18px 36px rgba(17, 46, 84, 0.06);
  margin-bottom: 1rem;
}

.company-editor-status {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #eaf3ff;
  color: #23588f;
  font-weight: 800;
}
.company-editor-status.publicado { background: #eaf9f0; color: #14804a; }
.company-editor-status.pronto-para-publicar { background: #fff6dd; color: #9a6a00; }
.company-editor-status.incompleto { background: #fbe9e9; color: #aa3a3a; }

.company-editor-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.company-editor-steps button {
  border: 1px solid rgba(47, 94, 149, 0.18);
  background: #f7fbff;
  color: #264e7f;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 700;
}
.company-editor-steps button.is-active {
  background: linear-gradient(135deg, #123f73, #256cb2);
  color: #fff;
}

.company-editor-preview { position: sticky; top: 1.2rem; align-self: start; }
.company-preview-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(47, 94, 149, 0.12);
  background: #fff;
  box-shadow: 0 18px 36px rgba(17, 46, 84, 0.08);
}
.company-preview-hero {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.company-preview-body { padding: 1rem; }
.company-preview-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 4px solid #fff;
  margin-top: -2.8rem;
  box-shadow: 0 12px 24px rgba(17, 46, 84, 0.14);
}
.company-preview-badges,
.company-page-meta,
.company-preview-cta,
.company-page-cta-row,
.company-page-videos,
.company-page-sidebar-cta,
.company-related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.company-preview-badges span,
.company-page-meta span,
.company-video-chip {
  display: inline-flex;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #eef5ff;
  color: #23588f;
  font-weight: 700;
}
.company-preview-cta button,
.company-page-cta-row a,
.company-page-sidebar-cta a {
  min-height: 46px;
}

.company-admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.company-overview-card {
  border: 1px solid rgba(47, 94, 149, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  padding: 1rem 1.1rem;
  box-shadow: 0 16px 36px rgba(17, 46, 84, 0.05);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

.company-overview-card strong {
  font-size: 1.9rem;
  line-height: 1;
  color: #15335a;
}

.company-overview-card span {
  color: #214b7b;
  font-weight: 800;
}

.company-overview-card small {
  color: #6b86a8;
}

.company-list-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.company-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.company-admin-card {
  border: 1px solid rgba(47, 94, 149, 0.12);
  border-radius: 24px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(17, 46, 84, 0.06);
  display: grid;
  gap: 1rem;
}

.company-admin-card-head,
.company-admin-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.company-admin-card-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  flex: 1;
}

.company-admin-card-brand .company-thumb {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 58px;
}

.company-admin-card-brand .company-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef5ff;
  color: #264e7f;
  font-size: 1.5rem;
}

.company-admin-name {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: 100%;
  font-size: 1.35rem;
  font-weight: 800;
  color: #15335a;
}

.company-admin-card-brand small {
  display: block;
  margin-top: 0.2rem;
  color: #6f87a6;
}

.company-admin-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.company-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.74rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 94, 149, 0.14);
  background: #eef5ff;
  color: #23588f;
  font-weight: 700;
  font-size: 0.84rem;
}

.company-chip.is-warm {
  background: #fff6dd;
  border-color: rgba(255, 190, 51, 0.22);
  color: #9a6a00;
}

.company-admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.company-admin-card-grid label {
  display: grid;
  gap: 0.35rem;
}

.company-admin-card-grid label span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #557293;
}

.company-admin-card-meta {
  color: #5f7a98;
  font-size: 0.95rem;
}

.company-admin-card .row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.company-admin-card .row-actions button {
  border: 1px solid rgba(47, 94, 149, 0.14);
  border-radius: 12px;
  background: #f6faff;
  color: #204b7a;
  padding: 0.58rem 0.82rem;
  font-weight: 700;
}

.company-admin-card .row-actions button:hover {
  background: #1f5ea8;
  color: #fff;
  transform: translateY(-1px);
}

.company-empty-state {
  border: 1px dashed rgba(47, 94, 149, 0.24);
  border-radius: 24px;
  background: rgba(255,255,255,0.96);
  padding: 2rem;
  text-align: center;
  color: #557293;
}

.media-slot-preview,
.media-slot-cover {
  min-height: 120px;
  border: 1px dashed rgba(47, 94, 149, 0.18);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fbff;
  margin-top: 0.8rem;
}
.media-slot-cover,
.media-slot-draggable {
  min-height: 180px;
  overflow: hidden;
  cursor: grab;
  position: relative;
  user-select: none;
}
.media-slot-cover.is-dragging,
.media-slot-draggable.is-dragging { cursor: grabbing; }
.media-slot-cover .media-slot-image,
.media-slot-draggable .media-slot-image {
  height: 220px;
  object-position: center 50%;
}
.media-slot-cover .drag-hint,
.media-slot-draggable .drag-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.4s;
}
.media-slot-cover.is-dragging .drag-hint { opacity: 0; }
.media-slot-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 16px;
}
.company-video-item,
.company-hours-public-row,
.company-related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(17, 46, 84, 0.08);
}
.company-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.company-related-card {
  display: block;
  border: 1px solid rgba(47, 94, 149, 0.12);
  border-radius: 22px;
  padding: 1rem;
  background: #fff;
}
.company-related-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0.75rem;
}
.company-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 1.25rem;
}
.company-page-text { line-height: 1.7; color: #38557b; }
.company-page-block { margin-top: 1.25rem; }
.company-page-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}
.company-page-gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
}
.company-page-logo {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 16px 36px rgba(8, 22, 42, 0.24);
}
.company-page-branding {
  display: flex;
  align-items: end;
  gap: 1rem;
}
.company-page-overlay {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 1rem;
}

@media (max-width: 980px) {
  .company-editor-layout,
  .company-page-grid,
  .company-admin-grid,
  .company-admin-overview,
  .company-admin-card-grid { grid-template-columns: 1fr; }
  .company-editor-preview { position: static; }
  .company-admin-card-head,
  .company-admin-card-footer {
    flex-direction: column;
  }
  .company-admin-badges,
  .company-admin-card .row-actions {
    justify-content: flex-start;
  }
}

/* Company Admin Row - Quick Edit (UX Design) */
.company-admin-row {
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(300px, auto);
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #fff;
  border: 1px solid rgba(47, 94, 149, 0.12);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(17, 46, 84, 0.02);
  transition: all 0.2s ease-out;
  cursor: pointer;
}

.company-admin-row:has(.multi-check-select.is-open) {
  z-index: 3200;
}

.company-admin-row:hover {
  border-color: rgba(47, 94, 149, 0.3);
  box-shadow: 0 4px 16px rgba(17, 46, 84, 0.05);
  transform: translateY(-1px);
}

.company-row-logo {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-row-logo .company-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.company-row-logo .upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.company-row-logo:hover .upload-overlay {
  opacity: 1;
}

.company-row-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.company-row-name-col {
  width: 100%;
}

.company-row-name-col .company-admin-name {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #15335a;
  box-shadow: none;
  width: 100%;
  outline: none;
}

.company-row-name-col .company-admin-name:focus {
  border-bottom: 2px solid #204b7a;
  border-radius: 0;
}

.company-row-name-col .company-slug {
  font-size: 0.8rem;
  color: #6f87a6;
  margin-top: 0.15rem;
}

.company-row-quick-edit {
  display: grid;
  grid-template-columns: minmax(120px, 1.05fr) minmax(110px, 0.75fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(130px, 1.1fr);
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  overflow: visible;
}

.company-row-quick-edit input,
.company-row-quick-edit select {
  width: 100%;
  height: 38px;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(47, 94, 149, 0.14);
  background: #f8fafc;
  color: #334155;
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
  line-height: 1.2;
}

.company-row-quick-edit input:focus,
.company-row-quick-edit select:focus {
  border-color: #204b7a;
}

.company-row-badges-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.company-row-actions-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.company-row-actions-col .save-status {
  font-size: 0.8rem;
  color: #5f7a98;
  white-space: nowrap;
}

.company-row-actions-col .edit-btn,
.company-row-actions-col .message-btn {
  padding: 0.45rem 0.8rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.company-row-actions-col .edit-btn:hover,
.company-row-actions-col .message-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.company-row-actions-col .message-btn {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4f8f;
}

.company-row-actions-col .delete-btn {
  padding: 0.45rem 0.8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.company-row-actions-col .delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.admin-access-message-modal[hidden] {
  display: none;
}

.admin-access-message-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-access-message-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 42, 0.48);
}

.admin-access-message-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(47, 94, 149, 0.18);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(8, 22, 42, 0.26);
  padding: 1.1rem;
  display: grid;
  gap: 0.85rem;
}

.admin-access-message-header,
.admin-access-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-access-message-header h2 {
  margin: 0;
  color: #123253;
}

.admin-access-message-alert {
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  padding: 0.75rem 0.85rem;
  font-weight: 700;
}

.admin-access-message-textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid #d0e2f3;
  border-radius: 12px;
  padding: 0.9rem;
  font: 0.95rem/1.55 Arial, sans-serif;
  color: #0f172a;
  background: #f8fbff;
}

.admin-access-message-feedback {
  color: #0d6a46;
  font-weight: 800;
}

/* Fallback responsive for mobile admin */
@media (max-width: 992px) {
  .company-admin-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 1rem;
  }
  .company-row-logo {
    margin: 0 auto;
  }
  .company-row-subcat-col {
    flex: auto;
  }
  .company-row-actions-col {
    justify-content: flex-start;
  }
}

/* Multi-select filter styles */
.multi-select-form {
  display: contents;
}

.multi-select-form input[type="checkbox"] {
  display: none;
}

.multi-select-form label.category-card {
  cursor: pointer;
  position: relative;
}

.multi-select-form label.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 32px rgba(45, 42, 38, 0.14);
  border-color: #d4c9bc;
}

.multi-select-form label.category-card:has(input:checked) {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 2px rgba(196, 120, 90, 0.2);
  background: linear-gradient(145deg, #fffefb, #fdf8f5);
}

.multi-select-form label.category-card:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--terracotta);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.filter-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem;
}

.btn-filter {
  background: linear-gradient(135deg, var(--terracotta), #d4896a);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 120, 90, 0.4);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #fdf8f5, #faf6f0);
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 0.8rem;
}

.active-filters strong {
  color: var(--terracotta);
  font-size: 0.9rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--terracotta);
  color: white;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
}

.filter-tag a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  opacity: 0.8;
}

.filter-tag a:hover {
  opacity: 1;
}

.theme-purple { border-left: 4px solid #8b5cf6; }
.theme-purple h2 { color: #7c3aed; }

/* ========== Categorias v2 Redesign ========== */
.cat2-shell { display: grid; gap: 1rem; }

/* Header */
.cat2-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  padding: 1.2rem 1.5rem; background: #fff; border: 1px solid #e2eaf4;
  border-radius: 18px; box-shadow: 0 4px 18px rgba(20, 50, 90, 0.05);
}
.cat2-header-title { display: flex; align-items: center; gap: 1rem; }
.cat2-header-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: #eef4ff; color: #2563eb;
}
.cat2-header h2 { margin: 0; font-size: 1.85rem; color: #0f1f38; font-weight: 800; }
.cat2-header p { margin: 0.2rem 0 0; color: #6b7c94; font-size: 0.92rem; }
.cat2-kpis { display: flex; gap: 0.8rem; }
.cat2-kpi {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; border: 1px solid #e5edf7; border-radius: 14px;
  background: #fff; min-width: 135px;
}
.cat2-kpi-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
}
.cat2-kpi--ramos .cat2-kpi-icon { background: #e8f5e9; color: #2e7d32; }
.cat2-kpi--categorias .cat2-kpi-icon { background: #e3f2fd; color: #1565c0; }
.cat2-kpi--sub .cat2-kpi-icon { background: #fff3e0; color: #e65100; }
.cat2-kpi strong { display: block; font-size: 1.6rem; font-weight: 800; color: #0f1f38; line-height: 1.1; }
.cat2-kpi span { font-size: 0.78rem; color: #7a8da6; line-height: 1.25; }
.cat2-btn-new {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  font: 700 0.92rem/1 'Inter', sans-serif; cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
  transition: all 0.2s ease;
}
.cat2-btn-new:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.38); }

/* Grid Layout */
.cat2-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }

/* Painel card genérico */
.cat2-panel {
  border: 1px solid #e2eaf4; border-radius: 18px; background: #fff;
  box-shadow: 0 6px 22px rgba(20, 50, 90, 0.05); overflow: hidden;
}
.cat2-panel-head {
  padding: 1rem 1.2rem 0.6rem; border-bottom: 1px solid #edf2fa;
}
.cat2-panel-head h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #1a2b45; }

/* Coluna esquerda: Busca + Tree */
.cat2-search-row {
  display: flex; gap: 0.5rem; padding: 0.7rem 1.2rem;
}
.cat2-search-box {
  flex: 1; display: flex; align-items: center; gap: 0.5rem;
  padding: 0 0.7rem; height: 38px; border: 1px solid #dde7f4;
  border-radius: 10px; background: #f8fbff; color: #94a3b8;
}
.cat2-search-box input {
  border: 0; background: transparent; outline: none; width: 100%;
  font: 400 0.88rem/1 'Inter', sans-serif; color: #334155;
}
.cat2-search-box input::placeholder { color: #94a3b8; }
.cat2-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid #dde7f4;
  border-radius: 10px; background: #f8fbff; color: #64748b;
  cursor: pointer; transition: all 0.15s;
}
.cat2-icon-btn:hover { border-color: #2563eb; color: #2563eb; background: #eef4ff; }
.cat2-meta { padding: 0 1.2rem; font-size: 0.8rem; color: #94a3b8; }

/* Tree view - Inline Edition */
.cat2-tree {
  padding: 1rem 1.2rem 1.5rem;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  columns: 3 320px;
  column-gap: 1.5rem;
}
.cat2-tree::-webkit-scrollbar { width: 4px; }
.cat2-tree::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Blocks and Items */
.cat2-ramo-block {
  display: inline-block;
  width: 100%;
  margin-bottom: 2.5rem;
  break-inside: avoid;
  border: 1px solid #e8eff8;
  border-top: 5px solid #3b82f6;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(20, 50, 90, 0.06);
  transition: all 0.3s ease;
  cursor: default;
}
.cat2-ramo-block:nth-child(6n+1) { border-top-color: #3b82f6; } 
.cat2-ramo-block:nth-child(6n+1) .cat2-item--ramo { background: linear-gradient(to bottom, #f0f7ff, #ffffff); }
.cat2-ramo-block:nth-child(6n+2) { border-top-color: #8b5cf6; }
.cat2-ramo-block:nth-child(6n+2) .cat2-item--ramo { background: linear-gradient(to bottom, #f5f3ff, #ffffff); }
.cat2-ramo-block:nth-child(6n+3) { border-top-color: #10b981; }
.cat2-ramo-block:nth-child(6n+3) .cat2-item--ramo { background: linear-gradient(to bottom, #ecfdf5, #ffffff); }
.cat2-ramo-block:nth-child(6n+4) { border-top-color: #f59e0b; }
.cat2-ramo-block:nth-child(6n+4) .cat2-item--ramo { background: linear-gradient(to bottom, #fffbeb, #ffffff); }
.cat2-ramo-block:nth-child(6n+5) { border-top-color: #ec4899; }
.cat2-ramo-block:nth-child(6n+5) .cat2-item--ramo { background: linear-gradient(to bottom, #fdf2f8, #ffffff); }
.cat2-ramo-block:nth-child(6n+6) { border-top-color: #06b6d4; }
.cat2-ramo-block:nth-child(6n+6) .cat2-item--ramo { background: linear-gradient(to bottom, #ecfeff, #ffffff); }

.cat2-item--ramo {
  font-weight: 800 !important;
  font-size: 1rem !important;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.cat2-item--cat {
  padding-left: 0.75rem !important;
  font-weight: 700;
  border-bottom: 1px dashed rgba(0,0,0,0.02);
}

.cat2-item--sub {
  padding-left: 2rem !important;
  font-size: 0.85rem;
  opacity: 0.9;
}

.cat2-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.cat2-item-dot--ramo { background-color: currentColor; width: 10px; height: 10px; }
.cat2-item-dot--cat { background-color: #94a3b8; }

.cat2-item:hover {
  background-color: rgba(0,0,0,0.02) !important;
}


.cat2-ramo-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 50, 90, 0.08);
}

.cat2-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  transition: all 0.2s;
  position: relative;
  border-left: 3px solid transparent;
}
/* Grip icon for dragging */
.cat2-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 20px;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: grab;
}
.cat2-item:hover::before { opacity: 1; }

.cat2-item:hover { 
  background: #f8fafc; 
  border-left-color: #94a3b8;
}

/* Identation based on Level */
.cat2-item--ramo {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  color: #1e293b;
  padding-left: 1.2rem;
}
.cat2-item--cat {
  padding-left: 2.2rem;
  border-bottom: 1px dashed #e8eff8;
  color: #334155;
  font-weight: 600;
}
.cat2-item--sub {
  padding-left: 3.4rem;
  border-bottom: 1px dashed #f0f4fa;
  color: #64748b;
  font-size: 0.92em;
}
.cat2-item--sub:last-child { border-bottom: none; }

/* SVG Icons replacing dots */
.cat2-item-dot {
  display: inline-block;
  width: 16px; height: 16px;
  margin-right: 0.6rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
  flex-shrink: 0;
}
.cat2-item--ramo .cat2-item-dot { 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233b82f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4'/%3E%3C/svg%3E");
  width: 18px; height: 18px;
}
.cat2-item--cat .cat2-item-dot { 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f59e0b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'/%3E%3C/svg%3E");
  width: 16px; height: 16px;
}
.cat2-item--sub .cat2-item-dot { 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z'/%3E%3C/svg%3E");
  width: 14px; height: 14px;
}

.cat2-item-name {
  flex: 1;
  font-size: 0.95rem;
  color: #1e3a5c;
  font-weight: 600;
  display: block;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
  padding: 0.4rem 0.6rem 0.4rem 0;
  cursor: pointer;
  transition: all 0.2s;
}
.cat2-item-name:hover {
  color: #2563eb;
}

.cat2-badge {
  background-color: #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

/* Actions */
.cat2-item-actions {
  display: flex; 
  gap: 0.35rem;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.cat2-item:hover .cat2-item-actions { opacity: 1; }

/* Accordion / Collapsible */
.cat2-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  color: #94a3b8;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.cat2-group.is-collapsed .cat2-children,
.cat2-ramo-block.is-collapsed .cat2-group,
.cat2-ramo-block.is-collapsed .cat2-children {
  display: none !important;
}
.cat2-ramo-block.is-collapsed .cat2-toggle svg,
.cat2-group.is-collapsed .cat2-toggle svg {
  transform: rotate(-90deg);
}
.cat2-item--ramo, .cat2-item--cat {
  cursor: pointer;
}
.cat2-item--ramo .cat2-toggle { color: #3b82f6; }
.cat2-item--cat .cat2-toggle { color: #f59e0b; }

.cat2-act-btn {
  border: 1px solid #d8e5f5;
  background: #f4f8ff;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  color: #64748b;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat2-act-btn svg { width: 14px; height: 14px; }
.cat2-act-btn:hover { background: #e2ecff; color: #2563eb; border-color: #93c5fd; }
.cat2-act-btn--add:hover { color: #10b981; border-color: #6ee7b7; background: #ecfdf5; }
.cat2-act-btn--del:hover { color: #ef4444; border-color: #fca5a5; background: #fef2f2; }

/* Inline Inputs */
.cat2-inline-input {
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font: 600 0.9rem/1 'Inter', sans-serif;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.cat2-inline-add { margin-left: 0.5rem; }

/* Add Ramo Input at bottom */
.cat2-add-ramo-btn {
  width: calc(100% - 2rem); margin: 0.5rem 1rem 1rem;
}

.cat2-inline-tip {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: auto;
  font-weight: normal;
  font-style: italic;
}

.cat2-saving {
  opacity: 0.5;
  pointer-events: none;
}
/* Coluna central: Editor */
.cat2-breadcrumb {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.2rem; border-bottom: 1px solid #edf2fa;
}
.cat2-bc-item {
  font-size: 0.85rem; color: #94a3b8; font-weight: 600;
}
.cat2-bc-item.is-active { color: #2563eb; font-weight: 700; }
.cat2-breadcrumb svg { color: #cbd5e1; }

.cat2-editor-body { padding: 1.2rem; }
.cat2-form { display: grid; gap: 1.1rem; }
.cat2-form-group { display: grid; gap: 0.35rem; }
.cat2-form-group > label {
  font-size: 0.85rem; font-weight: 600; color: #374151;
}
.cat2-input, .cat2-select, .cat2-textarea {
  width: 100%; padding: 0.6rem 0.85rem; border: 1px solid #dde7f4;
  border-radius: 10px; background: #fff; color: #1e293b;
  font: 400 0.92rem/1.5 'Inter', sans-serif; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cat2-input:focus, .cat2-select:focus, .cat2-textarea:focus {
  border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.cat2-textarea { resize: vertical; min-height: 72px; }
.cat2-char-count { font-size: 0.78rem; color: #94a3b8; text-align: right; }

/* Icon picker */
.cat2-icon-picker {
  display: flex; gap: 0.45rem; flex-wrap: wrap;
}
.cat2-icon-option {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 2px solid #e5edf7;
  border-radius: 12px; background: #f8fbff; cursor: pointer;
  font-size: 1.15rem; transition: all 0.15s;
}
.cat2-icon-option:hover { border-color: #93c5fd; background: #e8f0fe; }
.cat2-icon-option.is-active { border-color: #2563eb; background: #dbeafe; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }
.cat2-icon-more { color: #64748b; font-weight: 800; font-size: 1.4rem; }

/* Status toggle */
.cat2-status-row { display: flex; align-items: center; gap: 0.9rem; }
.cat2-status-row p { margin: 0.15rem 0 0; font-size: 0.8rem; color: #94a3b8; }
.cat2-status-label { font-size: 0.92rem; color: #16a34a; font-weight: 700; }
.cat2-toggle {
  position: relative; display: inline-block;
  width: 48px; height: 26px; flex: 0 0 48px;
}
.cat2-toggle input { opacity: 0; width: 0; height: 0; }
.cat2-toggle-track {
  position: absolute; inset: 0; cursor: pointer;
  background: #cbd5e1; border-radius: 999px;
  transition: background 0.25s;
}
.cat2-toggle-track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); transition: transform 0.25s;
}
.cat2-toggle input:checked + .cat2-toggle-track { background: #16a34a; }
.cat2-toggle input:checked + .cat2-toggle-track::after { transform: translateX(22px); }

/* Form buttons */
.cat2-form-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem;
  padding-top: 1rem; border-top: 1px solid #edf2fa; margin-top: 0.5rem;
}
.cat2-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border: 1px solid transparent;
  border-radius: 10px; font: 600 0.88rem/1 'Inter', sans-serif;
  cursor: pointer; transition: all 0.2s;
}
.cat2-btn--ghost {
  background: #f1f5f9; border-color: #e2e8f0; color: #475569;
}
.cat2-btn--ghost:hover { background: #e2e8f0; color: #1e293b; }
.cat2-btn--danger {
  background: #fef2f2; border-color: #fecaca; color: #dc2626;
}
.cat2-btn--danger:hover { background: #fee2e2; border-color: #fca5a5; }
.cat2-btn--primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); border: 0; color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.cat2-btn--primary:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35); transform: translateY(-1px); }

/* Sidebar as bottom widgets */
.cat2-col-side {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 1rem; 
  border: none;
  box-shadow: none;
  background: transparent;
}
.cat2-quick-section { 
  background: #fff;
  border: 1px solid #e2eaf4;
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(20, 50, 90, 0.05);
  padding: 0;
}
.cat2-quick-section .cat2-panel-head { padding: 0.9rem 1.2rem 0.5rem; border-bottom: 0; }
.cat2-quick-links { display: grid; gap: 0; padding: 0 0.6rem 0.6rem; }
.cat2-quick-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.65rem; border: 0; border-radius: 10px;
  background: transparent; color: #334155; font: 600 0.88rem/1.2 'Inter', sans-serif;
  cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.cat2-quick-link:hover { background: #f0f5ff; }
.cat2-quick-link > svg:last-child { margin-left: auto; }
.cat2-quick-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px;
}

/* Donut chart */
.cat2-donut-wrap {
  position: relative; display: flex; justify-content: center;
  padding: 1rem 0;
}
.cat2-donut { display: block; }
.cat2-donut-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); text-align: center;
}
.cat2-donut-center strong { display: block; font-size: 1.6rem; font-weight: 800; color: #0f1f38; }
.cat2-donut-center span { font-size: 0.75rem; color: #94a3b8; }
.cat2-donut-legend {
  display: grid; gap: 0.4rem; padding: 0 1.2rem 1rem;
}
.cat2-legend-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: #475569;
}
.cat2-legend-item i {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex: 0 0 10px;
}

/* Keyboard shortcuts */
.cat2-shortcuts { display: grid; gap: 0.5rem; padding: 0.5rem 1.2rem 1rem; }
.cat2-shortcut {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: #475569;
}
.cat2-shortcut span { margin-left: auto; color: #94a3b8; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.15rem 0.45rem; min-width: 22px; height: 22px;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 5px;
  font: 600 0.72rem/1 'Inter', monospace; color: #475569;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Footer */
.cat2-footer {
  display: grid; grid-template-columns: 1fr auto; gap: 0;
  border: 1px solid #e2eaf4; border-radius: 18px; background: #fff;
  box-shadow: 0 4px 18px rgba(20, 50, 90, 0.05); overflow: hidden;
}
.cat2-footer-main { display: flex; align-items: center; gap: 2rem; padding: 1rem 1.5rem; }
.cat2-footer-tip { display: flex; align-items: center; gap: 0.8rem; }
.cat2-footer-tip-icon { font-size: 1.5rem; }
.cat2-footer-tip strong { display: block; font-size: 0.9rem; color: #1a2b45; }
.cat2-footer-tip p { margin: 0.15rem 0 0; font-size: 0.8rem; color: #94a3b8; }
.cat2-footer-badges { display: flex; gap: 1.8rem; }
.cat2-footer-badge {
  display: flex; align-items: center; gap: 0.6rem;
}
.cat2-footer-badge strong { display: block; font-size: 0.82rem; color: #334155; }
.cat2-footer-badge span { font-size: 0.75rem; color: #94a3b8; }
.cat2-footer-help {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem; background: #eef4ff;
  color: #2563eb; text-decoration: none; font-weight: 600;
  border-left: 1px solid #d5e3fa; transition: background 0.15s;
}
.cat2-footer-help:hover { background: #dbeafe; }
.cat2-footer-help strong { display: block; font-size: 0.85rem; color: #2563eb; }
.cat2-footer-help span { font-size: 0.78rem; color: #60a5fa; }

/* Responsive */
@media (max-width: 1180px) {
  .cat2-grid { grid-template-columns: 1fr; }
  .cat2-kpis { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .cat2-header { flex-direction: column; align-items: stretch; }
  .cat2-footer { grid-template-columns: 1fr; }
  .cat2-footer-main { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cat2-footer-badges { flex-wrap: wrap; gap: 1rem; }
}

/* Admin multi-select */
.admin-form-modern select[multiple] {
  width: 100%;
  height: 44px;
  min-height: 44px;
  background: #fdfbf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
}

.admin-form-modern select[multiple],
.company-row-quick-edit .quick-select-multiple {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.multi-check-select {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 1;
}

.multi-check-trigger {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(47, 94, 149, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.admin-form-modern .multi-check-trigger {
  height: 44px;
  border-radius: 12px;
  background: #fdfbf9;
  padding: 0.55rem 0.75rem;
}

.multi-check-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-check-trigger b {
  color: #6f87a6;
  font-size: 0.8rem;
  line-height: 1;
}

.multi-check-select.is-open .multi-check-trigger {
  border-color: #204b7a;
  box-shadow: 0 0 0 2px rgba(32, 75, 122, 0.12);
}

.multi-check-select.is-open {
  z-index: 2600;
}

.multi-check-menu {
  position: absolute;
  z-index: 2601;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem;
  border: 1px solid rgba(47, 94, 149, 0.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 35, 64, 0.18);
  isolation: isolate;
}

.multi-check-option {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.45rem;
  border-radius: 7px;
  color: #24364f;
  font-weight: 650;
  cursor: pointer;
}

.multi-check-option:hover {
  background: #f1f5f9;
}

.multi-check-option input {
  width: 16px;
  height: 16px;
  accent-color: #204b7a;
  flex: 0 0 auto;
}

.multi-check-option span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
  word-break: break-word;
}

.admin-form-modern select[multiple]:focus {
  border-color: var(--terracotta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 120, 90, 0.15);
}

.admin-form-modern select[multiple] option {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.admin-form-modern select[multiple] option:checked {
  background: var(--terracotta);
  color: white;
}

/* New business guide */
.guide-page {
  --guide-ink: #172436;
  --guide-muted: #687382;
  --guide-border: #dde6df;
  --guide-paper: #fffdfa;
  --guide-green: #55745a;
  --guide-gold: #d9952f;
  --guide-blue: #386e8b;
  --guide-clay: #bb6f4b;
  display: grid;
  gap: 1.35rem;
}

.guide-hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid rgba(85, 116, 90, 0.24);
  border-radius: 30px;
  padding: clamp(1rem, 2.4vw, 1.7rem);
  background:
    linear-gradient(125deg, rgba(255, 253, 250, 0.98) 0%, rgba(250, 246, 238, 0.9) 50%, rgba(234, 241, 233, 0.96) 100%),
    url('/assets/img/cidade/centro-2.jpg') center/cover;
  box-shadow: 0 22px 56px rgba(36, 54, 79, 0.12);
  overflow: hidden;
  position: relative;
}

.guide-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 auto;
  width: 42%;
  height: 7px;
  background: linear-gradient(90deg, var(--guide-green), var(--guide-gold), var(--guide-blue));
}

.guide-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 860px;
}

.guide-eyebrow {
  margin: 0 0 0.8rem;
  color: var(--guide-clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guide-hero h1 {
  margin: 0;
  max-width: 780px;
  color: var(--guide-ink);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.85rem);
  line-height: 0.96;
  font-weight: 700;
}

.guide-hero-copy > p:not(.guide-eyebrow) {
  max-width: 590px;
  margin: 1rem 0 0;
  color: #4f5d69;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.55;
}

.guide-search {
  margin-top: 1.4rem;
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 0.45rem;
  border: 1px solid rgba(104, 115, 130, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(23, 36, 54, 0.09);
  backdrop-filter: blur(10px);
}

.guide-search input[type='search'] {
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 13px;
  padding: 0 0.9rem;
  background: transparent;
  color: var(--guide-ink);
  font: 700 1rem var(--font-body);
  outline: none;
}

.guide-search input[type='search']::placeholder {
  color: #9aa4ad;
}

.guide-search button,
.guide-hero-panel a,
.guide-filter-form > button,
.guide-results-head a,
.guide-company-actions a {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
}

.guide-search button {
  min-width: 122px;
  border-radius: 13px;
  background: #172436;
  color: #fff;
  font-size: 0.98rem;
}

.guide-hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 0.7rem;
  padding: 0.8rem;
  max-width: 360px;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background: rgba(255, 253, 250, 0.72);
  backdrop-filter: blur(13px);
}

.guide-hero-panel div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(85, 116, 90, 0.18);
}

.guide-hero-panel strong {
  color: var(--guide-ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 0.9;
}

.guide-hero-panel span {
  color: var(--guide-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
}

.guide-hero-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--guide-green), #6d8d62);
  color: #fff;
  box-shadow: 0 12px 28px rgba(85, 116, 90, 0.28);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.guide-filters,
.guide-results {
  border: 1px solid var(--guide-border);
  background: var(--guide-paper);
  box-shadow: 0 16px 42px rgba(23, 36, 54, 0.08);
}

.guide-filters {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  border-radius: 24px;
  padding: 1rem;
}

.guide-filter-head,
.guide-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.guide-filter-head strong {
  color: var(--guide-ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.guide-filter-head a,
.guide-results-head a {
  color: var(--guide-clay);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.guide-active span {
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: #eef5ee;
  color: var(--guide-green);
  font-size: 0.76rem;
  font-weight: 800;
}

.guide-filter-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.guide-filter-form section {
  display: grid;
  gap: 0.6rem;
}

.guide-filter-form h2 {
  margin: 0;
  color: #324151;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-check-list {
  display: grid;
  gap: 0.36rem;
}

.guide-check-list.compact {
  max-height: 280px;
  overflow: auto;
  padding-right: 0.2rem;
}

.guide-check-list label {
  min-height: 40px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #344456;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.guide-check-list label:hover {
  border-color: #d5dfd6;
  background: #f8fbf7;
}

.guide-check-list input {
  width: 16px;
  height: 16px;
  accent-color: var(--guide-green);
}

.guide-check-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 750;
}

.guide-check-list b {
  min-width: 27px;
  border-radius: 999px;
  padding: 0.15rem 0.38rem;
  background: #f1eee8;
  color: #7c715f;
  font-size: 0.72rem;
  text-align: center;
}

.guide-filter-form > button {
  min-height: 46px;
  border-radius: 14px;
  background: var(--guide-gold);
  color: #221708;
  font-size: 0.95rem;
}

.guide-results {
  border-radius: 28px;
  padding: clamp(1rem, 2vw, 1.3rem);
  overflow: hidden;
}

.guide-results-head {
  margin-bottom: 1rem;
}

.guide-results-head p {
  margin: 0 0 0.2rem;
  color: var(--guide-blue);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.guide-results-head h2 {
  margin: 0;
  color: var(--guide-ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

.guide-results-head a {
  flex: 0 0 auto;
  border: 1px solid #e1d3bc;
  border-radius: 999px;
  padding: 0.58rem 0.86rem;
  color: #805512;
  background: #fff8ec;
}

.guide-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.guide-featured article {
  min-height: 180px;
  display: grid;
  align-content: end;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #172436;
  color: #fff;
}

.guide-featured .guide-company-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  opacity: 0.72;
}

.guide-featured .guide-company-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 36, 54, 0.08), rgba(23, 36, 54, 0.86));
}

.guide-featured article > div:not(.guide-company-media) {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.guide-featured span {
  color: #f9d991;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-featured h3 {
  margin: 0.2rem 0;
  font-size: 1.15rem;
  line-height: 1.1;
}

.guide-featured p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.guide-quick-links {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  margin-bottom: 0.4rem;
}

.guide-quick-links a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  text-decoration: none;
  border: 1px solid #dfe8e3;
  border-radius: 999px;
  padding: 0.44rem 0.65rem;
  background: #fff;
  color: #334456;
  font-size: 0.82rem;
  font-weight: 800;
}

.guide-quick-links span {
  color: var(--guide-clay);
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.guide-company-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #dee7e2;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.guide-company-card:hover {
  transform: translateY(-4px);
  border-color: #cddccc;
  box-shadow: 0 18px 34px rgba(23, 36, 54, 0.12);
}

.guide-company-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #e9f1eb, #f7ead7);
  position: relative;
}

.guide-company-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guide-company-media.placeholder {
  display: grid;
  place-items: center;
  color: var(--guide-green);
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
}

.guide-company-body {
  display: grid;
  gap: 0.68rem;
  padding: 0.9rem;
}

.guide-company-title {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.guide-company-title span {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--guide-blue);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-company-title h3 {
  margin: 0;
  color: var(--guide-ink);
  font-size: 1.06rem;
  line-height: 1.18;
}

.guide-company-title b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.24rem 0.46rem;
  background: #fff2d5;
  color: #8c5c08;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.guide-company-body p,
.guide-company-body small {
  margin: 0;
  color: var(--guide-muted);
  line-height: 1.42;
}

.guide-company-body p {
  font-size: 0.9rem;
}

.guide-company-body small {
  font-size: 0.8rem;
}

.guide-company-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.guide-company-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 11px;
  padding: 0.45rem 0.72rem;
  background: #172436;
  color: #fff;
  font-size: 0.82rem;
}

.guide-company-actions a.whatsapp {
  background: var(--guide-green);
}

.guide-company-actions a.call {
  background: #2d4f73;
}

.guide-empty {
  margin: 0;
  border: 1px dashed #d7c9b7;
  border-radius: 18px;
  padding: 1.5rem;
  background: #fffaf2;
  color: #745f43;
  font-weight: 800;
  text-align: center;
}

.guide-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.guide-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  background: #f2ede6;
  color: #3a2e1f;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s;
}

.guide-pagination a:hover {
  background: #e0d8cc;
  color: #1a140e;
}

.guide-pagination-info {
  font-size: 0.85rem;
  color: #745f43;
  font-weight: 500;
}

@media (max-width: 1180px) {
  .guide-hero,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-filters {
    position: static;
    max-height: none;
  }

  .guide-check-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .guide-featured,
  .guide-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .topbar-actions > .announce-btn {
    display: none;
  }

  .guide-hero {
    min-height: 0;
    border-radius: 22px;
  }

  .guide-hero h1 {
    font-size: clamp(1.35rem, 8.5vw, 1.95rem);
  }

  .guide-hero-panel div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .guide-hero-panel strong {
    font-size: 2.15rem;
  }

  .guide-hero-panel span {
    text-align: left;
  }

  .guide-search {
    grid-template-columns: 1fr;
  }

  .guide-search button {
    min-height: 48px;
  }

  .guide-check-list,
  .guide-featured,
  .guide-card-grid {
    grid-template-columns: 1fr;
  }

  .guide-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-results {
    order: 1;
  }

  .guide-filters {
    order: 2;
  }
}

/* Quick multi-select in company list */
.company-row-quick-edit .quick-select-multiple {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
  min-width: 0;
  cursor: pointer;
  height: 38px;
  max-height: 38px;
  overflow: hidden;
  white-space: nowrap;
}

.company-row-quick-edit .quick-select-multiple:focus {
  border-color: var(--terracotta);
  outline: none;
  box-shadow: 0 0 0 2px rgba(196, 120, 90, 0.15);
}

.company-row-quick-edit .quick-select-multiple option {
  padding: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .company-row-quick-edit {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 680px) {
  .company-row-quick-edit {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== BANCO DE CURRÍCULOS ========== */

.resume-bank-public {
  padding: 2rem 1rem;
}

.resume-bank-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: linear-gradient(135deg, #1a6b6b 0%, #0f5252 50%, #1a5c5c 100%);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 2rem;
  box-shadow: 0 18px 42px rgba(19, 58, 94, 0.12);
  overflow: hidden;
  position: relative;
}

.resume-bank-hero-copy {
  color: white;
  flex: 1;
  z-index: 2;
}

.resume-bank-hero-copy span {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.resume-bank-hero-copy h1 {
  margin: 0.5rem 0 1.25rem;
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: white;
}

.resume-bank-hero-copy p {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 480px;
}

.resume-bank-cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: #4db8a0;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.resume-bank-cta:hover {
  background: #3aa087;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77, 184, 160, 0.3);
}

.resume-bank-hero-art {
  flex: 1;
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.resume-bank-desk {
  position: relative;
  width: 100%;
  height: 100%;
}

.resume-bank-phone,
.resume-bank-notebook,
.resume-bank-pencil,
.resume-bank-cv,
.resume-bank-lens,
.resume-bank-hand,
.resume-bank-coffee {
  position: absolute;
  background: currentColor;
  color: white;
}

.resume-bank-phone {
  width: 45px;
  height: 85px;
  background: #4a6fa5;
  border-radius: 8px;
  top: 20%;
  right: 25%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resume-bank-notebook {
  width: 120px;
  height: 70px;
  background: #e8e4e0;
  border-radius: 6px;
  top: 35%;
  left: 15%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resume-bank-pencil {
  width: 8px;
  height: 60px;
  background: #f5c563;
  border-radius: 4px;
  top: 45%;
  left: 40%;
  transform: rotate(-15deg);
}

.resume-bank-cv {
  width: 70px;
  height: 95px;
  background: #f5f3f0;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.resume-bank-cv span,
.resume-bank-cv i,
.resume-bank-cv b {
  display: block;
  background: #d0ccc8;
  border-radius: 2px;
}

.resume-bank-cv span {
  width: 50px;
  height: 6px;
  margin-bottom: 6px;
}

.resume-bank-cv i {
  width: 50px;
  height: 4px;
  margin-bottom: 4px;
}

.resume-bank-cv b {
  width: 50px;
  height: 4px;
}

.resume-bank-cv.cv-main {
  top: 50%;
  right: 5%;
}

.resume-bank-cv.cv-back {
  top: 45%;
  right: 8%;
  opacity: 0.6;
  z-index: -1;
}

.resume-bank-lens {
  width: 55px;
  height: 55px;
  border: 3px solid white;
  border-radius: 50%;
  background: transparent;
  bottom: 15%;
  left: 20%;
}

.resume-bank-lens::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  bottom: -8px;
  right: -8px;
}

.resume-bank-hand {
  width: 50px;
  height: 60px;
  background: #e8d5c4;
  border-radius: 8px 8px 0 0;
  bottom: 10%;
  right: 15%;
  transform: rotate(20deg);
}

.resume-bank-coffee {
  width: 45px;
  height: 50px;
  background: #8b6f47;
  border-radius: 0 0 8px 8px;
  bottom: 5%;
  left: 25%;
}

.resume-bank-status {
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resume-bank-status.is-ok {
  background: #e8f5f1;
  border-left: 4px solid #4db8a0;
}

.resume-bank-status.is-warning {
  background: #fef3e6;
  border-left: 4px solid #f5a623;
}

.resume-bank-status strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.resume-bank-status p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b635a;
}

.resume-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.resume-bank-grid article {
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e8e2d9;
  box-shadow: 0 4px 12px rgba(45, 42, 38, 0.05);
  transition: all 0.3s ease;
}

.resume-bank-grid article:hover {
  border-color: #4db8a0;
  box-shadow: 0 8px 20px rgba(77, 184, 160, 0.1);
  transform: translateY(-2px);
}

.resume-bank-grid h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.resume-bank-grid p {
  margin: 0;
  font-size: 0.95rem;
  color: #6b635a;
  line-height: 1.5;
}

.resume-bank-next {
  background: white;
  border: 1px solid #e8e2d9;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.resume-bank-next h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.resume-bank-next p {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: #6b635a;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.resume-bank-secondary-cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: #4db8a0;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.resume-bank-secondary-cta:hover {
  background: #3aa087;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77, 184, 160, 0.3);
}

@media (max-width: 1024px) {
  .resume-bank-hero {
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
  }

  .resume-bank-hero-copy h1 {
    font-size: 1.85rem;
  }

  .resume-bank-hero-art {
    height: 250px;
  }
}

@media (max-width: 680px) {
  .resume-bank-hero {
    padding: 1.5rem;
    gap: 1rem;
  }

  .resume-bank-hero-copy h1 {
    font-size: 1.5rem;
  }

  .resume-bank-hero-copy p {
    font-size: 0.9rem;
  }

  .resume-bank-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .resume-bank-next {
    padding: 1.5rem;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   HISTORIA ADMIN — Tabbed Interface, Kanban, Forms, Lists
   ────────────────────────────────────────────────────────────────────────── */

.historia-admin-tabs {
  margin-top: 1.5rem;
}

/* Tab Navigation */
.historia-tab-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  flex-wrap: wrap;
}

.historia-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.historia-tab-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.historia-tab-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(217, 123, 61, 0.15);
}

.historia-tab-btn .tab-icon {
  font-size: 1.1rem;
}

.historia-tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.historia-tab-panel.active {
  display: block;
}

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

/* Panel Header */
.panel-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.panel-header-actions h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.panel-header-actions .muted {
  margin: 0;
  font-size: 0.85rem;
}

/* Kanban Toolbar */
.kanban-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.view-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.view-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: 500px;
}

.kanban-column {
  flex: 1;
  min-width: 280px;
  max-width: 340px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  padding: 1rem 1.2rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 14px 14px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-count {
  background: rgba(255,255,255,0.2);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.kanban-cards {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kanban-cards.drag-over {
  background: rgba(217, 123, 61, 0.05);
  border-radius: 10px;
}

/* Kanban Card */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.kanban-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(45, 42, 38, 0.12);
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(3deg);
}

.kanban-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--sand), var(--cream));
  background-size: cover;
  background-position: center;
  position: relative;
}

.kanban-card-content {
  padding: 1rem 1.2rem;
}

.kanban-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.kanban-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.kanban-badge.antigas { background: #fff3e0; color: #bf7700; }
.kanban-badge.hoje { background: #e8f5e9; color: #2e7d32; }
.kanban-badge.aereas { background: #e3f2fd; color: #1565c0; }

.kanban-year {
  font-size: 0.75rem;
  color: var(--muted);
}

.kanban-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.tag-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 16px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: capitalize;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.nao_classificada { background: #f5f5f5; color: #757575; }
.status-badge.em_organizacao { background: #fff3e0; color: #e65100; }
.status-badge.em_revisao { background: #e3f2fd; color: #1565c0; }
.status-badge.publicada { background: #e8f5e9; color: #2e7d32; }
.status-badge.arquivada { background: #eceff1; color: #455a64; }

.kanban-actions {
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  padding: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn.danger:hover {
  background: #ffebee;
  color: #c62828;
}

.kanban-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Grid View */
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
}

.grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 42, 38, 0.12);
}

.grid-card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--sand), var(--cream));
  background-size: cover;
  background-position: center;
}

.grid-card-content {
  padding: 1rem 1.2rem;
}

.grid-card-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.grid-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.grid-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.grid-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.grid-actions button {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.grid-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.grid-actions button.danger:hover {
  border-color: #ef5350;
  color: #ef5350;
  background: #ffebee;
}

/* List View */
.list-table {
  width: 100%;
  border-collapse: collapse;
}

.list-table th,
.list-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.list-table th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--surface-2);
}

.list-table td img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.list-table .badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 16px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* Form Styles */
.admin-form-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.admin-form-modern label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.admin-form-modern input,
.admin-form-modern select,
.admin-form-modern textarea {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form-modern input:focus,
.admin-form-modern select:focus,
.admin-form-modern textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 123, 61, 0.15);
}

.admin-form-modern .col-span-2 {
  grid-column: 1 / -1;
}

.ia-image-paste-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--surface-2);
}

.ia-image-paste-zone:hover,
.ia-image-paste-zone.dragover {
  border-color: var(--accent);
  background: #fff8f0;
}

.ia-image-paste-zone svg {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.ia-image-paste-zone p {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.ia-image-paste-zone label {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
}

.ia-image-paste-zone small {
  color: var(--muted);
  font-size: 0.75rem;
}

.ia-preview {
  text-align: center;
  padding: 1rem;
}

.ia-preview img {
  display: block;
  margin: 0 auto 1rem;
  max-width: 100%;
  max-height: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(45, 42, 38, 0.15);
}

.ia-preview p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Tag/Category Items */
.tag-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all 0.2s;
}

.tag-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(217, 123, 61, 0.08);
}

.tag-item .color-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.tag-item .tag-name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}

.tag-item .tag-count {
  font-size: 0.7rem;
  color: var(--muted);
}

.icon-btn {
  padding: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn.danger:hover {
  background: #ffebee;
  color: #c62828;
}

/* Buttons */
.admin-primary-btn {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-primary-btn:hover {
  background: var(--accent-warm);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 123, 61, 0.3);
}

.ghost-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-close {
  padding: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--surface-2);
}

/* Toast/Alert */
.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.admin-toast.success {
  border-left: 4px solid var(--green);
}

.admin-toast.error {
  border-left: 4px solid #ef5350;
}

.admin-toast.warning {
  border-left: 4px solid #ff9800;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .historia-tab-nav {
    gap: 0.15rem;
    padding: 0.35rem;
  }
  
  .historia-tab-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
  
  .historia-tab-btn .tab-label {
    display: none;
  }
  
  .kanban-board {
    gap: 1rem;
  }
  
  .kanban-column {
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  .historia-tab-nav {
    padding: 0.25rem;
  }

  .historia-tab-btn {
    padding: 0.4rem 0.7rem;
  }

  .admin-form-modern {
    grid-template-columns: 1fr;
  }

  .admin-form-modern .col-span-2 {
    grid-column: 1 / -1;
  }

  .kanban-column {
    min-width: 240px;
  }

  .grid-view {
    grid-template-columns: 1fr;
  }

  .list-table {
    display: block;
    overflow-x: auto;
  }

  .kanban-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kanban-toolbar > div {
    justify-content: center;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   HISTORIA ADMIN MODERNO — Nova interface de acervo (Sidebar + Grid/Views)
   ────────────────────────────────────────────────────────────────────────── */

.historia-admin[data-historia-admin] {
  display: block;
}

.historia-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 200px);
}

/* SIDEBAR ESCURA */
.historia-sidebar {
  background: linear-gradient(180deg, #1a2a3a 0%, #0f1a2a 100%);
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  border-radius: 0 24px 24px 0;
  box-shadow: 4px 0 24px rgba(10, 37, 64, 0.15);
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.sidebar-brand svg { color: #f7b733; flex-shrink: 0; }
.sidebar-brand span { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }

.sidebar-nav { font-weight: 600; font-size: 0.9rem; opacity: 0.7; }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(247,183,51,0.2) 0%, rgba(247,183,51,0.1) 100%);
  color: #f7b733;
  border-color: rgba(247,183,51,0.3);
  box-shadow: 0 4px 16px rgba(247,183,51,0.15);
}

.sidebar-link .link-icon { font-size: 1.1rem; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.sidebar-footer .muted { opacity: 0.5; font-size: 0.8rem; }

/* MAIN CLARA */
.historia-main {
  background: var(--bg);
  padding: 2rem;
  border-radius: 24px 0 0 24px;
  min-height: 100%;
}

/* HEADER */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.header-content h1 { margin: 0 0 0.25rem; font-size: 1.75rem; font-weight: 700; color: var(--blue-900); }
.header-desc { margin: 0; color: var(--muted); font-size: 1rem; }

.header-actions { display: flex; gap: 0.75rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(217, 123, 61, 0.3);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217, 123, 61, 0.4); }
.btn-primary svg { width: 18px; height: 18px; stroke-width: 2.5; }

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.metric-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,37,64,0.08); }

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.metric-icon.total { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1976d2; }
.metric-icon.published { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #388e3c; }
.metric-icon.draft { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #f57c00; }
.metric-icon.tags { background: linear-gradient(135deg, #fce4ec, #f8bbd0); color: #e91e63; }
.metric-icon.year { background: linear-gradient(135deg, #f3e5f5, #e1bee7); color: #8e24aa; }

.metric-info { display: flex; flex-direction: column; min-width: 0; }
.metric-value { font-size: 1.75rem; font-weight: 700; color: var(--text); line-height: 1; }
.metric-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* FILTERS BAR */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.filter-group { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 160px; }
.filter-group:has(#filter-search) { flex: 2; min-width: 280px; }

.filter-group label.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.search-wrapper { position: relative; width: 100%; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
#filter-search { width: 100%; padding: 0.65rem 1rem 0.65rem 2.75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 0.95rem; background: var(--bg); transition: all 0.2s; }
#filter-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(247,183,51,0.15); }

#filter-year, #filter-tag, #filter-platform, #filter-status {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}
#filter-year:focus, #filter-tag:focus, #filter-platform:focus, #filter-status:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247,183,51,0.15);
}

.btn-secondary {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: #fff8f0; }

/* GRID PANEL */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

.grid-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 1rem; }
.grid-header h2 { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--blue-900); }

.grid-controls { display: flex; gap: 0.75rem; align-items: center; }

#grid-sort, #grid-per-page {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  background: var(--surface);
  cursor: pointer;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.image-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.image-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(10,37,64,0.12); }

.image-thumb {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.image-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,37,64,0.6) 100%);
}

.image-status {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.image-status.status-published { background: #4caf50; color: #fff; }
.image-status.status-draft { background: #ff9800; color: #fff; }

.image-platform {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 16px;
  font-size: 0.65rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  font-weight: 600;
}

.image-info { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.image-title { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.image-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--muted); }
.image-year { background: var(--sand); padding: 0.15rem 0.5rem; border-radius: 8px; }
.image-platform-badge { background: var(--cream); padding: 0.15rem 0.5rem; border-radius: 8px; }

.image-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.image-desc { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-state svg { margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--text); }
.empty-state p { margin: 0 0 1.5rem; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* YEAR ACCORDION */
.year-accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.year-section { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.year-section summary { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--text); list-style: none; background: var(--surface-2); }
.year-section summary::-webkit-details-marker { display: none; }
.year-section summary::after { content: '▼'; font-size: 0.7rem; transition: transform 0.2s; color: var(--muted); }
.year-section[open] summary::after { transform: rotate(180deg); }
.year-label { display: flex; align-items: center; gap: 0.5rem; }
.year-count { font-size: 0.8rem; color: var(--muted); background: var(--line); padding: 0.15rem 0.5rem; border-radius: 20px; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; padding: 1rem; }

/* TAGS CLOUD */
.tags-cloud { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.tag-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tag-card header { padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; }
.tag-card header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.tag-card header span { font-size: 0.8rem; opacity: 0.8; background: rgba(0,0,0,0.15); padding: 0.2rem 0.6rem; border-radius: 20px; }
.tag-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0.75rem; }
.tag-image { aspect-ratio: 1; background-size: cover; background-position: center; cursor: pointer; border-radius: 8px; transition: transform 0.2s; }
.tag-image:hover { transform: scale(1.05); }
.tag-more { display: flex; align-items: center; justify-content: center; grid-column: span 3; padding: 0.5rem; font-size: 0.8rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); cursor: pointer; }

/* PLATFORM GRID */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.platform-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.platform-card header { padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.platform-card header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.platform-card header span { font-size: 0.85rem; color: var(--muted); }
.platform-images { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0.75rem; }
.platform-image { aspect-ratio: 1; background-size: cover; background-position: center; cursor: pointer; border-radius: 8px; transition: transform 0.2s; }
.platform-image:hover { transform: scale(1.05); }

/* UPLOAD FORM */
.upload-form { max-width: 700px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-weight: 500; font-size: 0.9rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247,183,51,0.15);
}
.form-group .checkbox-inline { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 400; color: var(--text); }
.form-group .checkbox-inline input { width: 18px; height: 18px; accent-color: var(--accent); }

.tag-suggestions { position: absolute; z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem; margin-top: 0.25rem; width: 100%; box-shadow: 0 8px 24px rgba(10,37,64,0.12); display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag-suggestion { padding: 0.25rem 0.6rem; background: var(--surface-2); border-radius: 20px; font-size: 0.8rem; cursor: pointer; color: var(--accent); font-weight: 500; transition: all 0.2s; }
.tag-suggestion:hover { background: var(--accent); color: #fff; }

.upload-dropzone {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface-2);
  position: relative;
}
.upload-dropzone:hover, .upload-dropzone.dragover { border-color: var(--accent); background: #fff8f0; }
.dropzone-label { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; cursor: pointer; }
.dropzone-label svg { color: var(--accent); opacity: 0.6; }
.dropzone-label p { margin: 0; font-size: 1rem; color: var(--text); }
.dropzone-label p span { color: var(--accent); font-weight: 500; }
.dropzone-label small { color: var(--muted); font-size: 0.8rem; }
.upload-preview { margin-top: 1rem; display: flex; justify-content: center; }
.upload-preview img { max-width: 100%; max-height: 200px; border-radius: 12px; box-shadow: 0 4px 16px rgba(10,37,64,0.15); }

.form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* MODAL */
.image-modal { border: none; border-radius: 20px; padding: 0; max-width: 640px; width: 90vw; max-height: 90vh; box-shadow: 0 24px 64px rgba(10,37,64,0.25); background: var(--surface); }
.image-modal::backdrop { background: rgba(10, 37, 64, 0.6); backdrop-filter: blur(4px); }

.modal-content { display: flex; flex-direction: column; height: 100%; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.modal-close, .modal-close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); padding: 0.25rem; line-height: 1; transition: color 0.2s; }
.modal-close:hover, .modal-close-btn:hover { color: var(--text); }

.modal-body { padding: 1.5rem; overflow-y: auto; }
.modal-preview { margin: -1.5rem -1.5rem 1.5rem; border-radius: 0; }
.modal-preview img { width: 100%; height: 280px; object-fit: cover; border-radius: 20px 20px 0 0; }

.modal-fields { display: flex; flex-direction: column; gap: 1.25rem; }
.modal-fields .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 20px 20px; }
.btn-danger { background: #f44336; color: #fff; border: none; border-radius: 10px; padding: 0.65rem 1.25rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-danger:hover { background: #d32f2f; }

/* TOAST */
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px); } }
.admin-toast { box-shadow: 0 8px 32px rgba(10,37,64,0.2) !important; border-radius: 10px !important; font-size: 0.9rem !important; }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .historia-layout { grid-template-columns: 220px 1fr; }
  .historia-sidebar { padding: 1.25rem 0.75rem; }
}

@media (max-width: 900px) {
  .historia-layout { grid-template-columns: 1fr; }
  .historia-sidebar {
    border-radius: 0;
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
  }
  .sidebar-brand { border: none; padding: 0; margin: 0; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .sidebar-link { padding: 0.6rem 1rem; font-size: 0.85rem; white-space: nowrap; }
  .sidebar-footer { display: none; }
  .historia-main { border-radius: 0; padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .modal-fields .form-row { grid-template-columns: 1fr; }
  .images-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .platform-images { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-group { min-width: 0; }
  .images-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: 1fr; }
  .tag-images { grid-template-columns: repeat(2, 1fr); }
  .platform-images { grid-template-columns: repeat(2, 1fr); }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer button { width: 100%; }
}

/* TAG SUGGESTIONS - positioning fix */
.form-group { position: relative; }
.form-group:has(.tag-suggestions) { padding-bottom: 0; }

