:root {
  --cp-bg: #f4f7fb;
  --cp-card: #fff;
  --cp-text: #10213a;
  --cp-muted: #627089;
  --cp-line: #dfe6ef;
  --cp-blue: #1167e8;
  --cp-blue-soft: #e9f2ff;
  --cp-green: #087f5b;
  --cp-red: #b42318;
  --cp-shadow: 0 16px 50px rgba(20, 42, 74, 0.08);
  --customer-dashboard-gap: 14px;
  --pm-control-focus-border: rgba(7, 92, 255, 0.46);
  --pm-control-focus-glow: 0 0 0 4px rgba(7, 92, 255, 0.14), 0 10px 24px rgba(7, 92, 255, 0.1);
  --pm-control-focus-transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

* { box-sizing: border-box; }

body.customer-portal-page {
  margin: 0;
  min-width: 320px;
  color: var(--cp-text);
  background: var(--cp-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.customer-topbar {
  height: 72px;
  padding: 0 clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--cp-line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
}

.customer-brand img { display: block; width: 168px; height: auto; }

.customer-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cp-muted);
  font-size: 0.88rem;
  min-width: 0;
}

.customer-topbar-actions > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.customer-inbox-wrap {
  position: relative;
}

.customer-inbox-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cp-text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.customer-inbox-btn svg {
  width: 22px;
  height: 22px;
}

.customer-inbox-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.customer-inbox-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  overflow: auto;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 40;
}

.customer-inbox-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cp-line);
  position: sticky;
  top: 0;
  background: #fff;
}

.customer-inbox-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cp-muted);
}

.customer-inbox-list {
  display: grid;
  gap: 0;
}

.customer-inbox-empty {
  margin: 0;
  padding: 18px 14px;
  color: var(--cp-muted);
}

.customer-inbox-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.customer-inbox-item.is-unread {
  background: #f8fbff;
}

.customer-inbox-item strong {
  font-size: 0.95rem;
}

.customer-inbox-item p {
  margin: 0;
  color: var(--cp-muted);
  font-size: 0.86rem;
}

.customer-inbox-meta {
  color: #64748b;
  font-size: 0.76rem;
}

.customer-toast-host {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px clamp(14px, 3vw, 32px) 0;
  position: relative;
  z-index: 25;
}

.customer-status-toast-wrap {
  position: relative;
  animation: customer-toast-in 280ms ease-out;
}

.customer-status-toast {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 40px 12px 14px;
  border: 1px solid #86efac;
  border-radius: 12px;
  background: #ecfdf5;
  color: #166534;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.customer-status-toast p {
  margin: 0;
  color: #14532d;
}

.customer-status-toast-device {
  font-weight: 700;
}

.customer-status-toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #166534;
  font-size: 1.35rem;
  cursor: pointer;
}

@keyframes customer-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.customer-shell { min-height: calc(100dvh - 72px); }

.customer-shell-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 28px) clamp(14px, 3vw, 32px) 88px;
  display: grid;
  gap: 18px;
}

.customer-eyebrow {
  margin: 0;
  color: var(--cp-blue);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  line-height: 1.2;
}

.customer-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--customer-dashboard-gap);
  align-items: center;
  padding: 26px 22px;
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  background: var(--cp-card);
  box-shadow: var(--cp-shadow);
  margin-bottom: 0;
  min-height: 108px;
}

.customer-hero-copy h1 {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.customer-hero-meta { display: none; }

.customer-avatar { display: none; }

.customer-hero-cta { display: none !important; }

.customer-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--customer-dashboard-gap);
}

.customer-overview-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  background: var(--cp-card);
  box-shadow: var(--cp-shadow);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.customer-overview-card:hover,
.customer-overview-card:focus-visible {
  border-color: #9ec5ff;
  box-shadow: 0 18px 40px rgba(17, 103, 232, 0.12);
}

.customer-overview-card.is-active {
  border-color: var(--cp-blue);
  box-shadow: 0 0 0 3px var(--cp-blue-soft);
}

.customer-overview-icon {
  width: 28px;
  height: 28px;
  color: var(--cp-blue);
  display: grid;
  place-items: center;
}

.customer-overview-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.customer-segments { display: none !important; }

.customer-layout {
  display: grid;
  gap: var(--customer-dashboard-gap);
}

.customer-pane--nav {
  display: grid;
  gap: var(--customer-dashboard-gap);
  align-content: start;
}

.customer-pane--nav,
.customer-pane--detail {
  min-width: 0;
}

.customer-detail-head {
  margin-bottom: 12px;
}

.customer-detail-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.customer-detail-placeholder {
  padding: 28px 20px;
  border: 1px dashed var(--cp-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--cp-muted);
}

