/**
 * Pharma Vitality Delivery Portal
 * Front-end styles are deliberately scoped to .pvdp to avoid theme/admin collisions.
 */

.pvdp {
  --pvdp-brand-950: #4c1113;
  --pvdp-brand-900: #641417;
  --pvdp-brand-800: #78191c;
  --pvdp-brand-700: #901e22;
  --pvdp-brand-600: #a6282c;
  --pvdp-brand-100: #f7e9ea;
  --pvdp-brand-50: #fcf6f6;
  --pvdp-ink: #18202a;
  --pvdp-text: #344054;
  --pvdp-muted: #667085;
  --pvdp-subtle: #98a2b3;
  --pvdp-line: #e4e7ec;
  --pvdp-line-strong: #d0d5dd;
  --pvdp-canvas: #f4f6f8;
  --pvdp-surface: #ffffff;
  --pvdp-surface-soft: #f9fafb;
  --pvdp-success: #067647;
  --pvdp-success-bg: #ecfdf3;
  --pvdp-warning: #9a6700;
  --pvdp-warning-bg: #fffaeb;
  --pvdp-danger: #b42318;
  --pvdp-danger-bg: #fef3f2;
  --pvdp-info: #175cd3;
  --pvdp-info-bg: #eff8ff;
  --pvdp-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --pvdp-shadow-sm: 0 3px 12px rgba(16, 24, 40, 0.07);
  --pvdp-shadow-lg: 0 22px 60px rgba(16, 24, 40, 0.16);
  --pvdp-radius-sm: 10px;
  --pvdp-radius: 16px;
  --pvdp-radius-lg: 24px;
  color: var(--pvdp-ink);
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.pvdp,
.pvdp *,
.pvdp *::before,
.pvdp *::after {
  box-sizing: border-box;
}

.pvdp [hidden],
.pvdp .pvdp-hidden {
  display: none !important;
}

.pvdp a {
  color: var(--pvdp-brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.pvdp button,
.pvdp input,
.pvdp select,
.pvdp textarea {
  color: inherit;
  font: inherit;
}

.pvdp button {
  cursor: pointer;
}

.pvdp img,
.pvdp svg {
  display: block;
  max-width: 100%;
}

.pvdp :focus-visible {
  outline: 3px solid rgba(23, 92, 211, 0.38);
  outline-offset: 2px;
}

.pvdp .pvdp-sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.pvdp .pvdp-skip-link {
  background: var(--pvdp-surface);
  border-radius: 0 0 var(--pvdp-radius-sm) var(--pvdp-radius-sm);
  box-shadow: var(--pvdp-shadow-sm);
  color: var(--pvdp-brand-900);
  inset-block-start: -80px;
  inset-inline-start: 16px;
  padding: 10px 14px;
  position: fixed;
  transition: inset-block-start 160ms ease;
  z-index: 10000;
}

.pvdp .pvdp-skip-link:focus {
  inset-block-start: 0;
}

/* Shared controls */
.pvdp .pvdp-button {
  align-items: center;
  appearance: none;
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line-strong);
  border-radius: var(--pvdp-radius-sm);
  box-shadow: var(--pvdp-shadow-xs);
  color: var(--pvdp-text);
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease,
    color 150ms ease, transform 150ms ease;
}

.pvdp .pvdp-button:hover {
  border-color: var(--pvdp-brand-700);
  color: var(--pvdp-brand-900);
  transform: translateY(-1px);
}

.pvdp .pvdp-button:active {
  transform: translateY(0);
}

.pvdp .pvdp-button:disabled,
.pvdp .pvdp-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.pvdp .pvdp-button--primary {
  background: linear-gradient(135deg, var(--pvdp-brand-800), var(--pvdp-brand-700));
  border-color: var(--pvdp-brand-700);
  box-shadow: 0 8px 18px rgba(144, 30, 34, 0.2);
  color: #fff;
}

.pvdp .pvdp-button--primary:hover {
  background: linear-gradient(135deg, var(--pvdp-brand-900), var(--pvdp-brand-800));
  color: #fff;
}

.pvdp .pvdp-button--soft {
  background: var(--pvdp-brand-100);
  border-color: transparent;
  color: var(--pvdp-brand-900);
}

.pvdp .pvdp-button--danger {
  background: var(--pvdp-danger-bg);
  border-color: #fecdca;
  color: var(--pvdp-danger);
}

.pvdp .pvdp-button--small {
  font-size: 0.78rem;
  min-height: 34px;
  padding: 6px 10px;
}

.pvdp .pvdp-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 8px;
  width: 42px;
}

.pvdp .pvdp-icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pvdp .pvdp-field {
  display: grid;
  gap: 6px;
}

.pvdp .pvdp-label {
  color: var(--pvdp-text);
  font-size: 0.78rem;
  font-weight: 800;
}

.pvdp .pvdp-required {
  color: var(--pvdp-danger);
}

.pvdp .pvdp-control {
  appearance: none;
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line-strong);
  border-radius: var(--pvdp-radius-sm);
  box-shadow: var(--pvdp-shadow-xs);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.pvdp .pvdp-control::placeholder {
  color: var(--pvdp-subtle);
}

.pvdp .pvdp-control:focus {
  border-color: var(--pvdp-brand-700);
  box-shadow: 0 0 0 4px rgba(144, 30, 34, 0.1);
  outline: 0;
}

.pvdp .pvdp-control[aria-invalid="true"] {
  border-color: var(--pvdp-danger);
}

.pvdp .pvdp-control[readonly] {
  background: var(--pvdp-surface-soft);
  color: var(--pvdp-muted);
  cursor: default;
}

.pvdp .pvdp-field-help {
  color: var(--pvdp-muted);
  font-size: 0.73rem;
}

.pvdp .pvdp-password-wrap {
  position: relative;
}

.pvdp .pvdp-password-wrap .pvdp-control {
  padding-inline-end: 52px;
}

.pvdp .pvdp-password-toggle {
  background: transparent;
  border: 0;
  color: var(--pvdp-muted);
  inset-block: 2px;
  inset-inline-end: 2px;
  padding: 0 12px;
  position: absolute;
}

.pvdp .pvdp-message {
  border: 1px solid transparent;
  border-radius: var(--pvdp-radius-sm);
  display: flex;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 9px;
  padding: 11px 12px;
}

.pvdp .pvdp-message:empty {
  display: none;
}

.pvdp .pvdp-message--error {
  background: var(--pvdp-danger-bg);
  border-color: #fecdca;
  color: var(--pvdp-danger);
}

.pvdp .pvdp-message--success {
  background: var(--pvdp-success-bg);
  border-color: #abefc6;
  color: var(--pvdp-success);
}

.pvdp .pvdp-message--info {
  background: var(--pvdp-info-bg);
  border-color: #b2ddff;
  color: var(--pvdp-info);
}

/* Authentication */
.pvdp.pvdp-auth-page {
  background: var(--pvdp-canvas);
  min-height: 100vh;
}

.pvdp .pvdp-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  min-height: 100vh;
}

