* {
  box-sizing: border-box;
}

:root {
  --portal-accent: #dd3333;
  --portal-accent-strong: #c32d2d;
  --portal-topbar-bg: #ffffff;
  --portal-filter-font-size: 1.15rem;
  --portal-space-2xs: 0.25rem;
  --portal-space-xs: 0.5rem;
  --portal-space-sm: 0.625rem;
  --portal-space-md: 0.75rem;
  --portal-space-lg: 0.875rem;
  --portal-space-xl: 1rem;
  --portal-space-2xl: 1.125rem;
  --portal-space-3xl: 1.5rem;
  --portal-space-4xl: 2rem;
  --portal-shell-max: 48.75rem;
  --portal-account-max: 60rem;
  --portal-modal-max: 35rem;
  --portal-topbar-offset: 3.75rem;
  --portal-family-tabs-offset: 3.0625rem;
  --portal-control-height: 2.625rem;
  --portal-pill-gap: 0.3125rem;
  --portal-pill-swatch-clearance: 0.125rem;
  --portal-elevated-shadow: 0 -0.3125rem 1.125rem 0.25rem rgba(107, 114, 128, 0.14);
  --portal-topbar-shadow: 0 0.3125rem 1.125rem 0.25rem rgba(107, 114, 128, 0.14);
  --portal-surface-shadow: 0 0 0 0.0625rem #e5e7eb inset;
  --portal-panel-shadow: 0 1.125rem 2.5rem rgba(17, 24, 39, 0.07);
  --portal-toast-shadow: 0 0.625rem 1.5rem rgba(17, 24, 39, 0.12);
  --portal-focus-outline: 0.125rem solid var(--portal-accent);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  background: #f2f2f2;
  color: #111827;
}

body.portal-page {
  overflow-x: hidden;
}

h1 {
  font-size: 1.25rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--portal-space-xs);
  padding: var(--portal-space-sm) var(--portal-space-md);
  min-height: var(--portal-topbar-offset);
  background: var(--portal-topbar-bg);
  color: #111827;
  box-shadow: var(--portal-topbar-shadow);
}

.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-decoration: none;
  pointer-events: auto;
}

.topbar-logo {
  display: block;
  width: auto;
  max-width: min(13.75rem, 56vw);
  max-height: 2.375rem;
}

.topbar-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--portal-space-xs);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--portal-space-xs);
}

.topbar-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--portal-control-height);
  height: var(--portal-control-height);
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #f3f4f6;
  cursor: pointer;
}

.topbar-menu-toggle span {
  display: block;
  width: 1.125rem;
  height: 0.125rem;
  margin: 0.125rem 0;
  border-radius: 999px;
  background: #111827;
}

.topbar-mobile-menu {
  position: absolute;
  top: calc(100% + var(--portal-space-xs));
  right: 0;
  z-index: 65;
  gap: var(--portal-space-xs);
  min-width: 13.75rem;
  padding: var(--portal-space-md);
  border: 0.0625rem solid #d1d5db;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 2rem rgba(17, 24, 39, 0.18);
  display: none;
}

.topbar-mobile-menu[hidden] {
  display: none;
}

.topbar-mobile-menu .btn-secondary,
.topbar-mobile-menu .btn-logout {
  display: block;
  text-align: left;
}

.user-label {
  display: none;
}

.btn-logout,
.btn-secondary {
  text-decoration: none;
  border-radius: 12px;
  padding: var(--portal-space-xs) var(--portal-space-sm);
  font-size: 0.8125rem;
}

.btn-logout {
  background: #1f2937;
  color: white;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.app-shell {
  position: relative;
  max-width: var(--portal-shell-max);
  margin: 0 auto;
  padding-bottom: 5.75rem;
}

.catalog-header {
  position: sticky;
  top: var(--portal-topbar-offset);
  z-index: 30;
  background: #fff;
  border-bottom: 0.0625rem solid #e5e7eb;
  box-shadow: 0 0.375rem 1rem rgba(17, 24, 39, 0.06);
}

.catalog-header-expanded {
  display: grid;
  gap: 0;
  max-height: 10rem;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transform: translateY(0);
  transition: max-height 0.22s ease, opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.family-tabs-shell,
.variant-row-shell {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  background: #fff;
}

.family-tabs-shell::-webkit-scrollbar,
.variant-row-shell::-webkit-scrollbar {
  display: none;
}

.family-tabs {
  display: inline-flex;
  align-items: center;
  gap: var(--portal-space-xs);
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
  padding: var(--portal-space-sm) var(--portal-space-md);
  background: #fff;
}

.tab {
  --catalog-pill-padding-y: 0.6875rem;
  --catalog-pill-line-height: 1;
  border: 0;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--portal-pill-gap);
  padding: var(--catalog-pill-padding-y) 0.875rem;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  text-align: center;
  font-size: var(--portal-filter-font-size);
  line-height: var(--catalog-pill-line-height);
  font-weight: 500;
  text-transform: uppercase;
  color: #111827;
  border-radius: 999px;
}

.tab.active {
  background: var(--portal-accent);
  color: #fff;
}

.variant-row {
  display: inline-flex;
  align-items: center;
  gap: var(--portal-space-xs);
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
  padding: 0 var(--portal-space-md) var(--portal-space-sm);
  background: #fff;
}

.chip {
  --catalog-pill-padding-y: 0.4375rem;
  --catalog-pill-line-height: 1.15;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--portal-pill-gap);
  padding: var(--catalog-pill-padding-y) 0.6875rem;
  background: #e5e7eb;
  color: #111827;
  font-size: var(--portal-filter-font-size);
  line-height: var(--catalog-pill-line-height);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.chip:hover {
  background: #d1d5db;
}

.chip:active {
  transform: translateY(0.0625rem);
}

.chip.active {
  background: var(--portal-accent);
  color: #fff;
}

.chip.active:hover {
  background: var(--portal-accent-strong);
}

.catalog-pill-swatch {
  width: calc((1em * var(--catalog-pill-line-height, 1)) + (var(--catalog-pill-padding-y, 0rem) * 2) - var(--portal-pill-swatch-clearance));
  height: calc((1em * var(--catalog-pill-line-height, 1)) + (var(--catalog-pill-padding-y, 0rem) * 2) - var(--portal-pill-swatch-clearance));
  flex: 0 0 calc((1em * var(--catalog-pill-line-height, 1)) + (var(--catalog-pill-padding-y, 0rem) * 2) - var(--portal-pill-swatch-clearance));
  border-radius: 999px;
  border: 0.0625rem solid rgba(17, 24, 39, 0.14);
  background-color: rgba(255, 255, 255, 0.7);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.catalog-pill-swatch.is-placeholder {
  background-image: none;
}

.catalog-pill-swatch.has-image {
  background-color: #f9fafb;
}

.catalog-pill-label {
  display: block;
}

.tab.active .catalog-pill-swatch,
.chip.active .catalog-pill-swatch {
  border-color: rgba(255, 255, 255, 0.78);
  background-color: rgba(255, 255, 255, 0.18);
}

.catalog-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--portal-space-sm);
  width: 100%;
  border: 0;
  background: #fff;
  color: #111827;
  padding: 0 var(--portal-space-md);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.5rem);
  transition: max-height 0.22s ease, opacity 0.22s ease, transform 0.22s ease, padding 0.22s ease, visibility 0.22s ease;
}