.customer-logout-link {
  margin-top: 8px;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  color: var(--cp-red);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
}

.customer-logout-link:focus-visible {
  outline: 2px solid var(--cp-blue);
  outline-offset: 3px;
}

.customer-back-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cp-text);
  cursor: pointer;
}

.customer-back-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.customer-back-btn:focus-visible {
  outline: 2px solid var(--cp-blue);
  outline-offset: 2px;
}

.customer-unauth-actions {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 14px;
}

.customer-text-link {
  color: var(--cp-blue);
  font-weight: 650;
}

@media (min-width: 1024px) {
  .customer-layout {
    grid-template-columns: minmax(280px, 0.4fr) minmax(0, 0.6fr);
    align-items: start;
    gap: 20px;
  }

  .customer-pane--nav {
    position: sticky;
    top: 88px;
  }

  .customer-hero {
    padding: 26px 24px;
  }

  .customer-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--customer-dashboard-gap);
  }

  [data-portal-view="dashboard"] .customer-pane--detail .customer-detail-placeholder {
    display: block;
  }
}

@media (max-width: 1023px) {
  [data-portal-view="dashboard"] .customer-pane--detail {
    display: none;
  }

  [data-portal-view="detail"] .customer-pane--nav {
    display: none;
  }

  [data-portal-view="detail"] .customer-pane--detail {
    display: block;
  }

  .customer-detail-head[hidden] {
    display: none !important;
  }

  .customer-detail-head:not([hidden]) {
    display: block;
  }
}