.pvdp .pvdp-auth-brand {
  background:
    radial-gradient(circle at 83% 9%, rgba(255, 255, 255, 0.13), transparent 26%),
    radial-gradient(circle at 11% 91%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(140deg, var(--pvdp-brand-950), var(--pvdp-brand-700));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 108px);
  position: relative;
}

.pvdp .pvdp-brand-mark,
.pvdp .pvdp-header-mark {
  align-items: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  color: var(--pvdp-brand-800);
  display: inline-flex;
  font-size: 1.65rem;
  font-weight: 900;
  height: 86px;
  justify-content: center;
  letter-spacing: -0.08em;
  width: 86px;
}

.pvdp img.pvdp-brand-mark,
.pvdp img.pvdp-header-mark {
  object-fit: contain;
}

.pvdp .pvdp-auth-brand h1 {
  font-size: clamp(2.25rem, 4vw, 4.15rem);
  letter-spacing: -0.045em;
  line-height: 1.03;
  margin: 28px 0 14px;
  max-width: 760px;
}

.pvdp .pvdp-auth-brand > p {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  max-width: 650px;
}

.pvdp .pvdp-auth-features {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 30px 0 0;
  max-width: 690px;
}

.pvdp .pvdp-auth-feature {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  display: flex;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 9px;
  padding: 13px;
}

.pvdp .pvdp-auth-panel {
  align-items: center;
  background: var(--pvdp-surface);
  display: flex;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
}

.pvdp .pvdp-auth-card {
  max-width: 430px;
  width: 100%;
}

