:root {
  --ink: #13202f;
  --muted: #5d6b7b;
  --line: #dfe7ef;
  --paper: #ffffff;
  --soft: #f3f7fb;
  --brand: #084b83;
  --brand-2: #0b7fab;
  --accent: #f3b23f;
  --green: #16876a;
  --header-height: 76px;
  --shadow: 0 18px 55px rgba(19, 32, 47, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-top: var(--header-height);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 18px);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 231, 239, 0.76);
  box-shadow: 0 14px 38px rgba(19, 32, 47, 0.08);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.brand span:last-child {
  display: block;
  max-width: 150px;
  line-height: 1.05;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 0;
  cursor: pointer;
}

.nav-toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: #eef6fb;
}

.language-toggle {
  width: 52px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  color: #073f70;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 18px rgba(8, 75, 131, 0.08);
  font: inherit;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.language-toggle:hover {
  border-color: #9ec0dc;
  box-shadow: 0 10px 22px rgba(8, 75, 131, 0.13);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(8, 75, 131, 0.2);
}

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

.btn-primary:hover {
  box-shadow: 0 16px 34px rgba(8, 75, 131, 0.28);
}

.btn-secondary:hover {
  border-color: #a8c4db;
  background: #f7fbff;
}

.btn-accent:hover {
  background: #f8c55d;
  box-shadow: 0 14px 30px rgba(243, 178, 63, 0.24);
}

.btn-secondary {
  color: var(--brand);
  background: #fff;
  border-color: var(--line);
}

.btn-accent {
  color: #241800;
  background: var(--accent);
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 27, 48, 0.9), rgba(9, 27, 48, 0.62), rgba(9, 27, 48, 0.24)),
    var(--hero-image) var(--hero-position, center center) / cover no-repeat;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  padding: clamp(36px, 7svh, 76px) 0 clamp(58px, 9svh, 100px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.hero .eyebrow,
.page-hero .eyebrow,
.section-dark .eyebrow {
  color: #d8f1ff;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.65rem, min(5.2vw, 8.4svh), 5.05rem);
  line-height: 1.01;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin: clamp(14px, 2.4svh, 22px) 0 0;
  color: #e7f0f8;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(18px, 3svh, 32px);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-radius: 8px;
  padding: clamp(18px, 2.8svh, 24px);
  box-shadow: var(--shadow);
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.hero-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(19, 32, 47, 0.2);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: clamp(10px, 1.8svh, 14px) 0;
  min-width: 0;
}

.status-row:last-child {
  border-bottom: 0;
}

.status-row strong {
  color: var(--brand);
  text-align: right;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--soft);
}

.section-dark {
  color: #fff;
  background: #10243a;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 34px;
}

.section-head h2,
.split h2,
.card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.section-head p,
.split p,
.card p {
  color: var(--muted);
  margin: 12px 0 0;
}

.section-dark .section-head p,
.section-dark .split p {
  color: #c9d9e7;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(19, 32, 47, 0.06);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #c8d9e7;
  box-shadow: 0 18px 42px rgba(19, 32, 47, 0.12);
}

.card-body {
  padding: 24px;
}

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

.card img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  transition: transform 500ms ease;
}

.card:hover img {
  transform: scale(1.035);
}

.metric {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.metric:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
}

.trust-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: start;
}

.trust-grid h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.trust-list {
  display: grid;
  gap: 14px;
}

.trust-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.trust-list strong {
  color: var(--brand);
}

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

.metric strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.split-image {
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.list-check {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.list-check li {
  position: relative;
  padding-left: 30px;
  margin: 12px 0;
  color: var(--muted);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.42em;
  width: 7px;
  height: 12px;
  border-right: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  transform: rotate(45deg);
}

.page-hero {
  position: relative;
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  width: 100%;
  display: flex;
  align-items: center;
  padding: clamp(56px, 8vh, 92px) 0;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 27, 48, 0.88), rgba(9, 27, 48, 0.58)),
    var(--hero-image) var(--hero-position, center center) / cover no-repeat;
  z-index: -1;
}

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

