/* ==========================================================================
   TopEmpresas — Main Stylesheet
   Source: assets/less/main.less (compile with: npm run less)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --bg-deep:       #0a0d11;
  --bg-mid:        #121820;
  --bg-card:       #141b24;
  --bg-card-hover: #1a2330;
  --fg:            #f2f4f7;
  --fg-soft:       #b4bcc6;
  --fg-muted:      #7a8694;
  --accent:        #d4a84b;
  --accent-dim:    rgba(212, 168, 75, 0.30);
  --accent-glow:   rgba(212, 168, 75, 0.08);
  --border:        rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(212, 168, 75, 0.22);
  --danger:        #e05252;
  --success:       #4caf7d;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;

  --shadow-card: 0 4px 24px -8px rgba(0,0,0,0.45), 0 0 0 1px var(--border);
  --shadow-lg:   0 20px 48px -16px rgba(0,0,0,0.6);

  --container: 1200px;
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -10%, var(--accent-glow), transparent 55%),
    linear-gradient(165deg, var(--bg-mid) 0%, var(--bg-deep) 50%, #07090c 100%);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.page-wrap { position: relative; z-index: 1; }

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.kicker {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  margin-bottom: var(--space-xl);
}

/* Rich-text content blocks */
.prose { line-height: 1.8; color: var(--fg-soft); }
.prose h2, .prose h3 { color: var(--fg); margin-block: 1.5rem 0.75rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--fg); font-weight: 500; }
.prose a { color: var(--accent); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, transform 0.1s;
  border: none;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn--primary  { background: var(--accent); color: #0a0d11; }
.btn--outline  { background: transparent; border: 1px solid var(--border-accent); color: var(--accent); }
.btn--outline:hover { background: var(--accent-glow); }
.btn--ghost    { background: rgba(255,255,255,0.06); color: var(--fg-soft); border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,0.10); }
.btn--danger   { background: rgba(224,82,82,0.15); color: var(--danger); border: 1px solid rgba(224,82,82,0.3); }
.btn--danger:hover { background: rgba(224,82,82,0.25); }

.btn--sm  { padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn--xs  { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn--full { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  vertical-align: middle;
}
.badge--featured { background: var(--accent-dim); color: var(--accent); }
.badge--verified { background: rgba(76,175,125,0.18); color: var(--success); }

/* --------------------------------------------------------------------------
   Site Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 17, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  height: 4rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo span { color: var(--accent); }
.site-logo:hover { text-decoration: none; opacity: 0.9; }

.site-nav {
  display: flex;
  gap: var(--space-lg);
  margin-left: auto;
}
.site-nav a {
  color: var(--fg-soft);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--fg);
  text-decoration: none;
}
.site-nav a.is-active { border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg-soft);
  border-radius: 2px;
  transition: 0.25s;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding: var(--space-md) 0;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg-soft); }
.breadcrumb__sep { opacity: 0.5; }

/* --------------------------------------------------------------------------
   Home page
   -------------------------------------------------------------------------- */
.home-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
}
.home-hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}
.home-hero__title span { color: var(--accent); text-shadow: 0 0 40px var(--accent-dim); }
.home-hero__lead {
  font-size: 1.0625rem;
  color: var(--fg-soft);
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.home-search {
  position: relative;
  max-width: 32rem;
  margin-inline: auto;
}
.home-search__input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-search__input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.home-search__input::placeholder { color: var(--fg-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.search-dropdown__item {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--fg-soft);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.search-dropdown__item:last-child { border-bottom: none; }
.search-dropdown__item:hover { background: rgba(255,255,255,0.05); color: var(--fg); text-decoration: none; }

.verticals-section { padding: var(--space-2xl) 0 var(--space-3xl); }

.verticals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.vertical-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  box-shadow: var(--shadow-card);
}
.vertical-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  text-decoration: none;
}
.vertical-card__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--fg);
}
.vertical-card__desc {
  color: var(--fg-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}
.vertical-card__cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Vertical overview page
   -------------------------------------------------------------------------- */
.vertical-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
}
.vertical-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: var(--space-md);
}
.vertical-hero__lead {
  font-size: 1.0625rem;
  color: var(--fg-soft);
  max-width: 40rem;
}

