:root {
  --bg: #040c1c;
  --surface: rgba(10, 24, 58, 0.88);
  --surface-strong: rgba(14, 34, 86, 0.95);
  --text: #e5f2ff;
  --muted: #9bb0d6;
  --accent: #46d7ff;
  --accent-strong: #22c55e;
  --brand-warm: #fbbf24;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 24px;
}

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

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(100, 215, 255, 0.14), transparent 22%),
    radial-gradient(circle at bottom right, rgba(142, 98, 255, 0.16), transparent 20%),
    linear-gradient(180deg, #020612 0%, #04112d 50%, #071842 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 15% 15%, rgba(100, 215, 255, 0.18), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(142, 98, 255, 0.16), transparent 16%),
    linear-gradient(180deg, rgba(5, 14, 35, 0.2), transparent 50%);
  z-index: 0;
}

.background-grid::before,
.background-grid::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(50px);
}

.background-grid::before {
  top: 10%;
  left: 5%;
  background: rgba(100, 215, 255, 0.24);
}

.background-grid::after {
  bottom: 10%;
  right: 7%;
  background: rgba(142, 98, 255, 0.16);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8%;
  background: rgba(4, 8, 28, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: "Segoe UI Variable Display", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 950;
  font-size: 28px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.logo::before {
  content: "";
  width: 36px;
  height: 36px;
  margin-right: 9px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(70, 215, 255, 0.82)),
    #0f172a;
  box-shadow: 0 14px 34px rgba(70, 215, 255, 0.22);
}

.logo::after,
.footer-logo::after {
  content: "";
  flex: 0 0 auto;
  width: 36px;
  height: 25px;
  margin-left: 9px;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30' fill='none'%3E%3Crect x='6' y='20' width='4' height='8' rx='1' fill='%23fbbf24'/%3E%3Crect x='14' y='16' width='4' height='12' rx='1' fill='%2384cc16'/%3E%3Crect x='22' y='12' width='4' height='16' rx='1' fill='%2322c55e'/%3E%3Cpath d='M12 11L27 4' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M22 3H28V9' stroke='%239bdc38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 6px 12px rgba(34, 197, 94, 0.24));
}
.logo span,
.footer-logo span {
  color: var(--brand-warm);
  font-style: italic;
  letter-spacing: -0.07em;
}

.logo strong,
.footer-logo strong {
  color: #ffffff;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: rgba(229, 242, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #fff;
}

.header-buttons,
.hero-buttons {
  display: flex;
  gap: 14px;
}

.btn-primary,
.btn-outline {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04112d;
  box-shadow: 0 18px 45px rgba(100, 215, 255, 0.22);
}

.btn-outline {
  padding: 14px 26px;
  border: 1px solid rgba(100, 215, 255, 0.38);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary:hover,
.btn-outline:hover {
  transform: translateY(-2px);
}

.large {
  padding: 16px 32px;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 100px 8% 80px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-copy h1 {
  font-size: clamp(3rem, 4vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 24px;
  max-width: 700px;
}

.hero-description {
  font-size: 1.1rem;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 38px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.hero-metrics div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
}

.hero-metrics strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-panel {
  border-radius: 36px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.panel-top span {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-top strong {
  font-size: 1.2rem;
}

.panel-chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(100, 215, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.panel-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.panel-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
}

.panel-card span {
  color: var(--muted);
  display: block;
  margin-bottom: 14px;
}

.panel-card strong {
  font-size: 1.55rem;
}

.panel-chart {
  position: relative;
  min-height: 220px;
  background: linear-gradient(180deg, rgba(100, 215, 255, 0.1), rgba(11, 22, 55, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  overflow: hidden;
}

.chart-axis {
  position: absolute;
  inset: 24px 28px;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 40px, 40px 100%;
}

.chart-line {
  position: absolute;
  left: 22px;
  bottom: 34px;
  width: calc(100% - 44px);
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(100, 215, 255, 0.85), transparent);
  border-radius: 999px;
  transform: rotate(-8deg);
}

.chart-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(100, 215, 255, 0.5);
}

.dot-1 { left: 18%; bottom: 34%; }
.dot-2 { left: 40%; bottom: 52%; }
.dot-3 { left: 64%; bottom: 44%; }
.dot-4 { left: 84%; bottom: 28%; }

.panel-footer {
  margin-top: 26px;
  display: flex;
  gap: 18px;
}

.panel-footer div {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 20px;
}

.panel-footer strong {
  display: block;
  font-size: 1.5rem;
}

.panel-footer span {
  color: var(--muted);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-header span {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-header h2 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 2.6vw, 3rem);
  line-height: 1.08;
}

.features,
.highlights,
.plans,
.system-preview {
  padding: 80px 8%;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.feature-card,
.highlight-card,
.preview-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(100, 215, 255, 0.12);
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.feature-card h3,
.highlight-card strong,
.preview-card h3,
.plan-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.feature-card p,
.highlight-card p,
.preview-card p,
.preview-text p,
.plan-card p {
  color: var(--muted);
  line-height: 1.75;
}

.system-preview {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: flex-start;
}

.preview-text ul {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

.preview-text ul li {
  list-style: none;
  position: relative;
  padding-left: 26px;
}

.preview-text ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.preview-grid {
  display: grid;
  gap: 24px;
}

.preview-card.small-card {
  display: grid;
  gap: 18px;
}

.preview-mini {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 18px 20px;
}

.preview-mini strong {
  display: block;
  margin-bottom: 8px;
}

.preview-card table {
  width: 100%;
  border-collapse: collapse;
}

.preview-card th,
.preview-card td {
  padding: 16px;
  font-size: 0.94rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-card th {
  color: var(--muted);
  font-weight: 600;
}

.numbers {
  margin: 0 8%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.numbers div {
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.numbers strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.numbers span {
  color: var(--muted);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlight-card strong {
  color: #fff;
}

.plans {
  text-align: center;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.plan-card {
  position: relative;
  min-height: 100%;
  padding: 42px 30px 36px;
}

.plan-card ul {
  margin: 28px 0;
  display: grid;
  gap: 12px;
}

.plan-card li {
  padding-left: 24px;
  position: relative;
}

.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.plan-card a {
  margin-top: 16px;
}

.popular {
  border: 1px solid rgba(100, 215, 255, 0.4);
  transform: translateY(-6px);
}

.badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04112d;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 14px 32px rgba(34, 197, 94, 0.28);
}

.cta {
  margin: 80px 8px 120px;
  padding: 42px 60px;
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(100, 215, 255, 0.18), rgba(142, 98, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cta h2 {
  font-size: clamp(2rem, 2.4vw, 2.8rem);
  max-width: 760px;
}

.cta p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 560px;
}

.cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04112d;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 16px 34px rgba(34, 197, 94, 0.22);
}

.cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(70, 215, 255, 0.24);
}

.footer {
  padding: 60px 8% 80px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer h2 {
  font-size: 1.8rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: "Segoe UI Variable Display", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.1rem !important;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 14px;
}

.footer h4 {
  margin-bottom: 18px;
  color: #fff;
}

.footer a,
.footer p {
  color: rgba(229, 242, 255, 0.78);
}

@media (max-width: 1120px) {
  .hero,
  .system-preview,
  .feature-grid,
  .highlight-grid,
  .plan-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 30px;
  }

  .panel-cards,
  .hero-metrics,
  .panel-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header {
    padding: 18px 6%;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 80px 6px 60px;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .hero-buttons,
  .header-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
  }

  .cta {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .cta a {
    width: min(100%, 260px);
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 60px 5%;
  }

  .hero-metrics div,
  .preview-card table,
  .numbers div {
    font-size: 0.95rem;
  }

  .plan-card,
  .highlight-card,
  .preview-card,
  .panel-card {
    padding: 24px;
  }
}

/* ===============================
   RESPONSIVIDADE MOBILE FINAL
================================ */

@media (max-width: 1024px) {
  .hero,
  .system-preview {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlight-grid,
  .plan-grid,
  .numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-panel {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px 5%;
    gap: 14px;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 20px;
  }

  .logo::before {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    margin-right: 7px;
  }

  .header-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 60px 5% 50px;
    gap: 32px;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
    line-height: 1.08;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-metrics,
  .panel-cards,
  .panel-footer,
  .feature-grid,
  .highlight-grid,
  .plan-grid,
  .numbers {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 20px;
    border-radius: 26px;
  }

  .panel-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .features,
  .highlights,
  .plans,
  .system-preview {
    padding: 55px 5%;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .cta {
    margin: 55px 5% 80px;
    padding: 32px 24px;
    border-radius: 26px;
  }

  .footer {
    grid-template-columns: 1fr;
    padding: 45px 5% 60px;
  }
}

@media (max-width: 520px) {
  .header-buttons {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
    padding: 13px 18px;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .panel-card,
  .feature-card,
  .highlight-card,
  .preview-card,
  .plan-card {
    padding: 22px;
    border-radius: 22px;
  }

  .preview-card {
    overflow-x: auto;
  }

  .preview-card table {
    min-width: 520px;
  }

  .numbers {
    margin: 0 5%;
  }

  .cta h2 {
    font-size: 1.8rem;
  }

  .cta a {
    min-height: 46px;
    padding: 13px 18px;
    font-size: 0.9rem;
  }
}

.trial-item {
  list-style: none;
}

.trial-item span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04112d;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 12px 30px rgba(100, 215, 255, 0.22);
}

.trial-item span::before {
  content: "⚡";
}

/* === Compact responsive layer (Codex) === */
*,
*::before,
*::after {
    min-width: 0;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

.table-wrap,
.table-responsive,
.tabela-container,
.tabela-wrapper,
.assinatura-tabela-wrap,
.finance-table-wrap,
.overflow-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        max-width: 100%;
    }

    .cards,
    .grid,
    .dashboard-grid,
    .summary-grid,
    .metric-grid,
    .stats-grid,
    .module-card-grid,
    .work-grid,
    .form-grid,
    .produtos-grid,
    .clientes-grid,
    .pedidos-grid,
    .plan-grid,
    [class*="-grid"],
    [class*="-cards"] {
        gap: 12px;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    [class*="-card"],
    [class*="-panel"] {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-x: hidden;
    }

    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .topo,
    .topbar,
    .header,
    .page-header,
    .panel-header,
    .section-title-row,
    .toolbar,
    .actions-bar {
        gap: 10px;
        align-items: stretch;
    }

    .topo h1,
    .topbar h1,
    .header h1,
    .page-header h1,
    .dashboard-title,
    .page-title {
        font-size: 1.3rem;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .card h2,
    .panel h2,
    [class*="-card"] h2,
    [class*="-panel"] h2 {
        font-size: 1.08rem;
        line-height: 1.25;
        letter-spacing: 0;
    }

    .card h3,
    .panel h3,
    [class*="-card"] h3,
    [class*="-panel"] h3 {
        font-size: 0.98rem;
        line-height: 1.25;
        letter-spacing: 0;
    }

    p,
    label,
    input,
    select,
    textarea,
    button,
    a,
    small,
    td,
    th {
        font-size: 0.9rem;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    .modal-content,
    .modal-panel,
    [class*="-card"],
    [class*="-panel"] {
        padding: 14px;
        border-radius: 8px;
    }

    .cards,
    .grid,
    .dashboard-grid,
    .summary-grid,
    .metric-grid,
    .stats-grid,
    .module-card-grid,
    .work-grid,
    .form-grid,
    .produtos-grid,
    .clientes-grid,
    .pedidos-grid,
    .plan-grid,
    [class*="-grid"],
    [class*="-cards"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px;
    }

    .tab-menu,
    .tabs,
    .filters,
    .filtros,
    .topbar-actions,
    .actions,
    .row-actions,
    .botoes,
    .button-group,
    .toolbar-actions {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    input,
    select,
    textarea {
        min-height: 38px;
        padding: 9px 10px;
    }

    button,
    .btn,
    .button,
    [class*="-btn"],
    .ghost-action,
    .primary-action,
    .submit-button {
        min-height: 36px;
        padding: 8px 11px;
        letter-spacing: 0;
    }


    .sidebar a,
    .menu a,
    .nav a {
        font-size: 0.9rem;
        padding: 11px 13px;
    }

    .sidebar-brand,
    .sidebar-user,
    .sidebar-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    table {
        font-size: 0.86rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    .modal-content,
    .modal-panel,
    [class*="-card"],
    [class*="-panel"] {
        padding: 12px;
    }

    .metric-card strong,
    .summary-card strong,
    .dashboard-card strong,
    .stat-value,
    .metric-value,
    .amount-value {
        font-size: 1.15rem;
    }

    .tab-btn,
    button,
    .btn,
    .button,
    [class*="-btn"],
    .ghost-action,
    .primary-action,
    .submit-button {
        width: auto;
        max-width: 100%;
        white-space: normal;
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    html {
        font-size: 13px;
    }

    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    [class*="-card"],
    [class*="-panel"] {
        padding: 10px;
    }

    .topo,
    .topbar,
    .header,
    .page-header {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .sidebar a,
    .menu a,
    .nav a {
        font-size: 0.86rem;
        padding: 9px 11px;
    }
}

/* === Mobile landscape density (Codex) === */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 1024px) {
    html {
        font-size: 12.5px;
    }

    body {
        overflow-x: hidden;
    }

    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        width: 100%;
        padding: 8px 10px !important;
    }

    .cards,
    .grid,
    .dashboard-grid,
    .module-card-grid,
    .work-grid,
    .produtos-grid,
    .clientes-grid,
    .pedidos-grid,
    .plan-grid,
    .feature-grid,
    .highlight-grid,
    .panel-cards,
    [class*="-grid"],
    [class*="-cards"] {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr)) !important;
        gap: 8px !important;
    }

    .summary-grid,
    .metric-grid,
    .stats-grid,
    .hero-metrics,
    .numbers {
        grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr)) !important;
    }

    .form-grid,
    form .grid,
    form [class*="-grid"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .full,
    .full-width,
    .span-full,
    .form-full,
    .observacoes,
    textarea {
        grid-column: 1 / -1;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    .plan-card,
    .feature-card,
    .highlight-card,
    .modal-content,
    .modal-panel,
    [class*="-card"],
    [class*="-panel"] {
        min-height: auto !important;
        padding: 9px 10px !important;
        border-radius: 8px !important;
    }

    .topo,
    .topbar,
    .header,
    .page-header,
    .panel-header,
    .section-title-row,
    .toolbar,
    .actions-bar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 7px !important;
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }

    .topo h1,
    .topbar h1,
    .header h1,
    .page-header h1,
    .dashboard-title,
    .page-title,
    .hero-copy h1,
    .section-header h2 {
        font-size: 1.08rem !important;
        line-height: 1.15 !important;
        letter-spacing: 0 !important;
    }

    .card h2,
    .panel h2,
    [class*="-card"] h2,
    [class*="-panel"] h2 {
        font-size: 0.95rem !important;
        line-height: 1.2 !important;
        margin-bottom: 4px;
    }

    .card h3,
    .panel h3,
    [class*="-card"] h3,
    [class*="-panel"] h3 {
        font-size: 0.86rem !important;
        line-height: 1.2 !important;
        margin-bottom: 3px;
    }

    .metric-card strong,
    .summary-card strong,
    .dashboard-card strong,
    .stat-value,
    .metric-value,
    .amount-value,
    .number-value {
        font-size: 1.02rem !important;
        line-height: 1.1 !important;
    }

    p,
    label,
    input,
    select,
    textarea,
    button,
    a,
    small,
    td,
    th,
    li {
        font-size: 0.8rem !important;
        line-height: 1.28;
    }

    input,
    select,
    textarea {
        min-height: 32px !important;
        padding: 6px 8px !important;
    }

    button,
    .btn,
    .button,
    [class*="-btn"],
    .ghost-action,
    .primary-action,
    .submit-button {
        min-height: 31px !important;
        padding: 6px 8px !important;
        border-radius: 7px !important;
        white-space: normal;
    }

    .tab-menu,
    .tabs,
    .filters,
    .filtros,
    .topbar-actions,
    .actions,
    .row-actions,
    .botoes,
    .button-group,
    .toolbar-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px !important;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .tab-menu > *,
    .tabs > *,
    .filters > *,
    .filtros > *,
    .topbar-actions > *,
    .actions > *,
    .row-actions > *,
    .botoes > *,
    .button-group > *,
    .toolbar-actions > * {
        flex: 0 0 auto;
    }


    .sidebar-brand,
    .sidebar-user,
    .sidebar-footer {
        padding: 10px 12px !important;
    }

    .sidebar a,
    .menu a,
    .nav a {
        min-height: 32px;
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }

    table {
        font-size: 0.78rem !important;
    }

    th,
    td {
        padding: 6px 8px !important;
    }

    .modal-content,
    .modal-panel,
    [role="dialog"] {
        max-height: calc(100vh - 14px);
        overflow: auto;
    }
}

@media (orientation: landscape) and (max-height: 430px) and (max-width: 950px) {
    html {
        font-size: 12px;
    }

    .container,
    .main,
    #main,
    main,
    .content,
    .conteudo,
    .page-content,
    .dashboard-container,
    .dashboard-content,
    .detail-main,
    .personal-main,
    .app-shell {
        padding: 6px 8px !important;
    }

    .cards,
    .grid,
    .dashboard-grid,
    .module-card-grid,
    .work-grid,
    .produtos-grid,
    .clientes-grid,
    .pedidos-grid,
    .plan-grid,
    .feature-grid,
    .highlight-grid,
    .panel-cards,
    [class*="-grid"],
    [class*="-cards"] {
        grid-template-columns: repeat(auto-fit, minmax(min(148px, 100%), 1fr)) !important;
        gap: 7px !important;
    }

    .summary-grid,
    .metric-grid,
    .stats-grid,
    .hero-metrics,
    .numbers {
        grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr)) !important;
    }

    .card,
    .panel,
    .box,
    .metric-card,
    .summary-card,
    .dashboard-card,
    .module-card,
    .produto-card,
    .cliente-card,
    .pedido-card,
    .plan-card,
    .feature-card,
    .highlight-card,
    [class*="-card"],
    [class*="-panel"] {
        padding: 8px !important;
    }
}

/* Correção do selo popular no mobile */
@media (max-width: 768px) {
  .popular {
    transform: none;
  }

  .plan-card.popular {
    padding: 66px 20px 24px !important;
  }

  .plan-card .badge {
    top: 18px;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    max-width: calc(100% - 44px);
    text-align: center;
  }
}

@media (max-width: 380px) {
  .plan-card.popular {
    padding-top: 62px !important;
  }

  .plan-card .badge {
    padding: 7px 12px;
    font-size: 0.66rem;
  }
}
