/* Customer and public route views only. Keep shared admin/office styles untouched. */
.client-shell {
  --customer-ink: #12211f;
  --customer-green: #0f766e;
  --customer-yellow: #f7b538;
  --customer-line: #d9e3df;
  --customer-muted: #53635f;
  background: #f4f7f5;
  color: var(--customer-ink);
}

.client-shell :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.route-tracking-body :is(a, button):focus-visible {
  outline: 3px solid #0f766e;
  outline-offset: 3px;
}

.client-shell .site-header {
  min-height: 72px;
  border-bottom: 1px solid var(--customer-line);
  background: #fff;
}

.client-shell .header-action,
.client-shell .login-card > button[type="submit"],
.client-shell .password-change-form > button[type="submit"] {
  background: var(--customer-yellow);
  color: var(--customer-ink);
  box-shadow: none;
}

.client-shell .account-main {
  width: min(1160px, calc(100% - 32px));
  padding: clamp(24px, 4vw, 52px) 0 64px;
}

.client-shell .login-view {
  min-height: min(680px, calc(100vh - 128px));
  gap: clamp(24px, 6vw, 88px);
}

.client-shell .login-copy h1,
.client-shell .dashboard-head h1 {
  color: var(--customer-ink);
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

/* Override the large shared h1 scale only on the reset form. */
.client-shell .password-reset-card > h1 {
  max-width: 20ch;
  margin: 0 0 12px;
  color: var(--customer-ink);
  font-size: clamp(1.35rem, 4.4vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.22;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.client-shell .login-copy p,
.client-shell .password-reset-card > p {
  color: var(--customer-muted);
  line-height: 1.65;
}

.client-shell .login-card,
.client-shell .account-card,
.client-shell .metric-card {
  border: 1px solid var(--customer-line);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(18, 33, 31, 0.06);
}

.client-shell .login-card label,
.client-shell .password-change-form label {
  color: var(--customer-ink);
  font-weight: 700;
}

.client-shell .login-card input,
.client-shell .password-change-form input {
  min-height: 48px;
  border: 1px solid #aebdb7;
  border-radius: 10px;
  background: #fff;
}

.client-shell .login-card input:focus-visible,
.client-shell .password-change-form input:focus-visible {
  border-color: var(--customer-green);
}

.client-shell .dashboard-view { gap: 24px; }
.client-shell .dashboard-head { align-items: center; }
.client-shell .dashboard-head h1 { margin: 0; }
.client-shell .dashboard-grid { gap: 12px; }
.client-shell .metric-card { min-width: 0; background: #fff; }
.client-shell .metric-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--customer-green);
  font-size: clamp(1rem, 4vw, 1.45rem);
  line-height: 1.12;
}
.client-shell #dash-locker-code {
  max-width: 100%;
  font-size: clamp(1rem, 4vw, 1.45rem);
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

.client-shell .account-tabs {
  position: sticky;
  top: 8px;
  z-index: 5;
  gap: 6px;
  padding: 7px;
  border-color: var(--customer-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(18, 33, 31, 0.07);
}

.client-shell .account-tab {
  min-height: 46px;
  border-radius: 10px;
  color: var(--customer-muted);
}

.client-shell .account-tab.is-active {
  border-color: var(--customer-green);
  background: var(--customer-green);
  color: #fff;
}

.client-shell [data-account-panel][hidden] { display: none !important; }
.client-shell .account-tab-panel { min-width: 0; }
.client-shell .account-card { min-width: 0; padding: clamp(18px, 3vw, 28px); background: #fff; }
.client-shell .locker-list > div,
.client-shell .portal-list > li,
.client-shell .invoice-list > * { overflow-wrap: anywhere; }
.client-shell .client-message:empty { display: none; }
.client-shell .client-message.is-error { color: #9b2527; }
.client-shell .client-message.is-ok { color: #126443; }

.route-tracking-body {
  background: #f4f7f5;
  color: #12211f;
}

.route-public-header {
  min-height: 72px;
  padding: 10px max(16px, calc((100% - 980px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d9e3df;
  background: #fff;
}

.route-public-header .brand-logo { display: block; width: min(160px, 42vw); height: auto; }
.route-public-account { color: #12211f; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.route-tracking-shell {
  width: min(980px, calc(100% - 32px));
  padding: clamp(20px, 4vw, 48px) 0;
  gap: 18px;
}

.route-tracking-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #d9e3df;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(18, 33, 31, 0.06);
}

.route-tracking-card h1,
.route-tracking-card h2 { color: #12211f; }
.route-tracking-card > h1 {
  max-width: 24ch;
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 4.8vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.16;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.route-tracking-card > h2 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.route-tracking-card p { color: #53635f; line-height: 1.55; }
.route-public-actions a,
.route-public-actions button { min-height: 46px; border-radius: 10px; background: #0f766e; }
.route-public-list article { min-width: 0; border-color: #d9e3df; border-radius: 12px; background: #f8faf9; }
.route-public-list strong { overflow-wrap: anywhere; color: #12211f; }
.route-public-list span,
.route-public-list small { overflow-wrap: anywhere; color: #53635f; }
.route-tracking-body iframe { width: 100%; min-height: 320px; border: 0; border-radius: 12px; }

.client-shell .invoice-line-items,
.client-shell .invoice-history ol { margin: 10px 0; padding-left: 20px; }
.client-shell .invoice-line-items li,
.client-shell .invoice-history li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #e7eeea; }
.client-shell .invoice-line-items span,
.client-shell .invoice-history span { overflow-wrap: anywhere; }
.client-shell .invoice-history summary { cursor: pointer; font-weight: 700; }

@media (max-width: 900px) {
  .client-shell .login-view { grid-template-columns: 1fr; min-height: auto; }
  .client-shell .login-copy { max-width: 720px; }
  .client-shell .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .client-shell .account-main { width: min(100% - 24px, 1160px); }
  .client-shell .dashboard-head { align-items: flex-start; flex-direction: column; }
  .client-shell .dashboard-grid { gap: 8px; }
  .client-shell .metric-card { padding: 14px; }
  .client-shell .portal-list > li { align-items: flex-start; flex-direction: column; gap: 4px; }
  .client-shell .account-tabs { top: 4px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-shell .account-tab { min-height: 44px; }
  .client-shell .form-grid { grid-template-columns: 1fr; }
  .client-shell .password-change-form button { width: 100%; }
  .route-public-actions > * { flex: 1 1 100%; text-align: center; }
  .route-public-header { min-height: 64px; padding: 8px 12px; }
  .route-public-header .brand-logo { width: 140px; }
  .route-tracking-body iframe { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .client-shell *,
  .route-tracking-body * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
