/* =========================================================
   Central de Operações — OLTS Tech
   Design system: Spotify (getdesign.md/design-md/spotify)
   Ordem do Marcus (12/11/2026): Spotify substitui o SpaceX.
   Essência: escuridão de conteúdo — fundos #121212/#181818/
   #1f1f1f, texto #ffffff/#b3b3b3, verde #1ed760 SÓ funcional
   (CTA/ativo), pills 9999px com uppercase + tracking 1.4px,
   cards #181818 radius 6-8px sem borda, sombras pesadas,
   inputs pill #1f1f1f com inset, tipo compacta 10-24px.
   Estrutura: tokens → base → componentes → estados → responsivo
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Paleta — superfícies (escuridão de conteúdo) */
  --canvas: #121212;
  --canvas-soft: #181818;
  --surface: #181818;
  --hairline: #2a2a2a;
  --hairline-soft: #2a2a2a;

  /* Paleta — texto */
  --ink: #ffffff;
  --ink-deep: #ffffff;
  --ink-mute: #b3b3b3;
  --charcoal: #b3b3b3;
  --slate: #b3b3b3;
  --steel: #b3b3b3;
  --stone: #b3b3b3;
  --disabled-text: #757575;
  --faint: #757575;

  /* Semânticos Spotify — indicam estado operacional (não são CTA) */
  --success: #1ed760;
  --attention: #ffa42b;
  --warning: #ffa42b;
  --warning-bg: #181818;
  --critical: #f3727f;
  --critical-strong: #f3727f;

  /* Acento funcional — verde SÓ em CTA/ativo, nunca decorativo */
  --accent: #1ed760;
  --accent-hover: #35e475;
  --accent-active: #169c46;
  --accent-ink: #000000;

  /* Tipografia — SpotifyMixUI com fallbacks (CircularSp indisponível) */
  --font-display: "SpotifyMixUITitle", "CircularSp", "Helvetica Neue", helvetica, arial, sans-serif;
  --font-body: "SpotifyMixUI", "CircularSp", "Helvetica Neue", helvetica, arial, sans-serif;
  --pthero: clamp(2rem, 1.5rem + 2vw, 3rem);
  --pdisplay: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --pheading-lg: 1.5rem;
  --pheading-md: 1.125rem;
  --pheading-sm: 1.25rem;
  --psubtitle-lg: 1.125rem;
  --psubtitle-md: 1rem;
  --pbody-md: 1rem;
  --pbody-sm: 0.875rem;
  --pcaption: 0.8125rem;
  --ptiny: 0.75rem;
  --lh-display: 1.1;
  --lh-headings: 1.25;
  --lh-md: 1.21;
  --lh-sm: 1.25;
  --lh-body: 1.5;
  --lh-smaller: 1.43;
  --lh-caption: 1.33;
  --lh-pill: 1;
  --ls-display: 0.02em;
  --ls-caps: 0.09em;

  /* Espaçamento (base 8px do Spotify) */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-base: 16px;
  --sp-lg: 18px;
  --sp-xl: 24px;
  --sp-xxl: 32px;
  --sp-xxxl: 40px;
  --sp-section-sm: 48px;
  --sp-section: 64px;
  --sp-section-lg: 80px;

  /* Raio — Spotify: pill total, cards 6-8px */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 8px;
  --r-lg: 8px;
  --r-xl: 8px;
  --r-xxl: 8px;
  --r-xxxl: 8px;
  --r-feature: 8px;
  --r-chip: 9999px;
  --r-circle: 50%;

  /* Transições */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-med: 200ms;
  --t-slow: 300ms;
  --t-ease: cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Sombras — pesadas, visíveis sobre o escuro */
  --shadow-card: rgba(0, 0, 0, 0.3) 0px 8px 8px;
  --shadow-dialog: rgba(0, 0, 0, 0.5) 0px 8px 24px;
  --shadow-flat: none;
  --shadow-sticky: none;
  --shadow-indicator: none;

  /* Densidade da grid */
  --bd-card: 24px;
  --grid-max: 1280px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* display explícito de display:grid/flex não pode vencer o hidden */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--pbody-md);
  line-height: var(--lh-body);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--canvas);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
