:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-strong: #ecf8ef;
  --ink: #17211a;
  --muted: #627066;
  --line: #d9e2dc;
  --green: #1f8a4c;
  --green-dark: #126737;
  --red: #d84b35;
  --yellow: #f2c14e;
  --black-green: #142017;
  --shadow: 0 18px 42px rgba(22, 41, 29, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.app-shell,
.workspace,
.sidebar,
.panel,
.stat-card,
.booking-item,
.item-row,
.access-box,
.trial-form,
.feature-card,
.content-grid,
.split-grid,
.stats-grid,
.finance-summary,
.form-grid {
  min-width: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  color: #182015;
  font-weight: 800;
  overflow: hidden;
}

.brand-mark img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.brand-mark.has-logo {
  background: #ffffff;
}

.brand-mark.has-logo img {
  display: block;
}

.brand-mark.has-logo span {
  display: none;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand small {
  color: inherit;
  opacity: 0.68;
  font-size: 0.9rem;
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  width: 100%;
  background: rgba(246, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
  min-width: 0;
}

.site-nav a {
  text-decoration: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 420px;
  overflow: hidden;
  background: var(--black-green);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48) saturate(0.9);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 850px;
  width: 100%;
  padding: 46px 28px;
  color: #ffffff;
}

.hero-copy h1 {
  max-width: 800px;
  font-size: clamp(2rem, 5vw, 3.9rem);
  line-height: 1;
}

.hero-copy p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.section-band,
.access-band,
.trial-band {
  padding: 44px 28px;
}

.section-heading,
.access-copy {
  max-width: 760px;
}

.section-heading h2,
.access-copy h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin-top: 24px;
}

.feature-card {
  min-height: 136px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.feature-card strong,
.feature-card span {
  display: block;
}

.feature-card strong {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.feature-card span,
.access-copy p,
.helper-text {
  color: var(--muted);
  line-height: 1.5;
}

.access-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 30px;
  align-items: start;
  background: #edf6f0;
}

.access-box,
.trial-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.trial-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1180px;
  margin-top: 24px;
}

.trial-form .primary-action {
  align-self: end;
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
}

.app-shell.active {
  display: grid;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  padding: 24px;
  background: var(--black-green);
  color: #ffffff;
}

.admin-sidebar {
  background: #202218;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
  text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
}

.sidebar-note span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.sidebar-note strong {
  display: block;
  margin-top: 4px;
}

.workspace {
  width: 100%;
  max-width: 1280px;
  padding: 28px;
  overflow-x: hidden;
}

.topbar,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--yellow);
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  font-size: 2rem;
}

h2 {
  font-size: 1.25rem;
}

.primary-action,
.secondary-action,
.ghost-action,
.quick-actions button,
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.primary-action {
  border: 0;
  background: var(--green);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--green-dark);
}

.secondary-action,
.quick-actions button,
.mini-action {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-action.on-dark {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #ffffff;
}

.photo-strip {
  position: relative;
  display: grid;
  min-height: 92px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 8px;
  background: #1b2a1e;
}

.photo-strip img {
  width: 100%;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
  filter: brightness(0.65) saturate(0.95);
}

.photo-copy {
  position: absolute;
  left: 22px;
  bottom: 14px;
  display: grid;
  max-width: 520px;
  gap: 4px;
  color: #ffffff;
}

.photo-copy strong {
  font-size: 1.2rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.stat-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 112px;
  padding: 18px;
}

.stat-card span,
.item-meta,
.booking-meta,
.finance-summary span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.85rem;
}

.content-grid,
.split-grid {
  display: grid;
  gap: 18px;
}

.content-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.split-grid {
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
}

.panel {
  padding: 20px;
}

.booking-list,
.item-list,
.quick-actions,
.finance-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.booking-item,
.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfb;
}

.booking-title,
.item-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 800;
}

.booking-meta,
.item-meta {
  margin-top: 5px;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-strong);
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.status.cancelado,
.status.pausado {
  background: #ffe9e4;
  color: #a83421;
}

.status.pago,
.status.ativo {
  background: #e8f8ef;
  color: #11653a;
}

.status.teste {
  background: #fff7d9;
  color: #755a00;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-action {
  min-height: 36px;
  border: 1px solid #ffd0c7;
  border-radius: 8px;
  background: #fff3f0;
  color: #a83421;
  font-weight: 800;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

.toolbar input {
  width: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.compact-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.form-grid .primary-action {
  align-self: end;
}

.quick-actions {
  grid-template-columns: 1fr;
}

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

.finance-summary div {
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 16px;
}

.finance-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

dialog {
  width: min(720px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

dialog::backdrop {
  background: rgba(10, 16, 12, 0.54);
}

.dialog-card {
  padding: 20px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.admin-settings {
  margin-bottom: 18px;
}

.logo-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  margin-top: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--muted);
  padding: 18px;
}

.logo-preview img {
  display: none;
  max-width: 220px;
  max-height: 130px;
  object-fit: contain;
}

.logo-preview.has-logo img {
  display: block;
}

.logo-preview.has-logo span {
  display: none;
}

@media (max-width: 980px) {
  .site-header,
  .access-band {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-nav {
    flex-wrap: wrap;
  }

  .feature-grid,
  .trial-form,
  .compact-form {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell.active {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
  }

  .stats-grid,
  .content-grid,
  .split-grid,
  .finance-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  .section-band,
  .access-band,
  .trial-band,
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .site-header {
    gap: 12px;
  }

  .site-nav {
    width: 100%;
    gap: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .site-nav a,
  .site-nav button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.88rem;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: 300px;
  }

  .hero-copy p {
    display: none;
  }

  .hero-copy {
    padding: 32px 16px;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .photo-strip {
    display: none;
  }

  .stat-card {
    min-height: auto;
    padding: 14px;
  }

  .stat-card strong {
    margin-top: 8px;
    font-size: 1.45rem;
  }

  .panel {
    padding: 14px;
  }

  .topbar,
  .panel-heading,
  .booking-item,
  .item-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .nav-link {
    min-width: 0;
    padding: 10px;
    text-align: center;
  }

  h1,
  .section-heading h2,
  .access-copy h2 {
    font-size: 1.55rem;
  }

  .feature-grid,
  .trial-form,
  .compact-form,
  .stats-grid,
  .content-grid,
  .split-grid,
  .form-grid,
  .finance-summary {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .dialog-actions,
  .row-actions {
    justify-content: stretch;
  }

  .toolbar input,
  .toolbar button,
  .dialog-actions button,
  .row-actions button,
  .row-actions .mini-action,
  .primary-action,
  .secondary-action,
  .ghost-action,
  .mini-action {
    width: 100%;
    min-width: 0;
  }
}
