body {
  background: #f4f7fb;
  color: #202733;
}

:root {
  --landing-primary: #185b67;
  --landing-primary-dark: #103f48;
  --landing-accent: #d9b46f;
  --landing-surface: #f6f8f7;
  --landing-ink: #14242b;
  --landing-muted: #5d6b70;
  --landing-border: #d9e2e2;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #1e2a38;
  color: #fff;
  z-index: 1030;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 64px;
  padding: 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.sidebar-header .btn {
  margin-right: .75rem;
  flex: 0 0 auto;
}

.sidebar-backdrop {
  display: none;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #cfd8e3;
  padding: .7rem 1rem;
}

.sidebar-group {
  padding: 1rem 1rem .35rem;
  color: rgba(255,255,255,.55);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  color: #fff;
  background: #2f3e50;
}

.app-main {
  min-height: 100vh;
  margin-left: 260px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #dbe3ee;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem;
  background: #eef3f8;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
}

.mode-switch-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  padding: .35rem .65rem;
  border-radius: 6px;
  color: #4b5b6f;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.mode-switch-link:hover,
.mode-switch-link:focus {
  color: #1e2a38;
  background: rgba(255,255,255,.7);
}

.mode-switch-link.active {
  color: #fff;
  background: #1e2a38;
}

.content {
  padding: 1.25rem;
}

.module-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 1rem;
}

.refresh-progress {
  border-color: #b9d7ff;
  background: #f7fbff;
}

.refresh-progress .progress {
  height: .65rem;
  background: #dceaf9;
}

.refresh-progress-log {
  max-height: 132px;
  overflow: auto;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: .65rem .75rem;
  color: #405168;
  background: #fff;
  font-size: .875rem;
}

.refresh-progress-log-entry + .refresh-progress-log-entry {
  margin-top: .35rem;
}

.refresh-progress-log-entry::before {
  content: "";
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin-right: .45rem;
  border-radius: 999px;
  background: #0d6efd;
  vertical-align: .08rem;
}

.refresh-progress-error {
  border-color: #f1b7bd;
  background: #fff8f8;
}

.pricing-card {
  appearance: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pricing-card:hover,
.pricing-card:focus {
  border-color: var(--landing-primary);
  box-shadow: 0 14px 34px rgba(24, 91, 103, .14);
  transform: translateY(-2px);
}

.pricing-card-featured {
  border-color: var(--landing-primary);
  box-shadow: 0 10px 28px rgba(24, 91, 103, .12);
}

.pricing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 1.5rem;
}

.pricing-card-head > i {
  color: #7b898d;
}

.pricing-card h3 {
  margin-bottom: 1rem;
  color: var(--landing-ink);
  font-weight: 700;
}

.pricing-card-price {
  color: var(--landing-primary-dark);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
}

.pricing-card-period {
  margin: .4rem 0 1.25rem;
  color: var(--landing-muted);
  font-size: .875rem;
}

.pricing-card p {
  color: var(--landing-muted);
  line-height: 1.6;
}

.pricing-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--landing-primary);
  font-weight: 700;
  margin-top: auto;
}

.pricing-modal-price {
  color: var(--landing-primary-dark);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.pricing-modal {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(18, 30, 45, .22);
}

.pricing-modal .modal-header {
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: var(--landing-primary-dark);
  border-bottom: 0;
}

.pricing-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
  opacity: .8;
}

.pricing-modal .modal-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.pricing-modal .modal-body {
  padding: 1.5rem;
  background: #f6f8f7;
}

.pricing-modal-summary,
.pricing-modal-details {
  height: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
}

.pricing-modal-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-color: rgba(24, 91, 103, .24);
  background: #f8fbfa;
  box-shadow: inset 0 4px 0 var(--landing-primary);
}

.pricing-modal-summary .pricing-modal-price {
  padding-top: .35rem;
}