::selection { background: #1ed760; color: #000000; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; transition: color var(--t-fast); }
a:hover { color: var(--ink-mute); }
a:focus, button:focus, input:focus { outline: none; }
:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

.visually-hidden {
  position: absolute; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; white-space: nowrap;
}

/* ---------- 3. Componentes ---------- */

/* Marca */
.brand-lockup { display: inline-flex; align-items: center; gap: var(--sp-md); }
.brand-mark { width: 2rem; height: 2rem; font-size: 1.8rem; line-height: 1; color: var(--ink); }
img.brand-mark { object-fit: contain; border-radius: 0; display: block; }
.brand-name {
  font-family: var(--font-display); font-size: var(--pheading-sm); font-weight: 700;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink);
}

/* Botões — Spotify: pill total, uppercase + tracking 1.4px.
   CTA primário leva o verde funcional (#1ed760, texto preto);
   demais são outlined (borda #7c7c7c) sobre o escuro. */
.button-primary, .button-buy-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-xs); cursor: pointer; user-select: none;
  -webkit-appearance: none; appearance: none;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; text-align: center; text-decoration: none;
  border-radius: var(--r-chip); padding: 14px 32px; min-height: 50px;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.button-primary:hover, .button-buy-cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button-primary:active, .button-buy-cta:active { background: var(--accent-active); border-color: var(--accent-active); color: var(--accent-ink); }
.button-secondary, .button-ghost, .button-pill {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-xs); cursor: pointer; user-select: none;
  border: 1px solid #7c7c7c; -webkit-appearance: none; appearance: none;
  background: transparent; color: var(--ink);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; text-align: center; text-decoration: none;
  border-radius: var(--r-chip); padding: 14px 24px; min-height: 50px;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.button-secondary:hover, .button-ghost:hover, .button-pill:hover { border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.button-secondary:active, .button-ghost:active, .button-pill:active { background: #1f1f1f; border-color: #ffffff; color: #ffffff; }
.button-pill { padding: 8px 16px; min-height: 44px; }
.button-pill.is-active { background: transparent; color: var(--accent); border-color: var(--accent); }

/* Inputs — fundo near-black, hairline 1px, texto branco */
.field-group { margin-bottom: var(--sp-lg); }
.field-label {
  display: block; margin-bottom: var(--sp-xs);
  font-family: var(--font-body); font-size: var(--ptiny); font-weight: 700;
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-mute);
}
.text-input {
  display: block; width: 100%; min-height: 44px; padding: var(--sp-sm) var(--sp-base);
  font-family: var(--font-body); font-size: var(--pbody-md); line-height: var(--lh-md);
  color: var(--ink); background: #1f1f1f;
  border: 1px solid transparent; border-radius: var(--r-chip);
  box-shadow: rgb(18, 18, 18) 0px 1px 0px, rgb(124, 124, 124) 0px 0px 0px 1px inset;
  transition: border-color var(--t-med);
}
.text-input::placeholder { color: var(--faint); }
.text-input:focus { border-color: #ffffff; outline: none; }
.text-input.is-invalid { border-color: var(--critical); }

/* ---------- 4. Login ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: var(--sp-xl); background: var(--canvas);
}
.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  width: min(460px, 100%); padding: var(--sp-xxxl) var(--sp-xxl);
  background: var(--canvas-soft); border: 0; border-radius: var(--r-sm);
  box-shadow: var(--shadow-dialog);
}
.login-headline {
  font-family: var(--font-display); font-size: var(--pdisplay); font-weight: 700;
  letter-spacing: var(--ls-display); line-height: var(--lh-display);
  text-transform: uppercase; color: var(--ink); margin: var(--sp-lg) 0 var(--sp-sm) 0;
}
.login-subtitle {
  font-family: var(--font-body); font-size: var(--pbody-md); line-height: var(--lh-body);
  letter-spacing: 0.02em; color: var(--charcoal); margin-bottom: var(--sp-xl);
}
.remember-row { display: flex; align-items: center; gap: var(--sp-sm); margin: 0 0 var(--sp-lg) 0; font-size: var(--pbody-sm); color: var(--charcoal); cursor: pointer; user-select: none; }
.remember-row input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); cursor: pointer; }
.login-error { display: block; margin-top: var(--sp-base); color: var(--critical); font-size: var(--pbody-sm); font-weight: 700; }
.login-footer { margin-top: var(--sp-xxl); color: var(--faint); font-size: var(--ptiny); }
.login-footer .caption { color: inherit; }

.caption {
  font-family: var(--font-body); font-size: var(--pcaption); font-weight: 400;
  line-height: var(--lh-caption); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--charcoal);
}
.caption-strong { font-weight: 700; }

/* ---------- 5. Dashboard ---------- */
.dashboard { max-width: var(--grid-max); margin: 0 auto; padding: 0 var(--sp-xxl) 96px var(--sp-xxl); }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--canvas); border-bottom: 1px solid var(--hairline); }
.topbar-inner { max-width: var(--grid-max); margin: 0 auto; padding: var(--sp-md) var(--sp-xxl); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg); }
.topbar-right { display: flex; align-items: center; gap: var(--sp-base); }
.topbar-exit { padding: 12px 20px; min-height: 44px; }
.pill-runtime {
  display: inline-flex; align-items: center; gap: var(--sp-xs);
  padding: 6px var(--sp-base); border-radius: var(--r-chip);
  border: 1px solid var(--hairline); background: transparent;
  color: var(--ink-mute); font-size: var(--ptiny); font-weight: 700;
  letter-spacing: var(--ls-caps); text-transform: uppercase; white-space: nowrap;
}
.pill-runtime::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- 6. Widgets ---------- */
.section { margin: var(--sp-section-sm) 0 0 0; }
.section-copy { font-size: var(--pbody-sm); line-height: var(--lh-body); color: var(--charcoal); margin-top: var(--sp-xs); max-width: 72ch; }
.dashboard-footer { margin-top: var(--sp-section); padding: var(--sp-lg) 0 var(--sp-xs); border-top: 1px solid var(--hairline); }