.hero > .container,
.page-hero > .container {
  width: min(1120px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
}

.hero h1,
.page-hero h1 {
  overflow-wrap: anywhere;
  max-width: 100%;
}

.page-hero p {
  max-width: 700px;
  color: #e7f0f8;
  font-size: 1.12rem;
}

.crm-hero {
  min-height: clamp(360px, 54svh, 560px);
}

.crm-is-authenticated .crm-hero {
  display: none;
}

.crm-is-authenticated + .footer {
  margin-top: 0;
}

.crm-is-authenticated .crm-workspace {
  padding-top: 34px;
}

.process {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.process-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  margin-bottom: 18px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.route-map {
  min-height: 420px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 32%, var(--accent) 0 5px, transparent 6px),
    radial-gradient(circle at 38% 42%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 62% 35%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 78% 50%, var(--accent) 0 5px, transparent 6px),
    linear-gradient(135deg, #0f365a, #10243a);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.route-map::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-top: 2px dashed rgba(255, 255, 255, 0.62);
  transform: rotate(8deg);
}

.route-map span {
  position: absolute;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.route-map .hn { left: 12%; top: 36%; }
.route-map .us { left: 34%; top: 46%; }
.route-map .eu { right: 32%; top: 29%; }
.route-map .asia { right: 12%; top: 54%; }

.form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

label {
  font-weight: 800;
  display: grid;
  gap: 7px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #8fb7d5;
  box-shadow: 0 0 0 4px rgba(11, 127, 171, 0.12);
}

textarea {
  resize: vertical;
  min-height: 132px;
}

.notice {
  display: none;
  border-radius: 8px;
  padding: 16px;
  background: #eaf8f2;
  color: #0d5f48;
  border: 1px solid #bfe8d8;
}

.notice.show {
  display: block;
}

.tracking-box {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
}

.tracking-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.tracking-summary strong {
  color: var(--brand);
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
}

.dot {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: #aab7c4;
  box-shadow: 0 0 0 5px #edf2f6;
}

.timeline-item.is-done .dot {
  background: var(--green);
  box-shadow: 0 0 0 5px #dcf4ed;
}

.crm-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(19, 32, 47, 0.05);
}

.auth-card {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.auth-card form,
.auth-card > div {
  min-width: 0;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.auth-card p {
  color: var(--muted);
}

.crm-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.crm-session p {
  margin: 4px 0 0;
  color: var(--muted);
}

.crm-toolbar label {
  min-width: 210px;
}

.crm-toolbar .crm-search {
  flex: 1 1 280px;
}

.crm-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.crm-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(19, 32, 47, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.crm-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(19, 32, 47, 0.1);
}

.crm-kpi span {
  color: var(--muted);
  font-weight: 800;
}

.crm-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--brand);
}

.crm-forms {
  align-items: start;
}

.crm-brief {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.crm-brief article {
  background: #10243a;
  color: #fff;
  border-radius: 8px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.crm-brief span {
  display: block;
  color: #c9d9e7;
  font-weight: 800;
}

.crm-brief strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1;
  color: var(--accent);
}

.crm-brief p {
  margin: 10px 0 0;
  color: #d8e5ef;
}

.crm-command {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 16px;
  margin-bottom: 22px;
}

.crm-command-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(19, 32, 47, 0.06);
}

.section-head.compact {
  display: block;
  margin-bottom: 18px;
}

.section-head.compact h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.pipeline-list,
.ops-list,
.activity-list {
  display: grid;
  gap: 14px;
}

.pipeline-item,
.ops-item {
  display: grid;
  gap: 8px;
}

.pipeline-item > div:first-child,
.ops-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.pipeline-item > div:first-child,
.ops-item {
  display: grid;
}

.pipeline-item strong,
.ops-item span {
  font-weight: 900;
}

.pipeline-item span,
.activity-item span,
.activity-item p,
.muted {
  color: var(--muted);
}

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

.progress-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.activity-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-item span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.activity-item strong {
  display: block;
  line-height: 1.25;
}

.activity-item p,
.muted {
  margin: 4px 0 0;
}

.crm-panel {
  margin-top: 34px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(19, 32, 47, 0.06);
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.crm-table th,
.crm-table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.crm-table tbody tr {
  transition: background 160ms ease;
}

.crm-table tbody tr:hover {
  background: #f9fcff;
}

.crm-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f7fafc;
}

.crm-table td span {
  color: var(--muted);
  font-size: 0.92rem;
}

.crm-table select {
  min-width: 150px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  color: var(--brand);
  background: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.table-action:hover {
  background: #eef6fb;
  border-color: #9ec0dc;
  transform: translateY(-1px);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-toast {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 130;
  max-width: min(360px, calc(100vw - 36px));
  padding: 16px 18px 16px 22px;
  border-radius: 8px;
  color: #fff;
  background: #10243a;
  box-shadow: 0 18px 42px rgba(19, 32, 47, 0.24);
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  overflow: hidden;
}

.crm-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.crm-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.crm-toast.is-success {
  background: #0d6b55;
}

.crm-toast.is-info {
  background: #10243a;
}

.footer {
  color: #d8e5ef;
  background: #08192b;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
}

.footer a {
  color: #d8e5ef;
  text-decoration: none;
}

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

.footer small {
  display: block;
  margin-top: 36px;
  color: #99abbb;
}

.whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 110;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #20b36b;
  box-shadow: 0 14px 28px rgba(32, 179, 107, 0.35);
  text-decoration: none;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.whatsapp:hover {
  background: #18a860;
  box-shadow: 0 18px 34px rgba(32, 179, 107, 0.45);
  transform: translateY(-2px);
}

.whatsapp svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

@media (max-width: 1080px) and (min-width: 901px) {
  .nav {
    gap: 10px;
  }

  .nav-menu {
    gap: 4px;
  }

  .nav-link {
    padding: 8px 9px;
  }

  .brand span:last-child {
    max-width: 128px;
  }
}

@media (min-width: 901px) and (max-height: 840px) {
  .hero {
    align-items: center;
  }

  .hero-grid {
    padding: 28px 0 54px;
  }

  .hero h1 {
    max-width: 720px;
    font-size: clamp(2.6rem, min(4.7vw, 7.6svh), 4.45rem);
  }

  .hero p {
    max-width: 620px;
    font-size: 1.02rem;
  }

  .hero-panel {
    padding: 18px 22px;
  }
}

@media (min-width: 901px) and (max-height: 700px) {
  .hero-grid {
    padding: 18px 0 38px;
  }

  .hero h1 {
    max-width: 660px;
    font-size: clamp(2.35rem, min(4.2vw, 7svh), 3.75rem);
  }

  .hero .eyebrow {
    margin-bottom: 10px;
  }

  .hero p {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.5;
  }

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

@media (max-width: 900px) {
  .site-header {
    width: 100vw;
    max-width: 100vw;
  }

  .site-header .nav.container {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    gap: 12px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand span:last-child {
    max-width: 130px;
  }

  .nav-toggle {
    display: grid !important;
    place-items: center;
    flex: 0 0 44px;
    margin-left: auto;
    position: relative !important;
    z-index: 120 !important;
    color: var(--ink) !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 18px rgba(19, 32, 47, 0.08);
  }

  .nav .brand {
    padding-right: 0;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(19, 32, 47, 0.14);
    padding: 12px;
    max-height: calc(100svh - var(--header-height) - 18px);
    overflow-y: auto;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link,
  .nav-menu .btn {
    width: 100%;
    justify-content: center;
  }

  .language-toggle {
    width: 100%;
    min-height: 44px;
  }

  .hero-grid,
  .split,
  .grid-2,
  .auth-card,
  .trust-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 26px;
  }

  .crm-toolbar {
    align-items: stretch;
  }

  .crm-toolbar label {
    min-width: min(100%, 260px);
    flex: 1 1 220px;
  }

  .page-hero h1,
  .page-hero p,
  .hero h1,
  .hero p {
    max-width: calc(100vw - 28px);
  }

  .hero > .container,
  .page-hero > .container {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .hero {
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
  }

  .crm-hero {
    min-height: auto;
  }

  .hero,
  .page-hero {
    --hero-position: center center;
    align-items: flex-start;
    padding-top: clamp(42px, 8svh, 84px);
  }

  .hero-panel {
    max-width: 520px;
  }

  .grid-3,
  .process,
  .crm-brief,
  .crm-command,
  .crm-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body > * {
    max-width: 100vw;
  }

  .container {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .hero-grid {
    padding: 34px 0 72px;
  }

  .hero,
  .page-hero {
    min-height: auto;
  }

  .page-hero {
    padding: 48px 0 54px;
  }

  .crm-workspace {
    padding-top: 34px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
    line-height: 1.02;
  }

  .hero p,
  .page-hero p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .page-hero h1,
  .page-hero p,
  .hero h1,
  .hero p {
    max-width: 100%;
  }

  .section {
    padding: 62px 0;
  }

  .section-head h2,
  .split h2,
  .card h2,
  .trust-grid h2 {
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: 1.12;
  }

  .section-head {
    display: block;
  }

  .grid-3,
  .process,
  .form-grid,
  .crm-brief,
  .crm-command,
  .crm-kpis {
    grid-template-columns: 1fr;
  }

  .trust-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .card img {
    height: 190px;
  }

  .card-body,
  .auth-card,
  .tracking-box,
  .crm-kpi,
  .crm-brief article {
    padding: 20px;
  }

  .crm-toolbar {
    padding: 14px;
    gap: 12px;
  }

  .crm-toolbar label,
  .crm-toolbar .crm-search {
    min-width: 100%;
    flex-basis: 100%;
  }

  input,
  select,
  textarea,
  .btn {
    min-height: 48px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .crm-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .crm-table thead {
    display: none;
  }

  .crm-table,
  .crm-table tbody,
  .crm-table tr,
  .crm-table td {
    display: block;
    width: 100%;
  }

  .crm-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(19, 32, 47, 0.07);
    padding: 10px 0;
    overflow: hidden;
  }

  .crm-table td {
    display: grid;
    grid-template-columns: minmax(86px, 34%) 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f6;
    overflow-wrap: anywhere;
  }

  .crm-table td:last-child {
    border-bottom: 0;
  }

  .crm-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .crm-table select,
  .table-action,
  .table-actions {
    width: 100%;
    min-width: 0;
  }

  .hero-actions .btn {
    width: 100%;
    flex: 1 1 100%;
  }

  .status-row {
    display: block;
  }

  .status-row strong {
    display: block;
    margin-top: 3px;
    text-align: left;
  }

  .whatsapp {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }

  .crm-toast {
    left: 14px;
    right: 14px;
    bottom: 78px;
    max-width: none;
  }
}

@media (max-width: 380px) {
  .container,
  .site-header .nav.container,
  .hero > .container,
  .page-hero > .container {
    width: calc(100vw - 22px);
    max-width: calc(100vw - 22px);
  }

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

  .brand span:last-child {
    max-width: 112px;
    font-size: 0.92rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.95rem, 10vw, 2.45rem);
  }

  .crm-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