.catalog-compact-bar-copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

.catalog-compact-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.catalog-compact-bar-action {
  flex: 0 0 auto;
  color: var(--portal-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-page.catalog-header-collapsed .catalog-header-expanded {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  pointer-events: none;
}

.portal-page.catalog-header-collapsed .catalog-compact-bar {
  max-height: 3.25rem;
  padding: 0.75rem var(--portal-space-md);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.formats {
  padding: 0;
  display: grid;
  gap: var(--portal-space-sm);
}

.loading {
  display: grid;
  place-items: center;
  min-block-size: clamp(18rem, 52dvh, 28rem);
  padding: clamp(2rem, 6vw, 3.5rem) var(--portal-space-lg);
  text-align: center;
  color: #9ca3af;
}

.loading-inner {
  display: grid;
  justify-items: center;
  gap: var(--portal-space-md);
}

.loading-spinner {
  inline-size: 3rem;
  block-size: 3rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("images/pacman.svg") no-repeat center / contain;
  mask: url("images/pacman.svg") no-repeat center / contain;
}

.loading-spinner-bouncing-ball {
  inline-size: 2.75rem;
  block-size: 2.75rem;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("images/bouncing-ball.svg") no-repeat center / contain;
  mask: url("images/bouncing-ball.svg") no-repeat center / contain;
}

.loading-message {
  max-inline-size: 24rem;
  font-size: clamp(1.125rem, 3vw, 1.35rem);
  line-height: 1.5;
  font-weight: 500;
}

.loading.loading-price-list {
  min-block-size: clamp(14rem, 34dvh, 20rem);
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: var(--portal-space-md);
  box-shadow: var(--portal-surface-shadow);
  position: relative;
}

.first-quote-guide {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(4.9rem + env(safe-area-inset-bottom, 0rem));
  z-index: 44;
  display: grid;
  gap: var(--portal-space-xs);
  width: min(100% - 1.25rem, var(--portal-shell-max));
  margin: 0 auto;
  padding: var(--portal-space-md) var(--portal-space-xl);
  border-radius: 0.875rem;
  background: #fff;
  box-shadow: 0 -0.125rem 1.25rem rgba(17, 24, 39, 0.14);
  animation: firstQuoteCardIn 0.34s ease both;
}

.first-quote-guide[hidden] {
  display: none;
}

.first-quote-guide-dots {
  display: flex;
  justify-content: center;
  gap: 0.3125rem;
}

.first-quote-guide-dots span {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 999px;
  background: #ddd;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.first-quote-guide-dots span.active {
  width: 0.875rem;
  background: #d42027;
}

.first-quote-guide strong {
  color: #1b2a4a;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.first-quote-guide p {
  margin: 0;
  color: #777;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.first-quote-guide-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin-top: var(--portal-space-2xs);
  padding: var(--portal-space-xs) var(--portal-space-sm);
  border-radius: 0.5rem;
  background: #e8f0fe;
}

.first-quote-guide-hint[hidden] {
  display: none;
}

.first-quote-guide-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.0625rem;
  border: 0.09375rem solid #1a56db;
  border-radius: 999px;
  color: #1a56db;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.first-quote-guide-hint span:last-child {
  color: #1a56db;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

.first-quote-guide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--portal-space-md);
  margin-top: var(--portal-space-2xs);
}

.first-quote-guide-skip {
  border: 0;
  padding: 0;
  background: transparent;
  color: #777;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.first-quote-guide-foot span {
  color: #b7b7b7;
  font-size: 0.6875rem;
}

.first-quote-welcome {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: var(--portal-space-xl);
  background: rgba(27, 42, 74, 0.62);
}

.first-quote-welcome[hidden] {
  display: none;
}

body.portal-onboarding-open {
  overflow: hidden;
}

.first-quote-welcome-card {
  display: grid;
  justify-items: center;
  gap: var(--portal-space-xs);
  width: min(100%, 19.375rem);
  max-height: min(90dvh, 42rem);
  overflow: auto;
  padding: 1.75rem 1.375rem;
  border-radius: 1.25rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 1.5rem 4rem rgba(17, 24, 39, 0.24);
  animation: firstQuoteCardIn 0.38s ease both;
}

.first-quote-welcome-card h1,
.first-quote-welcome-card p {
  margin: 0;
}

.first-quote-welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--portal-space-xs);
  border-radius: 0.6875rem;
  background: #d42027;
  color: #fff;
}

.first-quote-welcome-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.first-quote-welcome-card h1 {
  color: #1b2a4a;
  font-size: 1.125rem;
  line-height: 1.25;
}

.first-quote-welcome-card p,
.first-quote-welcome-card li {
  color: #777;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.first-quote-welcome-list {
  display: grid;
  gap: var(--portal-space-xs);
  justify-self: stretch;
  margin: var(--portal-space-md) 0 var(--portal-space-lg);
  padding: 0 var(--portal-space-xs);
  list-style: none;
  text-align: left;
}

.first-quote-welcome-list li {
  position: relative;
  padding-left: 1.5rem;
  color: #1b2a4a;
}

.first-quote-welcome-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #e8f5e9;
  box-shadow: inset 0 0 0 0.0625rem #2e7d32;
}

.first-quote-welcome-list li::after {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0.4375rem;
  width: 0.375rem;
  height: 0.1875rem;
  border-left: 0.09375rem solid #2e7d32;
  border-bottom: 0.09375rem solid #2e7d32;
  transform: rotate(-45deg);
}

.first-quote-skip {
  width: 100%;
  border: 0;
  background: transparent;
  color: #4b5563;
  font: inherit;
  font-weight: 700;
  padding: var(--portal-space-sm);
  cursor: pointer;
}

