:root {
  --bg: #eef3f8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #fff;
  --text: #111827;
  --muted: #667482;
  --line: #d8e1ea;
  --accent: #0f172a;
  --blue: #2563eb;
  --blue-soft: #eff5ff;
  --green: #16a34a;
  --danger: #b91c1c;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 26%),
    linear-gradient(180deg, #f8fbfd 0%, #edf2f7 100%);
}

body {
  padding: 18px;
}

html.storefront-customer-only .view-switcher [data-view="agent"],
html.storefront-customer-only .view-switcher [data-view="care"],
html.storefront-customer-only .view-switcher [data-view="admin"] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
  height: 100vh;
}

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

body.app-loading {
  overflow: hidden;
}

html.portal-fastboot body.app-loading .app-loader {
  display: none;
}

html.portal-fastboot body.app-loading .shell {
  visibility: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  background: #fff;
}

textarea {
  resize: vertical;
}

.shell {
  max-width: 1560px;
  margin: 0 auto;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(120, 211, 255, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.24), transparent 22%),
    linear-gradient(135deg, #071634 0%, #0f2a69 45%, #133b93 100%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader-card {
  width: min(420px, 100%);
  padding: 34px 28px;
  border-radius: 30px;
  text-align: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(3, 10, 28, 0.35);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.app-loader-wordmark {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.app-loader-wordmark span:first-child {
  font-size: clamp(2.4rem, 5.2vw, 3.7rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.98;
  background: linear-gradient(90deg, #ffffff 0%, #fff2b0 45%, #8ad6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: loaderTextFloat 1.25s ease-in-out infinite alternate;
}

.app-loader-wordmark span:last-child {
  font-size: clamp(0.95rem, 1.7vw, 1.15rem);
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.app-loader-title {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.app-loader-pulse {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.app-loader-pulse span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff4bf, #8ad6ff);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
  animation: loaderPulse 0.9s ease-in-out infinite;
}

.app-loader-pulse span:nth-child(2) {
  animation-delay: 0.14s;
}

.app-loader-pulse span:nth-child(3) {
  animation-delay: 0.28s;
}

.app-loader-powered {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.app-loader-powered a {
  color: #fff6c7;
  font-weight: 700;
  text-decoration: none;
}

@keyframes loaderPulse {
  0%, 100% {
    transform: translateY(0) scale(0.86);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
}

@keyframes loaderTextFloat {
  from {
    transform: translateY(0);
    text-shadow: 0 0 18px rgba(138, 214, 255, 0.18);
  }
  to {
    transform: translateY(-2px);
    text-shadow: 0 0 24px rgba(255, 242, 176, 0.24);
  }
}

.local-tenant-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff5d6;
  border: 1px solid #f0d488;
  color: #7a5100;
  font-weight: 700;
  font-size: 0.86rem;
}

.local-tenant-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2a900;
}

.topbar,
.panel,
.modal-card,
.product-card,
.cart-item,
.sale-card,
.agent-card,
.inventory-card,
.muted-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 252, 0.92)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 28%);
}

.topbar > div:first-child {
  min-width: 0;
}

.hub-overview {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.hub-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

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

.hub-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.hub-card-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 42, 105, 0.08);
  color: #0f2a69;
}

.hub-card-staging {
  background: linear-gradient(180deg, rgba(235, 244, 255, 0.98), rgba(255, 255, 255, 0.98));
  border-color: rgba(37, 99, 235, 0.22);
}

.hub-card-agent {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(255, 255, 255, 0.98));
  border-color: rgba(16, 185, 129, 0.24);
}

.hub-card-care {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.98));
  border-color: rgba(249, 115, 22, 0.22);
}

.hub-card-admin {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.98));
  border-color: rgba(124, 58, 237, 0.22);
}

