:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #0f172a;
  --muted: #475467;
  --line: #e4e7ec;
  --primary: #52b788;
  --primary-600: #3da772;
  --primary-soft: #edf8f1;
  --success: #129a62;
  --warn: #b7791f;
  --danger: #e52f2f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 28px rgba(8, 20, 35, 0.08);
  --shadow-2: 0 18px 42px rgba(8, 20, 35, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: #f5f7fb;
  overflow-x: hidden;
  background: #f5f7fb;
}

.report-bridge-card {
  max-width: 100%;
}

.report-bridge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.report-bridge-row span {
  min-width: 0;
}

.report-bridge-row strong {
  text-align: right;
  white-space: nowrap;
}

.report-bridge-row-strong {
  font-size: 1.02rem;
}

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

h1, h2, h3, h4, h5 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.logo { font-weight: 800; letter-spacing: -0.02em; font-size: 22px; }
.topbar nav { display: flex; gap: 12px; align-items: center; }
.topbar nav a { color: var(--muted); font-weight: 700; }
.topbar nav a:hover { color: var(--text); }

.btn {
  border: none;
  border-radius: 11px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.secondary { background: #111827; }
.btn.secondary:hover { background: #1f2937; }

.hero {
  max-width: 1160px;
  margin: 42px auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.03;
  margin: 8px 0;
}
.pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-600);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.lp-hero { margin-top: 32px; align-items: stretch; }
.lp-hero-copy p { max-width: 64ch; }
.lp-proof-card { background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%); }
.lp-quick-points { margin: 12px 0 0; padding-left: 18px; color: #304563; }
.lp-quick-points li { margin-bottom: 6px; font-weight: 600; }
.lp-kpi-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lp-kpi-row div {
  background: #f7faff;
  border: 1px solid #d7e6ff;
  border-radius: 12px;
  padding: 10px;
}
.lp-kpi-row strong {
  display: block;
  font-size: 15px;
  color: #12356f;
}
.lp-kpi-row span {
  font-size: 12px;
  color: #516888;
  font-weight: 600;
}
.lp-trust-strip {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lp-trust-strip span {
  background: #f3f7ff;
  border: 1px solid #d5e3ff;
  color: #214377;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 6px 10px;
}
.lp-section { margin-top: 26px; margin-bottom: 0; }
.lp-head { margin-bottom: 14px; }
.lp-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.1;
}
.lp-head p { color: var(--muted); margin: 0; max-width: 72ch; }
.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lp-feature {
  padding: 16px;
  border-radius: 12px;
}
.lp-feature h3 {
  font-size: 20px;
  margin: 0 0 8px;
}
.lp-feature p {
  margin: 0;
  color: #455a78;
  line-height: 1.55;
}
.lp-workflow .lp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.lp-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-1);
}
.lp-step-no {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eaf2ff;
  color: #123b78;
  font-weight: 900;
  margin-bottom: 10px;
}
.lp-step h3 { margin: 0 0 6px; font-size: 18px; }
.lp-step p { margin: 0; color: #465a77; line-height: 1.5; }
.lp-why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lp-why-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.lp-why-card p {
  margin: 0;
  color: #465a77;
}
.lp-final-cta .card {
  padding: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}
.lp-final-cta h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 42px);
}
.lp-final-cta p {
  margin: 0;
  max-width: 72ch;
  color: #3f5473;
}
.lp-v2-hero {
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}
.lp-v2-mini-kpis {
  margin-top: 16px;
  display: grid;
  gap: 9px;
}
.lp-v2-mini-kpis div {
  border: 1px solid #d8e4f3;
  background: #f7fbff;
  border-radius: 11px;
  padding: 10px 12px;
}
.lp-v2-mini-kpis strong { display: block; font-size: 14px; color: #123a6f; }
.lp-v2-mini-kpis span { color: #587090; font-size: 12px; font-weight: 600; }
.lp-v2-dashboard-card h3 { margin-top: 0; }
.lp-v2-list {
  margin: 0;
  padding-left: 18px;
  color: #334d70;
}
.lp-v2-list li { margin-bottom: 7px; }
.lp-v2-rule {
  margin: 14px 0;
  border: 1px solid #dce7f4;
  background: #f5fafe;
  border-radius: 10px;
  padding: 10px 12px;
}
.lp-v2-rule strong { color: #11396c; font-size: 13px; }
.lp-v2-rule p { margin: 4px 0 0; color: #425f82; font-size: 13px; }
.lp-v2-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.lp-v2-strip-item {
  border: 1px solid #dce8f5;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-1);
}
.lp-v2-strip-item span {
  display: block;
  font-size: 12px;
  color: #5e7390;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.lp-v2-strip-item strong { font-size: 15px; color: #193659; }
.lp-v2-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lp-v2-feature { padding: 16px; }
.lp-v2-feature h3 { margin: 0 0 8px; font-size: 19px; }
.lp-v2-feature p { margin: 0; color: #465f80; line-height: 1.55; }
.lp-v2-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.lp-v2-step {
  border: 1px solid #dce7f4;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}
.lp-v2-step span {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #eaf4ff;
  color: #1d4f87;
  font-weight: 900;
  margin-bottom: 10px;
}
.lp-v2-step h3 { margin: 0 0 6px; font-size: 18px; }
.lp-v2-step p { margin: 0; color: #4a6383; }
.lp-v2-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lp-v2-compare-col { padding: 16px; }
.lp-v2-compare-col h3 { margin: 0 0 10px; }
.lp-v2-compare-col.good {
  border-color: #bde1cc;
  background: linear-gradient(180deg, #fcfffd 0%, #f2fbf6 100%);
}
.lp-v2-faq {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lp-v2-faq article { padding: 16px; }
.lp-v2-faq h3 { margin: 0 0 8px; font-size: 19px; }
.lp-v2-faq p { margin: 0; color: #4a6383; line-height: 1.55; }
.lp-v2-cta {
  text-align: left;
  padding: 26px;
  border-color: #d4e5f6;
  background: linear-gradient(180deg, #fff 0%, #f4faff 100%);
}

/* Responsive hardening: app-wide safety without changing functionality */
img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

.app-layout,
.app-main {
  max-width: 100%;
}

.workspace-top,
.app-head {
  flex-wrap: wrap;
}

.workspace-top form,
.workspace-top .form-select {
  max-width: 100%;
}

.panel,
.card {
  overflow: visible;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.panel table,
.panel .table {
  min-width: 760px;
}

.auth-ecom-social-btn span,
.menu-link span,
.chip-input label,
.kpi span {
  word-break: break-word;
}

.hero-card,
.card,
.auth-card,
.panel,
.kpi {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.hero-card,
.panel,
.card { padding: 18px; }

.wrap { max-width: 1160px; margin: 30px auto; padding: 0 16px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.price { font-size: 34px; font-weight: 900; margin: 8px 0; letter-spacing: -0.02em; }

.auth-wrap {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(480px, 96vw);
  padding: 26px;
  display: grid;
  gap: 12px;
}

.auth-card.wide { width: min(700px, 96vw); }
.auth-ecom-wrap {
  min-height: 100vh;
  background: #f6f8fb;
}
.auth-ecom-card {
  width: min(560px, 94vw);
  padding: 30px 34px;
  gap: 14px;
  border: 1px solid #dbe2ed;
  box-shadow: 0 10px 28px rgba(14, 21, 34, 0.08);
  background: #fff;
}
.auth-ecom-title {
  margin: 0;
  font-size: 46px;
  line-height: 1.02;
  text-align: center;
  letter-spacing: -0.03em;
  color: #141c29;
}
.auth-ecom-subtitle {
  margin: -4px 0 6px;
  text-align: center;
  color: #5f7392;
  font-size: 17px;
  font-weight: 600;
}
.auth-ecom-social-wrap {
  display: grid;
  gap: 8px;
}
.auth-ecom-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: #fff;
  color: #1a2434;
  font-weight: 700;
  min-height: 48px;
}
.auth-ecom-social-btn:hover {
  background: #f8fbff;
}
.auth-ecom-social-alt {
  text-align: center;
  font-size: 13px;
  color: #33507a;
  font-weight: 700;
}
.auth-ecom-divider {
  position: relative;
  text-align: center;
  margin: 4px 0;
}
.auth-ecom-divider:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #dde5ef;
}
.auth-ecom-divider span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  color: #6c7f9d;
  font-weight: 600;
}
.auth-ecom-label {
  font-size: 17px;
  color: #1f2c3e;
  font-weight: 700;
  gap: 8px;
}
.auth-ecom-label input {
  min-height: 50px;
  border-radius: 10px;
}
.auth-ecom-password {
  position: relative;
}
.auth-ecom-password input {
  padding-right: 44px;
  width: 100%;
}
.auth-eye-btn {
  border: 0;
  background: transparent;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #506382;
  padding: 2px 4px;
}
.auth-ecom-forgot {
  margin: -2px 0 2px;
  text-align: right;
  color: #526887;
  font-weight: 600;
}
.auth-ecom-submit {
  min-height: 50px;
  font-size: 22px;
}
.auth-ecom-bottom {
  margin: 6px 0 0;
  text-align: center;
  color: #2f3e55;
  font-size: 16px;
  font-weight: 600;
}
.auth-ecom-bottom a {
  color: #0d2341;
  text-decoration: underline;
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #344054;
}

input,
select,
textarea,
.form-control,
.form-select {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: #8fb3ff;
  box-shadow: 0 0 0 3px rgba(15, 91, 217, 0.14);
}

.error, .success, .hint {
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}
.error { background: #fff1f2; color: #a3202f; border: 1px solid #fecdd3; }
.success { background: #ecfdf4; color: #0f7a4f; border: 1px solid #bbf7d0; }
.hint { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.footer {
  text-align: center;
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.global-page-loader {
  position: fixed;
  inset: 0;
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.global-page-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-page-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 251, 0.72);
  backdrop-filter: blur(6px);
}

.global-page-loader__dialog {
  position: absolute;
  top: 50%;
  left: calc(50% + 141px);
  transform: translate(-50%, -50%);
  min-width: 164px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-2);
}

.global-page-loader__spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(82, 183, 136, 0.22);
  border-top-color: var(--primary);
  animation: vaaprex-loader-spin 0.8s linear infinite;
}

.global-page-loader__text {
  font-size: 14px;
  font-weight: 800;
  color: #21466a;
}

body.is-page-loading {
  cursor: progress;
}

body.is-page-loading .app-main {
  user-select: none;
}

@keyframes vaaprex-loader-spin {
  to { transform: rotate(360deg); }
}

.sidebar {
  width: 282px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1045;
}

.sidebar .offcanvas-header {
  min-height: 68px;
  background: #ffffff;
}

.sidebar .firm {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

.sidebar-menu-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.sidebar-menu-scroll::-webkit-scrollbar {
  width: 8px;
}

.sidebar-menu-scroll:hover::-webkit-scrollbar-thumb,
.sidebar-menu-scroll:focus-within::-webkit-scrollbar-thumb {
  background: #c4d2e5;
  border-radius: 999px;
}

.menu-group-title {
  margin-top: 10px;
  margin-bottom: 3px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #90a0b8;
  font-weight: 800;
}

.sidebar a {
  padding: 10px 12px;
  border-radius: 11px;
  color: #344054;
  font-weight: 700;
  transition: 0.15s ease;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-label {
  display: inline-block;
}

.menu-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar a.active,
.sidebar a:hover {
  background: #f0faf4;
  color: #0f5132;
  box-shadow: inset 0 0 0 1px #ccebd9;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 20px;
  background: transparent;
}

.workspace-top {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}

.loading-overlay-allowed {
  position: relative;
  z-index: 1055;
}

.glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(216, 226, 239, 0.8);
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
  transform: scale(1.015);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
  border-color: rgba(173, 196, 223, 0.95);
}

.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card-premium {
  padding: 14px 16px;
}

.kpi-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.kpi-title-text {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.kpi-value {
  margin: 8px 0 2px;
  font-size: clamp(22px, 2vw, 31px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.kpi-value-neutral { color: #1f3654; }
.kpi-value-success { color: #1a8f5c; }
.kpi-value-danger { color: #c23745; }
.kpi-value-warning { color: #b06f14; }

.kpi-meta {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
}

.kpi-meta-neutral { color: #5f7088; }
.kpi-meta-success { color: #17814f; }
.kpi-meta-danger { color: #ba2c3a; }
.kpi-meta-warning { color: #9d6812; }

.workspace-icon {
  font-size: 14px;
  color: #4b5f7e;
}

.workspace-name {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.app-head h1,
h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.kpi { padding: 14px; border-radius: 13px; box-shadow: var(--shadow-1); }
.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi strong {
  font-size: clamp(25px, 2.15vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #253651;
}

.split-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.panel { overflow: auto; margin-bottom: 12px; }
.panel h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 2vw, 31px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.table,
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table th,
.table td,
th,
td {
  border: 1px solid var(--line);
  border-left-width: 0;
  border-top-width: 0;
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  background: #fff;
}

.table th,
th {
  background: #f6f9ff;
  color: #5d6e88;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.table tr > *:first-child,
tr > *:first-child { border-left-width: 1px; }
.table thead tr:first-child > *,
thead tr:first-child > * { border-top-width: 1px; }
.table tr:first-child th:first-child,
tr:first-child th:first-child { border-top-left-radius: 10px; }
.table tr:first-child th:last-child,
tr:first-child th:last-child { border-top-right-radius: 10px; }
.table tbody tr:last-child td:first-child,
tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
.table tbody tr:last-child td:last-child,
tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }
.table tbody tr:hover td,
tbody tr:hover td { background: #fbfdff; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.inline-form { display: flex; gap: 8px; align-items: center; }
.grid-form.compact { grid-template-columns: repeat(3, minmax(0,1fr)); }

.orders-filter-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr auto auto;
  gap: 10px;
  margin: 10px 0;
  align-items: end;
}

.products-filter-row { grid-template-columns: 2fr 2fr auto; }

.chip-input {
  display: grid;
  gap: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
}

.chip-input label {
  font-size: 12px;
  color: #6b7e9c;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.toggle-check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}

.edit-link {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #344054;
  background: #fff;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  gap: 10px;
}

.rows-form label { display: flex; align-items: center; gap: 8px; }
.pager { color: var(--muted); font-weight: 700; }
.pager-btns { display: flex; gap: 6px; }
.btn.tiny { padding: 6px 10px; font-size: 12px; }
.btn.disabled { opacity: .45; pointer-events: none; }

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #e9eef8;
  color: #425466;
}
.badge.success { background: #dbf7e8; color: #1a8452; }
.badge.warn { background: #fff2d5; color: #9a630d; }
.badge.danger { background: #ffe6e6; color: #bd2323; }

.pos { color: #16824f; font-weight: 800; }
.neg { color: #c63d4d; font-weight: 800; }
.muted-note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.chart-sub { color: var(--muted); margin: 2px 0 14px; }

.userbox {
  margin-top: 12px;
  padding: 11px;
  background: #edf3ff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
}
.userbox span { color: var(--muted); font-size: 12px; }
.account-dropdown { margin-top: auto; }
.sidebar-user-fixed {
  flex: 0 0 auto;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dce4ef;
  background: linear-gradient(180deg, rgba(244, 248, 252, 0) 0%, rgba(244, 248, 252, 0.96) 28%);
}
.account-dropdown .userbox { width: 100%; text-align: left; }
.account-dropdown .dropdown-toggle::after { margin-left: auto; }
.userbox-top { display: flex; align-items: center; gap: 10px; }
.userbox-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.userbox-meta strong {
  display: block;
  line-height: 1.2;
  font-size: 14px;
}
.user-email-line {
  display: block;
  line-height: 1.2;
  margin-top: 2px;
  color: #5e6c83;
  font-size: 12px;
  word-break: break-all;
}
.avatar-circle {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.navbar-brand span {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  max-width: 100%;
  height: auto;
}

.nav-logo {
  height: 38px;
  width: auto;
  max-width: 220px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.side-logo {
  height: 32px;
  width: auto;
  max-width: 170px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.brand-fallback {
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #0b1118;
  background: linear-gradient(135deg, #dff6ff 0%, #ffffff 100%);
  border: 1px solid #cae9f5;
}
.account-dropdown .dropdown-menu {
  border-radius: 11px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.account-dropdown .dropdown-item { font-weight: 700; }

.readonly-field {
  background: #f2f4f8;
  color: #344054;
}

.bulk-edit-row { background: #fffdf5; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 36, 0.48);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}

.modal-card {
  width: min(660px, 95vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  padding: 18px;
}
.modal-card h2 { margin: 0 0 6px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.chart-wrap {
  width: 100%;
  min-height: 330px;
}

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

.btn.btn-primary {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  border-color: var(--primary-600);
}

/* SaaS UI refresh: cleaner enterprise layout without touching functionality */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #0f172a;
  --muted: #475467;
  --line: #e4e7ec;
  --primary: #52b788;
  --primary-600: #3da772;
  --primary-soft: #edf8f1;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow-1: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 20px 48px rgba(15, 23, 42, 0.2);
}

body {
  background: #f5f7fb;
}

.sidebar {
  width: 268px;
  background: #ffffff;
  border-right: 1px solid #e4e7ec;
}

.sidebar .offcanvas-header {
  min-height: 74px;
  background: #ffffff;
}

.menu-link {
  border: 1px solid transparent;
}

.sidebar a {
  color: #344054;
  font-weight: 700;
}

.sidebar a.active,
.sidebar a:hover {
  background: #f0faf4;
  color: #0f5132;
  box-shadow: none;
  border-color: #ccebd9;
}

.workspace-top {
  min-height: 68px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 12px 16px;
}

.workspace-name {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  color: #1b2a41;
}

.app-main {
  padding: 18px;
}

.app-head h1,
h1 {
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.05;
}

.panel,
.card,
.hero-card,
.auth-card,
.kpi {
  border: 1px solid #dbe3ee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.panel {
  border-radius: 14px;
}

.panel,
.card,
.kpi,
.chip-input,
.toggle-check,
.table-responsive {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(216, 226, 239, 0.8);
  border-radius: 14px;
}

.table-responsive {
  border-radius: 12px;
}

.kpi {
  background: #fff;
}

.kpi span {
  color: #627188;
  letter-spacing: 0.02em;
}

.kpi strong {
  color: #16243a;
}

.orders-filter-row,
.products-filter-row {
  gap: 12px;
}

.chip-input,
.toggle-check {
  background: #f8fbff;
  border-color: #dbe5f1;
}

.btn {
  border-radius: 10px;
  font-weight: 700;
  padding: 10px 14px;
}

.btn.secondary {
  background: #111827;
}

.btn.secondary:hover {
  background: #1f2937;
}

table,
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-responsive {
  overflow: auto;
}

.table thead th,
table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.table.table-striped tbody tr:nth-child(odd) td,
table.table-striped tbody tr:nth-child(odd) td {
  background: rgba(252, 253, 255, 0.96);
}

.return-audit-table-wrap {
  display: block;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 72vh;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  position: static;
}

.return-audit-table {
  min-width: 1280px;
  width: 1280px;
  max-width: none;
  table-layout: auto;
  background: #fff;
}

.return-audit-table thead th,
.return-audit-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fbff;
  color: #667085;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 #dbe4ef;
}

.return-audit-table td {
  display: table-cell;
  background: #fff;
  color: #16243a;
  white-space: nowrap;
}

.return-audit-table thead {
  display: table-header-group;
}

.return-audit-table tbody {
  display: table-row-group;
}

.return-audit-table tr {
  display: table-row;
}

.return-audit-table th,
.return-audit-table td {
  opacity: 1;
  visibility: visible;
}

.return-audit-table tbody tr:nth-child(odd) td {
  background: rgba(252, 253, 255, 0.98);
}

.return-audit-simple-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 72vh;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fff;
}

.return-audit-simple-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.return-audit-simple-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fbff;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #dbe5f1;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 #dbe4ef;
}

.return-audit-simple-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #16243a;
  vertical-align: top;
  white-space: nowrap;
}

.return-audit-simple-table tbody tr:nth-child(odd) td {
  background: rgba(252, 253, 255, 0.98);
}

.return-audit-simple-table tbody tr:hover td {
  background: #f8fbff;
}

th,
.table th {
  background: #f9fafb;
  color: #667085;
  font-weight: 800;
}

tbody tr:hover td,
.table tbody tr:hover td {
  background: #f9fbfb;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-ink {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  transform: scale(0);
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.65);
  animation: ripple-ink 0.5s ease-out;
}

@keyframes ripple-ink {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.modal-backdrop {
  background: rgba(11, 18, 32, 0.52);
}

.modal-card {
  width: min(760px, 96vw);
  border: 1px solid #d9e2ee;
  border-radius: 16px;
  padding: 24px;
}

.modal-card h2 {
  font-size: clamp(20px, 2.2vw, 30px);
  margin-bottom: 10px;
}

.single-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.single-edit-form .modal-actions {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.readonly-field {
  background: #f5f7fb;
  color: #3c4e67;
}

.account-dropdown .userbox {
  background: #f7faff;
  border-color: #dbe5f1;
}

.account-dropdown .dropdown-menu {
  border: 1px solid #dce4ee;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.menu-group-title {
  color: #7e8da8;
}

@media (min-width: 768px) {
  .kpi-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .kpi-cards-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: 1fr; }
  .grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-workflow .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-why-grid { grid-template-columns: 1fr; }
  .lp-v2-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-v2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-v2-faq { grid-template-columns: 1fr; }
  .lp-v2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-top form.ms-auto {
    width: 100%;
    margin-left: 0 !important;
  }
  .workspace-top .form-select {
    width: 100%;
  }
}

@media (max-width: 991px) {
  .app-layout { display: block; }
  .sidebar {
    width: 268px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1045;
  }
  .global-page-loader__dialog {
    left: 50%;
  }
  .sidebar .offcanvas-body { overflow: hidden; }
  .sidebar-menu-scroll { overflow: auto; }
  .sidebar.offcanvas:not(.show) {
    visibility: hidden;
  }
  .sidebar.offcanvas.show {
    visibility: visible;
  }
  .workspace-name { font-size: 23px; }
  .orders-filter-row,
  .products-filter-row,
  .date-top,
  .grid-form,
  .grid-form.compact,
  .filter-row { grid-template-columns: 1fr; }
  .table-footer { flex-direction: column; align-items: flex-start; }
  .single-edit-form { grid-template-columns: 1fr; }
  .orders-filter-row .btn,
  .products-filter-row .btn {
    width: 100%;
  }
  .workspace-top {
    gap: 10px;
  }
  .workspace-name {
    width: 100%;
    font-size: clamp(20px, 5vw, 26px);
  }
  .sidebar-user-fixed {
    position: static;
    background: transparent;
  }
  .menu-link {
    min-height: 42px;
  }
  .app-main {
    padding: 14px;
  }
  .kpi-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .menu-label {
    display: inline-block;
  }
}

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .lp-kpi-row { grid-template-columns: 1fr; }
  .lp-feature-grid,
  .lp-workflow .lp-steps { grid-template-columns: 1fr; }
  .lp-v2-feature-grid,
  .lp-v2-steps,
  .lp-v2-strip,
  .lp-v2-compare { grid-template-columns: 1fr; }
  .lp-v2-hero { grid-template-columns: 1fr; }
  .app-main { padding: 14px; }
  .workspace-top { padding: 10px 12px; }
  .workspace-top .form-control {
    min-width: 0 !important;
    width: 100%;
  }
  .app-head h1,
  h1 {
    font-size: clamp(28px, 9vw, 36px);
  }
  .kpi strong {
    font-size: clamp(22px, 8vw, 30px);
  }
  .panel table,
  .panel .table {
    min-width: 640px;
  }
  .panel,
  .card,
  .hero-card,
  .auth-card { padding: 14px; }
  .auth-ecom-card {
    width: min(94vw, 560px);
    padding: 20px 16px;
  }
  .auth-ecom-title { font-size: 38px; }
  .auth-ecom-subtitle { font-size: 15px; }
  .auth-ecom-label { font-size: 16px; }
  .auth-ecom-submit { font-size: 20px; }
  .kpi-cards-grid { grid-template-columns: 1fr; }
  .kpi-card-premium { padding: 12px 14px; }
  .kpi-value { font-size: clamp(20px, 8vw, 28px); }
}

.dark body,
html.dark body {
  background: linear-gradient(180deg, #0b1220 0%, #0b1324 100%);
}

html.dark .sidebar {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-right-color: #1f2a3a;
}

html.dark .global-page-loader__backdrop {
  background: rgba(10, 15, 26, 0.7);
}

html.dark .global-page-loader__dialog {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(44, 66, 104, 0.9);
}

html.dark .global-page-loader__text {
  color: #e2edff;
}

html.dark .sidebar .offcanvas-header,
html.dark .workspace-top,
html.dark .panel,
html.dark .card,
html.dark .kpi,
html.dark .auth-card,
html.dark .hero-card {
  background: #0f172a;
  border-color: #1f2a3a;
  color: #e5edf7;
}

html.dark .sidebar a {
  color: #c8d8ef;
}

html.dark .sidebar a.active,
html.dark .sidebar a:hover {
  background: #172339;
  color: #f0f7ff;
  border-color: #2c4268;
}

html.dark .kpi-title-text { color: #9cb2cf; }
html.dark .kpi-value-neutral { color: #e2edff; }
html.dark .kpi-meta-neutral { color: #a9bfdc; }
html.dark body {
  background:
    radial-gradient(920px 420px at 10% -12%, rgba(51, 103, 171, 0.3) 0%, rgba(51, 103, 171, 0) 60%),
    radial-gradient(880px 440px at 100% -10%, rgba(29, 78, 216, 0.23) 0%, rgba(29, 78, 216, 0) 58%),
    linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

html.dark .panel,
html.dark .card,
html.dark .kpi,
html.dark .chip-input,
html.dark .toggle-check,
html.dark .table-responsive,
html.dark .glass-card {
  background: rgba(16, 25, 41, 0.78);
  border-color: rgba(45, 63, 91, 0.86);
}

html.dark .table.table-striped tbody tr:nth-child(odd) td,
html.dark table.table-striped tbody tr:nth-child(odd) td {
  background: rgba(20, 33, 54, 0.82);
}

html.dark .table th,
html.dark .table td,
html.dark th,
html.dark td {
  background: #0f172a;
  border-color: #263246;
  color: #d8e3f4;
}

html.dark .table th,
html.dark th {
  background: #152136;
  color: #9fb2cf;
}

@media (max-width: 480px) {
  .auth-wrap {
    padding: 12px;
  }
  .auth-ecom-card {
    padding: 16px 12px;
    border-radius: 12px;
  }
  .auth-ecom-title {
    font-size: 32px;
  }
  .btn,
  .form-control,
  .form-select,
  input,
  select {
    min-height: 44px;
  }
  .panel table,
  .panel .table {
    min-width: 560px;
  }
}

/* Final responsive hardening for app pages */
@media (max-width: 1024px) {
  .app-layout {
    display: block;
  }

  .app-main {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .workspace-top {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .workspace-top .d-flex,
  .workspace-top form {
    flex-wrap: wrap;
  }

  .workspace-top .form-select,
  .workspace-top .form-control {
    min-width: 0 !important;
    width: 100%;
  }

  .orders-filter-row,
  .products-filter-row,
  .grid-form,
  .date-top {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .orders-filter-row .btn,
  .products-filter-row .btn,
  .grid-form .btn {
    width: 100%;
  }

  .table-responsive,
  .overflow-x-auto {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 760px;
  }
}

@media (max-width: 640px) {
  .panel,
  .card,
  .glass-card,
  .auth-card,
  .hero-card {
    padding: 12px !important;
  }

  .table-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .table-footer form,
  .table-footer .btn,
  .table-footer .pager-btns .btn {
    width: 100%;
  }
}

/* Header and account simplification */
.workspace-top-shell {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.workspace-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workspace-firm-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.88);
  min-width: 0;
}

.workspace-firm-lines {
  min-width: 0;
}

.workspace-firm-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: #26384f;
}

.workspace-meta-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.workspace-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.workspace-controls .form-select {
  min-width: 148px;
}

.workspace-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sidebar-account-links {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.sidebar-account-links .menu-link {
  border-radius: 10px;
  border: 1px solid #dce4ef;
  background: #f8fbff;
  min-height: 38px;
}

.sidebar-account-links .menu-link:hover,
.sidebar-account-links .menu-link.active {
  background: #eef7ff;
  box-shadow: inset 0 0 0 1px #cfe0f3;
}

@media (max-width: 991px) {
  .workspace-top-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .workspace-controls {
    width: 100%;
  }
  .workspace-controls form,
  .workspace-controls .btn {
    flex: 1 1 180px;
  }
  .workspace-controls .form-select {
    width: 100%;
    min-width: 0;
  }
  .workspace-tools {
    justify-content: flex-start;
  }
  .dashboard-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-modern-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-showcase__head {
    flex-direction: column;
  }
  .dashboard-status-panel {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 0.85fr);
    align-items: center;
  }
  .growth-lab-head,
  .growth-lab-teaser {
    flex-direction: column;
    align-items: stretch;
  }
  .growth-lab-teaser__actions {
    justify-items: start;
  }
  .growth-lab-teaser__pill-group {
    justify-content: flex-start;
  }
  .growth-lab-summary-grid,
  .growth-lab-top-picks__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .workspace-top {
    padding: 10px 12px;
  }
  .workspace-top > .w-full {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .workspace-top-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "context tools"
      "controls controls";
    align-items: start;
    gap: 10px;
  }
  .workspace-context {
    grid-area: context;
    align-items: flex-start;
  }
  .workspace-tools {
    grid-area: tools;
    justify-content: flex-end;
    align-self: start;
  }
  .workspace-controls {
    grid-area: controls;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .workspace-controls form {
    min-width: 0;
    margin: 0;
    width: 100%;
  }
  .workspace-controls form {
    display: block !important;
  }
  .workspace-controls .form-select {
    width: 100%;
    min-height: 44px;
  }
  .workspace-controls > .btn,
  .workspace-controls > a.btn {
    align-self: stretch;
    width: auto;
    min-width: 110px;
    min-height: 44px;
    white-space: nowrap;
    justify-content: center;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace-firm-chip {
    align-items: flex-start;
    padding: 8px 10px;
    max-width: 100%;
  }
  .workspace-firm-lines {
    flex: 1 1 auto;
  }
  .workspace-firm-name {
    font-size: 14px;
    line-height: 1.25;
  }
  .workspace-meta-row .badge {
    font-size: 11px;
    padding: 3px 9px;
  }
  .workspace-meta-row {
    gap: 5px;
  }
  .workspace-context .btn {
    min-width: 38px;
    min-height: 38px;
    padding: 8px 10px;
  }
  .dashboard-hero-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero-card {
    padding: 14px;
  }
  .dashboard-hero-card__value {
    font-size: 32px;
  }
  .dashboard-insight-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-insight-strip__value {
    font-size: 20px;
  }
  .dashboard-mini-panel {
    grid-template-columns: 1fr;
  }
  .dashboard-trend-chart {
    min-height: 280px;
  }
  .dashboard-status-chart {
    min-height: 260px;
  }
  .dashboard-status-panel {
    grid-template-columns: 1fr;
  }
  .dashboard-recon-highlights {
    grid-template-columns: 1fr;
  }
  .growth-lab-summary-grid,
  .growth-lab-top-picks__grid {
    grid-template-columns: 1fr;
  }
  .growth-lab-summary-card strong {
    font-size: 32px;
  }
  .growth-lab-teaser,
  .dashboard-showcase {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .workspace-top {
    padding: 10px;
  }
  .workspace-top-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "context tools"
      "controls controls";
    gap: 8px;
  }
  .workspace-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .workspace-controls form {
    width: 100%;
  }
  .workspace-controls > .btn,
  .workspace-controls > a.btn {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace-firm-chip {
    flex: 1 1 auto;
    border-radius: 10px;
    padding: 8px 9px;
  }
  .workspace-firm-name {
    font-size: 13px;
  }
  .workspace-meta-row .badge {
    font-size: 10px;
    padding: 2px 8px;
  }
  .workspace-tools .btn,
  .workspace-context .btn {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 9px;
  }
}

/* Profile popup in top header */
.profile-menu-popup {
  min-width: 240px;
  max-width: min(92vw, 360px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid #dce4ef;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 8px;
  margin-top: 4px;
}

.profile-menu-popup .dropdown-item,
.profile-menu-popup .dropdown-item-text {
  border-radius: 8px;
  padding: 9px 10px;
}

.profile-menu-popup .dropdown-item:hover {
  background: #f2f7ff;
}

.profile-menu-wrap .dropdown-menu {
  right: 0;
  left: auto;
}

.sidebar-user-fixed .account-dropdown > .btn {
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sidebar-user-fixed .account-dropdown > .btn:hover,
.sidebar-user-fixed .account-dropdown > .btn:focus {
  background: #f8fbff;
  border-color: #cfe0f3;
}

.sidebar-profile-popup {
  min-width: 100%;
  margin-bottom: 8px !important;
}

.upload-modal-form {
  grid-template-columns: 1fr !important;
  align-items: stretch;
}

.upload-modal-form label {
  width: 100%;
}

.upload-modal-field-actions {
  flex-wrap: wrap;
}

.upload-modal-field-actions .hint {
  white-space: normal;
}

.upload-dropzone {
  border: 1.5px dashed #b7c6d9;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
  padding: 14px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.upload-dropzone:hover {
  border-color: #7fb697;
  background: linear-gradient(180deg, #f3fcf7 0%, #eef9f3 100%);
}

.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  outline: none;
  border-color: #52b788;
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.18);
  background: linear-gradient(180deg, #effbf5 0%, #e9f7ef 100%);
}

.upload-dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

.upload-dropzone-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.upload-dropzone-name {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  word-break: break-word;
}

.plan-lock-shell {
  position: relative;
}

.plan-lock-content {
  filter: blur(8px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.plan-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 24px 24px;
  background: rgba(245, 247, 251, 0.22);
}

.plan-lock-overlay .panel {
  width: min(980px, 100%);
  box-shadow: var(--shadow-2);
}

html.dark .plan-lock-overlay {
  background: rgba(3, 7, 18, 0.35);
}

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

.dashboard-showcase {
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.28), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-2);
}

.growth-lab-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(82, 183, 136, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-1);
}

.growth-lab-teaser__copy {
  max-width: 760px;
}

.growth-lab-teaser__copy p {
  color: #526984;
  line-height: 1.6;
}

.growth-lab-teaser__actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.growth-lab-teaser__pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.growth-lab-teaser__pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef7f2;
  color: #1a7b53;
  border: 1px solid #d0ead9;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-showcase__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dashboard-showcase__eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6f8d;
  margin-bottom: 4px;
}

.dashboard-showcase__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-hero-card {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-1);
}

.dashboard-hero-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5b6f8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dashboard-hero-card__value {
  margin-top: 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #142d4b;
}

.dashboard-hero-card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: #5e7390;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-hero-card-success .dashboard-hero-card__value {
  color: #15824d;
}

.dashboard-hero-card-danger .dashboard-hero-card__value {
  color: #d13c49;
}

.dashboard-hero-card-warning .dashboard-hero-card__value {
  color: #b7791f;
}

.dashboard-insight-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: var(--shadow-1);
}

.dashboard-insight-strip strong {
  display: block;
  font-size: 17px;
}

.dashboard-insight-strip span {
  color: #526984;
  font-size: 13px;
  font-weight: 600;
}

.dashboard-insight-strip__value {
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-insight-strip-success .dashboard-insight-strip__value,
.dashboard-insight-strip-success strong {
  color: #15824d;
}

.dashboard-insight-strip-danger .dashboard-insight-strip__value,
.dashboard-insight-strip-danger strong {
  color: #d13c49;
}

.dashboard-modern-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-range-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #dbe4ef;
  background: #f7fbff;
  border-radius: 999px;
  padding: 3px;
}

.dashboard-range-tab {
  border: 0;
  background: transparent;
  color: #5f7290;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
}

.dashboard-range-tab.is-active {
  background: #ffffff;
  color: #18385f;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.dashboard-main-panel,
.dashboard-side-panel {
  overflow: hidden;
}

.growth-lab-shell {
  display: grid;
  gap: 16px;
}

.growth-lab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.growth-lab-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.growth-lab-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.growth-lab-summary-card {
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-1);
}

.growth-lab-summary-card__label {
  display: block;
  color: #5b6f8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.growth-lab-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.growth-lab-summary-card small {
  display: block;
  margin-top: 6px;
  color: #5e7390;
  font-size: 13px;
  font-weight: 700;
}

.growth-lab-summary-card.tone-scale strong,
.growth-lab-badge.tone-scale {
  color: #15824d;
}

.growth-lab-summary-card.tone-price strong,
.growth-lab-badge.tone-price {
  color: #b7791f;
}

.growth-lab-summary-card.tone-hold strong,
.growth-lab-badge.tone-hold,
.growth-lab-badge.tone-careful {
  color: #345f93;
}

.growth-lab-summary-card.tone-stop strong,
.growth-lab-badge.tone-stop {
  color: #d13c49;
}

.growth-lab-top-picks {
  display: grid;
  gap: 12px;
}

.growth-lab-top-picks__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.growth-lab-pick-card {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.growth-lab-pick-card.is-empty {
  grid-column: 1 / -1;
}

.growth-lab-pick-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.growth-lab-pick-card__head strong {
  font-size: 18px;
}

.growth-lab-pick-card__head span {
  color: #15824d;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.growth-lab-pick-card__name {
  margin-top: 8px;
  color: #526984;
  font-size: 14px;
  line-height: 1.4;
}

.growth-lab-pick-card__meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.growth-lab-pick-card__meta span {
  border-radius: 999px;
  background: #f4f8fd;
  color: #415877;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.growth-lab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.growth-lab-sku-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.growth-lab-sku-insight-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.report-sku-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.report-sku-insight-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  line-height: 1;
  flex: 0 0 auto;
}

.report-sku-insight-btn i {
  font-size: 0.75rem;
}

.growth-lab-insight-drawer {
  width: min(520px, 100vw);
}

.growth-lab-insight-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #45617e;
  font-size: 14px;
  font-weight: 700;
}

.growth-lab-insight-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.growth-lab-insight-header__sku {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.growth-lab-insight-header__name,
.growth-lab-insight-header__meta,
.growth-lab-insight-note,
.growth-lab-insight-row__meta {
  color: #5b6f8d;
  font-size: 13px;
}

.growth-lab-insight-header__name {
  margin-top: 4px;
}

.growth-lab-insight-header__meta {
  text-align: right;
  font-weight: 700;
}

.growth-lab-insight-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.growth-lab-insight-kpis article,
.growth-lab-insight-block {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-1);
}

.growth-lab-insight-kpis article {
  padding: 12px 14px;
}

.growth-lab-insight-kpis span {
  display: block;
  color: #5b6f8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.growth-lab-insight-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.growth-lab-insight-block {
  padding: 14px;
  margin-bottom: 14px;
}

.growth-lab-insight-block h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.growth-lab-insight-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #edf1f6;
}

.growth-lab-insight-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.growth-lab-insight-row__value {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

.growth-lab-insight-note {
  margin-top: 10px;
  line-height: 1.5;
}

.growth-lab-estimator {
  display: grid;
  gap: 14px;
}

.growth-lab-estimator__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.growth-lab-estimator__controls label span {
  display: block;
  margin-bottom: 6px;
  color: #5b6f8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.growth-lab-estimator__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.growth-lab-estimator__result {
  border: 1px solid #edf1f6;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
}

.growth-lab-estimator__result span {
  display: block;
  color: #5b6f8d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.growth-lab-estimator__result strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.return-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
}

.return-sort-link:hover {
  color: #1f6b49;
  text-decoration: none;
}

.return-sort-link span {
  color: #5f7290;
  font-size: 12px;
  line-height: 1;
}

.report-moneyflow-table-wrap {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid #e3ebf5;
  border-radius: 16px;
  background: #fff;
  max-width: 100%;
}

.report-moneyflow-table {
  margin-bottom: 0;
}

.report-async-mount {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.report-async-mount > .panel {
  margin-bottom: 0;
}

.report-moneyflow-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fbff;
  box-shadow: inset 0 -1px 0 #dbe4ef;
  white-space: nowrap;
}

.report-moneyflow-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #ffffff;
  box-shadow: inset 0 1px 0 #dbe4ef;
}

.report-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
}

.report-sort-link:hover {
  color: #1f6b49;
  text-decoration: none;
}

.report-sort-link span {
  color: #5f7290;
  font-size: 12px;
  line-height: 1;
}

.growth-lab-reason-cell {
  min-width: 280px;
  color: #526984;
  line-height: 1.5;
}

.growth-lab-table td,
.growth-lab-table th {
  vertical-align: top;
}

.dashboard-trend-chart {
  min-height: 360px;
  margin-top: 16px;
}

.dashboard-mini-panel {
  margin-top: 14px;
  border: 1px solid #dce8f5;
  background: linear-gradient(180deg, #f9fcff 0%, #f1f8ff 100%);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: center;
}

.dashboard-mini-panel__eyebrow {
  font-size: 12px;
  color: #5d728f;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-mini-panel__value {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  color: #17395f;
}

.dashboard-mini-panel__meta {
  margin-top: 6px;
  font-size: 13px;
  color: #617590;
  font-weight: 700;
}

.dashboard-mini-panel__meta strong {
  display: block;
  margin-top: 4px;
}

.dashboard-mini-panel__chart {
  min-height: 110px;
}

.dashboard-side-stack {
  display: grid;
  gap: 14px;
}

.dashboard-recon-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dashboard-recon-highlights__card {
  border: 1px solid #dce8f5;
  border-radius: 14px;
  background: #f7fbff;
  padding: 14px;
}

.dashboard-recon-highlights__card span {
  display: block;
  color: #587090;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-recon-highlights__card strong {
  display: block;
  margin-top: 8px;
  color: #17395f;
  font-size: 28px;
  line-height: 1;
}

.dashboard-recon-delta {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  background: #f8fbff;
}

.dashboard-recon-delta.pos {
  border: 1px solid rgba(16, 185, 129, 0.26);
  background: rgba(236, 253, 245, 0.85);
}

.dashboard-recon-delta.neg {
  border: 1px solid rgba(239, 68, 68, 0.22);
  background: rgba(254, 242, 242, 0.88);
}

.dashboard-status-chart {
  min-height: 300px;
}

.dashboard-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.dashboard-status-legend {
  display: grid;
  gap: 8px;
}

.dashboard-status-legend__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dashboard-status-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dashboard-status-legend__label {
  color: #5d718e;
  font-weight: 700;
}

.dashboard-status-legend__item strong {
  color: #16355d;
  font-size: 14px;
}

@media (max-width: 768px) {
  .plan-lock-overlay {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .profile-menu-wrap {
    position: static;
  }
  .profile-menu-wrap .dropdown-menu {
    position: fixed;
    top: 72px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 84px);
  }
  .upload-modal-field-actions {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .upload-modal-field-actions .btn {
    width: 100%;
  }
}