.first-quote-skip:disabled {
  cursor: wait;
  opacity: 0.65;
}

.quote-confidence-copy {
  display: grid;
  gap: var(--portal-space-xs);
  margin-top: var(--portal-space-sm);
  padding: var(--portal-space-sm) var(--portal-space-md);
  border: 0.0625rem solid rgba(46, 125, 50, 0.15);
  border-radius: 0.625rem;
  background: #e8f5e9;
}

.quote-confidence-copy strong {
  color: #2e7d32;
  font-size: 0.8125rem;
}

.quote-confidence-copy ul {
  display: grid;
  gap: var(--portal-space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.quote-confidence-copy li {
  position: relative;
  padding-left: 1.25rem;
  color: #1b5e20;
  font-size: 0.75rem;
  line-height: 1.3;
}

.quote-confidence-copy li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.1875rem;
  width: 0.5rem;
  height: 0.25rem;
  border-left: 0.09375rem solid #2e7d32;
  border-bottom: 0.09375rem solid #2e7d32;
  transform: rotate(-45deg);
}

@keyframes firstQuoteCardIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

details summary {
  list-style: none;
  font-weight: 700;
  cursor: pointer;
}

details summary::-webkit-details-marker {
  display: none;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--portal-space-md) 0;
  border-top: 0.0625rem solid #f3f4f6;
  gap: var(--portal-space-xs);
  min-width: 0;
}

.item-row > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.item-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.item-row small {
  display: block;
  color: #374151;
  overflow-wrap: anywhere;
}

.stepper {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 999px;
  min-width: 8.875rem;
  justify-content: space-between;
  gap: var(--portal-space-2xs);
  padding: var(--portal-space-2xs);
  flex: 0 0 auto;
  touch-action: manipulation;
}

.stepper button {
  width: 1.875rem;
  height: 1.875rem;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.stepper button:hover {
  background: #d1d5db;
}

.stepper button:active {
  background: #cbd5e1;
}

.stepper-input {
  appearance: textfield;
  width: 3.25rem;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.375rem var(--portal-space-2xs);
  text-align: center;
}

.stepper-input:focus {
  outline: var(--portal-focus-outline);
  outline-offset: 0.0625rem;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quote-bar-shell {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 45;
  transform-origin: center bottom;
  will-change: transform;
}

.quote-bar {
  background: var(--portal-accent);
  color: #fff;
  border: 0;
  padding: calc(var(--portal-space-lg) + 0.8125rem) var(--portal-space-xl) var(--portal-space-lg);
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  width: 100%;
  box-shadow: var(--portal-elevated-shadow);
}

.quote-bar-handle {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border: 0.125rem solid #fff;
  border-radius: 999px;
  background: var(--portal-accent);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--portal-elevated-shadow);
  cursor: pointer;
}

.quote-bar-handle:hover {
  background: var(--portal-accent-strong);
}

.quote-bar-handle:active {
  transform: translate(-50%, -46%);
}

.quote-bar b {
  background: #fff;
  color: var(--portal-accent);
  border-radius: 999px;
  padding: 0.0625rem var(--portal-space-xs);
}

.quote-bar-shell.attention {
  animation: quoteBarAttention 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 61;
}

.quote-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -95dvh;
  width: 100%;
  max-width: 100vw;
  height: min(80dvh, 50rem);
  background: #fff;
  border-radius: 14px 14px 0 0;
  z-index: 60;
  transition: bottom 0.22s ease;
  overflow: hidden;
  padding: 0;
  box-shadow: var(--portal-elevated-shadow);
}

.quote-drawer.open {
  bottom: 0;
}

.quote-drawer.attention {
  animation: quoteDrawerAttention 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.quote-drawer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: var(--portal-space-lg) var(--portal-space-lg) calc(var(--portal-space-lg) + env(safe-area-inset-bottom, 0rem));
  overflow: hidden;
  color: #111827;
}

.quote-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quote-drawer-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--portal-space-xs);
  cursor: pointer;
}
.drawer-header button {
  border: 0;
  background: transparent;
  font-size: 1.625rem;
  cursor: pointer;
}
.drawer-field-group {
  display: grid;
  gap: var(--portal-space-sm);
}

.address-postcode-group {
  grid-template-columns: 1fr 5.5rem;
  align-items: end;
}

.address-postcode-group .drawer-field {
  margin: 0;
}

.address-row {
  margin-top: 0;
  position: relative;
}

.address-row input {
  width: 100%;
  max-width: 100%;
  border: 0.0625rem solid #d1d5db;
  border-radius: 10px;
  padding: var(--portal-space-sm);
  font-size: 1rem;
  font-family: inherit;
  line-height: inherit;
}

.postcode-field input {
  width: 100%;
  border: 0.0625rem solid #d1d5db;
  border-radius: 10px;
  padding: var(--portal-space-sm);
  font-size: 1rem;
  font-family: inherit;
  line-height: inherit;
  text-align: center;
  letter-spacing: 0.08em;
}

.postcode-field input:focus {
  outline: var(--portal-focus-outline);
  outline-offset: 0.0625rem;
  border-color: var(--portal-accent);
}

.drawer-field-help {
  color: #6b7280;
  font-size: 0.75rem;
  margin-top: var(--portal-space-2xs);
}

.address-suggestions {
  position: fixed;
  z-index: 9999;
  display: grid;
  gap: 0;
  padding: 0.375rem;
  border: 0.0625rem solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0.875rem 1.75rem rgba(17, 24, 39, 0.12);
  max-height: 15rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.address-suggestions[hidden] {
  display: none;
}

.address-suggestion {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.625rem 0.75rem;
  background: transparent;
  color: #111827;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(221, 51, 51, 0.1);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.address-suggestion:hover,
.address-suggestion:focus {
  background: #f3f4f6;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--portal-space-md) var(--portal-space-xl);
  background: #f9fafb;
  border-top: 0.0625rem solid #e5e7eb;
}

.pagination-summary {
  font-size: 0.8125rem;
  color: #6b7280;
}

.pagination-actions {
  display: flex;
  gap: var(--portal-space-xs);
}

.quote-items {
  min-width: 0;
  overflow: visible;
}

.quote-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--portal-space-sm) 0;
  border-top: 0.0625rem solid #f3f4f6;
  gap: var(--portal-space-xs);
  min-width: 0;
}

.quote-item > div {
  min-width: 0;
}

.quote-item strong,
.quote-item small {
  overflow-wrap: anywhere;
}

.quote-item small {
  color: #374151;
  display: block;
}

