@media (min-width: 1200px) {
  html {
    font-size: 14px;
  }

  :root {
    --navbar-height: 50px;
    --max-width: 1440px;
    --container-padding: 0.92rem;
    --section-padding: 3.35rem 0;
    --dashboard-filter-height: 2.56rem;
  }

  .dashboard-shell,
  .dashboard-shell.dashboard-shell--compact {
    padding: 0.58rem 0.72rem;
    border-radius: 12px;
  }

  .dashboard-filters-card,
  body.app-shell--auth .dashboard-filters-card {
    border-radius: 0.92rem;
  }

  .dashboard-filters-card .card-body,
  body.app-shell--auth .dashboard-filters-card .card-body,
  .dashboard-shell--compact .dashboard-filters-card .card-body {
    padding: 0.46rem 0.56rem 0.5rem;
  }

  .dashboard-filter-bar {
    grid-template-columns: minmax(212px, 1.24fr) repeat(4, minmax(0, 1fr));
    gap: 0.44rem;
  }

  .dashboard-filters-card .form-label,
  .dashboard-shell--compact .dashboard-filters-card .form-label {
    margin-bottom: 0.16rem;
    font-size: 0.74rem;
  }

  .dashboard-filters-card .filter-control,
  .dashboard-filter-field--compact .filter-control,
  .dashboard-filter-field--compact .btn.filter-control {
    min-height: var(--dashboard-filter-height);
    border-radius: 0.72rem;
    font-size: 0.84rem;
  }

  .dashboard-range-selector .range-display,
  .dashboard-shell--compact .dashboard-range-selector .range-display {
    min-height: var(--dashboard-filter-height);
    padding: 0.26rem 1.8rem 0.26rem 0.64rem;
  }

  .dashboard-range-selector .range-display-label,
  .dashboard-shell--compact .dashboard-range-selector .range-display-label {
    font-size: 0.83rem;
    line-height: 1.1;
  }

  .dashboard-range-selector .range-display-sub,
  .dashboard-shell--compact .dashboard-range-selector .range-display-sub {
    font-size: 0.67rem;
  }

  #dashboard-widgets-container {
    --bs-gutter-x: 0.68rem;
    --bs-gutter-y: 0.68rem;
  }

  #dashboard-widgets-container .card .card-body,
  .dashboard-shell--compact #dashboard-widgets-container .card .card-body,
  body.app-shell--auth #dashboard-widgets-container .card .card-body {
    padding: 0.68rem 0.72rem 0.76rem;
    gap: 0.38rem;
  }

  #dashboard-widgets-container .widget-card-title,
  .dashboard-shell--compact #dashboard-widgets-container .widget-card-title {
    font-size: 0.74rem;
  }

  #dashboard-widgets-container .widget-comparison {
    gap: 0.42rem;
  }

  #dashboard-widgets-container .widget-previous-value,
  .dashboard-shell--compact #dashboard-widgets-container .widget-previous-value {
    min-height: 1.46rem;
    font-size: 0.82rem;
  }

  #dashboard-widgets-container .widget-trend,
  .dashboard-shell--compact #dashboard-widgets-container .widget-trend {
    padding: 0.16rem 0.42rem;
    font-size: 0.68rem;
  }

  .chart-container {
    height: 360px;
  }

  .chart-container--compact {
    height: 290px;
  }

  .product-table-wrapper {
    max-height: 70vh;
  }

  body.app-shell--auth .table > :not(caption) > * > *,
  body.app-shell--auth .table-responsive > table > :not(caption) > * > * {
    padding: 0.42rem 0.5rem;
  }

  body.app-shell--auth .table thead th {
    font-size: 0.74rem;
    line-height: 1.18;
  }

  body.app-shell--auth .table tbody td {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .costs-shell {
    --bs-gutter-x: 0.88rem;
  }

  .costs-toolbar .btn-filter {
    padding-inline: 0.7rem;
    min-height: 2.34rem;
  }

  .costs-shell .dashboard-filters-card .card-body {
    padding: 0.5rem 0.58rem;
  }

  .costs-header {
    padding: 0.78rem 0.92rem 0.7rem;
    font-size: 0.64rem;
  }

  .costs-row {
    padding: 0.78rem 0.86rem;
    gap: 0.68rem;
  }

  .cost-cell-product {
    gap: 0.82rem;
  }

  .costs-product-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .costs-product-title {
    font-size: 0.94rem;
  }

  .costs-product-meta {
    font-size: 0.78rem;
    line-height: 1.28;
  }

  .list-metric,
  .history-pill {
    padding: 0.62rem 0.82rem;
    border-radius: 10px;
  }

  .list-metric-value {
    font-size: 0.98rem;
  }

  .history-pill-value {
    font-size: 0.88rem;
  }

  body.app-shell--guest-landing {
    padding-top: 56px;
  }

  .landing-navbar {
    padding: 0.08rem 0.42rem;
  }

  .landing-navbar__inner {
    padding: 0.06rem 0.52rem;
    gap: 0.44rem;
  }

  .landing-navbar__logo {
    padding: 0.22rem 0.72rem 0.24rem;
  }

  .landing-navbar__logo img {
    height: clamp(40px, 3vw, 48px);
  }

  .landing-navbar__menu {
    gap: 0.36rem;
  }

  .landing-navbar .nav-link {
    padding: 0.32rem 0.44rem;
    font-size: 0.82rem;
  }

  .landing-btn,
  .landing-btn--sm {
    padding: 0.48rem 0.86rem;
    font-size: 0.84rem;
  }

  .ks-hero {
    padding-top: clamp(2.4rem, 4vw, 4.2rem);
    padding-bottom: clamp(1.9rem, 3.6vw, 3.5rem);
  }

  .ks-hero__grid {
    gap: clamp(1.7rem, 3vw, 2.7rem);
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .ks-hero__title {
    font-size: clamp(2.28rem, 3.55vw, 4.08rem);
    line-height: 1.06;
  }

  .ks-hero__lead {
    font-size: clamp(0.98rem, 1.15vw, 1.12rem);
    line-height: 1.5;
    max-width: 58ch;
  }

  .ks-hero__actions {
    margin-top: 0;
  }

  .ks-hero__visual {
    min-height: clamp(380px, 42vw, 540px);
  }

  .ks-hero-device {
    max-width: 820px;
  }

  .ks-section,
  .ks-section--product,
  .ks-section--pricing,
  .ks-section--faq,
  .ks-section--glass {
    padding-top: 2.45rem;
    padding-bottom: 2.45rem;
  }

  .ks-section__head {
    margin-bottom: 1.5rem;
  }

  .ks-section__head h2 {
    font-size: clamp(1.72rem, 2.25vw, 2.4rem);
  }

  .ks-section__head p {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .ks-feature-grid,
  .ks-metrics-grid {
    gap: 0.92rem;
  }

  .ks-product-showcase {
    padding: 0.92rem;
  }

  .ks-footer {
    padding-top: 2.4rem;
    padding-bottom: 1.5rem;
  }

  .ks-footer__lead {
    max-width: 26ch;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .app-shell__content--guest--auth {
    padding-top: calc(var(--navbar-height) + 0.3rem);
    padding-bottom: 0.72rem;
    padding-inline: 0.58rem;
  }

  .app-shell__content--guest--auth::before {
    width: 250px;
    height: 250px;
    top: -90px;
    right: -70px;
  }

  .app-shell__content--guest--auth::after {
    width: 280px;
    height: 280px;
    bottom: -130px;
    left: -90px;
  }

  .auth-page {
    width: min(840px, 100%);
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 316px);
    border-radius: 1.5rem;
    box-shadow: 0 18px 44px -36px rgba(20, 18, 31, 0.26);
  }

  .auth-page__intro {
    padding: 0.92rem 1rem;
    gap: 0.56rem;
  }

  .auth-page__badge {
    font-size: 0.58rem;
    padding: 0.24rem 0.62rem;
  }

  .auth-page__title {
    font-size: clamp(1.26rem, 1.46vw, 1.68rem);
    line-height: 0.96;
  }

  .auth-page__lead {
    font-size: 0.78rem;
    line-height: 1.28;
    max-width: 32ch;
  }

  .auth-page__list {
    gap: 0.42rem;
  }

  .auth-page__list-item {
    gap: 0.52rem;
    font-size: 0.84rem;
  }

  .auth-page__list-item i {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .auth-page__card {
    padding: 0.94rem 1rem;
  }

  .auth-card {
    gap: 0.58rem;
  }

  .auth-card__title {
    font-size: 1.08rem;
  }

  .auth-card__subtitle {
    font-size: 0.74rem;
  }

  .auth-card__body {
    gap: 0.72rem;
  }

  .auth-form {
    gap: 0.54rem;
  }

  .auth-form .form-label {
    font-size: 0.78rem;
  }

  .auth-form .form-control {
    padding: 0.48rem 0.68rem;
    border-radius: 9px;
  }

  .auth-form .btn {
    padding-block: 0.52rem;
  }

  .auth-aux {
    font-size: 0.74rem;
  }

  .auth-card__footer {
    padding-top: 0.56rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 1199.98px) {
  .dashboard-filter-bar {
    grid-template-columns: minmax(240px, 1.35fr) repeat(2, minmax(165px, 1fr));
  }

  .auth-page {
    width: min(920px, 100%);
  }
}

@media (max-width: 991.98px) {
  .dashboard-shell,
  .dashboard-shell.dashboard-shell--compact {
    padding: 0.72rem 0.8rem;
  }

  .app-shell__content--guest--auth {
    padding-top: calc(var(--navbar-height) + 0.7rem);
  }
}

/* Landing/auth polish pass. Keep this last so density rules do not re-expand layouts. */
body.app-shell--guest-landing,
body.app-shell--guest-auth {
  --landing-shell-width: 1280px;
  --container-padding: clamp(1rem, 2vw, 1.5rem);
  font-family: var(--landing-font);
}

body.app-shell--guest-landing .container,
body.app-shell--guest-landing .ks-footer .container,
body.app-shell--guest-auth .landing-navbar .container {
  width: min(100%, var(--landing-shell-width));
  max-width: var(--landing-shell-width);
}

body.app-shell--guest-landing .landing-navbar__inner,
body.app-shell--guest-auth .landing-navbar__inner {
  max-width: var(--landing-shell-width);
  margin-inline: auto;
}

body.app-shell--guest-landing .ks-pricing .container {
  max-width: var(--landing-shell-width);
}

body.app-shell--guest-landing .pricing-card--platinum,
body.app-shell--guest-landing .ks-product-showcase {
  border-radius: 28px;
}

body.app-shell--guest-landing .pricing-header {
  text-align: center;
}

body.app-shell--guest-landing .pricing-included {
  margin: 0 auto clamp(1.35rem, 2.4vw, 2rem);
  text-align: center;
}

body.app-shell--guest-landing .pricing-included h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

body.app-shell--guest-landing .pricing-included p {
  margin: 0 auto;
  max-width: 58ch;
}

body.app-shell--guest-landing .ks-faq-accordion--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.app-shell--guest-landing .ks-section__head h2 span {
  color: var(--primary-2);
}

body.app-shell--guest-auth {
  background:
    radial-gradient(95% 120% at 105% -15%, rgba(255, 176, 32, 0.2), rgba(255, 176, 32, 0)),
    linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
}

body.app-shell--guest-auth .app-shell__content--guest--auth {
  padding-top: calc(var(--navbar-height) + clamp(1.2rem, 3vh, 2rem));
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  padding-inline: clamp(1rem, 3vw, 2rem);
}

body.app-shell--guest-auth .auth-page {
  --auth-primary: var(--primary);
  --auth-primary-dark: #5322bf;
  --auth-accent: var(--accent);
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 86px -56px rgba(31, 46, 94, 0.38);
  border: 1px solid rgba(220, 226, 236, 0.9);
  overflow: hidden;
}

body.app-shell--guest-auth .auth-page::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(43, 107, 243, 0.12), transparent 34%),
    radial-gradient(circle at 48% 90%, rgba(255, 176, 32, 0.18), transparent 34%);
  opacity: 1;
}

body.app-shell--guest-auth .auth-page__intro {
  padding: clamp(2.2rem, 4vw, 3.6rem);
  gap: clamp(1.2rem, 2.2vw, 1.8rem);
  background: transparent;
}

body.app-shell--guest-auth .auth-page__badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.44rem 0.85rem;
  font-weight: 800;
}

body.app-shell--guest-auth .auth-page__title {
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 12.5em;
}

body.app-shell--guest-auth .auth-page__lead {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.5;
  max-width: 44ch;
}

body.app-shell--guest-auth .auth-page__list {
  gap: 0.8rem;
}

body.app-shell--guest-auth .auth-page__list-item {
  align-items: center;
  gap: 0.75rem;
  font-size: 0.98rem;
  font-weight: 700;
}

body.app-shell--guest-auth .auth-page__list-item i {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: rgba(43, 107, 243, 0.12);
}

body.app-shell--guest-auth .auth-page__card {
  padding: clamp(1.8rem, 3vw, 2.6rem);
  background: #fff;
  border-left: 1px solid rgba(220, 226, 236, 0.9);
}

body.app-shell--guest-auth .auth-card {
  gap: 1.15rem;
}

body.app-shell--guest-auth .auth-card__title {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

body.app-shell--guest-auth .auth-card__subtitle {
  font-size: 0.96rem;
  line-height: 1.45;
}

body.app-shell--guest-auth .auth-form {
  gap: 0.9rem;
}

body.app-shell--guest-auth .auth-form .form-label {
  font-size: 0.9rem;
  font-weight: 800;
}

body.app-shell--guest-auth .auth-form .form-control {
  min-height: 52px;
  padding: 0.76rem 0.95rem;
  border-radius: 14px;
  border-color: rgba(20, 18, 31, 0.13);
  box-shadow: none;
}

body.app-shell--guest-auth .auth-form .btn {
  min-height: 52px;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.app-shell--guest-auth .auth-form .btn-primary {
  color: #fff;
  border: none;
  background: linear-gradient(180deg, #2b6bf3 0%, #1b2e6b 100%);
}

body.app-shell--guest-auth .auth-form .btn-outline-danger,
body.app-shell--guest-auth .auth-form .btn-outline-warning {
  color: var(--landing-text);
  border-color: rgba(20, 18, 31, 0.12);
  background: #fff;
  box-shadow: none;
}

body.app-shell--guest-auth .auth-social-divider {
  margin-top: 0.2rem !important;
  color: rgba(20, 18, 31, 0.58) !important;
}

body.app-shell--guest-auth .auth-card__footer {
  margin-top: 0.2rem;
  padding-top: 1.05rem;
  font-size: 0.92rem;
}

@media (max-width: 991.98px) {
  body.app-shell--guest-landing .ks-faq-accordion--grid {
    grid-template-columns: 1fr;
  }

  body.app-shell--guest-auth .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-shell--guest-auth .auth-page__card {
    border-left: none;
    border-top: 1px solid rgba(220, 226, 236, 0.9);
  }
}

@media (max-width: 767.98px) {
  body.app-shell--guest-landing {
    --container-padding: clamp(1rem, 5vw, 1.25rem);
  }

  body.app-shell--guest-landing .pricing-card--platinum,
  body.app-shell--guest-landing .ks-product-showcase {
    border-radius: 22px;
  }

  body.app-shell--guest-auth .app-shell__content--guest--auth {
    padding-top: calc(var(--navbar-height) + 1rem);
    padding-inline: 1rem;
  }

  body.app-shell--guest-auth .auth-page {
    border-radius: 22px;
  }

  body.app-shell--guest-auth .auth-page__intro,
  body.app-shell--guest-auth .auth-page__card {
    padding: 1.35rem;
  }

  body.app-shell--guest-auth .auth-page__title {
    font-size: clamp(1.85rem, 9vw, 2.45rem);
  }
}