/* Faixa de boas-vindas — uma banda, um CTA ghost */
.hero-welcome {
  margin-top: var(--sp-lg);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-base);
  background: var(--canvas-soft); color: var(--ink);
  border: 0; border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 1.2rem + 3vw, 5rem) clamp(1.5rem, 1rem + 2.5vw, 4rem);
}
.hero-welcome .welcome-title {
  font-family: var(--font-display); font-size: var(--pdisplay);
  font-weight: 700; letter-spacing: var(--ls-display); line-height: var(--lh-display);
  text-transform: uppercase; color: var(--ink);
}
.hero-welcome .welcome-copy {
  font-size: var(--psubtitle-md); line-height: var(--lh-body);
  color: var(--charcoal); max-width: 60ch;
}
.hero-welcome .button-buy-cta { margin-top: var(--sp-sm); }

.section-header { display: flex; align-items: baseline; gap: var(--sp-base); margin-bottom: var(--sp-xl); flex-wrap: wrap; }
.section-title {
  font-family: var(--font-display); font-size: var(--pheading-lg); font-weight: 700;
  letter-spacing: var(--ls-display); line-height: var(--lh-headings);
  text-transform: uppercase; color: var(--ink);
}
.section-sub { font-size: var(--ptiny); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--charcoal); }
.section-anchor { scroll-margin-top: 88px; }

/* Métricas */
.metrics-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-xl); margin-top: var(--sp-xl); }
.metric-card {
  display: flex; flex-direction: column; gap: var(--sp-xxs); padding: var(--sp-xl);
  background: var(--canvas-soft); border: 0; border-radius: var(--r-sm);
}
.metric-label {
  font-size: var(--ptiny); font-weight: 700; letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--charcoal);
}
.metric-value { display: flex; align-items: baseline; gap: var(--sp-xxs); font-size: var(--pheading-lg); font-weight: 700; letter-spacing: var(--ls-display); color: var(--ink); }
.metric-unit { font-weight: 400; font-size: var(--pbody-sm); color: var(--charcoal); }
.metric-hint { font-size: var(--pbody-sm); color: var(--charcoal); }