.remove {
  border: 0;
  background: transparent;
  color: var(--portal-accent);
  cursor: pointer;
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  padding: var(--portal-space-2xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.remove:hover {
  background: #fecaca;
}

.remove:active {
  background: #fca5a5;
}

.remove-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background-color: var(--portal-accent);
  -webkit-mask: url("images/trash.svg") no-repeat center / contain;
  mask: url("images/trash.svg") no-repeat center / contain;
}

.totals {
  background: #f9fafb;
  border-radius: 10px;
  padding: var(--portal-space-sm);
  margin: var(--portal-space-xs) 0;
}

.totals > div {
  display: flex;
  justify-content: space-between;
  padding: var(--portal-space-2xs) 0;
}

.gst-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--portal-space-xs);
  cursor: pointer;
}

.gst-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--portal-accent);
}

.gst-toggle span {
  font: inherit;
  color: inherit;
}

.drawer-field {
  display: grid;
  gap: var(--portal-space-xs);
  margin: var(--portal-space-sm) 0 0;
}

.drawer-field span {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

#requiredByDate,
#quoteNotes {
  width: 100%;
  max-width: 100%;
  border: 0.0625rem solid #d1d5db;
  border-radius: 10px;
  padding: var(--portal-space-sm);
  font: inherit;
}

#requiredByDate {
  min-height: var(--portal-control-height);
}

#quoteNotes {
  min-height: 4.375rem;
  resize: vertical;
}
.btn-primary,
button.btn-primary {
  width: 100%;
  margin-top: var(--portal-space-xs);
  border: 0;
  border-radius: 10px;
  padding: var(--portal-space-md);
  background: var(--portal-accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.quote-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.125rem;
  font-size: 1rem;
}

.quote-submit-button:disabled {
  cursor: wait;
  opacity: 0.92;
}

.quote-submit-spinner {
  display: none;
  width: 0.9375rem;
  height: 0.9375rem;
  border: 0.125rem solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: quoteSubmitSpin 0.7s linear infinite;
  flex: 0 0 auto;
}

.quote-submit-button.is-loading .quote-submit-spinner {
  display: inline-block;
}

@keyframes quoteSubmitSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

body.portal-page > .toast {
  position: fixed;
  top: calc(var(--portal-topbar-offset) + var(--portal-space-md));
  left: 50%;
  transform: translateX(-50%);
  background: #e5e7eb;
  color: #111827;
  padding: var(--portal-space-sm) var(--portal-space-lg);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 80;
  box-shadow: var(--portal-toast-shadow);
}
body.portal-page > .toast.show {
  opacity: 1;
}
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--portal-space-sm);
}

.modal-card {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: var(--portal-modal-max);
  max-height: 90dvh;
  overflow: auto;
  padding: var(--portal-space-md);
}

body.portal-page .modal {
  background: rgba(17, 24, 39, 0.45);
}

body.portal-page .portal-variant-modal-card {
  background: #fff;
  color: #111827;
  border: 0.0625rem solid #e5e7eb;
  box-shadow: var(--portal-panel-shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header button {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
}

body.portal-page .portal-variant-modal-card .modal-header button {
  color: #111827;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--portal-space-xs);
  margin-top: var(--portal-space-sm);
}

.portal-variant-grid .chip {
  --catalog-pill-padding-y: 0.5rem;
  --catalog-pill-line-height: 1.25;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  padding: var(--catalog-pill-padding-y) 0.625rem;
  font-size: 0.8125rem;
  line-height: var(--catalog-pill-line-height);
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}

.portal-variant-grid .catalog-pill-swatch {
  margin-top: 0.125rem;
}

@media (max-width: 48rem) {
  body.portal-page.portal-overlay-open {
    overflow: hidden;
  }

  .topbar {
    padding: var(--portal-space-sm) var(--portal-space-md);
  }

  .topbar-actions {
    display: none;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .topbar-mobile-menu {
    width: min(15.625rem, calc(100vw - 1.5rem));
  }

  .topbar-mobile-menu:not([hidden]) {
    display: grid;
  }

  .app-shell {
    padding-bottom: 5.25rem;
  }

  .item-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .item-row > :first-child {
    flex-basis: 100%;
  }

  .stepper {
    width: min(100%, 11rem);
    margin-left: auto;
  }

  .quote-bar {
    font-size: 1rem;
    padding: calc(var(--portal-space-md) + 0.75rem) var(--portal-space-lg) calc(var(--portal-space-md) + env(safe-area-inset-bottom, 0rem));
  }

  .quote-bar-handle {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.375rem;
  }

  .quote-drawer {
    height: min(82dvh, 42.5rem);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--portal-elevated-shadow);
  }

  .quote-drawer-panel {
    padding: var(--portal-space-lg) var(--portal-space-lg) calc(var(--portal-space-2xl) + env(safe-area-inset-bottom, 0rem));
  }

  .account-topbar {
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: var(--portal-space-md);
    padding-bottom: var(--portal-space-md);
  }

  .account-topbar .brand {
    position: static;
    transform: none;
    margin-right: auto;
  }

  .account-topbar .topbar-right {
    flex: 1 1 100%;
    display: grid;
    justify-items: stretch;
    gap: var(--portal-space-sm);
    margin-top: 0;
  }

  .account-topbar .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--portal-space-xs);
  }

  .account-user-label {
    text-align: left;
  }
}

.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  width: min(26.25rem, 92vw);
  padding: var(--portal-space-2xl);
  box-shadow: var(--portal-surface-shadow);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--portal-space-sm);
  justify-content: center;
  margin-bottom: var(--portal-space-lg);
}

.login-brand-logo {
  width: min(16.25rem, 72vw);
  max-width: 16.25rem;
  height: auto;
  max-height: 5.5rem;
  object-fit: contain;
}

.login-brand-title {
  margin: 0;
  text-align: center;
  color: #313131;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.login-forgot-link {
  display: block;
  margin-top: var(--portal-space-sm);
  padding: var(--portal-space-2xs) 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  text-decoration: none;
}