.pvdp .pvdp-auth-kicker {
  color: var(--pvdp-brand-700);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.pvdp .pvdp-auth-card h2 {
  color: var(--pvdp-brand-950);
  font-size: clamp(1.7rem, 2.3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0;
}

.pvdp .pvdp-auth-intro {
  color: var(--pvdp-muted);
  margin: 8px 0 25px;
}

.pvdp .pvdp-auth-form {
  display: grid;
  gap: 16px;
}

.pvdp .pvdp-auth-form .pvdp-button {
  margin-top: 2px;
  min-height: 48px;
  width: 100%;
}

.pvdp .pvdp-security-note {
  background: var(--pvdp-surface-soft);
  border: 1px solid var(--pvdp-line);
  border-radius: 12px;
  color: var(--pvdp-muted);
  font-size: 0.74rem;
  margin-top: 22px;
  padding: 12px;
}

.pvdp .pvdp-auth-footer {
  color: var(--pvdp-muted);
  font-size: 0.72rem;
  margin-top: 22px;
  text-align: center;
}

.pvdp .pvdp-language-switch {
  align-items: center;
  display: flex;
  gap: 6px;
  inset-block-start: 20px;
  inset-inline-end: 24px;
  position: absolute;
  z-index: 5;
}

.pvdp .pvdp-language-switch button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--pvdp-muted);
  font-size: 0.78rem;
  font-weight: 800;
  min-height: 34px;
  padding: 5px 9px;
}

.pvdp .pvdp-language-switch button[aria-pressed="true"] {
  background: var(--pvdp-brand-100);
  color: var(--pvdp-brand-900);
}

/* Dashboard shell */
.pvdp.pvdp-dashboard-page {
  background: var(--pvdp-canvas);
  min-height: 100vh;
}

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

.pvdp .pvdp-sidebar {
  background: linear-gradient(180deg, var(--pvdp-brand-950), #3d0e10);
  color: #fff;
  display: flex;
  flex-direction: column;
  inset-block: 0;
  inset-inline-start: 0;
  overflow-y: auto;
  padding: 18px 14px;
  position: fixed;
  width: 268px;
  z-index: 80;
}

.pvdp .pvdp-sidebar-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  display: flex;
  gap: 11px;
  padding: 2px 6px 18px;
}

.pvdp .pvdp-header-mark {
  border-radius: 12px;
  box-shadow: none;
  flex: 0 0 auto;
  font-size: 1rem;
  height: 48px;
  width: 48px;
}

.pvdp .pvdp-sidebar-brand strong,
.pvdp .pvdp-sidebar-brand small {
  display: block;
}

.pvdp .pvdp-sidebar-brand strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.pvdp .pvdp-sidebar-brand small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  margin-top: 2px;
  text-transform: uppercase;
}

.pvdp .pvdp-nav {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.pvdp .pvdp-nav-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 14px 10px 3px;
  text-transform: uppercase;
}

.pvdp .pvdp-nav-link {
  align-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  font-size: 0.83rem;
  font-weight: 700;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  text-decoration: none;
}

.pvdp .pvdp-nav-link:hover,
.pvdp .pvdp-nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pvdp .pvdp-nav-icon {
  align-items: center;
  display: inline-flex;
  flex: 0 0 22px;
  justify-content: center;
}

.pvdp .pvdp-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: auto;
  padding: 15px 6px 2px;
}

.pvdp .pvdp-user-mini {
  margin-bottom: 10px;
  min-width: 0;
}

.pvdp .pvdp-user-mini strong,
.pvdp .pvdp-user-mini small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvdp .pvdp-user-mini strong {
  font-size: 0.8rem;
}

.pvdp .pvdp-user-mini small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.67rem;
}

.pvdp .pvdp-main {
  grid-column: 2;
  min-width: 0;
}

.pvdp .pvdp-topbar {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--pvdp-line);
  display: flex;
  gap: 16px;
  inset-block-start: 0;
  justify-content: space-between;
  min-height: 72px;
  padding: 11px 22px;
  position: sticky;
  z-index: 60;
}

.pvdp .pvdp-topbar-start,
.pvdp .pvdp-topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.pvdp .pvdp-menu-toggle {
  background: var(--pvdp-brand-100);
  border: 0;
  color: var(--pvdp-brand-900);
  display: none;
}

.pvdp .pvdp-page-title {
  min-width: 0;
}

.pvdp .pvdp-page-title h1 {
  color: var(--pvdp-brand-950);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvdp .pvdp-page-title p {
  color: var(--pvdp-muted);
  font-size: 0.73rem;
  margin: 3px 0 0;
}

.pvdp .pvdp-content {
  margin: 0 auto;
  max-width: 1640px;
  padding: 22px;
}

.pvdp .pvdp-section-heading {
  align-items: flex-end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 3px 0 13px;
}

.pvdp .pvdp-section-heading h2 {
  color: var(--pvdp-brand-950);
  font-size: 1.08rem;
  margin: 0;
}

.pvdp .pvdp-section-heading p {
  color: var(--pvdp-muted);
  font-size: 0.75rem;
  margin: 3px 0 0;
}

.pvdp .pvdp-card {
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line);
  border-radius: var(--pvdp-radius);
  box-shadow: var(--pvdp-shadow-sm);
}