/* Módulos */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-xl); }
.modules-grid > * { min-width: 0; }
.module-grid { gap: var(--sp-xl); }
.module-card {
  display: flex; flex-direction: column; gap: var(--sp-xxs); padding: var(--sp-xl);
  min-width: 0;
  background: var(--canvas-soft); border: 0; border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
}
.badge-status {
  display: inline-flex; align-items: center; align-self: flex-start; gap: var(--sp-xs);
  padding: var(--sp-xxs) var(--sp-sm); border-radius: var(--r-chip);
  border: 1px solid var(--hairline); background: transparent;
  font-size: var(--ptiny); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--ink-mute);
}
.badge-status.ativo { color: var(--success); border-color: var(--success); }
.badge-status.manutencao, .badge-status.degraded { color: var(--attention); border-color: var(--attention); }
.badge-status.off { color: var(--critical); border-color: var(--critical); }
.badge-status.azul { color: var(--ink); border-color: var(--hairline); }
.badge-status.violeta { color: var(--ink); border-color: var(--hairline); }
.badge-status.neutro { color: var(--charcoal); border-color: var(--hairline); }
.badge-status.verde { color: var(--success); border-color: var(--success); }
.badge-status.cinza { color: var(--charcoal); border-color: var(--hairline); }
.module-name {
  font-family: var(--font-display); font-size: var(--pheading-md); font-weight: 700;
  letter-spacing: var(--ls-display); text-transform: uppercase; color: var(--ink);
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
.module-desc {
  font-size: var(--pbody-sm); line-height: var(--lh-body); color: var(--charcoal);
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
/* Link "Abrir" do card de módulo (renderModules em dashboard.js) */
.module-link { align-self: flex-start; margin-top: var(--sp-xs); font-size: var(--pbody-sm); font-weight: 700; color: var(--ink); }

/* Rotinas */
.routines-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-lg); }
.routine-card {
  display: flex; align-items: flex-start; gap: var(--sp-base); padding: var(--sp-xl);
  min-width: 0;
  background: var(--canvas-soft); border: 0; border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
}
.routine-icon {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-circle, 50%);
  background: #1f1f1f; border: 0; color: var(--ink); font-size: 1.15rem;
}
.routine-title {
  font-family: var(--font-display); font-size: var(--psubtitle-lg); font-weight: 700;
  letter-spacing: var(--ls-display); text-transform: uppercase; color: var(--ink); margin: 0 0 var(--sp-xs) 0;
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
.routine-desc {
  font-size: var(--pbody-sm); color: var(--charcoal);
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}

/* ---------- 7. Header / topo do dashboard ---------- */
.topbar-hero { display: flex; align-items: center; gap: var(--sp-lg); margin-bottom: var(--sp-xl); }
.dashboard-title {
  font-family: var(--font-display); font-size: var(--pthero); font-weight: 700;
  letter-spacing: var(--ls-display); line-height: var(--lh-display);
  text-transform: uppercase; color: var(--ink);
}
.dashboard-slogan { margin-top: var(--sp-xs); font-size: var(--psubtitle-md); color: var(--charcoal); max-width: 56ch; }

/* ---------- 8. Estado vazio ---------- */
.empty-state {
  display: grid; place-items: center; padding: var(--sp-section) var(--sp-lg);
  text-align: center; background: transparent; border: 1px dashed var(--hairline); border-radius: var(--r-sm);
  gap: var(--sp-sm);
}
.empty-state .empty-title {
  font-family: var(--font-display); font-size: var(--pheading-lg); font-weight: 700;
  letter-spacing: var(--ls-display); text-transform: uppercase; color: var(--ink);
}
.empty-state .empty-copy { font-size: var(--pbody-md); color: var(--charcoal); max-width: 48ch; margin: 0 auto; }

/* ---------- 9. Utilidades ---------- */
.wrap-pad { padding-inline: var(--sp-section-sm); }
.text-align-center { text-align: center; }
.stack-xs > * + * { margin-top: var(--sp-xs); }
.stack-sm > * + * { margin-top: var(--sp-sm); }
.stack-md > * + * { margin-top: var(--sp-md); }
.stack-lg > * + * { margin-top: var(--sp-lg); }

/* ---------- 10. Responsividade ---------- */
@media (max-width: 1200px) {
  .metrics-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-lg); }
}
@media (max-width: 768px) {
  html { font-size: 15px; }
  .login-wrap { padding: var(--sp-lg) var(--sp-base); }
  .login-panel { padding: var(--sp-xl) var(--sp-lg); }
  .section-header { flex-direction: column; gap: var(--sp-xxs); }
  .section-header-right { width: 100%; }
  .section-header-right .button-ghost { width: 100%; justify-content: center; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); gap: var(--sp-base); }
  .metric-card { padding: var(--sp-lg); }
  .modules-grid, .module-grid, .routines-grid { grid-template-columns: 1fr; }
  .routine-card { flex-direction: column; gap: var(--sp-sm); }
  .topbar-inner { padding: var(--sp-md) var(--sp-lg); }
}
@media (max-width: 480px) {
  html { font-size: 14.5px; }
  .metrics-row { grid-template-columns: 1fr; }
  .login-panel { padding: var(--sp-lg) var(--sp-base); }
  .empty-state { padding: var(--sp-xl) var(--sp-base); }
}
/* Header mobile — correção de encaixe (sem redesign): em telas
   estreitas marca + status + Sair não cabem numa linha (nowrap
   estourava ~80px a 360px). Permite quebra em 2 linhas, contém
   logo/nome com ellipsis e mantém alvo de toque de 44px no Sair. */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; row-gap: var(--sp-sm); column-gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-base); }
  .topbar .brand-lockup { gap: var(--sp-xs); min-width: 0; flex: 1 1 auto; }
  .topbar img.brand-mark { width: 28px; height: 28px; flex: 0 0 auto; }
  .topbar .brand-name { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: var(--sp-xs); min-width: 0; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .pill-runtime { padding: 6px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .topbar-exit { padding: 10px 18px; min-height: 44px; flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 11. Scrollbar e ajustes finos ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: var(--r-chip); border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* ---------- 13. Feed de publicações ---------- */
.feed-controls {
  display: flex; gap: var(--sp-base); align-items: center;
  margin-top: var(--sp-lg); flex-wrap: wrap;
}
.search-pill-input {
  flex: 1 1 260px; min-width: 200px; max-width: 480px;
  min-height: 44px; padding: 0 var(--sp-lg);
  font-family: var(--font-body); font-size: var(--pbody-sm);
  color: var(--ink); background: #1f1f1f;
  border: 1px solid transparent; border-radius: var(--r-chip);
  box-shadow: rgb(18, 18, 18) 0px 1px 0px, rgb(124, 124, 124) 0px 0px 0px 1px inset;
  transition: border-color var(--t-fast);
}
.search-pill-input::placeholder { color: var(--faint); }
.search-pill-input:focus { outline: none; border-color: #ffffff; }
/* Dropdowns — seta própria em chevron (appearance:none remove a nativa,
   que colava na borda direita): padding respirado + chevron a 16px da borda */
.sort-select {
  min-height: 44px; padding: 0 44px 0 20px;
  font-family: var(--font-body); font-size: var(--ptiny); font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink); background-color: #1f1f1f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
  border: 1px solid transparent; border-radius: var(--r-chip);
  box-shadow: rgb(18, 18, 18) 0px 1px 0px, rgb(124, 124, 124) 0px 0px 0px 1px inset;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}
.sort-select:focus { outline: none; border-color: #ffffff; }
.sort-select option { background: #1f1f1f; color: #ffffff; text-transform: none; letter-spacing: normal; }
.feed-chips { display: flex; gap: var(--sp-sm); flex-wrap: wrap; margin-top: var(--sp-base); }

/* Limitador "Mostrar mais" — contador micro-cap + um ghost pill */
.more-wrap {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-base);
  margin-top: var(--sp-xxl); text-align: center;
}
.list-count {
  font-size: var(--ptiny); font-weight: 700; letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--charcoal); margin: 0;
}

.feed-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-xl); margin-top: var(--sp-xl);
}
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--canvas-soft); border: 0;
  border-radius: var(--r-sm); cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background-color var(--t-fast);
}
.post-card:hover { background: #282828; }
.post-card:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.post-thumb { aspect-ratio: 16 / 9; background: var(--canvas); border-bottom: 1px solid var(--hairline); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { display: flex; flex-direction: column; gap: var(--sp-sm); padding: var(--sp-lg); }
.post-meta-top { display: flex; gap: var(--sp-xs); flex-wrap: wrap; }
.post-title {
  font-family: var(--font-display); font-size: var(--psubtitle-lg); font-weight: 700;
  line-height: var(--lh-headings); letter-spacing: var(--ls-display);
  text-transform: uppercase; color: var(--ink);
}
.post-summary { font-size: var(--pbody-sm); line-height: var(--lh-body); color: var(--charcoal); }
.post-meta { display: flex; gap: var(--sp-base); flex-wrap: wrap; font-size: var(--pcaption); color: var(--charcoal); }
.meta-item { display: inline-flex; align-items: center; gap: var(--sp-xxs); white-space: nowrap; }
.post-footer { display: flex; gap: var(--sp-base); align-items: center; justify-content: space-between; margin-top: auto; flex-wrap: wrap; }
.post-link { font-size: var(--pbody-sm); font-weight: 700; color: var(--ink); }
.post-link::after { content: " →"; }

/* ---------- 14. Jobs (cron) ---------- */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-lg); }
.job-card {
  display: flex; flex-direction: column; gap: var(--sp-xs);
  padding: var(--sp-lg); background: var(--canvas-soft);
  border: 0; border-left: 4px solid var(--hairline); border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.job-card.status-ok { border-left: 4px solid var(--success); }
.job-card.status-falhou { border-left: 4px solid var(--critical); }
.job-card.status-pendente { border-left: 4px solid var(--attention); }
.job-title {
  font-family: var(--font-display); font-size: var(--pbody-sm); font-weight: 700;
  letter-spacing: var(--ls-display); text-transform: uppercase; color: var(--ink);
  overflow-wrap: break-word; word-break: break-word; hyphens: auto;
}
.job-detail {
  font-size: var(--pcaption); line-height: var(--lh-caption); color: var(--charcoal);
  overflow-wrap: break-word; word-break: break-word;
}
.job-times { display: flex; gap: var(--sp-base); flex-wrap: wrap; font-size: var(--ptiny); color: var(--charcoal); }

/* ---------- 15. Página dedicada de post ---------- */
.post-title-page {
  font-family: var(--font-display); font-size: var(--pdisplay);
  font-weight: 700; letter-spacing: var(--ls-display); line-height: var(--lh-display);
  text-transform: uppercase; color: var(--ink); margin-top: var(--sp-base);
}
.post-article { max-width: 68ch; margin-top: var(--sp-xl); font-size: var(--pbody-md); line-height: var(--lh-body); color: var(--ink-mute); }
.post-article p + p { margin-top: var(--sp-base); }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-lg); }
.gallery-item { margin: 0; overflow: hidden; border-radius: var(--r-sm); border: 0; background: var(--canvas-soft); cursor: zoom-in; }
.gallery-item img, .gallery-item video { display: block; width: 100%; height: auto; }

/* ---------- 16. Viewer de mídia ---------- */
.viewer-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.96);
  display: flex; flex-direction: column;
}
.viewer-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-base) var(--sp-xl); color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.viewer-topbar-right { display: flex; align-items: center; gap: var(--sp-base); }
.viewer-topbar .caption { color: var(--charcoal); }
.viewer-stage { flex: 1; display: grid; place-items: center; padding: var(--sp-xl); min-height: 0; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 100%; border-radius: var(--r-xs); border: 1px solid var(--hairline); }
.viewer-nav { display: flex; justify-content: center; gap: var(--sp-base); padding: var(--sp-base); }