.sectors-section { padding: var(--space-xl) 0 var(--space-3xl); }

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.sector-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg-soft);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sector-card:hover {
  border-color: var(--border-accent);
  color: var(--fg);
  background: var(--bg-card-hover);
  text-decoration: none;
}
.sector-card__name { font-weight: 400; }
.sector-card__arrow { color: var(--accent); opacity: 0.7; }

/* --------------------------------------------------------------------------
   Programmatic page
   -------------------------------------------------------------------------- */
.prog-hero {
  padding: var(--space-2xl) 0 var(--space-xl);
}
.prog-hero__title {
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  margin-bottom: var(--space-lg);
}
.prog-hero__intro {
  font-size: 1.0625rem;
  color: var(--fg-soft);
  max-width: 48rem;
  line-height: 1.7;
}

.stats-strip { padding: var(--space-lg) 0; }
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  min-width: 160px;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--accent);
}
.stat-card__label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.companies-section { padding: var(--space-2xl) 0; }
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, transform 0.2s;
}
.company-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.company-card__logo {
  height: 48px;
  display: flex;
  align-items: center;
}
.company-card__logo img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}
.company-card__logo-placeholder {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}
.company-card__body { flex: 1; }
.company-card__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.company-card__desc {
  font-size: 0.9rem;
  color: var(--fg-soft);
  line-height: 1.55;
}
.company-card__footer { margin-top: auto; }

.comparison-section { padding: var(--space-xl) 0 var(--space-2xl); }
.table-wrap { overflow-x: auto; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  background: rgba(255,255,255,0.03);
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(255,255,255,0.025); }

.ct-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.5rem;
}
.ct-desc { color: var(--fg-soft); max-width: 300px; }
.ct-verified .check { color: var(--success); font-weight: 600; }
.ct-verified .dash  { color: var(--fg-muted); }
.table-link { color: var(--accent); font-size: 0.875rem; }

.content-section { padding: var(--space-xl) 0; }