.pvdp .pvdp-card--padded {
  padding: 16px;
}

.pvdp .pvdp-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.pvdp .pvdp-kpi {
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line);
  border-radius: 15px;
  box-shadow: var(--pvdp-shadow-sm);
  min-height: 116px;
  overflow: hidden;
  padding: 15px;
  position: relative;
}

.pvdp .pvdp-kpi::after {
  background: var(--pvdp-brand-100);
  border-radius: 999px;
  content: "";
  height: 64px;
  inset-block-start: -24px;
  inset-inline-end: -22px;
  position: absolute;
  width: 64px;
}

.pvdp .pvdp-kpi-label {
  color: var(--pvdp-muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pvdp .pvdp-kpi-value {
  color: var(--pvdp-brand-800);
  display: block;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  margin-top: 9px;
  overflow-wrap: anywhere;
}

.pvdp .pvdp-kpi-note {
  color: var(--pvdp-muted);
  display: block;
  font-size: 0.68rem;
  margin-top: 5px;
}

.pvdp .pvdp-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(210px, 2fr) repeat(2, minmax(145px, 1fr)) auto;
  margin-bottom: 14px;
  padding: 13px;
}

.pvdp .pvdp-search {
  position: relative;
}

.pvdp .pvdp-search .pvdp-control {
  padding-inline-start: 40px;
}

.pvdp .pvdp-search-icon {
  color: var(--pvdp-muted);
  inset-block-start: 50%;
  inset-inline-start: 13px;
  pointer-events: none;
  position: absolute;
  transform: translateY(-50%);
}

.pvdp .pvdp-table-wrap {
  border: 1px solid var(--pvdp-line);
  border-radius: var(--pvdp-radius);
  box-shadow: var(--pvdp-shadow-sm);
  overflow: auto;
}

.pvdp .pvdp-table {
  background: var(--pvdp-surface);
  border-collapse: collapse;
  min-width: 840px;
  width: 100%;
}

.pvdp .pvdp-table th,
.pvdp .pvdp-table td {
  border-bottom: 1px solid var(--pvdp-line);
  padding: 11px 12px;
  text-align: start;
  vertical-align: middle;
}

.pvdp .pvdp-table th {
  background: var(--pvdp-surface-soft);
  color: var(--pvdp-text);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

.pvdp .pvdp-table td {
  color: var(--pvdp-text);
  font-size: 0.78rem;
}

.pvdp .pvdp-table tbody tr:hover {
  background: #fcfcfd;
}

.pvdp .pvdp-table tbody tr:last-child td {
  border-bottom: 0;
}

.pvdp .pvdp-delivery-number {
  color: var(--pvdp-brand-800);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}

.pvdp .pvdp-status {
  align-items: center;
  background: #f2f4f7;
  border-radius: 999px;
  color: var(--pvdp-text);
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 850;
  gap: 5px;
  line-height: 1.2;
  padding: 6px 9px;
  white-space: nowrap;
}

.pvdp .pvdp-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  opacity: 0.72;
  width: 6px;
}

.pvdp .pvdp-status--complete,
.pvdp .pvdp-status--delivered,
.pvdp .pvdp-status--valid {
  background: var(--pvdp-success-bg);
  color: var(--pvdp-success);
}

.pvdp .pvdp-status--pending,
.pvdp .pvdp-status--processing,
.pvdp .pvdp-status--issued {
  background: var(--pvdp-warning-bg);
  color: var(--pvdp-warning);
}

.pvdp .pvdp-status--cancelled,
.pvdp .pvdp-status--failed,
.pvdp .pvdp-status--invalid {
  background: var(--pvdp-danger-bg);
  color: var(--pvdp-danger);
}

.pvdp .pvdp-pagination {
  align-items: center;
  color: var(--pvdp-muted);
  display: flex;
  font-size: 0.73rem;
  gap: 10px;
  justify-content: space-between;
  padding: 13px 4px 2px;
}

.pvdp .pvdp-pagination-actions {
  display: flex;
  gap: 6px;
}

.pvdp .pvdp-empty {
  align-items: center;
  color: var(--pvdp-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 250px;
  padding: 34px;
  text-align: center;
}

.pvdp .pvdp-empty-icon {
  align-items: center;
  background: var(--pvdp-brand-100);
  border-radius: 50%;
  color: var(--pvdp-brand-800);
  display: flex;
  font-size: 1.4rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.pvdp .pvdp-empty h3 {
  color: var(--pvdp-ink);
  font-size: 0.95rem;
  margin: 3px 0 0;
}

.pvdp .pvdp-empty p {
  font-size: 0.78rem;
  margin: 0;
  max-width: 430px;
}

/* Customer portal */
.pvdp .pvdp-customer-hero {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.16), transparent 23%),
    linear-gradient(135deg, var(--pvdp-brand-950), var(--pvdp-brand-700));
  color: #fff;
  padding: 26px clamp(16px, 5vw, 72px) 72px;
}

.pvdp .pvdp-customer-bar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
}