.pricing-modal-period {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin-top: .55rem;
  padding: .25rem .55rem;
  color: #5d6b7a;
  background: #edf4f3;
  border: 1px solid rgba(24, 91, 103, .16);
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-modal-target {
  margin: 0;
  padding-top: .9rem;
  color: #2d3748;
  border-top: 1px solid #e5ebf2;
  font-size: .95rem;
  line-height: 1.5;
}

.pricing-modal-details {
  padding: 1.25rem;
}

.pricing-modal-description {
  margin-bottom: 1.25rem;
  color: #263241;
  font-size: 1.05rem;
  line-height: 1.55;
}

.pricing-modal-list-group + .pricing-modal-list-group {
  margin-top: 1.25rem;
}

.pricing-modal-list-group h3 {
  margin-bottom: .65rem;
  color: var(--landing-primary-dark);
  font-weight: 800;
}

.pricing-list {
  display: grid;
  gap: .5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .6rem .7rem;
  color: #2d3748;
  background: #f8fafc;
  border: 1px solid #e5ebf2;
  border-radius: 6px;
  line-height: 1.35;
}

.pricing-list i {
  flex: 0 0 auto;
  margin-top: .15rem;
}

.pricing-modal .modal-footer {
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 1px solid #e5ebf2;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef3f8;
  padding: 1rem;
}

.auth-card {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 18px 45px rgba(30,42,56,.12);
}

.auth-brand {
  color: #1e2a38;
  border: 0;
  min-height: auto;
  padding: 0;
}

.landing-body {
  background: #fff;
  color: var(--landing-ink);
}

.landing-container {
  width: 100%;
  max-width: 1200px;
}

.landing-page {
  min-height: 100vh;
  margin-left: 0;
  background: #fff;
}

.landing-mobilebar {
  min-height: 72px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--landing-border);
  box-shadow: 0 4px 18px rgba(20, 36, 43, .06);
}

.landing-mobilebar .navbar-brand {
  color: var(--landing-primary-dark);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.landing-mobilebar .navbar-brand img {
  width: 36px;
  height: 36px;
}

.landing-menu-button {
  min-width: 44px;
  min-height: 42px;
  color: var(--landing-primary-dark);
  background: #fff;
  border: 1px solid var(--landing-border);
}

.landing-menu-button:hover,
.landing-menu-button:focus {
  color: #fff;
  background: var(--landing-primary-dark);
  border-color: var(--landing-primary-dark);
}

.landing-mobilebar .btn-primary,
.landing-offcanvas .btn-primary,
.landing-page .btn-primary {
  background-color: var(--landing-primary);
  border-color: var(--landing-primary);
}

.landing-mobilebar .btn-primary:hover,
.landing-mobilebar .btn-primary:focus,
.landing-offcanvas .btn-primary:hover,
.landing-offcanvas .btn-primary:focus,
.landing-page .btn-primary:hover,
.landing-page .btn-primary:focus {
  background-color: var(--landing-primary-dark);
  border-color: var(--landing-primary-dark);
}

.landing-mobilebar .btn-outline-primary,
.landing-page .btn-outline-primary {
  color: var(--landing-primary);
  border-color: var(--landing-primary);
}

.landing-mobilebar .btn-outline-primary:hover,
.landing-mobilebar .btn-outline-primary:focus,
.landing-page .btn-outline-primary:hover,
.landing-page .btn-outline-primary:focus {
  color: #fff;
  background-color: var(--landing-primary);
  border-color: var(--landing-primary);
}

.landing-page .text-primary {
  color: var(--landing-primary) !important;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 68px;
  padding: 1rem;
  color: #202733;
  text-decoration: none;
  font-weight: 800;
  border-bottom: 1px solid #dbe3ee;
}

.landing-menu-label {
  padding: .85rem .65rem .35rem;
  color: #6c757d;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-menu-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .7rem .75rem;
  color: #2d3748;
  text-decoration: none;
  border-radius: 8px;
}

.landing-offcanvas {
  width: min(92vw, 360px);
}

.landing-offcanvas .offcanvas-header {
  border-bottom: 1px solid #e9ecef;
}

.landing-menu-icon {
  width: 1.25rem;
  color: var(--landing-primary);
  text-align: center;
  flex: 0 0 1.25rem;
}

.landing-menu-link:hover,
.landing-menu-link.active {
  color: var(--landing-primary);
  background: #eef5f4;
}

.landing-hero {
  min-height: calc(88vh - 72px);
  display: flex;
  align-items: center;
  padding: 5.5rem 0;
  color: var(--landing-ink);
  background: #f2f6f5;
  border-bottom: 1px solid var(--landing-border);
}

.landing-hero .row > [class*="col"] {
  min-width: 0;
}

.landing-copy {
  max-width: 620px;
  padding: 0;
  position: relative;
  z-index: 1;
}

.landing-eyebrow,
.landing-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
  color: var(--landing-primary);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-eyebrow {
  padding: .55rem .7rem;
  background: #fff;
  border: 1px solid var(--landing-border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(20, 36, 43, .05);
}

.landing-copy h1 {
  max-width: 680px;
  margin-bottom: 1.5rem;
  color: var(--landing-ink);
  font-size: 3.75rem;
  line-height: 1.03;
  letter-spacing: 0;
  font-weight: 800;
  overflow-wrap: break-word;
  hyphens: auto;
}

.landing-copy p {
  max-width: 580px;
  margin-bottom: 2rem;
  color: var(--landing-muted);
  font-size: 1.2rem;
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.landing-actions .btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding-inline: 1.2rem;
  font-weight: 700;
}

.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin-top: 2rem;
  color: #435359;
  font-size: .875rem;
  font-weight: 600;
}

.landing-proof i {
  margin-right: .25rem;
  color: var(--landing-primary);
}

.landing-hero-visual {
  position: relative;
  width: 100%;
  padding: 2.25rem 1rem 1rem;
  background: var(--landing-primary-dark);
  border: 1px solid #0b353d;
  border-radius: 8px;
  box-shadow: 0 28px 60px rgba(16, 63, 72, .2);
}

.landing-visual-label {
  position: absolute;
  top: .65rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255,255,255,.78);
  font-size: .75rem;
  font-weight: 700;
}