.hub-card.active {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.hub-card strong {
  font-size: 1rem;
}

.hub-card .ghost-button {
  width: 100%;
}

.hub-card-staging .ghost-button {
  border-color: rgba(37, 99, 235, 0.24);
  color: #0f2a69;
}

.hub-card-agent .ghost-button {
  border-color: rgba(16, 185, 129, 0.28);
  color: #0f766e;
}

.hub-card-care .ghost-button {
  border-color: rgba(249, 115, 22, 0.28);
  color: #c2410c;
}

.hub-card-admin .ghost-button {
  border-color: rgba(124, 58, 237, 0.24);
  color: #6d28d9;
}

@media (max-width: 980px) {
  .hub-overview-head {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 640px) {
  .hub-overview-grid {
    grid-template-columns: 1fr;
  }
}

.view-switcher {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mode-tab {
  border-radius: 16px;
  border: 1px solid rgba(211, 220, 232, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.95));
  color: #52627a;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.mode-tab:hover {
  background: linear-gradient(180deg, #ffffff, #f1f6ff);
  border-color: rgba(37, 99, 235, 0.18);
  color: #10233d;
  transform: translateY(-1px);
}

.mode-tab.active {
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  color: #10233d;
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 16px 28px rgba(29, 95, 208, 0.08);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

h2 {
  font-size: 1.4rem;
}

.view-switcher,
.panel-head,
.toolbar,
.summary,
.date-row,
.two-col,
.view-layout,
.split-grid,
.admin-tabs,
.metric-list,
.view-switcher,
.checkbox-row,
.summary-row {
  display: flex;
  gap: 12px;
}

.mode-tab,
.admin-tab,
.care-tab,
.ghost-button,
.stepper-button {
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  color: #1f3250;
  padding: 11px 16px;
  cursor: pointer;
  border: 1px solid rgba(179, 193, 214, 0.9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.mode-tab,
.admin-tab,
.care-tab,
.primary-button,
.ghost-button,
.auth-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-align: center;
}

.mode-tab.active,
.admin-tab.active,
.care-tab.active,
.ghost-button.active {
  background: linear-gradient(135deg, rgba(13, 35, 93, 0.14), rgba(37, 99, 235, 0.18));
  color: #0b1f4d;
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 14px 28px rgba(29, 95, 208, 0.12);
}

.admin-tab:nth-child(1),
.care-tab:nth-child(1) { background: #eff6ff; }
.admin-tab:nth-child(2),
.care-tab:nth-child(2) { background: #f0fdf4; }
.admin-tab:nth-child(3),
.care-tab:nth-child(3) { background: #fff7ed; }
.admin-tab:nth-child(4) { background: #f5f3ff; }
.admin-tab:nth-child(5) { background: #fef2f2; }
.admin-tab:nth-child(6) { background: #ecfeff; }
.admin-tab:nth-child(7) { background: #fefce8; }
.admin-tab:nth-child(8) { background: #f8fafc; }
.admin-tab:nth-child(9) { background: #f3f4f6; }

.primary-button {
  background: linear-gradient(135deg, #0b2d7a, #1d5fd0 55%, #53a7ff 100%);
  color: #fff;
  border-color: transparent;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(29, 95, 208, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.admin-tab:hover,
.care-tab:hover,
.mode-tab:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  box-shadow: 0 20px 34px rgba(29, 95, 208, 0.3);
}

.ghost-button:hover,
.admin-tab:hover,
.care-tab:hover,
.mode-tab:hover {
  border-color: rgba(37, 99, 235, 0.28);
  color: #0f2552;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.toolbar .search-expand {
  flex: 1 1 360px;
  min-width: 280px;
}

.toolbar input[type="date"] {
  flex: 0 0 170px;
  min-width: 170px;
}

.toolbar .ghost-button,
.toolbar select {
  flex: 0 0 auto;
}

.views {
  display: grid;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.customer-app {
  display: grid;
  gap: 18px;
}

.customer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(91, 179, 255, 0.35), transparent 24%),
    linear-gradient(135deg, #0b214f 0%, #164093 45%, #2f79f2 100%);
  color: #fff;
}

.customer-hero .eyebrow,
.customer-hero .muted,
.customer-hero-copy p,
.customer-hero-card p {
  color: rgba(255, 255, 255, 0.82);
}

.customer-hero h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
  max-width: 720px;
}

.customer-hero-copy {
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-copy-muted {
  font-size: 1.04rem;
  max-width: 640px;
}

.hero-pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-location-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.hero-location-shortcuts-head {
  display: grid;
  gap: 4px;
}

.hero-location-shortcuts-head strong {
  font-size: 0.98rem;
}

.hero-location-shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-location-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.hero-location-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #92f2c4;
  box-shadow: 0 0 0 4px rgba(146, 242, 196, 0.16);
}

.hero-location-button:hover,
.hero-location-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.32);
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 600;
}

#customerStorePill {
  background: rgba(255, 244, 191, 0.24);
  border: 1px solid rgba(255, 244, 191, 0.34);
}

.hero-powered,
.payment-powered {
  margin: 12px 0 0;
  font-size: 0.92rem;
}

.hero-powered {
  color: rgba(255, 255, 255, 0.88);
}

.payment-powered {
  color: var(--muted);
}

.hero-powered a,
.payment-powered a {
  font-weight: 700;
  text-decoration: none;
}

.hero-powered a {
  color: #ffffff;
}

.payment-powered a {
  color: #0f2a69;
}

body.portal-single .view-switcher {
  display: none;
}

body.portal-single.portal-agent [data-view-panel="customer"],
body.portal-single.portal-agent [data-view-panel="care"],
body.portal-single.portal-agent [data-view-panel="admin"],
body.portal-single.portal-care [data-view-panel="customer"],
body.portal-single.portal-care [data-view-panel="agent"],
body.portal-single.portal-care [data-view-panel="admin"],
body.portal-single.portal-admin [data-view-panel="customer"],
body.portal-single.portal-admin [data-view-panel="agent"],
body.portal-single.portal-admin [data-view-panel="care"],
body.portal-single.portal-customer [data-view-panel="agent"],
body.portal-single.portal-customer [data-view-panel="care"],
body.portal-single.portal-customer [data-view-panel="admin"] {
  display: none !important;
}

.customer-hero-card {
  display: grid;
  gap: 14px;
}

.hero-mini-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-image-card {
  min-height: 220px;
  padding: 18px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 27, 72, 0.18), rgba(10, 27, 72, 0.72)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1600&auto=format&fit=crop") center / cover no-repeat;
  display: flex;
  align-items: end;
}

.hero-image-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f2a69;
  font-weight: 700;
  font-size: 0.8rem;
}

.hero-image-copy {
  color: #fff;
  display: grid;
  gap: 6px;
  max-width: 260px;
}

.customer-flow {
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: 1fr;
}

.customer-main,
.account-surface,
.cart-surface {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.94));
}

.customer-sidebar {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.customer-toolbar {
  padding: 8px;
  border-radius: 18px;
  background: var(--blue-soft);
}

.customer-discount-row {
  padding: 8px;
  border-radius: 18px;
  background: #f4f7fb;
}

.danger-button {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.auth-grid {
  gap: 10px;
}

.auth-card {
  padding: 14px;
  border-radius: 18px;
  background: #f7faff;
  border: 1px solid #dfe8f4;
}

.auth-card strong {
  display: block;
  margin-bottom: 6px;
}

.auth-action-grid {
  display: grid;
  gap: 10px;
}

.wallet-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.member-heading {
  display: grid;
  gap: 6px;
}

.member-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4bf, #f7d665);
  color: #6a4b00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-input-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
}

.phone-code-select {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.auth-action {
  padding: 14px 16px;
  border-radius: 18px;
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.auth-form-intro {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-switch-row .ghost-button {
  flex: 1 1 180px;
  min-height: 44px;
}

.auth-join {
  background: linear-gradient(135deg, #0f2a69, #2a74f3);
}

.auth-login {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.auth-help {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.auth-code {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.panel {
  padding: 18px;
}

.panel.side {
  position: sticky;
  top: 20px;
}

.panel-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.status-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-size: 0.86rem;
}

.toolbar {
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.compact-toolbar {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.pager-row {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.toolbar input {
  flex: 1;
}

.toolbar > * {
  min-width: 0;
}

.toolbar select,
.toolbar .ghost-button,
.toolbar .primary-button {
  width: auto;
}

.stack,
.form-stack,
.product-grid {
  display: grid;
  gap: 12px;
}

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

.product-card .quantity-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.product-card .quantity-row > * {
  min-width: 0;
}

.product-card {
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 22px;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 54px rgba(15, 23, 42, 0.12);
}

.product-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #143b8f, #3ea7ff);
  display: grid;
  place-items: end start;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-hero-art {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: 18px;
  color: #fff;
}

.product-hero-default,
.product-hero-thirty {
  background: linear-gradient(145deg, #13235e, #234db8 54%, #59aaf7);
}

.product-hero-multi {
  background: linear-gradient(135deg, #0f4aa6, #2d7fe2 55%, #59c3ff);
}

.product-hero-twenty {
  background: linear-gradient(135deg, #1fa65b, #6bde6a 56%, #1fb9cb);
}

.product-hero-fifteen {
  background: linear-gradient(135deg, #d65263, #ff7d88 55%, #ffb25f);
}

.product-hero-ten {
  background: linear-gradient(135deg, #0f766e, #18a999 55%, #7ce2d4);
}

.product-hero-one {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8 58%, #9be7ff);
}

.product-hero-orb,
.product-hero-swoosh {
  position: absolute;
  pointer-events: none;
  opacity: 0.22;
}

.product-hero-orb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.product-hero-orb-a {
  width: 132px;
  height: 132px;
  top: -26px;
  left: -18px;
}

.product-hero-orb-b {
  width: 112px;
  height: 112px;
  right: -10px;
  bottom: 14px;
}

.product-hero-swoosh {
  width: 120%;
  height: 82px;
  left: -10%;
  bottom: 18px;
  border-bottom: 6px solid rgba(255, 205, 77, 0.95);
  border-radius: 0 0 50% 50%;
}

.product-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  align-content: center;
  width: 100%;
  text-align: center;
}

.product-hero-copy em {
  justify-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-hero-copy strong {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 900;
}

.product-hero-copy span {
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
  text-transform: capitalize;
}

.product-hero-copy-thirty {
  gap: 12px;
}

.product-hero-copy-thirty strong {
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
  text-shadow: 0 10px 28px rgba(2, 6, 23, 0.18);
}

.product-hero-copy-thirty span {
  font-size: 1rem;
}

.product-hero-thirty .product-hero-orb-a {
  width: 156px;
  height: 156px;
  top: -34px;
  left: -12px;
}

.product-hero-thirty .product-hero-orb-b {
  width: 138px;
  height: 138px;
  right: -18px;
  bottom: -8px;
}

.product-hero-thirty .product-hero-swoosh {
  height: 96px;
  bottom: 36px;
  border-bottom-width: 5px;
  opacity: 0.3;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
}

.product-meta {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.duration {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.product-meta h3 {
  font-size: 1.02rem;
}

.product-meta .muted {
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.quantity-row,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qty-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-button {
  width: 38px;
  height: 38px;
  padding: 0;
}

.qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
}

.qty-hint {
  font-size: 0.84rem;
  white-space: nowrap;
}

.cart-item,
.sale-card,
.agent-card,
.inventory-card,
.muted-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
}

.inventory-good {
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  border-left: 6px solid #16a34a;
}

.inventory-warn {
  background: linear-gradient(180deg, #fffbeb, #ffffff);
  border-left: 6px solid #d97706;
}

.inventory-danger {
  background: linear-gradient(180deg, #fef2f2, #ffffff);
  border-left: 6px solid #dc2626;
}

.summary {
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.summary-breakdown {
  padding: 8px 0 14px;
}

.summary-breakdown .summary-row {
  padding: 4px 0;
}

.full-width {
  width: 100%;
}

.notice {
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
}

.notice.error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.panel-block {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #f7fafd;
  border: 1px solid var(--line);
}

.portal-login-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.portal-login-close {
  display: none;
  flex: 0 0 auto;
  min-width: 0;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
}

.catalog-layout {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.user-management-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.user-management-grid > .stack {
  min-width: 0;
}

.admin-tabs {
  margin: 16px 0 22px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(201, 212, 228, 0.8);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.94)),
    #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs .admin-tab,
.admin-tabs .care-tab {
  position: relative;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(211, 220, 232, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
  color: #52627a;
  font-weight: 700;
  min-width: max-content;
  padding: 12px 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.admin-tabs .admin-tab::after,
.admin-tabs .care-tab::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 180ms ease, transform 180ms ease;
}

.admin-tabs .admin-tab:hover,
.admin-tabs .care-tab:hover {
  background: linear-gradient(180deg, #ffffff, #f1f6ff);
  border-color: rgba(37, 99, 235, 0.18);
  color: #10233d;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

.admin-tabs .admin-tab.active,
.admin-tabs .care-tab.active {
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  color: #10233d;
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 16px 30px rgba(29, 95, 208, 0.09);
}

.admin-tabs .admin-tab.active::after,
.admin-tabs .care-tab.active::after {
  background: linear-gradient(90deg, #1d5fd0, #43b7ff);
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f2a69, #1d6ee8 60%, #78d3ff);
  color: #fff;
  margin-bottom: 16px;
}

.admin-hero .eyebrow,
.admin-hero .muted {
  color: rgba(255, 255, 255, 0.82);
}

.admin-scope-bar {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7fafd;
  align-items: center;
}

.admin-scope-bar strong {
  flex: 0 0 auto;
}

.admin-scope-bar select {
  flex: 1 1 320px;
  min-width: 240px;
}

.admin-scope-bar .ghost-button {
  flex: 0 0 auto;
}

.admin-scope-bar .muted {
  flex: 1 1 220px;
}

.admin-identity-banner {
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(15, 42, 105, 0.08), rgba(37, 99, 235, 0.12));
  color: #0f2552;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.catalog-guide-card,
.catalog-rollout-card,
.catalog-list-card {
  border-radius: 24px;
}

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

.catalog-guide-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #d9e5f5;
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.catalog-guide-item strong {
  display: block;
  margin-bottom: 8px;
  color: #10233d;
}

.catalog-list-head {
  align-items: flex-start;
}

.catalog-package-card {
  border: 1px solid #dbe6f5;
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.catalog-package-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.catalog-package-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.catalog-package-title .image-thumb {
  flex: 0 0 84px;
}

.catalog-package-title strong {
  font-size: 1.14rem;
}

.catalog-matrix-wrap {
  border: 1px solid #e4ecf7;
  border-radius: 18px;
  overflow: hidden;
}

.catalog-matrix-table {
  min-width: 640px;
}

.catalog-matrix-table th,
.catalog-matrix-table td {
  vertical-align: middle;
}

.catalog-matrix-actions {
  white-space: nowrap;
}

.catalog-matrix-actions .ghost-button {
  margin-right: 8px;
}

.order-modal-card,
#adminProductModal .modal-card {
  width: min(760px, 100%);
}

#agentLogoutButton,
#careLogoutButton,
#adminLogoutButton {
  border-color: rgba(29, 95, 208, 0.22);
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  color: #17345f;
  font-weight: 700;
}

@media (max-width: 1380px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

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

.admin-panel > .split-grid,
.admin-panel > .metric-list,
.admin-panel > .toolbar,
.admin-panel > .date-row,
.admin-panel > .sales-chart,
.admin-panel > .table-scroll,
.admin-panel > .stack {
  margin-bottom: 16px;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table-wrap {
  padding: 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf5;
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: #f6f9fd;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-subtext {
  margin-top: 4px;
  font-size: 0.84rem;
}

.table-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
}

.table-status-completed,
.table-status-active {
  background: rgba(22, 163, 74, 0.12);
  color: #0f8a3f;
}

.table-status-processing,
.table-status-reserved {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.table-status-cancelled,
.table-status-failed,
.table-status-inactive {
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
}

.table-status-onhold,
.table-status-sold,
.table-status-delivered {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.care-panel {
  display: none;
}

.care-panel.active {
  display: block;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-row {
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.metric-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f7fafd;
  border: 1px solid var(--line);
  min-width: 0;
}

.metric-action {
  text-align: left;
  cursor: pointer;
}

.metric-action.active {
  background: linear-gradient(135deg, #0f2a69, #1d6ee8);
  border-color: transparent;
}

.metric-action.active span,
.metric-action.active strong {
  color: #fff;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.metric-card strong {
  font-size: 1.2rem;
  line-break: anywhere;
  overflow-wrap: anywhere;
}

.sales-chart {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

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

.licence-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.licence-page-layout {
  gap: 16px;
}

.licence-upload-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) minmax(220px, 0.9fr);
  gap: 12px;
}

.toolbar select[id$="PageSize"] {
  min-width: 140px;
}

.toolbar select[id*="BulkAction"] {
  min-width: 190px;
}

.toolbar select[id*="ProductFilter"] {
  min-width: 180px;
}

.toolbar input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  padding: 0;
}

.inventory-inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.inventory-inline-grid .inventory-card {
  padding: 16px 18px;
}

.reports-grid,
.licence-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.chart-row {
  display: grid;
  grid-template-columns: 72px 1fr 110px;
  gap: 12px;
  align-items: center;
}

.chart-label,
.chart-value {
  font-size: 0.92rem;
  color: var(--muted);
}

.chart-bar-track {
  height: 12px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d6ee8, #6dc7ff);
}

.compact-head {
  margin-bottom: 6px;
}

.loyalty-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f2a69, #1d6ee8 55%, #6dc7ff);
  color: #fff;
}

.loyalty-card .eyebrow,
.loyalty-card .muted {
  color: rgba(255, 255, 255, 0.78);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
  z-index: 20;
}

.portal-login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.portal-login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98)),
    #fff;
  border: 1px solid rgba(216, 225, 234, 0.94);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -50%);
}

.portal-login-modal .form-stack {
  gap: 10px;
}

.portal-login-modal .portal-login-close {
  display: inline-flex;
}

.modal-card {
  width: min(760px, 100%);
  padding: 22px;
}

.auth-modal-card {
  width: min(520px, 100%);
}

.order-modal-card {
  width: min(1040px, 100%);
}

.order-modal-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
}

.platform-stack > .stack {
  margin-bottom: 12px;
}

#apiConfigForm {
  gap: 10px;
}

.platform-card {
  color: #0f172a;
}

.platform-live-warning {
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.08), rgba(245, 158, 11, 0.12));
  color: #7c3f00;
  border: 1px solid rgba(217, 119, 6, 0.18);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.platform-core {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.platform-comms {
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

.platform-access {
  background: linear-gradient(135deg, #fef3c7, #fff7ed);
}

.secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.secret-stack {
  align-items: end;
}

.secret-field {
  gap: 8px;
}

.secret-row .ghost-button {
  white-space: nowrap;
}

.payment-settings-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.payment-provider-group {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, rgba(239, 245, 255, 0.96), rgba(255, 255, 255, 0.99));
}

.payment-settings-head {
  display: grid;
  gap: 4px;
}

.payment-provider-banner {
  background: linear-gradient(180deg, rgba(15, 42, 105, 0.08), rgba(37, 99, 235, 0.12));
  color: #0f2552;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.payment-provider-details {
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (min-width: 1180px) {
  #apiConfigForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  #apiConfigForm > p,
  #apiConfigForm > .payment-provider-group,
  #apiConfigForm > .two-col,
  #apiConfigForm > select[name="timezone"],
  #apiConfigForm > button {
    grid-column: 1 / -1;
  }

  #apiConfigForm > .payment-settings-group:not(.payment-provider-group) {
    height: 100%;
  }
}

@media (min-width: 1180px) and (max-width: 1600px) {
  body {
    font-size: 15px;
  }

  .topbar {
    padding: 14px 18px;
  }

  .hub-overview {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  #apiConfigForm {
    gap: 8px;
  }

  .payment-settings-group {
    padding: 12px;
    gap: 8px;
  }

  #apiConfigForm input,
  #apiConfigForm select,
  #apiConfigForm textarea,
  #apiConfigForm button {
    min-height: 42px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

.email-setup-form {
  gap: 16px;
}

.email-setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.email-setup-tip,
.email-setup-card,
.email-template-card,
.test-email-card {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #dce5ef;
}

.email-setup-tip {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.field-group {
  gap: 8px;
}

.field-group .eyebrow {
  margin-bottom: 0;
}

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

.email-template-card {
  align-content: start;
  gap: 12px;
}

.email-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #eef4fb);
  border: 1px solid #dce5ef;
}

.email-action-bar .primary-button {
  flex: 0 0 auto;
}

.compact-product-card {
  padding: 16px 18px;
}

.compact-item-row {
  align-items: center;
}

.compact-thumb {
  width: 68px;
  height: 68px;
}

.portal-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  min-width: 260px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(22, 163, 74, 0.96);
  color: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.portal-toast.error {
  background: rgba(185, 28, 28, 0.95);
}

.dashboard-grid-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.portal-dashboard-shell {
  display: grid;
  gap: 16px;
}

.portal-dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 42, 105, 0.06), rgba(29, 110, 232, 0.02)),
    #ffffff;
}

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

.portal-stat-card,
.portal-mini-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
}

.portal-stat-primary {
  background: linear-gradient(135deg, #10233d, #1d5fd0 72%, #74c8ff);
  border-color: transparent;
}

.portal-stat-primary span,
.portal-stat-primary strong,
.portal-stat-primary .muted {
  color: #fff;
}

.portal-stat-card span,
.portal-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-stat-card strong,
.portal-mini-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.55rem;
  color: #10233d;
}

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

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

.portal-dashboard-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
}

.portal-dashboard-card-wide {
  grid-column: 1 / -1;
}

.portal-dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.report-shell {
  display: grid;
  gap: 18px;
}

.report-shell-immersive {
  gap: 20px;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px;
  border-radius: 26px;
  border: 1px solid rgba(201, 212, 228, 0.8);
  background:
    linear-gradient(135deg, rgba(15, 42, 105, 0.04), rgba(37, 99, 235, 0.02)),
    #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.report-hero-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.report-mini-note {
  max-width: 240px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.report-toolbar-card,
.report-card,
.report-stat-card {
  border: 1px solid rgba(201, 212, 228, 0.82);
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
}

.report-toolbar-card {
  padding: 18px 20px;
  border-radius: 22px;
}

.report-toolbar {
  display: grid;
  gap: 14px;
}

.report-toolbar-group {
  display: grid;
  gap: 10px;
}

.report-toolbar-label {
  display: grid;
  gap: 4px;
}

.report-toolbar-label strong {
  color: #10233d;
}

.report-shortcuts,
.report-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.report-shortcuts .ghost-button {
  border-radius: 999px;
  background: #f4f8ff;
  border-color: rgba(201, 212, 228, 0.85);
  min-height: 42px;
}

.report-filters input {
  flex: 1 1 190px;
}

.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.report-stat-card {
  padding: 20px;
  border-radius: 24px;
  min-height: 148px;
}

.report-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.report-stat-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.7rem;
  color: #10233d;
}

.report-stat-card-primary {
  background: linear-gradient(135deg, #0f2a69, #1d5fd0 68%, #7fd8ff);
  border-color: transparent;
}

.report-stat-card-primary span,
.report-stat-card-primary strong,
.report-stat-card-primary .muted {
  color: #fff;
}

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

.report-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
}

.report-card-wide {
  grid-column: 1 / -1;
}

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

.report-card-head strong {
  color: #10233d;
  font-size: 1rem;
}

.report-card-head .muted {
  max-width: 38ch;
}

.report-summary-list {
  gap: 12px;
}

.report-summary-list .sale-card {
  border-radius: 18px;
  border: 1px solid rgba(216, 226, 238, 0.95);
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: none;
}

.report-chart {
  min-height: 220px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(216, 226, 238, 0.9);
  background: linear-gradient(180deg, #fbfdff, #f4f8ff);
}

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

.quality-summary-card {
  border-style: dashed;
}

.quality-issue-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quality-issue-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.quality-issue-high {
  border-color: rgba(185, 28, 28, 0.18);
  background: rgba(254, 242, 242, 0.9);
}

.quality-issue-medium {
  border-color: rgba(180, 83, 9, 0.16);
  background: rgba(255, 247, 237, 0.9);
}

.dashboard-summary-card {
  padding: 18px;
}

.dashboard-summary-card strong {
  display: block;
  margin-bottom: 6px;
}

.table-scroll .notice {
  margin: 12px;
}

.auth-modal-form {
  margin-top: 10px;
}

.auth-modal-notice {
  margin-top: 12px;
  margin-bottom: 6px;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.compact-head {
  align-items: flex-start;
}

.modal-card.narrow {
  width: min(420px, 100%);
  background:
    linear-gradient(rgba(11, 17, 32, 0.82), rgba(11, 17, 32, 0.86)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop")
      center / cover no-repeat;
  color: #fff;
}

.modal-card.narrow .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.success-panel {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.checkout-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.payment-brand-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.payment-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-height: 42px;
  border-radius: 999px;
  background: #f3f7fd;
  color: #17345f;
  font-weight: 700;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.code-value {
  font-size: 1.55rem;
  letter-spacing: 0.03em;
}

.embedded-payment-box {
  min-height: 140px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  overflow: hidden;
}

.image-thumb {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #143b8f, #3ea7ff);
  flex-shrink: 0;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.agent-otp-actions {
  align-items: stretch;
}

.success-panel .sale-card {
  display: grid;
  gap: 10px;
}

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

.success-summary-grid .muted-card {
  padding: 14px;
}

.success-summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  color: #10233d;
}

@media (max-width: 1100px) {
  .customer-hero,
  .customer-flow,
  .view-layout,
  .split-grid,
  .user-management-grid,
  .metric-list,
  .admin-metrics-secondary,
  .portal-dashboard-topline,
  .portal-dashboard-minirow,
  .portal-dashboard-grid,
  .dashboard-mini-grid,
  .report-stat-grid,
  .report-grid,
  .email-setup-hero,
  .email-template-grid {
    grid-template-columns: 1fr;
  }

  .panel.side {
    position: static;
  }

  .customer-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body {
    padding: 10px;
  }

  .portal-login-modal {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 22px;
    transform: none;
  }

  .modal-backdrop {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
  }

  .topbar,
  .panel,
  .modal-card {
    padding: 14px;
  }

  [data-view-panel="agent"] .panel,
  [data-view-panel="care"] .panel,
  [data-view-panel="admin"] .panel {
    padding: 14px;
    border-radius: 22px;
  }

  #apiConfigForm {
    display: grid;
    gap: 10px;
  }

  .shell {
    max-width: 100%;
  }

  .modal-card {
    width: 100%;
    margin: 0 auto;
    max-height: none;
  }

  .admin-hero {
    flex-direction: column;
  }

  .portal-dashboard-hero {
    flex-direction: column;
    padding: 18px;
  }

  .report-hero {
    flex-direction: column;
    padding: 18px;
  }

  .report-hero-actions {
    justify-items: start;
  }

  .report-mini-note {
    max-width: none;
    text-align: left;
  }

  .portal-dashboard-card,
  .portal-stat-card,
  .portal-mini-card,
  .report-card,
  .report-stat-card,
  .report-toolbar-card {
    padding: 16px;
    border-radius: 18px;
  }

  .embedded-payment-box {
    min-height: 220px;
  }

  .checkout-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-list-agent {
    grid-template-columns: 1fr;
  }

  .metric-list-agent .metric-card strong {
    font-size: 1.05rem;
  }

  .topbar,
  .panel-head,
  .summary,
  .date-row {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    gap: 14px;
    border-radius: 22px;
  }

  .topbar > div:first-child {
    width: 100%;
  }

  .topbar h1 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .hero-location-shortcut-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-location-button {
    width: 100%;
    justify-content: center;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .wallet-action-row,
  .hero-pill-row {
    flex-wrap: wrap;
  }

  .toolbar > *,
  .hero-cta-row > *,
  .wallet-action-row > *,
  .success-summary-grid > *,
  .toolbar .ghost-button,
  .toolbar .primary-button,
  .toolbar select,
  .toolbar input,
  .compact-toolbar > * {
    width: 100%;
  }

  .summary-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-tabs {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tabs > * {
    width: auto;
    min-width: 124px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .view-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .view-switcher > * {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .report-shortcuts,
  .report-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-cta-row,
  .wallet-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .phone-input-row {
    grid-template-columns: 1fr;
  }

  .phone-code-select {
    min-height: 48px;
  }

  .licence-upload-toolbar,
  .licence-summary-grid,
  .inventory-inline-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta-row {
    grid-template-columns: 1fr;
  }

  .customer-main .product-grid,
  #agentGrid.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-sidebar {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .email-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .member-title-row {
    align-items: flex-start;
  }

  .email-action-bar .primary-button {
    width: 100%;
  }

  .success-summary-grid {
    grid-template-columns: 1fr;
  }

  .product-meta {
    padding: 12px;
  }

  .auth-switch-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-switch-row .ghost-button,
  .auth-action-grid > * {
    width: 100%;
  }

  .duration {
    font-size: 1.45rem;
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-scope-bar {
    gap: 10px;
    padding: 14px;
  }

  .admin-scope-bar strong,
  .admin-scope-bar select,
  .admin-scope-bar .ghost-button,
  .admin-scope-bar .muted,
  .pager-row,
  .compact-toolbar {
    width: 100%;
  }

  .pager-row {
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head .status-pill,
  .customer-section-head .status-pill {
    width: 100%;
    justify-content: center;
  }

  .admin-table-wrap {
    border-radius: 18px;
  }

  .data-table {
    min-width: 860px;
  }

  .data-table th,
  .data-table td {
    padding: 11px 12px;
  }

  .portal-dashboard-shell,
  .report-shell,
  .stack,
  .form-stack {
    gap: 10px;
  }

  .payment-settings-group {
    padding: 14px;
    border-radius: 18px;
  }

  .panel-block,
  .catalog-package-card,
  .catalog-guide-item,
  .report-stat-card,
  .portal-stat-card {
    overflow-wrap: anywhere;
  }

  .metric-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .toolbar .search-expand,
  .toolbar input[type="date"] {
    flex: 1 1 auto;
    min-width: 0;
  }

  .product-card .quantity-row,
  .compact-item-row,
  .item-row {
    flex-direction: column;
    align-items: stretch;
  }

  .qty-box,
  .checkout-action-row {
    width: 100%;
    justify-content: space-between;
  }

  .portal-toast {
    top: 14px;
    right: 14px;
    left: 14px;
    bottom: auto;
    min-width: 0;
    max-width: none;
  }

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

  .catalog-package-head,
  .catalog-package-title {
    flex-direction: column;
  }

  .catalog-package-title .image-thumb {
    width: 100%;
    max-width: 120px;
  }

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

  .user-management-grid {
    grid-template-columns: 1fr;
  }

  .hub-overview {
    padding: 14px;
    gap: 12px;
  }

  .hub-overview-head h2 {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .hub-overview-head .muted {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .hub-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hub-card {
    padding: 12px;
    gap: 8px;
    border-radius: 18px;
  }

  .hub-card .muted {
    display: none;
  }

  .hub-card .ghost-button {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.88rem;
  }

  .admin-identity-banner {
    margin-bottom: 12px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .portal-login-head {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-login-close {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .customer-main .product-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #agentGrid.product-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card {
    border-radius: 18px;
  }

  .product-image {
    aspect-ratio: 1 / 0.82;
  }

  .product-meta {
    padding: 10px;
    gap: 8px;
  }

  .product-card h3 {
    font-size: 1rem;
    line-height: 1.2;
  }

  .product-card .muted {
    font-size: 0.8rem;
  }

  .duration {
    font-size: 1.15rem;
  }

  .summary-row strong {
    font-size: 0.98rem;
  }

  .hero-location-shortcut-bar {
    grid-template-columns: 1fr;
  }

  .qty-box {
    gap: 8px;
  }

  .stepper-button {
    min-width: 34px;
    min-height: 34px;
  }

  body.portal-single.portal-agent .view-layout,
  [data-view-panel="agent"] .view-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  [data-view-panel="agent"] .panel.side {
    padding-top: 0;
  }

  #agentStorePanel .summary-row,
  #agentSalesList .summary-row,
  #agentCheckoutPanel .summary-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #agentSalesList .sale-card,
  #agentCheckoutPanel .cart-item,
  #agentCheckoutPanel .summary-breakdown,
  #agentCheckoutPanel .toolbar {
    overflow-wrap: anywhere;
  }

  #agentSalesList .sale-card strong {
    font-size: 1rem;
    line-height: 1.25;
  }

  #agentSalesList .sale-card p {
    margin: 0;
    line-height: 1.38;
  }
}

@media (max-width: 560px) {

  .topbar {
    padding: 14px;
  }

  .view-switcher {
    grid-template-columns: 1fr;
  }

  .hub-overview-grid {
    grid-template-columns: 1fr;
  }

  .hub-card strong {
    font-size: 0.96rem;
  }

  .customer-hero {
    padding: 18px;
  }

  .customer-hero h2 {
    font-size: clamp(1.7rem, 9vw, 2.35rem);
  }

  .customer-main .product-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #agentGrid.product-grid {
    grid-template-columns: 1fr;
  }

  .hero-mini-card,
  .hero-image-card {
    min-height: 0;
    padding: 16px;
  }

  .product-meta,
  .cart-item,
  .sale-card,
  .agent-card,
  .inventory-card,
  .muted-card {
    padding: 14px;
  }

  .email-setup-card,
  .email-template-card,
  .test-email-card,
  .email-setup-tip {
    padding: 14px;
  }

  .admin-tabs > * {
    min-width: 116px;
    font-size: 0.92rem;
    padding: 11px 14px;
  }

  [data-view-panel="admin"] .admin-tabs,
  [data-view-panel="care"] .admin-tabs {
    margin: 12px 0 18px;
  }

  .modal-card,
  .auth-modal-card,
  .order-modal-card {
    border-radius: 18px;
  }

  .agent-card,
  .sale-card,
  .inventory-card,
  .panel-block,
  .portal-dashboard-card,
  .report-card {
    border-radius: 16px;
  }

  .data-table {
    min-width: 760px;
  }

  [data-view-panel="agent"] .panel,
  [data-view-panel="agent"] .panel-block,
  [data-view-panel="agent"] .sale-card,
  [data-view-panel="agent"] .cart-item {
    border-radius: 16px;
  }

  #agentStorePanel .toolbar,
  #agentCheckoutPanel .toolbar,
  #agentReportsPanel .toolbar,
  #agentReportsPanel .date-row {
    gap: 10px;
  }

  #agentGrid .product-image {
    aspect-ratio: 1 / 0.72;
  }

  #agentGrid .product-meta {
    gap: 7px;
  }

  #agentGrid .product-card h3 {
    font-size: 0.96rem;
  }

  #agentGrid .product-card .muted,
  #agentSalesList .muted {
    font-size: 0.84rem;
  }

  #agentStoreBadge,
  #agentOtpResetBadge,
  #agentStatus,
  #agentLogoutButton {
    width: 100%;
    justify-content: center;
  }

  [data-view-panel="admin"] .portal-dashboard-topline,
  [data-view-panel="care"] .portal-dashboard-topline,
  [data-view-panel="admin"] .portal-dashboard-minirow,
  [data-view-panel="care"] .portal-dashboard-grid,
  [data-view-panel="admin"] .portal-dashboard-grid {
    gap: 10px;
  }
}