/* FAQ */
.faq-section { padding: var(--space-2xl) 0; }
.faq-list { display: flex; flex-direction: column; gap: var(--space-md); max-width: 52rem; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  padding: var(--space-lg);
  cursor: pointer;
  font-weight: 500;
  color: var(--fg);
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
  transition: background 0.15s;
}
.faq-item summary:hover { background: rgba(255,255,255,0.03); }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--fg-soft);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* CTA */
.cta-section { padding: var(--space-2xl) 0 var(--space-3xl); }
.cta-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(212,168,75,0.06) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}
.cta-box h2 {
  font-size: clamp(1.375rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
}
.cta-box p {
  color: var(--fg-soft);
  margin-bottom: var(--space-xl);
}

.empty-state {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  padding: var(--space-2xl) 0;
  text-align: center;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.blog-hero { padding: var(--space-2xl) 0 var(--space-xl); }
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: var(--space-md); }
.blog-hero__lead { color: var(--fg-soft); font-size: 1.0625rem; max-width: 36rem; }

.blog-list { padding: var(--space-xl) 0 var(--space-3xl); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.article-card__kicker { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.article-card__title { font-size: 1.125rem; line-height: 1.3; }
.article-card__title a { color: var(--fg); text-decoration: none; }
.article-card__title a:hover { color: var(--accent); }
.article-card__excerpt { font-size: 0.9rem; color: var(--fg-soft); flex: 1; }
.article-card__meta { font-size: 0.8rem; color: var(--fg-muted); }
.article-card__link { font-size: 0.875rem; font-weight: 500; color: var(--accent); margin-top: auto; }

/* Single article */
.article-header { padding: var(--space-2xl) 0 var(--space-xl); }
.article-header__title { font-size: clamp(1.875rem, 4.5vw, 3rem); margin-bottom: var(--space-md); }
.article-header__excerpt { font-size: 1.125rem; color: var(--fg-soft); max-width: 44rem; margin-bottom: var(--space-md); }
.article-header__meta { font-size: 0.85rem; color: var(--fg-muted); }
.article-body { padding: 0 0 var(--space-3xl); }
.article-body .prose { max-width: 44rem; font-size: 1.0625rem; }

/* --------------------------------------------------------------------------
   Error page
   -------------------------------------------------------------------------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.error-page h1 { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: var(--space-md); }
.error-page__lead { color: var(--fg-soft); margin-bottom: var(--space-xl); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
.footer-brand .site-logo { font-size: 1.125rem; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; color: var(--fg-muted); }
.footer-nav__heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { color: var(--fg-soft); font-size: 0.9rem; text-decoration: none; }
.footer-nav a:hover { color: var(--fg); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */
.admin-body {
  background: #0d1117;
  background-image: none;
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
}
.admin-body::before { display: none; }

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0a0d11;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-logo {
  display: block;
  padding: 0 1.25rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.admin-logo span { color: var(--accent); }
.admin-logo em { font-style: normal; font-size: 0.7rem; font-family: var(--font-body); color: var(--fg-muted); font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-top: 0.15rem; }

.admin-nav { display: flex; flex-direction: column; }
.admin-nav__group {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 1rem 1.25rem 0.4rem;
}
.admin-nav__item {
  display: block;
  padding: 0.55rem 1.25rem;
  color: var(--fg-soft);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  border-left: 2px solid transparent;
}
.admin-nav__item:hover { background: rgba(255,255,255,0.04); color: var(--fg); text-decoration: none; }
.admin-nav__item.is-active { color: var(--accent); border-left-color: var(--accent); background: rgba(212,168,75,0.05); }

.admin-main { flex: 1; min-width: 0; overflow-x: auto; }
.admin-content { padding: 2rem; max-width: 1100px; }

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.admin-page-header__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-subheading {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--fg);
}
.admin-help {
  font-size: 0.875rem;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Dashboard stats */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.stat-tile__count {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat-tile__label {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* Admin forms */
.admin-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 700px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--fg-soft);
}
.form-label small { color: var(--fg-muted); font-weight: 400; }
.form-hint { font-size: 0.8rem; color: var(--fg-muted); }

.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.6rem 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input option { background: #1a2330; }

.form-textarea { resize: vertical; min-height: 90px; }
.form-textarea--lg { min-height: 240px; }

.form-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.form-fieldset legend {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--fg-soft);
  padding: 0 0.5rem;
}
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; }
.form-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--fg-soft);
  cursor: pointer;
}
.form-check input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

.form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.form-errors {
  list-style: none;
  background: rgba(224,82,82,0.1);
  border: 1px solid rgba(224,82,82,0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--danger);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Admin tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(255,255,255,0.025);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table code { font-size: 0.8rem; background: rgba(255,255,255,0.06); padding: 0.15rem 0.4rem; border-radius: 3px; }
.table-actions { display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; }

/* Admin panel split layout */
.admin-panel-split { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; align-items: start; }
.admin-panel-split__form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; }

/* Status badges */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}
.status-badge--live    { background: rgba(76,175,125,0.15); color: var(--success); }
.status-badge--draft   { background: rgba(255,255,255,0.07); color: var(--fg-muted); }
.status-badge--published { background: rgba(76,175,125,0.15); color: var(--success); }

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}
.flash--success { background: rgba(76,175,125,0.12); border-color: rgba(76,175,125,0.3); color: var(--success); }
.flash--error   { background: rgba(224,82,82,0.10);  border-color: rgba(224,82,82,0.3);  color: var(--danger); }
.flash--info    { background: rgba(212,168,75,0.08);  border-color: var(--border-accent); color: var(--accent); }

/* Admin login */
.admin-body--login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-wrap { width: 100%; max-width: 380px; padding: 1.5rem; }
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}
.login-card .admin-logo { margin-bottom: 1.5rem; padding: 0; border: none; }
.login-card__title { font-size: 1.375rem; margin-bottom: 1.5rem; }
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .site-nav { display: none; gap: var(--space-md); }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0; right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    z-index: 99;
  }
  .nav-toggle { display: flex; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }

  .admin-sidebar { display: none; }
  .admin-panel-split { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