.login-forgot-link:hover,
.login-forgot-link:focus {
  color: #6b7280;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .address-postcode-group {
    grid-template-columns: 1fr 4.5rem;
  }

  .quote-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }

  .quote-item > :last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .login-brand {
    flex-direction: column;
    gap: var(--portal-space-xs);
  }

  .login-brand-logo {
    width: min(13.75rem, 70vw);
    max-height: 4.5rem;
  }

  .account-shell {
    width: min(calc(100vw - 1rem), var(--portal-account-max));
    padding: var(--portal-space-md) 0 var(--portal-space-3xl);
    gap: var(--portal-space-md);
  }

  .account-card {
    border-radius: 16px;
    padding: var(--portal-space-xl);
  }

  .account-section-head,
  .quote-item-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-detail-grid,
  .quote-item-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-topbar .btn-secondary,
  .account-topbar .btn-logout {
    width: 100%;
    text-align: center;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: var(--portal-space-sm);
    padding: var(--portal-space-sm) var(--portal-space-md);
  }

  .history-row-id,
  .history-row-date,
  .history-row-total {
    font-size: 0.8125rem;
  }

  .history-row .history-card-link {
    width: auto;
    padding: 0.4375rem var(--portal-space-sm);
    text-align: center;
  }

  .quote-detail-line,
  .quote-item-line {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .quote-detail-line dd,
  .quote-item-line-total {
    white-space: normal;
  }
}
.login-card form {
  display: grid;
  gap: var(--portal-space-xs);
  margin-top: var(--portal-space-xs);
}

.login-card input {
  border: 0.0625rem solid #d1d5db;
  border-radius: 8px;
  padding: var(--portal-space-sm);
  font-size: 1rem;
}

.login-card button {
  border: 0;
  border-radius: 8px;
  padding: var(--portal-space-sm);
  background: var(--portal-accent);
  color: #fff;
}

.btn-primary:hover,
button.btn-primary:hover,
.login-card button:hover {
  background: var(--portal-accent-strong);
}

.pin-input-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.pin-input-group input[type="tel"] {
  width: 2.75rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border: 0.0625rem solid #d1d5db;
  border-radius: 8px;
  padding: 0;
  -moz-appearance: textfield;
  -webkit-text-security: disc;
  text-security: disc;
}

.pin-input-group input[type="tel"]::-webkit-outer-spin-button,
.pin-input-group input[type="tel"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pin-input-group input[type="tel"]:focus {
  outline: none;
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 0.125rem rgba(221, 51, 51, 0.2);
}

.account-form .pin-input-group {
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

.account-form .pin-input-group input[type="tel"] {
  width: 2.5rem;
  height: 2.75rem;
  font-size: 1.125rem;
}

@keyframes quoteBarAttention {
  0%,
  100% {
    transform: translateY(0);
  }

  24% {
    transform: translateY(-0.875rem);
  }

  52% {
    transform: translateY(0.3125rem);
  }

  76% {
    transform: translateY(-0.375rem);
  }
}

@keyframes quoteDrawerAttention {
  0%,
  100% {
    transform: translateY(0);
  }

  28% {
    transform: translateY(-0.75rem);
  }

  58% {
    transform: translateY(0.25rem);
  }

  80% {
    transform: translateY(-0.3125rem);
  }
}
.notice {
  background: #dcfce7;
  color: #14532d;
  padding: var(--portal-space-xs) var(--portal-space-sm);
  border-radius: 8px;
}

.error {
  background: #fee2e2;
  color: #991b1b;
  padding: var(--portal-space-xs) var(--portal-space-sm);
  border-radius: 8px;
}

.account-page {
  min-height: 100dvh;
  background: linear-gradient(180deg, #f5f6f7 0%, #eceff1 100%);
}

.account-topbar {
  justify-content: flex-end;
}

.account-topbar .topbar-actions {
  display: flex;
}

.account-user-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.account-shell {
  width: min(var(--portal-account-max), calc(100vw - 1.5rem));
  margin: 0 auto;
  padding: var(--portal-space-2xl) 0 2.5rem;
  display: grid;
  gap: var(--portal-space-xl);
}

.account-card {
  background: #fff;
  border-radius: 18px;
  padding: var(--portal-space-2xl);
  border: 0.0625rem solid rgba(209, 213, 219, 0.8);
  box-shadow: var(--portal-panel-shadow);
}

.account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--portal-space-xl);
  margin-bottom: var(--portal-space-lg);
}

.account-section-head h1,
.account-section-head h2,
.account-section-head h3 {
  margin: 0;
}

.account-eyebrow {
  margin: 0 0 var(--portal-space-xs);
  color: var(--portal-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-section-copy {
  margin: 0.375rem 0 0;
  color: #4b5563;
  line-height: 1.55;
}

.account-current-email {
  display: grid;
  gap: var(--portal-space-2xs);
  margin-bottom: var(--portal-space-lg);
  padding: var(--portal-space-md) var(--portal-space-lg);
  border-radius: 14px;
  background: #f9fafb;
  border: 0.0625rem solid #e5e7eb;
}

.account-current-email span,
.history-card-grid dt,
.quote-detail-grid dt,
.quote-item-card-grid dt {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.account-form {
  display: grid;
  gap: var(--portal-space-sm);
}

.account-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.account-form input {
  width: 100%;
  border: 0.0625rem solid #d1d5db;
  border-radius: 12px;
  padding: var(--portal-space-md) var(--portal-space-lg);
  font-size: 1rem;
  background: #fff;
}

.account-form input:focus {
  outline: 0.125rem solid rgba(221, 51, 51, 0.18);
  border-color: var(--portal-accent);
}

.account-form .btn-primary {
  margin-top: var(--portal-space-2xs);
}

.account-empty-state {
  padding: var(--portal-space-2xl);
  border-radius: 16px;
  background: #f9fafb;
  border: 0.0625rem dashed #d1d5db;
  color: #4b5563;
}

.account-empty-state strong {
  display: block;
  margin-bottom: var(--portal-space-2xs);
  color: #111827;
}

.history-list,
.quote-detail-items {
  display: grid;
  gap: var(--portal-space-md);
}

.history-card,
.quote-item-card {
  background: #fcfcfd;
  border: 0.0625rem solid #e5e7eb;
  border-radius: 16px;
  padding: var(--portal-space-xl);
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: var(--portal-space-lg);
  padding: var(--portal-space-md) var(--portal-space-lg);
}

.history-row-id,
.history-row-total {
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 700;
}

.history-row-date {
  color: #6b7280;
  font-size: 0.875rem;
  white-space: nowrap;
}

.history-row-total {
  white-space: nowrap;
}

.history-card-head,
.quote-item-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--portal-space-md);
  margin-bottom: var(--portal-space-lg);
}

.history-card-head h3,
.quote-item-card-head h3 {
  margin: 0;
  font-size: 1.125rem;
}

.history-card-head p,
.quote-item-card-head p {
  margin: var(--portal-space-2xs) 0 0;
  color: #6b7280;
}

.history-card-link {
  width: auto;
  white-space: nowrap;
}

.history-card-grid,
.quote-detail-grid,
.quote-item-card-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--portal-space-md);
}