.pvdp .pvdp-customer-brand {
  align-items: center;
  display: flex;
  gap: 11px;
}

.pvdp .pvdp-customer-brand strong,
.pvdp .pvdp-customer-brand small {
  display: block;
}

.pvdp .pvdp-customer-brand small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
}

.pvdp .pvdp-customer-welcome {
  margin: 48px auto 0;
  max-width: 1240px;
}

.pvdp .pvdp-customer-welcome h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
}

.pvdp .pvdp-customer-welcome p {
  color: rgba(255, 255, 255, 0.75);
  margin: 8px 0 0;
}

.pvdp .pvdp-customer-content {
  margin: -42px auto 0;
  max-width: 1240px;
  padding: 0 clamp(14px, 4vw, 42px) 44px;
  position: relative;
}

.pvdp .pvdp-customer-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.pvdp .pvdp-customer-summary .pvdp-kpi {
  min-height: 106px;
}

.pvdp .pvdp-mobile-deliveries {
  display: none;
  gap: 10px;
}

.pvdp .pvdp-delivery-card {
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line);
  border-radius: 14px;
  box-shadow: var(--pvdp-shadow-xs);
  display: grid;
  gap: 11px;
  padding: 14px;
}

.pvdp .pvdp-delivery-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pvdp .pvdp-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pvdp .pvdp-delivery-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pvdp .pvdp-meta-label {
  color: var(--pvdp-muted);
  display: block;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pvdp .pvdp-meta-value {
  color: var(--pvdp-text);
  display: block;
  font-size: 0.77rem;
  font-weight: 700;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

/* Verification: deliberately separate from both portals */
.pvdp.pvdp-verification-page {
  align-items: center;
  background:
    radial-gradient(circle at 85% 0, #f8e7e8, transparent 30%),
    var(--pvdp-canvas);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.pvdp .pvdp-verification-card {
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line);
  border-radius: var(--pvdp-radius-lg);
  box-shadow: var(--pvdp-shadow-lg);
  max-width: 700px;
  overflow: hidden;
  width: 100%;
}

.pvdp .pvdp-verification-head {
  align-items: center;
  background: linear-gradient(135deg, var(--pvdp-brand-950), var(--pvdp-brand-700));
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 24px;
}

.pvdp .pvdp-verification-brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.pvdp .pvdp-verification-brand h1 {
  font-size: 1.1rem;
  margin: 0;
}

.pvdp .pvdp-verification-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  margin: 3px 0 0;
}

.pvdp .pvdp-verification-body {
  padding: 24px;
}

.pvdp .pvdp-verification-result {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.pvdp .pvdp-verification-icon {
  align-items: center;
  background: var(--pvdp-info-bg);
  border-radius: 50%;
  color: var(--pvdp-info);
  display: flex;
  flex: 0 0 auto;
  font-size: 1.3rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.pvdp .pvdp-verification-result[data-state="valid"] .pvdp-verification-icon {
  background: var(--pvdp-success-bg);
  color: var(--pvdp-success);
}

.pvdp .pvdp-verification-result[data-state="invalid"] .pvdp-verification-icon {
  background: var(--pvdp-danger-bg);
  color: var(--pvdp-danger);
}

.pvdp .pvdp-verification-result h2 {
  color: var(--pvdp-ink);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0;
}

.pvdp .pvdp-verification-result p {
  color: var(--pvdp-muted);
  font-size: 0.8rem;
  margin: 5px 0 0;
}

.pvdp .pvdp-verification-grid {
  border: 1px solid var(--pvdp-line);
  border-radius: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  overflow: hidden;
}

.pvdp .pvdp-verification-item {
  border-bottom: 1px solid var(--pvdp-line);
  padding: 12px 14px;
}

.pvdp .pvdp-verification-item:nth-child(odd) {
  border-inline-end: 1px solid var(--pvdp-line);
}

.pvdp .pvdp-verification-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pvdp .pvdp-privacy-note {
  background: var(--pvdp-surface-soft);
  border-radius: 10px;
  color: var(--pvdp-muted);
  font-size: 0.7rem;
  margin-top: 18px;
  padding: 10px 12px;
}

/* Admin shell */
.pvdp.pvdp-admin {
  background: #f6f7f7;
  margin-inline-start: -20px;
  min-height: calc(100vh - 32px);
  padding: 22px;
}

.pvdp .pvdp-admin-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pvdp .pvdp-admin-head h1 {
  color: var(--pvdp-brand-950);
  font-size: 1.55rem;
  margin: 0;
}

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

.pvdp .pvdp-admin-card {
  min-height: 150px;
  padding: 17px;
}

.pvdp .pvdp-admin-card h2 {
  color: var(--pvdp-brand-900);
  font-size: 1rem;
  margin: 0 0 7px;
}

.pvdp .pvdp-admin-card p {
  color: var(--pvdp-muted);
  font-size: 0.77rem;
  margin: 0 0 13px;
}

/* Loading, feedback and mobile navigation */
.pvdp .pvdp-spinner {
  animation: pvdp-spin 720ms linear infinite;
  border: 3px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  display: inline-block;
  height: 18px;
  opacity: 0.8;
  width: 18px;
}

.pvdp .pvdp-loading {
  align-items: center;
  color: var(--pvdp-muted);
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 210px;
  padding: 24px;
}

.pvdp .pvdp-skeleton {
  animation: pvdp-shimmer 1.25s infinite linear;
  background: linear-gradient(90deg, #edf0f2 25%, #f8f9fa 50%, #edf0f2 75%);
  background-size: 200% 100%;
  border-radius: 9px;
  min-height: 16px;
}

.pvdp .pvdp-toast-region {
  display: grid;
  gap: 8px;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  position: fixed;
  width: min(380px, calc(100vw - 28px));
  z-index: 1000;
}

.pvdp .pvdp-toast {
  background: var(--pvdp-ink);
  border-radius: 11px;
  box-shadow: var(--pvdp-shadow-lg);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 12px 14px;
}

.pvdp .pvdp-toast--error {
  background: var(--pvdp-danger);
}

.pvdp .pvdp-toast--success {
  background: var(--pvdp-success);
}

.pvdp .pvdp-sidebar-overlay {
  background: rgba(16, 24, 40, 0.58);
  border: 0;
  display: none;
  inset: 0;
  position: fixed;
  z-index: 70;
}

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

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

/* RTL uses logical properties; these fixes cover directional symbols and native alignment. */
.pvdp[dir="rtl"] .pvdp-auth-kicker,
.pvdp[dir="rtl"] .pvdp-nav-label,
.pvdp[dir="rtl"] .pvdp-kpi-label,
.pvdp[dir="rtl"] .pvdp-meta-label {
  letter-spacing: 0;
}

.pvdp[dir="rtl"] .pvdp-table th,
.pvdp[dir="rtl"] .pvdp-table td,
.pvdp[dir="rtl"] .pvdp-control {
  text-align: right;
}

body.admin-bar .pvdp .pvdp-sidebar {
  inset-block-start: 32px;
}

@media (max-width: 1080px) {
  .pvdp .pvdp-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .pvdp .pvdp-toolbar .pvdp-search {
    grid-column: 1 / -1;
  }

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

@media (max-width: 860px) {
  .pvdp .pvdp-auth-layout {
    grid-template-columns: 1fr;
  }

  .pvdp .pvdp-auth-brand {
    display: none;
  }

  .pvdp .pvdp-auth-panel {
    min-height: 100vh;
    padding: 70px 24px 30px;
  }

  .pvdp .pvdp-shell {
    display: block;
  }

  .pvdp .pvdp-sidebar {
    box-shadow: var(--pvdp-shadow-lg);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .pvdp[dir="rtl"] .pvdp-sidebar {
    transform: translateX(105%);
  }

  .pvdp .pvdp-sidebar[data-open="true"],
  .pvdp[dir="rtl"] .pvdp-sidebar[data-open="true"] {
    transform: translateX(0);
  }

  .pvdp .pvdp-sidebar-overlay[data-open="true"] {
    display: block;
  }

  .pvdp .pvdp-main {
    grid-column: auto;
  }

  .pvdp .pvdp-menu-toggle {
    display: inline-flex;
  }

  .pvdp .pvdp-customer-summary {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 680px) {
  .pvdp {
    font-size: 14px;
  }

  .pvdp .pvdp-content {
    padding: 14px;
  }

  .pvdp .pvdp-topbar {
    min-height: 64px;
    padding: 9px 12px;
  }

  .pvdp .pvdp-topbar-actions .pvdp-hide-mobile,
  .pvdp .pvdp-page-title p {
    display: none;
  }

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

  .pvdp .pvdp-kpi {
    min-height: 102px;
    padding: 12px;
  }

  .pvdp .pvdp-toolbar {
    grid-template-columns: 1fr;
  }

  .pvdp .pvdp-toolbar .pvdp-search {
    grid-column: auto;
  }

  .pvdp .pvdp-desktop-table {
    display: none;
  }

  .pvdp .pvdp-mobile-deliveries {
    display: grid;
  }

  .pvdp .pvdp-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .pvdp .pvdp-verification-head,
  .pvdp .pvdp-verification-body {
    padding: 18px;
  }

  .pvdp .pvdp-verification-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pvdp .pvdp-verification-grid {
    grid-template-columns: 1fr;
  }

  .pvdp .pvdp-verification-item,
  .pvdp .pvdp-verification-item:nth-child(odd),
  .pvdp .pvdp-verification-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--pvdp-line);
    border-inline-end: 0;
  }

  .pvdp .pvdp-verification-item:last-child {
    border-bottom: 0;
  }

  .pvdp .pvdp-admin-grid {
    grid-template-columns: 1fr;
  }

  .pvdp.pvdp-admin {
    margin-inline-start: -10px;
    padding: 15px;
  }

  .pvdp .pvdp-admin-head,
  .pvdp .pvdp-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .pvdp .pvdp-auth-panel {
    padding-inline: 18px;
  }

  .pvdp .pvdp-kpi-grid {
    grid-template-columns: 1fr;
  }

  .pvdp .pvdp-customer-bar {
    align-items: flex-start;
  }

  .pvdp .pvdp-customer-brand small {
    display: none;
  }
}

@media (max-width: 782px) {
  body.admin-bar .pvdp .pvdp-sidebar {
    inset-block-start: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pvdp *,
  .pvdp *::before,
  .pvdp *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .pvdp .pvdp-button,
  .pvdp .pvdp-control,
  .pvdp .pvdp-card,
  .pvdp .pvdp-kpi,
  .pvdp .pvdp-table-wrap {
    border: 1px solid CanvasText;
  }
}

@media print {
  .pvdp .pvdp-sidebar,
  .pvdp .pvdp-topbar-actions,
  .pvdp .pvdp-menu-toggle,
  .pvdp .pvdp-toolbar,
  .pvdp .pvdp-pagination,
  .pvdp .pvdp-toast-region,
  .pvdp .pvdp-no-print {
    display: none !important;
  }

  .pvdp,
  .pvdp.pvdp-dashboard-page,
  .pvdp .pvdp-main,
  .pvdp .pvdp-content {
    background: #fff !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .pvdp .pvdp-card,
  .pvdp .pvdp-kpi,
  .pvdp .pvdp-table-wrap {
    box-shadow: none;
  }
}

/* Form helpers and language controls */
.pvdp .pvdp-check-label {
  align-items: flex-start;
  color: var(--pvdp-muted);
  display: flex;
  font-size: 0.75rem;
  gap: 8px;
}

.pvdp .pvdp-check-label input {
  accent-color: var(--pvdp-brand-700);
  height: 16px;
  margin: 2px 0 0;
  width: 16px;
}

.pvdp .pvdp-check-tile {
  align-items: center;
  background: var(--pvdp-surface);
  border: 1px solid var(--pvdp-line);
  border-radius: var(--pvdp-radius-sm);
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
}

.pvdp .pvdp-check-tile input {
  accent-color: var(--pvdp-brand-700);
  flex: 0 0 auto;
  height: 17px;
  width: 17px;
}

.pvdp .pvdp-check-tile strong,
.pvdp .pvdp-check-tile small {
  display: block;
}

.pvdp .pvdp-check-tile strong {
  color: var(--pvdp-text);
  font-size: 0.72rem;
}

.pvdp .pvdp-check-tile small {
  color: var(--pvdp-muted);
  font-size: 0.62rem;
}

.pvdp .pvdp-inline-language {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
}

.pvdp .pvdp-inline-language button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  min-height: 30px;
  min-width: 34px;
  padding: 4px 7px;
}

.pvdp .pvdp-inline-language button[aria-pressed="true"] {
  background: #fff;
  color: var(--pvdp-brand-900);
}

.pvdp .pvdp-topbar .pvdp-inline-language {
  background: var(--pvdp-surface-soft);
  border-color: var(--pvdp-line);
  color: var(--pvdp-muted);
}

.pvdp .pvdp-customer-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.pvdp .pvdp-customer-actions > .pvdp-button {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.pvdp .pvdp-user-greeting:not(:empty)::before {
  content: " — ";
}

.pvdp .pvdp-kpi-value--date {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.3;
}

.pvdp .pvdp-customer-toolbar {
  grid-template-columns: minmax(220px, 520px);
}

.pvdp [data-pvdp-retry][hidden] {
  display: none;
}

/* Native dialog-based editors */
.pvdp .pvdp-dialog {
  background: var(--pvdp-surface);
  border: 0;
  border-radius: var(--pvdp-radius-lg);
  box-shadow: var(--pvdp-shadow-lg);
  color: var(--pvdp-ink);
  margin: auto;
  max-height: min(92vh, 940px);
  max-width: 760px;
  padding: 0;
  width: calc(100vw - 28px);
}

.pvdp .pvdp-dialog--wide {
  max-width: 1280px;
}

.pvdp .pvdp-dialog::backdrop {
  backdrop-filter: blur(3px);
  background: rgba(16, 24, 40, 0.68);
}

.pvdp .pvdp-dialog[open] {
  animation: pvdp-dialog-in 160ms ease-out;
}

.pvdp .pvdp-dialog-form {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 940px);
  min-height: 0;
}

.pvdp .pvdp-dialog-head {
  align-items: center;
  background: linear-gradient(135deg, var(--pvdp-brand-950), var(--pvdp-brand-700));
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  justify-content: space-between;
  padding: 17px 20px;
}

.pvdp .pvdp-dialog-head .pvdp-auth-kicker {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3px;
}

.pvdp .pvdp-dialog-head h2 {
  font-size: 1.2rem;
  margin: 0;
}

.pvdp .pvdp-dialog-head small {
  color: rgba(255, 255, 255, 0.7);
}

.pvdp .pvdp-dialog-body {
  display: grid;
  gap: 15px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
}

.pvdp .pvdp-dialog-actions {
  align-items: center;
  background: var(--pvdp-surface-soft);
  border-top: 1px solid var(--pvdp-line);
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  justify-content: flex-end;
  padding: 13px 20px;
}

.pvdp .pvdp-fieldset {
  border: 1px solid var(--pvdp-line);
  border-radius: 14px;
  display: grid;
  gap: 13px;
  margin: 0;
  min-width: 0;
  padding: 15px;
}

.pvdp .pvdp-fieldset > legend {
  color: var(--pvdp-brand-900);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 7px;
}

.pvdp .pvdp-form-grid {
  display: grid;
  gap: 12px;
}

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

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

.pvdp .pvdp-form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pvdp .pvdp-form-span-2 {
  grid-column: span 2;
}

.pvdp textarea.pvdp-control {
  min-height: 86px;
  resize: vertical;
}

.pvdp .pvdp-item-list {
  display: grid;
  gap: 10px;
}

.pvdp .pvdp-item-row {
  background: var(--pvdp-surface-soft);
  border: 1px solid var(--pvdp-line);
  border-radius: 12px;
  display: grid;
  gap: 11px;
  padding: 13px;
}

.pvdp .pvdp-item-row-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pvdp .pvdp-item-row-head strong {
  color: var(--pvdp-brand-900);
  font-size: 0.78rem;
}

.pvdp .pvdp-signature {
  background: #fff;
  border: 2px dashed var(--pvdp-line-strong);
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
}

.pvdp .pvdp-signature canvas {
  cursor: crosshair;
  height: 180px;
  touch-action: none;
  width: 100%;
}

.pvdp .pvdp-location-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.pvdp .pvdp-location-row span {
  color: var(--pvdp-muted);
  font-size: 0.72rem;
}

@keyframes pvdp-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 960px) {
  .pvdp .pvdp-form-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pvdp .pvdp-dialog,
  .pvdp .pvdp-dialog--wide {
    border-radius: 16px;
    max-height: calc(100vh - 12px);
    width: calc(100vw - 12px);
  }

  .pvdp .pvdp-dialog-form {
    max-height: calc(100vh - 12px);
  }

  .pvdp .pvdp-dialog-head,
  .pvdp .pvdp-dialog-body,
  .pvdp .pvdp-dialog-actions {
    padding-inline: 14px;
  }

  .pvdp .pvdp-form-grid--2,
  .pvdp .pvdp-form-grid--3,
  .pvdp .pvdp-form-grid--4 {
    grid-template-columns: 1fr;
  }

  .pvdp .pvdp-form-span-2 {
    grid-column: auto;
  }

  .pvdp .pvdp-dialog-actions > .pvdp-button {
    flex: 1;
  }
}