.customer-overview-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-overview-title {
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.customer-overview-meta { color: var(--cp-muted); font-size: 0.82rem; }

.customer-segments {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.customer-segments::-webkit-scrollbar { display: none; }

.customer-segments button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--cp-line);
  border-radius: 999px;
  background: #fff;
  color: #40506a;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.customer-segments button.is-active,
.customer-segments button[aria-selected="true"] {
  color: #0758c5;
  border-color: #9ec5ff;
  background: var(--cp-blue-soft);
}

.customer-detail {
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  background: var(--cp-card);
  box-shadow: var(--cp-shadow);
  padding: clamp(16px, 2.5vw, 24px);
  min-height: 180px;
}

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

.customer-panel-head h2,
.customer-profile-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.customer-panel-note { margin: 0 0 12px; color: var(--cp-muted); }

.customer-section-title { margin: 0 0 10px; font-size: 1rem; }

.customer-accordion-list { display: grid; gap: 10px; }

.customer-accordion {
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.customer-accordion.is-completed {
  background: #f3f5f8;
  filter: saturate(0.82);
}

.customer-accordion.is-cancelled {
  background: #fbf7f4;
  border-color: #e7d5c8;
}

.customer-accordion.is-completed::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 12% -8%;
  border-top: 2px solid rgba(16, 33, 58, 0.18);
  transform: rotate(-12deg);
  z-index: 1;
}

.customer-completion-mark {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cp-line);
  color: var(--cp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.customer-accordion-trigger {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.customer-accordion-trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cp-blue);
}

.customer-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-accordion-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-accordion-summary-copy strong {
  font-size: 1rem;
  line-height: 1.25;
}

.customer-accordion-meta { color: var(--cp-muted); font-size: 0.84rem; }

.customer-accordion-panel {
  padding: 0 16px 16px;
  border-top: 1px solid var(--cp-line);
}

.customer-accordion-body { padding-top: 14px; display: grid; gap: 12px; }

.customer-group-toggle {
  width: 100%;
  margin: 14px 0 8px;
  padding: 12px 14px;
  border: 1px dashed #bdc9d9;
  border-radius: 12px;
  background: #f8fafc;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.customer-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #bcd6fd;
  border-radius: 99px;
  color: #0758c5;
  background: var(--cp-blue-soft);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.customer-ready-host {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.customer-ready-banner {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #ecfdf5;
  color: #166534;
  text-align: left;
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.customer-ready-banner strong {
  font-size: 1.05rem;
}

.customer-ready-banner p {
  margin: 0;
  color: #14532d;
}

.customer-ready-banner-device {
  margin-top: 2px;
  font-weight: 700;
  color: #14532d;
}

.customer-ready-banner--panel {
  margin-bottom: 12px;
}

.customer-ready-banner--dashboard {
  margin: 0;
}

.customer-status-banner {
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: #eef4ff;
  border: 1px solid #c9dbf8;
  display: grid;
  gap: 4px;
}

.customer-status-banner.is-ready {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.customer-status-banner.is-complete {
  background: #eef1f5;
  border-color: #d5dde8;
  color: #445468;
}

.customer-status-banner.is-cancelled {
  background: #fff4ec;
  border-color: #ecd2bc;
  color: #8a4b24;
}

.customer-status-banner strong {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.customer-status-banner p {
  margin: 0;
  color: inherit;
  opacity: 0.92;
  font-size: 0.88rem;
}

.customer-status-banner-device {
  margin-top: 2px;
  font-weight: 700;
  color: inherit;
}

.customer-info-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.customer-info-tile {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fb;
  display: grid;
  gap: 3px;
}

.customer-info-tile span {
  color: var(--cp-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-info-tile strong {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.customer-appointment-location-copy {
  margin: 0;
  color: var(--cp-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.customer-location-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cp-line);
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.customer-location-card:hover,
.customer-location-card:focus-visible {
  border-color: #9dbef5;
  box-shadow: var(--pm-control-focus-glow);
  outline: none;
}

.customer-location-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cp-blue-soft);
  color: var(--cp-blue);
  display: grid;
  place-items: center;
}

.customer-location-card-icon svg {
  width: 18px;
  height: 18px;
}

.customer-location-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-location-card-copy span {
  color: var(--cp-muted);
  font-size: 0.84rem;
}

.customer-location-card-copy em {
  font-style: normal;
  color: var(--cp-blue);
  font-weight: 700;
  font-size: 0.82rem;
}

.customer-order-next {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--cp-blue);
  border-radius: 6px;
  color: #32445f;
  background: #f5f9ff;
}

.customer-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customer-details div {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fb;
}

.customer-details dt { color: var(--cp-muted); font-size: 0.72rem; }
.customer-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; font-size: 0.88rem; }

.customer-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

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

.customer-timeline li {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  color: #8a95a6;
}

.customer-timeline-marker {
  width: 22px;
  height: 22px;
  border: 2px solid #cfd8e5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  background: #fff;
}

.customer-timeline li.is-complete .customer-timeline-marker,
.customer-timeline li.is-current .customer-timeline-marker {
  border-color: var(--cp-blue);
  color: #fff;
  background: var(--cp-blue);
}

.customer-timeline li.is-special { color: var(--cp-red); }
.customer-timeline li.is-special .customer-timeline-marker { border-color: var(--cp-red); background: var(--cp-red); }

.customer-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.customer-danger {
  padding: 10px 12px;
  border: 0;
  color: var(--cp-red);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.customer-payment-list { display: grid; gap: 10px; }

.customer-payment-card {
  padding: 14px 16px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.customer-payment-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.customer-payment-card small { color: var(--cp-muted); }

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

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

.customer-address-card h3 { margin: 0; font-size: 1rem; }

.customer-address-card p { white-space: pre-line; line-height: 1.55; margin: 8px 0 0; }

.customer-default {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--cp-green);
  background: #e6f7f0;
  font-size: 0.72rem;
  font-weight: 800;
}

.customer-profile-head { align-items: center; }
.customer-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.customer-profile-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.customer-profile-actions-bar .button {
  min-height: 46px;
  flex: 1 1 180px;
}
.customer-profile-pending {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #f0d9a0;
  display: grid;
  gap: 8px;
}
.customer-profile-pending p { margin: 0; color: #6b5420; }

.customer-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

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

.customer-form-grid .is-wide { grid-column: 1 / -1; }

.customer-form label,
.customer-dialog label {
  display: grid;
  gap: 6px;
  color: #364861;
  font-weight: 700;
  font-size: 0.92rem;
}

.customer-form input,
.customer-dialog input,
.customer-form select,
.customer-dialog select,
.customer-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: var(--cp-text);
  background: #fff;
  font: inherit;
  font-size: 16px;
  transition: var(--pm-control-focus-transition);
}

.customer-form input:focus-visible,
.customer-dialog input:focus-visible,
.customer-form select:focus-visible,
.customer-dialog select:focus-visible {
  outline: none;
  border-color: var(--pm-control-focus-border);
  box-shadow: var(--pm-control-focus-glow);
}

.customer-check {
  grid-template-columns: auto 1fr !important;
  align-items: center;
  font-weight: 600 !important;
}

.customer-check input { width: 18px; min-height: 18px; }

.customer-form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.customer-empty {
  padding: 28px;
  border: 1px dashed #bdc9d9;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  color: var(--cp-muted);
  display: grid;
  gap: 8px;
}

.customer-empty strong { color: var(--cp-text); }

.customer-notice {
  max-width: 1180px;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border: 1px solid #a8d6c5;
  border-radius: 12px;
  color: #056246;
  background: #eaf8f3;
}

.customer-notice.is-error {
  border-color: #f3b4ae;
  color: #9f1d14;
  background: #fff0ef;
}

.customer-loading {
  min-height: 50vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--cp-muted);
}

.customer-loading-global {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.customer-loading span {
  width: min(480px, 80%);
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e5eaf1, #f6f8fb, #e5eaf1);
  background-size: 200% 100%;
  animation: customer-shimmer 1.2s infinite;
}

.customer-loading span:nth-child(2) { width: min(380px, 65%); }
.customer-loading span:nth-child(3) { width: min(280px, 50%); }

.customer-error-state,
.customer-unauth-state {
  max-width: 520px;
  margin: 48px auto;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  display: grid;
  gap: 14px;
}

.customer-error-state {
  border: 1px solid #f3b4ae;
  background: #fff0ef;
}

.customer-unauth-state {
  border: 1px solid var(--cp-line);
  background: #fff;
  box-shadow: var(--cp-shadow);
}

.customer-cta-repair {
  position: fixed;
  right: clamp(12px, 3vw, 24px);
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 25;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: #10213a;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(16, 33, 58, 0.28);
}

.customer-cta-repair[hidden] {
  display: none !important;
}

[data-portal-view="dashboard"] .customer-cta-repair:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-portal-view="detail"] .customer-cta-repair {
  display: none !important;
}

.customer-shell[data-portal-view="dashboard"] .customer-shell-inner {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.customer-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 22px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 25px 80px rgba(10, 30, 60, 0.3);
  overflow: auto;
}

.customer-dialog::backdrop { background: rgba(9, 24, 45, 0.55); backdrop-filter: blur(3px); }

.customer-dialog form { display: grid; gap: 14px; }
.customer-dialog h2 { margin: 0; font-size: 1.25rem; }

.customer-track-link { color: var(--cp-blue); font-weight: 750; }

@keyframes customer-shimmer { to { background-position: -200% 0; } }

@media (max-width: 1024px) {
  .customer-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-info-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-hero { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .customer-topbar { height: 64px; }
  .customer-brand img { width: 140px; }
  .customer-topbar-actions > span { display: none; }
  .customer-shell-inner { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); gap: 14px; }
  .customer-hero { grid-template-columns: 1fr; padding: 16px; }
  .customer-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-overview-card { min-height: 0; }
  .customer-panel-head { flex-direction: column; align-items: stretch; }
  .customer-panel-head .button { width: 100%; }
  .customer-details,
  .customer-info-tiles,
  .customer-form-grid,
  .customer-address-grid { grid-template-columns: 1fr; }
  .customer-timeline { grid-template-columns: 1fr; }
  .customer-timeline--shipping { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-profile-actions-bar .button { flex: 1 1 100%; width: 100%; }
  .customer-dialog {
    width: min(100vw - 16px, 520px);
    max-height: calc(100dvh - max(18px, env(safe-area-inset-top)) - max(18px, env(safe-area-inset-bottom)));
    margin: auto auto max(8px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 12px 12px;
  }
  .customer-dialog input,
  .customer-dialog select,
  .customer-dialog textarea,
  .customer-profile-form input,
  .customer-profile-form select,
  .customer-profile-form textarea,
  .phonemen-form-page .customer-auth-form input,
  .phonemen-form-page .customer-auth-form select,
  .phonemen-form-page .customer-auth-form textarea,
  .customer-portal-page input,
  .customer-portal-page select,
  .customer-portal-page textarea {
    font-size: 16px;
  }
  .customer-cta-repair {
    left: 12px;
    right: 12px;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .customer-shell-inner { padding-inline: 10px; }
  .customer-overview { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.phonemen-form-page .customer-auth-text-button {
  border: 0;
  padding: 0;
  background: none;
  color: #075cff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.phonemen-form-page .customer-auth-text-button:hover:not(:disabled) {
  text-decoration: underline;
}

.phonemen-form-page .customer-auth-text-button:focus-visible {
  outline: 2px solid rgba(7, 92, 255, 0.46);
  outline-offset: 2px;
  border-radius: 4px;
}

.phonemen-form-page .customer-auth-text-button:disabled,
.phonemen-form-page .customer-auth-text-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Registration / login form content-fit (login.html loads this sheet). */
.phonemen-form-page .aurora-form-card.customer-auth-shell {
  width: min(100%, 440px);
  padding: 22px 22px 18px;
  height: fit-content;
  min-height: 0;
  align-self: center;
}

.phonemen-form-page .customer-auth-shell {
  height: fit-content;
  min-height: 0;
}

.phonemen-form-page .customer-auth-tabs {
  margin-bottom: 14px;
}

.phonemen-form-page .customer-auth-form {
  gap: 10px;
}

.phonemen-form-page .aurora-form-shell {
  align-content: center;
  min-height: calc(100vh - 88px);
}