.history-card-grid div,
.quote-detail-grid div,
.quote-item-card-grid div {
  padding: var(--portal-space-md);
  border-radius: 12px;
  background: #fff;
  border: 0.0625rem solid #edf0f2;
}

.history-card-grid dd,
.quote-detail-grid dd,
.quote-item-card-grid dd {
  margin: 0.375rem 0 0;
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 600;
}

.quote-detail-notes {
  margin-top: var(--portal-space-xl);
  padding: var(--portal-space-lg);
  border-radius: 14px;
  background: #f9fafb;
  border: 0.0625rem solid #e5e7eb;
}

.quote-detail-notes h3 {
  margin: 0 0 var(--portal-space-xs);
}

.quote-detail-notes p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.account-back-link {
  display: inline-flex;
  margin-bottom: var(--portal-space-sm);
  color: var(--portal-accent);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.account-back-link:hover,
.account-back-link:focus {
  color: var(--portal-accent-strong);
}

.account-detail-shell,
.account-detail-section {
  display: grid;
  gap: var(--portal-space-sm);
}

.account-detail-shell h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  line-height: 1.15;
}

.quote-detail-lines {
  display: grid;
  gap: var(--portal-space-xs);
}

.quote-detail-line,
.quote-item-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--portal-space-md);
  padding: var(--portal-space-sm) 0;
  border-bottom: 0.0625rem solid #e5e7eb;
}

.quote-detail-line:first-child,
.quote-item-line:first-child {
  border-top: 0.0625rem solid #e5e7eb;
}

.quote-detail-line dt,
.quote-detail-line span {
  color: #6b7280;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quote-detail-line dd,
.quote-item-line-total {
  margin: 0;
  color: #111827;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

.quote-detail-line-notes {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.quote-detail-line-notes p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.quote-item-line-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem var(--portal-space-md);
  align-items: baseline;
}

.quote-item-line-main strong {
  color: #111827;
  font-size: 0.9375rem;
}

.quote-item-line-main span {
  color: #6b7280;
  font-size: 0.875rem;
}

.admin-page {
  --admin-bg: #101822;
  --admin-surface: #111418;
  --admin-surface-2: #141a22;
  --admin-panel: #1c2530;
  --admin-panel-2: #222b36;
  --admin-border: #28303f;
  --admin-border-soft: #344152;
  --admin-text: #f2f7fb;
  --admin-text-soft: #d6e0ea;
  --admin-muted: #9ca8ba;
  --admin-primary: #1973f0;
  --admin-primary-soft: rgba(25, 115, 240, 0.14);
  --admin-success: #34d399;
  --admin-warn: #f59e0b;
  --admin-danger: #fb7185;
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--admin-text);
  background:
    radial-gradient(circle at top left, rgba(25, 115, 240, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), transparent 26%),
    linear-gradient(180deg, #0f1720 0%, #101822 38%, #0d141c 100%);
}

.admin-page .admin-wrap {
  padding: 24px;
}

.admin-dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  background: rgba(17, 20, 24, 0.94);
  border-right: 1px solid rgba(40, 48, 63, 0.94);
  backdrop-filter: blur(16px);
}

.admin-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--admin-text);
  background: linear-gradient(180deg, rgba(28, 37, 48, 0.9), rgba(20, 26, 34, 0.92));
  border: 1px solid rgba(52, 65, 82, 0.7);
}

.admin-sidebar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--admin-primary), #0f5fcf);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.admin-sidebar-brand strong,
.admin-sidebar-user strong,
.admin-sidebar-card h2 {
  display: block;
}

.admin-sidebar-brand small,
.admin-sidebar-user small,
.admin-sidebar-nav a small {
  color: var(--admin-muted);
}

.admin-sidebar-user,
.admin-sidebar-card,
.hero-panel,
.filter-card,
.panel-card,
.utility-card,
.analytics-header-card {
  background: linear-gradient(180deg, rgba(28, 37, 48, 0.96), rgba(20, 26, 34, 0.98));
  border: 1px solid rgba(52, 65, 82, 0.72);
  box-shadow: 0 22px 56px rgba(3, 8, 15, 0.32);
}

.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
}

.admin-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(25, 115, 240, 0.95), rgba(11, 84, 188, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar-nav a {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--admin-text-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.admin-sidebar-nav a span {
  font-size: 15px;
  font-weight: 700;
}

.admin-sidebar-nav a.active,
.admin-sidebar-nav a:hover {
  background: rgba(28, 37, 48, 0.92);
  border-color: rgba(52, 65, 82, 0.9);
  color: var(--admin-text);
  transform: translateY(-1px);
}

.admin-sidebar-card {
  padding: 16px;
  border-radius: 22px;
}

.admin-sidebar-card h2 {
  margin: 0 0 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--admin-muted);
}

.sidebar-definition-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.sidebar-definition-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.sidebar-definition-list dt {
  color: var(--admin-muted);
}

.sidebar-definition-list dd {
  margin: 0;
  color: var(--admin-text);
  text-align: right;
  font-weight: 600;
}

.admin-sidebar-actions {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.analytics-header-card {
  margin: 24px 24px 0;
  border-radius: 30px;
  padding: 24px 26px;
  display: block;
}

.analytics-header-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.analytics-breadcrumb {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.analytics-breadcrumb span {
  opacity: 0.5;
}

.analytics-header-card h1,
.filter-card-heading h2 {
  margin: 10px 0 0;
  line-height: 1.04;
  color: var(--admin-text);
}

.analytics-header-card h1 {
  font-size: clamp(32px, 4vw, 46px);
  max-width: 14ch;
}

.analytics-header-card p:last-child {
  margin: 12px 0 0;
  max-width: 58ch;
  color: var(--admin-muted);
  line-height: 1.65;
}

.analytics-header-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.quick-preset-chips,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(52, 65, 82, 0.92);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.btn-filter,
.admin-form button,
.promote-user,
.remove-admin,
.disable-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--admin-primary) 0%, #0c60d5 100%);
  box-shadow: 0 16px 28px rgba(25, 115, 240, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-filter:hover,
.admin-form button:hover,
.promote-user:hover,
.remove-admin:hover,
.disable-user:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(25, 115, 240, 0.28);
}

.analytics-shell {
  max-width: 100%;
  margin: 0;
  display: grid;
  gap: 20px;
}

.hero-panel,
.filter-card,
.panel-card,
.utility-card {
  border-radius: 28px;
}

.hero-panel {
  padding: 24px;
  display: grid;
  gap: 22px;
}

.hero-panel-copy {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8ea5bf;
}

.hero-copy {
  max-width: 60ch;
  margin: 0;
  color: var(--admin-muted);
  line-height: 1.65;
}

.hero-metadata,
.metrics-grid,
.dashboard-grid,
.admin-ops-grid,
.detail-metrics {
  display: grid;
  gap: 16px;
}

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

.hero-metadata > div,
.detail-metrics > div,
.metric-card {
  border-radius: 20px;
  border: 1px solid rgba(52, 65, 82, 0.72);
  background: linear-gradient(180deg, rgba(20, 26, 34, 0.98), rgba(16, 24, 34, 0.98));
}

.hero-metadata > div {
  padding: 16px;
}

.hero-metadata span,
.metric-card span,
.detail-metrics span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--admin-muted);
}