.landing-visual-label span {
  width: 7px;
  height: 7px;
  background: #7fd1a3;
  border-radius: 50%;
}

.landing-image-placeholder {
  min-height: 300px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  color: #2d3748;
  background: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  text-align: center;
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.landing-image-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

.landing-image-placeholder i {
  font-size: 3rem;
}

.landing-image-placeholder strong,
.landing-image-placeholder span {
  display: block;
}

.module-card .landing-image-placeholder,
main .landing-image-placeholder {
  margin-bottom: 1rem;
  color: #2d3748;
  background: var(--landing-surface);
  border-color: rgba(24, 91, 103, 0.28);
}

.landing-section {
  padding: 6rem 0;
  scroll-margin-top: 72px;
}

.landing-modules {
  background: #fff;
}

.landing-section-heading {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.landing-section-heading h2 {
  margin-bottom: .65rem;
  color: var(--landing-ink);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-section-heading .landing-section-kicker {
  margin-bottom: .75rem;
}

.landing-module-card {
  min-height: 350px;
  padding: 1.5rem;
  border-color: var(--landing-border);
  box-shadow: 0 8px 24px rgba(20, 36, 43, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.landing-module-card:hover,
.landing-module-card:focus-visible {
  border-color: rgba(24, 91, 103, .55);
  box-shadow: 0 18px 38px rgba(20, 36, 43, .1);
  transform: translateY(-3px);
}

.landing-card-top,
.pricing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-card-top {
  margin-bottom: 1.35rem;
}

.landing-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--landing-primary);
  background: #edf5f3;
  border: 1px solid #d8e8e4;
  border-radius: 8px;
  font-size: 1.35rem;
}

.landing-card-arrow {
  color: #839095;
  font-size: 1.1rem;
}

.landing-module-card h3 {
  margin-bottom: .75rem;
  color: var(--landing-ink);
  font-size: 1.2rem;
  font-weight: 750;
}

.landing-module-card > p {
  color: var(--landing-muted);
  line-height: 1.6;
}

.landing-saving {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: auto;
  padding-top: 1rem;
  color: #705521;
  border-top: 1px solid #eee5d3;
  font-size: .92rem;
  line-height: 1.45;
}

.landing-saving i {
  flex: 0 0 auto;
  color: #a87922;
}

.landing-pricing {
  background: #f2f4f3;
  border-top: 1px solid var(--landing-border);
}

.landing-footer {
  padding: 3.5rem 0;
  color: rgba(255,255,255,.72);
  background: #1e2a38;
  border-top: 1px solid rgba(255,255,255,.08);
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .75rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.landing-footer a {
  display: block;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  margin-bottom: .35rem;
}

.landing-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.landing-footer .text-muted {
  color: rgba(255,255,255,.62) !important;
}

.chart-panel {
  position: relative;
  width: 100%;
  height: 340px;
}

.chart-panel-sm {
  height: 300px;
}

.chart-panel canvas,
canvas[data-chart],
#dashboardTrend {
  max-height: 360px;
}

.chart-box {
  position: relative;
  width: 100%;
  height: 340px;
}

.module-card > canvas[data-chart] {
  width: 100% !important;
  height: 340px !important;
}

.table-critical {
  --bs-table-bg: #fff4f4;
  --bs-table-striped-bg: #ffeaea;
  background-color: #fff4f4;
  border-left: 4px solid #dc3545;
}

.table-warning-soft {
  --bs-table-bg: #fff8e1;
  --bs-table-striped-bg: #fff2bf;
  background-color: #fff8e1;
  border-left: 4px solid #ffc107;
}

.critical-cell {
  color: #b02a37;
  font-weight: 700;
}

.warning-cell {
  color: #8a5a00;
  font-weight: 700;
}

.small-feature {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 1rem;
  font-weight: 700;
}

.metric-table td,
.metric-table th {
  white-space: nowrap;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1025;
    display: block;
    background: rgba(12, 18, 28, .46);
  }

  .app-main {
    margin-left: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mode-switch {
    order: 3;
    width: 100%;
  }

  .mode-switch-link {
    flex: 1 1 0;
    justify-content: center;
  }

  .landing-page {
    margin-left: 0;
  }

  .landing-hero {
    min-height: auto;
    padding: 3.5rem 0;
  }

  .landing-copy {
    padding: 0;
    max-width: none;
  }

  .landing-copy h1 {
    font-size: 2.65rem;
  }

  .landing-copy p {
    max-width: 680px;
    font-size: 1.05rem;
  }

  .landing-hero-visual {
    max-width: 720px;
    margin-inline: auto;
  }

  .landing-image-placeholder {
    min-height: 220px;
  }

  .chart-panel,
  .chart-panel-sm,
  .chart-box {
    height: 260px;
  }

  .module-card > canvas[data-chart] {
    height: 260px !important;
  }

  .pricing-modal .modal-header,
  .pricing-modal .modal-body,
  .pricing-modal .modal-footer {
    padding: 1rem;
  }

  .pricing-modal-summary,
  .pricing-modal-details {
    padding: 1rem;
  }

  .pricing-modal-description {
    font-size: 1rem;
  }

  .pricing-modal .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-modal .modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .landing-mobilebar {
    min-height: 64px;
  }

  .landing-hero {
    padding: 1.75rem 0 2.5rem;
  }

  .landing-hero .row {
    --bs-gutter-y: 2rem;
  }

  .landing-copy h1 {
    font-size: 2.5rem;
  }

  .landing-copy p {
    font-size: 1.05rem;
  }

  .landing-section {
    padding: 4.25rem 0;
  }

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

  .landing-module-card,
  .pricing-card {
    min-height: 0;
  }

  .landing-footer {
    padding: 2.75rem 0;
  }
}

@media (max-width: 575.98px) {
  .landing-mobilebar .navbar-brand {
    font-size: 1rem;
  }

  .landing-mobilebar .navbar-brand img {
    width: 32px;
    height: 32px;
  }

  .landing-copy h1 {
    margin-bottom: .85rem;
    font-size: 1.95rem;
    line-height: 1.08;
  }

  .landing-copy p {
    margin-bottom: 1rem;
    font-size: .95rem;
    line-height: 1.45;
  }

  .landing-eyebrow {
    align-items: flex-start;
    margin-bottom: .85rem;
    padding: .45rem .55rem;
    font-size: .72rem;
    line-height: 1.35;
  }

  .landing-actions {
    gap: .5rem;
  }

  .landing-proof {
    gap: .3rem .75rem;
    margin-top: .85rem;
    font-size: .78rem;
  }

  .landing-hero-visual {
    padding: 1.85rem .55rem .55rem;
  }

  .landing-image-placeholder {
    min-height: 0;
    padding: .5rem;
  }

  .landing-hero-visual .landing-image-placeholder img {
    max-height: 110px;
  }

  .landing-section {
    padding: 3.5rem 0;
  }

  .landing-section-heading {
    margin-bottom: 2rem;
  }

  .landing-module-card,
  .pricing-card {
    padding: 1.25rem;
  }

  .pricing-modal-price {
    font-size: 2.6rem;
  }

  .pricing-modal .modal-title {
    font-size: 1.5rem;
  }
}