.hero-metadata strong,
.metric-card strong,
.detail-metrics strong {
  display: block;
  margin-top: 10px;
  color: var(--admin-text);
}

.hero-metadata strong {
  font-size: 18px;
}

.filter-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.filter-card-inline {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.filter-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.filter-card-heading h2 {
  margin: 6px 0 0;
  font-size: 22px;
  color: var(--admin-text);
}

.filter-grid,
.admin-form {
  display: grid;
  gap: 12px;
}

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

.filter-grid-inline {
  grid-template-columns: repeat(3, minmax(148px, 176px));
  gap: 10px;
}

.users-tab-link {
  flex: 0 0 auto;
}

.filter-grid label {
  display: grid;
  gap: 8px;
}

.filter-grid span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--admin-muted);
}

.filter-grid select,
.filter-grid input,
.admin-form input,
.admin-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(52, 65, 82, 0.86);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(16, 24, 34, 0.94);
  color: var(--admin-text);
  font: inherit;
}

.filter-grid select:focus,
.filter-grid input:focus,
.admin-form input:focus,
.admin-form textarea:focus {
  outline: 2px solid rgba(25, 115, 240, 0.24);
  border-color: rgba(25, 115, 240, 0.92);
}

.admin-form textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.admin-form-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--admin-text-soft);
  font-size: 14px;
}

.admin-form-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #4ade80;
}

.mail-settings-form label {
  display: grid;
  gap: 8px;
}

.mail-settings-form label > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--admin-muted);
}

.preset-chip,
.text-link {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.preset-chip {
  background: rgba(20, 26, 34, 0.92);
  color: var(--admin-text-soft);
}

.preset-chip.active {
  background: var(--admin-primary-soft);
  border-color: rgba(25, 115, 240, 0.84);
  color: #fff;
}

.analytics-tabs {
  display: inline-flex;
  gap: 8px;
  width: fit-content;
  padding: 6px;
  border-radius: 999px;
  background: rgba(20, 26, 34, 0.96);
  border: 1px solid rgba(52, 65, 82, 0.9);
}

.analytics-tabs a {
  text-decoration: none;
  color: var(--admin-muted);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.analytics-tabs a.active {
  background: rgba(25, 115, 240, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(25, 115, 240, 0.4);
}

.analytics-content-grid {
  display: grid;
  gap: 20px;
}

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

.metric-card {
  padding: 20px;
  box-shadow: 0 16px 36px rgba(3, 8, 15, 0.24);
}

.metric-card strong {
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.05;
}

.chart-caption,
.muted-line {
  display: block;
  color: var(--admin-muted);
  font-size: 13px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.92fr);
}

.panel-card,
.utility-card {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2,
.utility-card h3 {
  margin: 6px 0 0;
  color: var(--admin-text);
}

.panel-head h2 {
  font-size: 24px;
}

.utility-card h3 {
  font-size: 22px;
}

.table-wrap {
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(52, 65, 82, 0.82);
  background: rgba(20, 26, 34, 0.94);
}

.admin-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--admin-text-soft);
  background: transparent;
}

.admin-page thead {
  background: rgba(20, 26, 34, 0.98);
}

.admin-page th,
.admin-page td {
  border-bottom: 1px solid rgba(52, 65, 82, 0.66);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.accounts-table th,
.accounts-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.admin-page th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--admin-muted);
  font-weight: 700;
}

.admin-page tbody tr:hover {
  background: rgba(34, 43, 54, 0.94);
}

.table-link,
.text-link {
  color: #7fb1ff;
  font-weight: 700;
  text-decoration: none;
}

.text-link {
  align-self: center;
}

.chart-panel {
  min-height: 420px;
}

.chart-wrap {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 24, 34, 0.98) 0%, rgba(12, 18, 26, 0.98) 100%);
  border: 1px solid rgba(52, 65, 82, 0.84);
  padding: 16px;
}

.chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid-line {
  stroke: rgba(156, 168, 186, 0.22);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-point {
  fill: #f59e0b;
  stroke: rgba(16, 24, 34, 0.95);
  stroke-width: 3;
  transition: transform 0.15s ease, fill 0.15s ease;
}

.chart-point.selected {
  fill: var(--admin-warn);
}

.chart-label {
  fill: var(--admin-muted);
  font-size: 10px;
}

.chart-y-axis-label {
  fill: rgba(156, 168, 186, 0.9);
  font-size: 10px;
  font-weight: 600;
}

.top-users-panel .panel-head {
  margin-bottom: 12px;
}

.top-users-table table {
  font-size: 12px;
}

.top-users-table th,
.top-users-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.chart-caption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-panel {
  margin-top: 2px;
}

.analytics-detail-view {
  display: grid;
  gap: 18px;
}

.detail-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.detail-metrics > div {
  padding: 16px;
}

.detail-metrics strong {
  font-size: 20px;
}

.detail-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-title {
  display: block;
  margin-top: 8px;
  color: var(--admin-text);
  font-size: 24px;
  font-weight: 700;
}

.detail-note-line {
  margin: 0;
  color: var(--admin-text-soft);
  line-height: 1.6;
}

.admin-ops-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.48fr);
}

.mail-settings-card,
.compact-catalog-order-card {
  grid-column: 1 / -1;
}

.mail-settings-card {
  padding: 18px;
}

.mail-settings-stack {
  display: grid;
  gap: 12px;
}

.mail-settings-section {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(52, 65, 82, 0.78);
  background: rgba(15, 21, 29, 0.72);
}

.mail-settings-head,
.mail-template-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.mail-settings-head h3,
.mail-template-head h4 {
  margin: 0;
  color: var(--admin-text);
}

.mail-settings-head h3 {
  font-size: 18px;
}

.mail-template-head h4 {
  font-size: 16px;
}

.mail-settings-head p,
.mail-template-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
}

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

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

.mail-template-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(52, 65, 82, 0.74);
  background: rgba(15, 21, 29, 0.95);
}

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

.mail-template-body {
  display: grid;
  gap: 8px;
}

.mail-template-body textarea {
  min-height: 260px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.mail-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.compact-catalog-order-card {
  padding: 18px;
}

.compact-catalog-order-card .catalog-order-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-catalog-order-card .catalog-order-block {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(52, 65, 82, 0.74);
  background: rgba(15, 21, 29, 0.72);
}

.compact-catalog-order-card .catalog-order-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
}

.compact-catalog-order-card .catalog-order-head h3 {
  margin: 0;
  font-size: 16px;
}

.compact-catalog-order-card .catalog-order-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-catalog-order-card .catalog-order-filter {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: var(--admin-text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compact-catalog-order-card .catalog-order-filter select,
.compact-catalog-order-card .catalog-order-row input {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(52, 65, 82, 0.9);
  background: rgba(11, 17, 24, 0.96);
  color: var(--admin-text);
}

.compact-catalog-order-card .catalog-order-filter select {
  padding: 0 10px;
}

.compact-catalog-order-card .catalog-order-list {
  display: grid;
  gap: 6px;
  padding-block: 2px;
}

.compact-catalog-order-card .catalog-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 14px;
  border: 1px solid rgba(52, 65, 82, 0.78);
  background: rgba(15, 21, 29, 0.95);
  color: var(--admin-text-soft);
  font-size: 13px;
  font-weight: 600;
}

.compact-catalog-order-card .catalog-order-row input {
  width: 100%;
  padding: 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.compact-catalog-order-card .catalog-order-actions {
  display: flex;
  justify-content: flex-end;
}

.catalog-order-save {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(25, 115, 240, 0.2);
}

.catalog-order-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(52, 65, 82, 0.82);
  color: var(--admin-muted);
  background: rgba(15, 21, 29, 0.76);
}

.utility-button {
  margin-top: 14px;
  width: 100%;
}

.admin-page .btn-secondary,
.admin-page .btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(52, 65, 82, 0.9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text);
  background: rgba(28, 37, 48, 0.94);
}

.admin-page .btn-logout {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.26);
  color: #fecdd3;
}

.admin-page .table-pagination.admin-pagination {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 65, 82, 0.9);
  border-radius: 18px;
  background: rgba(15, 21, 29, 0.76);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-page .admin-pagination-summary {
  color: var(--admin-muted);
}

.admin-page .admin-pagination-actions {
  flex-wrap: wrap;
  align-items: center;
}

.admin-page .btn-secondary.admin-pagination-link,
.admin-page .btn-filter.admin-pagination-current {
  min-height: 34px;
  min-width: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.admin-page .btn-filter.admin-pagination-current {
  cursor: default;
  box-shadow: 0 10px 18px rgba(25, 115, 240, 0.18);
}

.admin-page .admin-pagination-ellipsis {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.promote-user,
.edit-user,
.remove-admin,
.disable-user {
  margin-left: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-decoration: none;
}

.promote-user {
  color: #7fb1ff;
}

.remove-admin {
  color: #f59e0b;
}

.edit-user {
  color: #fda4af;
}

.disable-user {
  color: #fda4af;
}

.promote-user:hover,
.edit-user:hover,
.remove-admin:hover,
.disable-user:hover {
  transform: none;
  box-shadow: none;
  text-decoration: underline;
}

.admin-lock-label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-table table {
  font-size: 12px;
}

.import-users-csv-message {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--admin-text-soft);
  white-space: pre-wrap;
}

.import-users-csv-message.is-error {
  color: #fda4af;
}

.import-users-csv-message.is-success {
  color: #9dd6b4;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--admin-muted);
}

.toast {
  top: 28px;
  background: rgba(17, 20, 24, 0.96);
  border: 1px solid rgba(52, 65, 82, 0.9);
  color: var(--admin-text);
}

body.admin-page > .toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.admin-page > .toast.show {
  opacity: 1;
}

.modal {
  background: rgba(6, 10, 16, 0.72);
}

.modal-card {
  background: linear-gradient(180deg, rgba(28, 37, 48, 0.98), rgba(20, 26, 34, 0.98));
  color: var(--admin-text);
  border: 1px solid rgba(52, 65, 82, 0.9);
  box-shadow: 0 28px 70px rgba(3, 8, 15, 0.48);
}

.modal-header button {
  color: var(--admin-text);
}

.modal-wide {
  max-width: 920px;
}

.admin-prices-wrap {
  max-height: 62vh;
  overflow: auto;
  margin-top: 8px;
}

@media (max-width: 1220px) {
  .admin-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(40, 48, 63, 0.94);
  }

  .analytics-header-card {
    margin: 18px 18px 0;
  }

  .dashboard-grid,
  .admin-ops-grid {
    grid-template-columns: 1fr;
  }

  .mail-settings-grid,
  .mail-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-order-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-page .admin-wrap {
    padding: 18px;
  }

  .analytics-header-toolbar,
  .analytics-header-card,
  .panel-head,
  .detail-page-actions,
  .mail-settings-head,
  .mail-template-head,
  .catalog-order-head,
  .filter-card-heading,
  .chart-caption {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-card-inline {
    width: 100%;
    align-items: stretch;
  }

  .mail-settings-grid,
  .mail-template-grid,
  .catalog-order-stack {
    grid-template-columns: 1fr;
  }

  .mail-template-stack {
    grid-template-columns: 1fr;
  }

  .hero-metadata,
  .metrics-grid,
  .detail-metrics,
  .filter-grid,
  .admin-sidebar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-order-filter {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .analytics-header-card {
    margin: 0;
    border-radius: 0 0 28px 28px;
    border-left: 0;
    border-right: 0;
  }

  .analytics-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .analytics-tabs a {
    white-space: nowrap;
  }

  .hero-metadata,
  .metrics-grid,
  .detail-metrics,
  .filter-grid,
  .admin-sidebar-actions {
    grid-template-columns: 1fr;
  }

  .filter-card-inline {
    flex-direction: column;
  }

  .catalog-order-row {
    grid-template-columns: 1fr;
  }

  .admin-page th,
  .admin-page td {
    padding: 12px 14px;
  }

  .metric-card strong {
    font-size: 26px;
  }
}
