/**
 * Plumb Now Design System
 * Phase 7 - UI/UX Foundation
 * Premium SaaS Design System inspired by Stripe and Linear
 */

/* ============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */

:root {
  /* Typography Scale */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */

  /* Heading Sizes */
  --heading-h1: clamp(2.25rem, 5vw, 3rem);    /* 36-48px */
  --heading-h2: clamp(1.875rem, 4vw, 2.25rem); /* 30-36px */
  --heading-h3: clamp(1.5rem, 3vw, 1.875rem);  /* 24-30px */
  --heading-h4: clamp(1.25rem, 2vw, 1.5rem);   /* 20-24px */

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  /* Spacing Scale (4px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.25rem;  /* 20px */
  --radius-full: 9999px;

  /* Brand Colors - Primary */
  --color-brand-50: #eef7ff;
  --color-brand-100: #d9edff;
  --color-brand-200: #b9ddff;
  --color-brand-300: #89c6ff;
  --color-brand-400: #54a7ff;
  --color-brand-500: #237fff;
  --color-brand-600: #1764e8;
  --color-brand-700: #164fbb;
  --color-brand-800: #174495;
  --color-brand-900: #162f66;

  /* Status Colors */
  --color-success-50: #f0fdf4;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;

  --color-warning-50: #fffbeb;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-warning-700: #b45309;

  --color-danger-50: #fef2f2;
  --color-danger-500: #ef4444;
  --color-danger-600: #dc2626;
  --color-danger-700: #b91c1c;

  --color-info-50: #eff6ff;
  --color-info-500: #3b82f6;
  --color-info-600: #2563eb;
  --color-info-700: #1d4ed8;

  /* Neutral Palette - Light Mode */
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-tertiary: #94a3b8;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0 0 0 4px rgba(35, 127, 255, 0.14);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Dark Mode Variables */
html.dark {
  --color-background: #0f172a;
  --color-surface: #1e293b;
  --color-surface-elevated: #334155;
  --color-border: #334155;
  --color-border-light: #475569;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-tertiary: #94a3b8;
  --shadow-card: 0 12px 32px rgba(2, 6, 23, 0.28);
  --shadow-soft: 0 20px 40px rgba(2, 6, 23, 0.35);
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

h1, .h1 {
  font-size: var(--heading-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h2, .h2 {
  font-size: var(--heading-h2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

h3, .h3 {
  font-size: var(--heading-h3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-text-primary);
}

h4, .h4 {
  font-size: var(--heading-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--color-text-primary);
}

.text-body {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
}

.text-secondary {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}

.text-small {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
  outline: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-brand-600);
  color: white;
  box-shadow: 0 4px 12px rgba(23, 100, 232, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-700);
  box-shadow: 0 6px 16px rgba(23, 100, 232, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-background);
  border-color: var(--color-border-light);
}

.btn-danger {
  background: var(--color-danger-600);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-700);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-background);
  color: var(--color-text-primary);
}

.btn-icon {
  padding: var(--space-2);
  width: 2.5rem;
  height: 2.5rem;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
}

/* ============================================
   CARD COMPONENTS
   ============================================ */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.metric-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

.metric-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.metric-card-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

.metric-card-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.metric-card-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-3);
}

.metric-card-change.positive {
  color: var(--color-success-600);
}

.metric-card-change.negative {
  color: var(--color-danger-600);
}

.action-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
}

.action-card:hover {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 4px rgba(35, 127, 255, 0.1);
  transform: translateY(-2px);
}

.empty-state-card {
  padding: var(--space-12);
  text-align: center;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--space-4);
  color: var(--color-text-tertiary);
}

.empty-state-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

/* ============================================
   TABLE COMPONENTS
   ============================================ */

.table-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.table th {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.table td {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  border-top: 1px solid var(--color-border);
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--color-background);
}

.table-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Mobile Table View */
@media (max-width: 768px) {
  .table-mobile {
    display: block;
  }

  .table-mobile thead {
    display: none;
  }

  .table-mobile tbody,
  .table-mobile tr,
  .table-mobile td {
    display: block;
  }

  .table-mobile tr {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
  }

  .table-mobile td {
    padding: var(--space-2) 0;
    border: none;
  }

  .table-mobile td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
  }
}

/* ============================================
   FORM COMPONENTS
   ============================================ */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-label-required::after {
  content: "*";
  color: var(--color-danger-500);
  margin-left: var(--space-1);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 4px rgba(35, 127, 255, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--color-background);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--color-danger-500);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-error {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-danger-600);
}

.form-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.form-checkbox,
.form-radio {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.form-checkbox:checked,
.form-radio:checked {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
}

.form-radio {
  border-radius: var(--radius-full);
}

/* ============================================
   MODAL & OVERLAY COMPONENTS
   ============================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal-backdrop);
  animation: fadeIn var(--transition-base);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 32rem;
  max-height: calc(100vh - 2rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-modal);
  overflow: hidden;
  animation: modalSlideIn var(--transition-slow);
  margin: auto;
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(90vh - 10rem);
}

.modal-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 90%;
  max-width: 28rem;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-modal);
  overflow-y: auto;
  animation: drawerSlideIn var(--transition-slow);
}

.confirmation-dialog {
  max-width: 24rem;
}

.confirmation-dialog .modal-body {
  text-align: center;
}

.confirmation-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-full);
}

.confirmation-icon.danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

.confirmation-icon.warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

/* ============================================
   BADGE & STATUS COMPONENTS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-success {
  background: var(--color-success-50);
  color: var(--color-success-700);
}

.badge-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-700);
}

.badge-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-700);
}

.badge-info {
  background: var(--color-info-50);
  color: var(--color-info-700);
}

.badge-neutral {
  background: var(--color-background);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-brand-600);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-background) 25%,
    var(--color-border-light) 50%,
    var(--color-background) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  z-index: var(--z-fixed);
}

html.dark .loading-overlay {
  background: rgba(15, 23, 42, 0.8);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-6);
}

.pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination-item:hover:not(.active):not(:disabled) {
  background: var(--color-background);
  border-color: var(--color-brand-500);
  color: var(--color-brand-600);
}

.pagination-item.active {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: white;
}

.pagination-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
}

.breadcrumb-item a {
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
}

.breadcrumb-item a:hover {
  color: var(--color-brand-600);
}

.breadcrumb-item.active {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

.breadcrumb-separator {
  color: var(--color-text-tertiary);
}

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.tab-item {
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.tab-item:hover:not(.active) {
  color: var(--color-text-primary);
}

.tab-item.active {
  color: var(--color-brand-600);
  border-bottom-color: var(--color-brand-600);
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.alert-message {
  font-size: var(--font-size-sm);
}

.alert-success {
  background: var(--color-success-50);
  border-color: var(--color-success-500);
  color: var(--color-success-700);
}

.alert-warning {
  background: var(--color-warning-50);
  border-color: var(--color-warning-500);
  color: var(--color-warning-700);
}

.alert-danger {
  background: var(--color-danger-50);
  border-color: var(--color-danger-500);
  color: var(--color-danger-700);
}

.alert-info {
  background: var(--color-info-50);
  border-color: var(--color-info-500);
  color: var(--color-info-700);
}

/* ============================================
   STEPPER (WIZARD)
   ============================================ */

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.stepper-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: -1;
}

.stepper-item.completed:not(:last-child)::after {
  background: var(--color-brand-600);
}

.stepper-circle {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  transition: all var(--transition-base);
}

.stepper-item.active .stepper-circle {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: white;
}

.stepper-item.completed .stepper-circle {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: white;
}

.stepper-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-align: center;
}

.stepper-item.active .stepper-label {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-12) 0;
}

.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

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

.text-right {
  text-align: right;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

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

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

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile: < 768px (default) */
/* Tablet: 768px - 1024px */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* Desktop: > 1024px */
@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Touch Targets - Minimum 44px for mobile */
@media (max-width: 768px) {
  .btn,
  .pagination-item,
  .tab-item {
    min-height: 44px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 2px;
}

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

/* ============================================
   PHASE 1 FOUNDATION OVERRIDES
   Flowbite-first app shell and reusable patterns
   ============================================ */

body {
  background: var(--color-background);
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(35, 127, 255, 0.06), transparent 28rem),
    var(--color-background);
}

.app-topbar {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

html.dark .app-topbar {
  background: rgba(30, 41, 59, 0.92);
}

.app-sidebar {
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
}

.app-main {
  min-height: calc(100vh - 4rem);
  background: transparent;
}

.app-sidebar-shell {
  width: 16rem;
  transition: width var(--transition-base);
}

.app-main {
  transition: margin-left var(--transition-base);
}

@media (min-width: 1024px) {
  .app-main {
    margin-left: 16rem;
  }

  .app-shell-collapsed .app-sidebar-shell {
    width: 4.25rem;
  }

  .app-shell-collapsed .app-main {
    margin-left: 4.25rem;
  }

  .app-shell-collapsed .app-sidebar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .app-shell-collapsed .app-sidebar ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
  }

  .app-shell-collapsed .app-sidebar-section-label,
  .app-shell-collapsed .sidebar-link-label,
  .app-shell-collapsed .sidebar-link-badge,
  .app-shell-collapsed .app-sidebar-link .ml-auto {
    display: none;
  }

  .app-shell-collapsed .app-sidebar-section {
    width: 100%;
    padding: 0.5rem 0 0.25rem;
    margin: 0.5rem 0 0;
    border-top: 1px solid var(--color-border);
  }

  .app-shell-collapsed .app-sidebar-section:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }

  .app-shell-collapsed .app-sidebar-link {
    width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    gap: 0;
  }

  .app-shell-collapsed .app-sidebar-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
  }

  .app-shell-collapsed .app-sidebar-link:hover {
    transform: none;
  }
}

.app-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-10);
}

.app-main__viewport--mobile-chat,
.app-content--mobile-chat,
.animate-rise--mobile-chat {
  min-height: 0;
}

.animate-rise--mobile-chat {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-content {
    padding: var(--space-8) var(--space-6) var(--space-12);
  }
}

@media (min-width: 1280px) {
  .app-content {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.page-header-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.page-kicker {
  margin-bottom: var(--space-1);
  color: var(--color-brand-600);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.page-description {
  margin-top: var(--space-2);
  max-width: 48rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .page-header-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .page-actions {
    justify-content: flex-end;
  }
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .search-filter-bar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.action-bar {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .action-bar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
}

.btn {
  min-height: 2.625rem;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.btn-success {
  background: var(--color-success-600);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-success:hover:not(:disabled) {
  background: var(--color-success-700);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
  transform: translateY(-1px);
}

.card,
.metric-card,
.table-container,
.empty-state-card {
  border-radius: var(--radius-lg);
}

.card {
  box-shadow: var(--shadow-sm);
}

.card-header,
.card-body,
.card-footer {
  padding: var(--space-5);
}

@media (min-width: 768px) {
  .card-header,
  .card-body,
  .card-footer {
    padding: var(--space-6);
  }
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-input,
.form-select,
.form-textarea {
  min-height: 2.75rem;
  border-radius: var(--radius-md);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  box-shadow: var(--shadow-focus);
}

.form-input.error,
.form-select.error,
.form-textarea.error,
.form-checkbox.error,
.form-radio.error {
  border-color: var(--color-danger-500);
}

.form-file {
  display: block;
  width: 100%;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.form-file::file-selector-button {
  margin-right: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-brand-50);
  color: var(--color-brand-700);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}

.form-file:hover::file-selector-button {
  background: var(--color-brand-100);
}

.form-toggle {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  appearance: none;
  border-radius: var(--radius-full);
  background: var(--color-border);
  cursor: pointer;
  transition: background var(--transition-base);
}

.form-toggle::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}

.form-toggle:checked {
  background: var(--color-brand-600);
}

.form-toggle:checked::after {
  transform: translateX(1.25rem);
}

.badge {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  text-transform: none;
}

.badge-success {
  border-color: rgba(22, 163, 74, 0.16);
}

.badge-warning {
  border-color: rgba(217, 119, 6, 0.18);
}

.badge-danger {
  border-color: rgba(220, 38, 38, 0.18);
}

.badge-info {
  border-color: rgba(37, 99, 235, 0.16);
}

.pagination {
  flex-wrap: wrap;
}

.pagination-summary {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.confirmation-icon.success {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

html.dark .confirmation-icon.success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

/* Semantic utility aliases used by existing templates. */
.bg-danger-100 {
  background-color: var(--color-danger-50);
}

.text-danger-600 {
  color: var(--color-danger-600);
}

.bg-success-100 {
  background-color: var(--color-success-50);
}

.text-success-600 {
  color: var(--color-success-600);
}

.border-danger-200 {
  border-color: rgba(220, 38, 38, 0.22);
}

html.dark .dark\:bg-danger-900\/30 {
  background-color: rgba(127, 29, 29, 0.3);
}

html.dark .dark\:text-danger-400 {
  color: #f87171;
}

html.dark .dark\:bg-success-900\/30 {
  background-color: rgba(20, 83, 45, 0.3);
}

html.dark .dark\:text-success-400 {
  color: #4ade80;
}

html.dark .dark\:border-danger-500\/30 {
  border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   PHASE 7 CUSTOMER PAGE COMPONENTS
   Keeps the shared shell consistent while improving page-level UI.
   ============================================ */

.customer-soft-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  color: #1764e8;
  font-size: 0.74rem;
  font-weight: 700;
}

html.dark .customer-soft-pill {
  border-color: rgba(96, 165, 250, 0.16);
  background: rgba(37, 99, 235, 0.14);
  color: #93c5fd;
}

.customer-surface {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

html.dark .customer-surface {
  border-color: rgba(148, 163, 184, 0.14);
}

.customer-surface-header,
.customer-surface-body {
  padding: var(--space-5);
}

.customer-surface-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.customer-surface-title {
  color: var(--color-text-primary);
  font-size: 1.05rem;
  font-weight: var(--font-weight-bold);
}

.customer-surface-description {
  margin-top: 0.2rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.customer-surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.customer-stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 9rem;
  padding: var(--space-5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.customer-stat-card-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.customer-stat-card-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.customer-stat-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-stat-value {
  color: var(--color-text-primary);
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.customer-stat-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.customer-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
}

.customer-tone-brand .customer-stat-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #1764e8;
}

.customer-tone-success .customer-stat-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.customer-tone-warning .customer-stat-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.customer-tone-neutral .customer-stat-icon {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
}

.customer-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-10) var(--space-6);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(248, 250, 252, 0.7);
  text-align: center;
}

html.dark .customer-empty-state {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.16);
}

.customer-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(37, 99, 235, 0.08);
  color: #1764e8;
}

.customer-empty-icon.small {
  width: 2.5rem;
  height: 2.5rem;
}

.customer-empty-title {
  color: var(--color-text-primary);
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
}

.customer-empty-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.65;
  max-width: 38rem;
}

.customer-job-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(248, 250, 252, 0.7);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.customer-job-card:hover {
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: var(--shadow-sm);
}

html.dark .customer-job-card {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.12);
}

.customer-job-card-header,
.customer-job-card-body {
  display: flex;
  gap: var(--space-4);
  justify-content: space-between;
}

.customer-job-card-body {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}

.customer-job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.customer-job-reference {
  color: #1764e8;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-job-timestamp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-align: right;
}

.customer-job-title {
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
}

.customer-job-description {
  color: #475569;
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.customer-job-card-copy {
  display: grid;
  gap: 0.8rem;
}

.customer-job-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

html.dark .customer-job-description,
html.dark .customer-job-timestamp {
  color: #94a3b8;
}

.customer-inline-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.customer-job-details,
.customer-assignee-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.customer-job-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1.2fr) auto;
  gap: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 0.9rem;
}

.customer-job-stat {
  display: grid;
  gap: 0.18rem;
  padding-right: 0.9rem;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.customer-job-stat:last-of-type {
  border-right: 0;
}

.customer-job-stat__label {
  color: var(--color-text-tertiary);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
}

.customer-job-stat strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.customer-job-stat--wide strong {
  line-height: 1.55;
}

.customer-job-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.customer-job-actions--inline {
  align-self: center;
  justify-self: end;
}

.admin-job-card .customer-job-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.admin-job-card {
  position: relative;
}

.admin-job-card__surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.admin-job-card .customer-job-card-header,
.admin-job-card .customer-job-card-body {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.admin-job-card .customer-job-actions,
.admin-job-card .customer-job-actions a,
.admin-job-card .customer-job-actions button {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.customer-notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
}

.customer-notification-item.unread {
  background: rgba(239, 246, 255, 0.85);
  border-color: rgba(96, 165, 250, 0.18);
}

html.dark .customer-notification-item {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.12);
}

html.dark .customer-notification-item.unread {
  background: rgba(30, 41, 59, 0.78);
}

.customer-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.95rem;
  background: rgba(37, 99, 235, 0.08);
  color: #1764e8;
  flex-shrink: 0;
}

.customer-notification-copy {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.customer-notification-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.customer-notification-title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.customer-notification-message {
  margin-top: 0.2rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.customer-unread-dot {
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: #1764e8;
  flex-shrink: 0;
}

.customer-notification-footer,
.customer-notification-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.customer-notification-footer {
  justify-content: space-between;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.customer-text-link {
  color: #1764e8;
  font-size: 0.82rem;
  font-weight: var(--font-weight-semibold);
}

.customer-settings-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.customer-settings-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
}

.customer-settings-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1764e8, #0f172a);
  color: white;
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
}

.customer-settings-name {
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
}

.customer-settings-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

.customer-settings-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.customer-settings-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-text-primary);
  transition: all var(--transition-base);
}

.customer-settings-link > span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.customer-settings-link > small {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.customer-settings-link:hover,
.customer-settings-link.active {
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: var(--shadow-sm);
}

html.dark .customer-settings-profile,
html.dark .customer-settings-link {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.12);
}

html.dark .customer-settings-link > small,
html.dark .customer-settings-subtitle {
  color: #94a3b8;
}

@media (min-width: 768px) {
  .customer-surface-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  /* Operational admin cards share the same compact rhythm as customer jobs
     and plumber leads. Keep the action on the right without reserving a
     second full-width footer on small screens. */
  .admin-job-card {
    gap: .65rem;
    padding: .75rem;
  }

  .admin-job-card .customer-job-card-header,
  .admin-job-card .customer-job-card-body {
    gap: .65rem;
  }

  .admin-job-card .customer-job-card-body { gap: .65rem; }
  .admin-job-card .customer-job-card-copy { gap: .55rem; }
  .admin-job-card .customer-job-stats { padding-top: .65rem; gap: .55rem; }

  .customer-job-card-header,
  .customer-job-card-body,
  .customer-notification-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .customer-job-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .customer-job-stat {
    padding-right: 0;
    border-right: 0;
  }

  .customer-job-stat--wide {
    grid-column: 1 / -1;
  }

  .customer-job-actions--inline {
    width: 100%;
    justify-self: stretch;
  }

  .customer-job-actions--inline .btn {
    width: 100%;
  }

  .admin-job-card .customer-job-actions--inline {
    width: auto;
    justify-self: end;
  }

  .admin-job-card .customer-job-actions--inline .btn {
    width: auto;
    min-width: 8rem;
  }

  .customer-job-timestamp,
  .customer-job-actions {
    align-items: flex-start;
    text-align: left;
  }
}

/* ============================================
   PLUMBER PORTAL STANDARDIZATION
   Keep plumber pages on the shared design-token
   typography scale even when they reuse
   customer-style structural classes.
   ============================================ */

.plumber-page .customer-soft-pill,
.plumber-public-page .customer-soft-pill {
  min-height: 1.75rem;
  padding: 0 var(--space-3);
  border-color: var(--color-border);
  background: var(--color-background);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.plumber-page .customer-surface,
.plumber-public-page .customer-surface {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-page .customer-surface-header,
.plumber-page .customer-surface-body,
.plumber-public-page .customer-surface-header,
.plumber-public-page .customer-surface-body {
  padding: var(--space-6);
}

.plumber-page .customer-surface-header,
.plumber-public-page .customer-surface-header {
  gap: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.plumber-page .customer-surface-title,
.plumber-public-page .customer-surface-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.plumber-page .customer-surface-description,
.plumber-public-page .customer-surface-description {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-page .customer-stat-card,
.plumber-public-page .customer-stat-card {
  min-height: auto;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-page .customer-stat-card-link:hover,
.plumber-public-page .customer-stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.plumber-page .customer-stat-label,
.plumber-public-page .customer-stat-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
  text-transform: none;
}

.plumber-page .customer-stat-value,
.plumber-public-page .customer-stat-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

.plumber-page .customer-stat-meta,
.plumber-public-page .customer-stat-meta {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-page .customer-empty-state,
.plumber-public-page .customer-empty-state {
  padding: var(--space-12);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.plumber-page .customer-empty-title,
.plumber-public-page .customer-empty-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.plumber-page .customer-empty-description,
.plumber-public-page .customer-empty-description {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-page .customer-job-card,
.plumber-public-page .customer-job-card {
  gap: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-page .customer-job-card:hover,
.plumber-public-page .customer-job-card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-lg);
}

.plumber-page .customer-job-card-header,
.plumber-page .customer-job-card-body,
.plumber-public-page .customer-job-card-header,
.plumber-public-page .customer-job-card-body {
  padding: var(--space-5) var(--space-6);
}

.plumber-page .customer-job-card-header,
.plumber-public-page .customer-job-card-header {
  border-bottom: 1px solid var(--color-border-light);
}

.plumber-page .customer-job-card-body,
.plumber-public-page .customer-job-card-body {
  align-items: flex-start;
}

.plumber-page .customer-job-reference,
.plumber-public-page .customer-job-reference {
  font-size: var(--font-size-xs);
  letter-spacing: 0.05em;
}

.plumber-page .customer-job-timestamp,
.plumber-public-page .customer-job-timestamp {
  font-size: var(--font-size-xs);
}

.plumber-page .customer-job-title,
.plumber-public-page .customer-job-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.plumber-page .customer-job-description,
.plumber-public-page .customer-job-description {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.plumber-page .customer-inline-detail,
.plumber-public-page .customer-inline-detail {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-page .customer-notification-item,
.plumber-public-page .customer-notification-item {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-page .customer-notification-item.unread,
.plumber-public-page .customer-notification-item.unread {
  background: var(--color-surface);
  border-color: var(--color-border);
}

.plumber-page .customer-notification-title,
.plumber-public-page .customer-notification-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-page .customer-notification-message,
.plumber-public-page .customer-notification-message,
.plumber-page .customer-notification-footer,
.plumber-public-page .customer-notification-footer,
.plumber-page .customer-text-link,
.plumber-public-page .customer-text-link {
  font-size: var(--font-size-sm);
}

.plumber-page .customer-settings-profile,
.plumber-page .customer-settings-link {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-page .customer-settings-profile {
  padding: var(--space-5);
}

.plumber-page .customer-settings-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.plumber-page .customer-settings-subtitle,
.plumber-page .customer-settings-link > small {
  font-size: var(--font-size-xs);
}

.plumber-page .customer-settings-link {
  gap: var(--space-1);
  padding: var(--space-5);
}

.plumber-page .customer-settings-link > span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-page .customer-settings-link:hover,
.plumber-page .customer-settings-link.active {
  border-color: var(--color-brand-300);
  box-shadow: var(--shadow-lg);
}

html.dark .plumber-page .customer-soft-pill,
html.dark .plumber-public-page .customer-soft-pill {
  border-color: var(--color-border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--color-text-secondary);
}

html.dark .plumber-page .customer-surface,
html.dark .plumber-page .customer-stat-card,
html.dark .plumber-page .customer-empty-state,
html.dark .plumber-page .customer-job-card,
html.dark .plumber-page .customer-notification-item,
html.dark .plumber-page .customer-settings-profile,
html.dark .plumber-page .customer-settings-link,
html.dark .plumber-public-page .customer-surface,
html.dark .plumber-public-page .customer-stat-card,
html.dark .plumber-public-page .customer-empty-state,
html.dark .plumber-public-page .customer-job-card,
html.dark .plumber-public-page .customer-notification-item {
  border-color: var(--color-border);
  background: var(--color-surface);
}

html.dark .plumber-page .customer-job-description,
html.dark .plumber-page .customer-job-timestamp,
html.dark .plumber-page .customer-notification-footer,
html.dark .plumber-public-page .customer-job-description,
html.dark .plumber-public-page .customer-job-timestamp,
html.dark .plumber-public-page .customer-notification-footer {
  color: var(--color-text-secondary);
}

.plumber-settings-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.98));
  box-shadow: var(--shadow-card);
}

.plumber-settings-hero__bg {
  min-height: 9rem;
  background:
    radial-gradient(circle at left top, rgba(35, 127, 255, 0.24), transparent 14rem),
    linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0f172a 100%);
}

.plumber-settings-hero__content {
  margin-top: -3.75rem;
  padding: 0 var(--space-6) var(--space-6);
}

.plumber-settings-hero__summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.plumber-settings-avatar-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.plumber-settings-avatar-frame,
.plumber-settings-avatar-panel__preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1764e8, #0f172a);
  color: white;
  font-size: 1.8rem;
  font-weight: var(--font-weight-bold);
  overflow: hidden;
}

.plumber-settings-avatar-image,
.plumber-settings-avatar-panel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plumber-settings-hero__name {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: var(--font-weight-bold);
}

.plumber-settings-hero__meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-settings-status-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.plumber-settings-status-card {
  padding: var(--space-5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.88);
}

.plumber-settings-status-card__label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plumber-settings-status-card__value {
  margin-top: var(--space-2);
  color: var(--color-text-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

.plumber-settings-status-card__meta {
  margin-top: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.plumber-settings-tab:hover,
.plumber-settings-tab.active {
  border-color: rgba(35, 127, 255, 0.18);
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
}

.plumber-settings-avatar-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.plumber-settings-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.plumber-settings-progress__chart {
  --size: 9rem;
  width: var(--size);
  height: var(--size);
  margin: 0 auto;
  border-radius: 999px;
  background:
    conic-gradient(#22c55e calc(var(--progress) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
}

.plumber-settings-progress__inner {
  width: calc(var(--size) - 1.35rem);
  height: calc(var(--size) - 1.35rem);
  border-radius: 999px;
  background: var(--color-surface);
  display: grid;
  place-items: center;
  color: var(--color-text-primary);
  font-size: 1.3rem;
  font-weight: var(--font-weight-bold);
}

.plumber-settings-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
}

.plumber-settings-check.done {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

html.dark .plumber-settings-hero,
html.dark .plumber-settings-avatar-card,
html.dark .plumber-settings-status-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}

html.dark .plumber-settings-progress__chart {
  background: conic-gradient(#22c55e calc(var(--progress) * 1%), rgba(51, 65, 85, 0.9) 0);
}

@media (min-width: 768px) {
  .plumber-settings-avatar-card {
    flex-direction: row;
    align-items: center;
  }
}

.customer-page .customer-surface {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.customer-page .customer-surface-header,
.customer-page .customer-surface-body {
  padding: var(--space-6);
}

.customer-page .customer-surface-header {
  gap: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.customer-page .customer-surface-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.customer-page .customer-surface-description,
.customer-page .customer-job-description,
.customer-page .customer-notification-message {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.customer-page .customer-stat-card,
.customer-page .customer-settings-profile,
.customer-page .customer-settings-link,
.customer-page .customer-empty-state,
.customer-page .customer-job-card,
.customer-page .customer-notification-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.customer-page .customer-stat-card {
  min-height: auto;
  padding: var(--space-6);
}

.customer-page .customer-stat-label,
.customer-page .customer-job-reference {
  font-size: var(--font-size-xs);
}

.customer-page .customer-stat-value {
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
}

.customer-page .customer-settings-profile,
.customer-page .customer-settings-link {
  padding: var(--space-5);
}

.customer-page .customer-settings-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

.customer-page .customer-settings-link > span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.customer-page .customer-settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.customer-page .customer-settings-tab:hover,
.customer-page .customer-settings-tab.active {
  border-color: rgba(35, 127, 255, 0.18);
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
}

.customer-settings-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.98));
  box-shadow: var(--shadow-card);
}

.customer-settings-hero__bg {
  min-height: 8rem;
  background:
    radial-gradient(circle at right top, rgba(34, 197, 94, 0.18), transparent 13rem),
    linear-gradient(135deg, #0f172a 0%, #1764e8 52%, #38bdf8 100%);
}

.customer-settings-hero__content {
  margin-top: -3rem;
  padding: 0 var(--space-6) var(--space-6);
}

.customer-settings-hero__summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.customer-settings-hero__profile {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.customer-settings-hero__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1764e8, #0f172a);
  color: white;
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold);
}

.customer-settings-hero__name {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: var(--font-weight-bold);
}

.customer-settings-hero__meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.customer-settings-hero__stats {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

html.dark .customer-page .customer-surface,
html.dark .customer-page .customer-stat-card,
html.dark .customer-page .customer-settings-profile,
html.dark .customer-page .customer-settings-link,
html.dark .customer-page .customer-empty-state,
html.dark .customer-page .customer-job-card,
html.dark .customer-page .customer-notification-item,
html.dark .customer-settings-hero,
html.dark .customer-settings-hero__profile {
  border-color: var(--color-border);
  background: var(--color-surface);
}

@media (min-width: 768px) {
  .customer-settings-hero__profile {
    flex-direction: row;
    align-items: center;
  }
}

/* ============================================
   PHASE 6A STEP 2C ADMIN POLISH
   Scoped to the Flask/Jinja admin shell.
   ============================================ */

.btn-warning {
  background: var(--color-warning-600);
  color: white;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
}

.btn-warning:hover:not(:disabled) {
  background: var(--color-warning-700);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-danger-500);
}

.admin-shell {
  background:
    radial-gradient(circle at top left, rgba(35, 127, 255, 0.08), transparent 30rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0)),
    var(--color-background);
}

html.dark .admin-shell {
  background:
    radial-gradient(circle at top left, rgba(84, 167, 255, 0.12), transparent 32rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0)),
    var(--color-background);
}

.admin-shell .app-topbar {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03), 0 12px 28px rgba(15, 23, 42, 0.05);
}

.admin-shell .app-sidebar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

html.dark .admin-shell .app-sidebar {
  background: rgba(15, 23, 42, 0.92);
}

.admin-shell .app-sidebar a {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.admin-shell .app-sidebar a.bg-gray-100,
.admin-shell .app-sidebar a.dark\:bg-gray-700 {
  border-color: rgba(35, 127, 255, 0.16);
  background: var(--color-brand-50) !important;
  color: var(--color-brand-800) !important;
}

html.dark .admin-shell .app-sidebar a.bg-gray-100,
html.dark .admin-shell .app-sidebar a.dark\:bg-gray-700 {
  border-color: rgba(84, 167, 255, 0.22);
  background: rgba(35, 127, 255, 0.14) !important;
  color: #d9edff !important;
}

.admin-shell .app-content {
  max-width: 1560px;
}

.admin-shell .page-stack {
  gap: var(--space-5);
}

.admin-shell .breadcrumbs {
  margin-bottom: 0;
}

.admin-shell .page-header {
  padding-bottom: var(--space-1);
}

.admin-shell .page-title {
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  letter-spacing: 0;
}

.admin-shell .page-description {
  max-width: 56rem;
  color: #526173;
}

html.dark .admin-shell .page-description {
  color: #cbd5e1;
}

.admin-shell .section-stack {
  gap: var(--space-5);
}

.admin-shell .card,
.admin-shell .metric-card,
.admin-shell .table-container,
.admin-shell .empty-state-card {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.055);
}

html.dark .admin-shell .card,
html.dark .admin-shell .metric-card,
html.dark .admin-shell .table-container,
html.dark .admin-shell .empty-state-card {
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.06), 0 18px 45px rgba(2, 6, 23, 0.28);
}

.admin-shell .card-header {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0));
}

html.dark .admin-shell .card-header {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(30, 41, 59, 0));
}

.admin-shell .card-footer {
  background: rgba(248, 250, 252, 0.72);
}

html.dark .admin-shell .card-footer {
  background: rgba(15, 23, 42, 0.35);
}

.admin-shell .metric-card {
  position: relative;
  min-height: 9rem;
  overflow: hidden;
}

.admin-shell .metric-card::after {
  content: "";
  position: absolute;
  inset: auto 1rem 0 1rem;
  height: 3px;
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  background: linear-gradient(90deg, var(--color-brand-600), rgba(34, 197, 94, 0.85));
  opacity: 0.28;
}

.admin-shell .metric-card-value {
  letter-spacing: 0;
}

.admin-shell .table {
  min-width: 720px;
}

.admin-shell .table thead {
  background: #f8fafc;
}

html.dark .admin-shell .table thead {
  background: rgba(15, 23, 42, 0.68);
}

.admin-shell .table th {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  letter-spacing: 0.04em;
}

.admin-shell .table td {
  vertical-align: middle;
}

.admin-shell .overflow-x-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}

.admin-shell .overflow-x-auto::-webkit-scrollbar {
  height: 10px;
}

.admin-shell .overflow-x-auto::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
}

.admin-shell .table tbody tr:hover {
  background: rgba(35, 127, 255, 0.035);
}

html.dark .admin-shell .table tbody tr:hover {
  background: rgba(84, 167, 255, 0.06);
}

.admin-shell .table-actions,
.admin-shell td .flex.items-center.justify-end {
  flex-wrap: wrap;
}

.admin-shell .search-filter-bar,
.admin-shell .card-header form {
  align-items: stretch;
}

.admin-shell .card-header form .form-input,
.admin-shell .card-header form .form-select {
  background-color: #f8fafc;
}

html.dark .admin-shell .card-header form .form-input,
html.dark .admin-shell .card-header form .form-select {
  background-color: #0f172a;
}

.admin-shell .badge {
  min-height: 1.55rem;
  padding-inline: 0.625rem;
  font-weight: var(--font-weight-bold);
}

.admin-shell .admin-summary-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.admin-shell .admin-split-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}

.admin-shell .admin-detail-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.admin-shell .admin-split-grid > *,
.admin-shell .admin-summary-grid > *,
.admin-shell .card,
.admin-shell .card-body,
.admin-shell .card-header,
.admin-shell .table {
  min-width: 0;
}

.admin-shell .admin-section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.admin-shell .admin-key-value-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.admin-shell .admin-key-value-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.admin-shell .admin-key-value-row dt {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.admin-shell .admin-key-value-row dd {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.admin-shell .admin-action-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-lg);
  background: rgba(248, 250, 252, 0.76);
  padding: var(--space-4);
}

html.dark .admin-shell .admin-action-tile {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.2);
}

.admin-shell .admin-action-tile-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.admin-shell .admin-modal-alert {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: var(--space-4);
}

.admin-shell .admin-modal-alert ul {
  padding-left: 1rem;
}

.admin-shell .admin-preview-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
  padding: var(--space-5);
}

html.dark .admin-shell .admin-preview-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.9));
  border-color: rgba(148, 163, 184, 0.18);
}

.admin-shell .admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 13rem;
  text-align: center;
}

.admin-shell .btn {
  min-height: 2.5rem;
}

.admin-shell .btn-sm {
  min-height: 2.25rem;
}

.admin-shell .btn-ghost {
  border-color: rgba(148, 163, 184, 0.18);
}

.admin-shell .btn-ghost:hover:not(:disabled) {
  border-color: rgba(35, 127, 255, 0.18);
}

.admin-shell [data-modal-target],
.admin-shell [data-modal-toggle],
.admin-shell [data-modal-hide] {
  scroll-margin-top: 6rem;
}

.admin-shell [id$="-modal"] .card,
.admin-shell [id*="-modal-"] .card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.admin-shell [id$="-modal"] .card-header,
.admin-shell [id*="-modal-"] .card-header {
  padding: var(--space-5);
}

.admin-shell [id$="-modal"] .card-body,
.admin-shell [id*="-modal-"] .card-body {
  padding: var(--space-5);
}

.admin-shell [id$="-modal"] .card-footer,
.admin-shell [id*="-modal-"] .card-footer {
  padding: var(--space-5);
}

.admin-shell [id$="-modal"] .card-footer > div,
.admin-shell [id*="-modal-"] .card-footer > div {
  width: 100%;
}

.admin-shell .admin-action-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.75);
  padding: var(--space-4);
}

html.dark .admin-shell .admin-action-item {
  background: rgba(15, 23, 42, 0.38);
}

.admin-shell .empty-state-card,
.admin-shell td .mx-auto.max-w-sm,
.admin-shell .card-body.py-12.text-center,
.admin-shell .card-body.py-16.text-center {
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .admin-shell .app-content {
    padding: var(--space-5) var(--space-4) var(--space-8);
  }

  .admin-shell .page-actions,
  .admin-shell .page-actions .btn,
  .admin-shell .card-header form .form-select {
    width: 100%;
  }

  .admin-shell .page-actions .btn,
  .admin-shell .card-header form .btn {
    justify-content: center;
  }

  .admin-shell .card-header,
  .admin-shell .card-body,
  .admin-shell .card-footer {
    padding: var(--space-4);
  }

  .admin-shell .table {
    min-width: 640px;
  }

  .admin-shell .admin-action-tile {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-shell .admin-action-tile .btn,
  .admin-shell .admin-action-tile form,
  .admin-shell .admin-action-tile form .btn {
    width: 100%;
  }

  .admin-shell .admin-key-value-row {
    flex-direction: column;
    gap: var(--space-1);
  }

  .admin-shell .admin-key-value-row dd {
    text-align: left;
  }

  .admin-shell [id$="-modal"] .card-footer > div,
  .admin-shell [id*="-modal-"] .card-footer > div {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .admin-shell [id$="-modal"] .card-footer .btn,
  .admin-shell [id*="-modal-"] .card-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 640px) {
  .admin-shell .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .admin-shell .admin-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-shell .admin-split-grid {
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  }
}

@media (min-width: 1440px) {
  .admin-shell .app-content {
    max-width: 1680px;
  }

  .admin-shell .admin-split-grid {
    grid-template-columns: minmax(0, 2.25fr) minmax(360px, 0.9fr);
  }
}

/* ============================================
   PORTAL FORM ENHANCEMENTS
   Premium form styling for customer/plumber portals
   ============================================ */

.form-input,
.form-select,
.form-textarea {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-primary);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

html.dark .form-input,
html.dark .form-select,
html.dark .form-textarea {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

html.dark .form-input::placeholder,
html.dark .form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

html.dark .form-input:focus,
html.dark .form-select:focus,
html.dark .form-textarea:focus {
  border-color: var(--color-brand-400);
  box-shadow: 0 0 0 4px rgba(84, 167, 255, 0.15);
}

/* Custom select arrow */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

html.dark .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
}

/* Professional file upload zone */
.file-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

.file-upload-zone:hover {
  border-color: var(--color-brand-400);
  background: var(--color-brand-50);
}

html.dark .file-upload-zone:hover {
  background: rgba(35, 127, 255, 0.06);
}

.file-upload-zone.dragover {
  border-color: var(--color-brand-500);
  background: var(--color-brand-50);
  box-shadow: 0 0 0 4px rgba(35, 127, 255, 0.1);
}

.file-upload-zone-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-3);
  color: var(--color-text-tertiary);
}

.file-upload-zone-text {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.file-upload-zone-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

/* File preview thumbnails */
.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.file-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
}

/* Notification list item */
.notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--color-background);
}

.notification-item.unread {
  background: var(--color-brand-50);
}

html.dark .notification-item.unread {
  background: rgba(35, 127, 255, 0.08);
}

/* Review star rating */
.star-rating {
  display: inline-flex;
  gap: 0.125rem;
}

.star-rating-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.star-rating-icon.filled {
  color: #f59e0b;
}

.star-rating-icon:hover {
  color: #f59e0b;
}

/* Settings section layout */
.settings-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-8);
  }
}

.settings-label {
  padding-top: var(--space-1);
}

.settings-label h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.settings-label p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

/* Filter pills (horizontal filter buttons) */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-pill {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.filter-pill:hover {
  border-color: var(--color-brand-400);
  color: var(--color-brand-600);
}

.filter-pill.active {
  background: var(--color-brand-600);
  border-color: var(--color-brand-600);
  color: white;
}

/* Plumber workspace */
.plumber-page .page-title {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
}

.plumber-row-icon svg,
.plumber-lead-card svg,
.plumber-bottom-sheet svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plumber-workspace-hero,
.plumber-leads-header,
.plumber-action-banner,
.plumber-filter-panel,
.plumber-sticky-action,
.plumber-lead-card,
.plumber-activity-card,
.plumber-lead-detail-hero {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

/* Customer settings consume the same profile-settings anatomy as the plumber
   portal. The final alias layer near the end of this sheet remains authoritative. */
@media (min-width: 1024px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell {
    width: min(100%, 76rem);
    max-width: 100%;
    margin-inline: auto;
  }

  #main-content .customer-page .customer-settings.plumber-profile-shell {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    min-height: 39rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }

  #main-content .customer-page .customer-settings .plumber-profile-nav {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    gap: 0;
    padding: var(--space-5) var(--space-4);
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-background);
    box-shadow: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-identity,
  #main-content .customer-page .customer-settings .plumber-profile-home-summary {
    display: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-section-list {
    display: grid;
    gap: var(--space-1);
  }

  #main-content .customer-page .customer-settings .plumber-profile-section-list h3 {
    margin: var(--space-4) 0 var(--space-1);
    padding: 0 var(--space-3);
    color: var(--color-text-secondary);
    font-size: 0.68rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
  }

  #main-content .customer-page .customer-settings .plumber-profile-section {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #main-content .customer-page .customer-settings .plumber-profile-row {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr) auto;
    gap: var(--space-2);
    min-height: 2.45rem;
    margin: 0.15rem 0;
    padding: 0.55rem var(--space-3);
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    box-shadow: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-row:hover,
  #main-content .customer-page .customer-settings .plumber-profile-row.is-active {
    background: rgba(35, 127, 255, 0.08);
    color: var(--color-brand-700);
    box-shadow: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-row__icon {
    width: 1.1rem;
    height: 1.1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: currentColor;
  }

  #main-content .customer-page .customer-settings .plumber-profile-row__label {
    color: currentColor;
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
  }

  #main-content .customer-page .customer-settings .plumber-profile-row__meta,
  #main-content .customer-page .customer-settings .plumber-profile-row__description,
  #main-content .customer-page .customer-settings .plumber-profile-row__badge,
  #main-content .customer-page .customer-settings .plumber-profile-row__alert,
  #main-content .customer-page .customer-settings .plumber-profile-row__chevron {
    display: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-detail {
    display: grid;
    align-content: start;
    gap: var(--space-5);
    padding: var(--space-6);
    overflow: hidden;
    background: var(--color-surface);
  }

  #main-content .customer-page .customer-settings .plumber-profile-panel {
    gap: var(--space-5);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #main-content .customer-page .customer-settings .plumber-profile-panel__header {
    flex-wrap: nowrap;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  #main-content .customer-page .customer-settings .plumber-profile-panel__kicker { display: none; }
  #main-content .customer-page .customer-settings .plumber-profile-panel h2 { font-size: var(--font-size-xl); }
  #main-content .customer-page .customer-settings .plumber-profile-panel__description { max-width: 36rem; font-size: var(--font-size-sm); }
}

@media (min-width: 1200px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell { width: min(100%, 90rem); }
  #main-content .customer-page .customer-settings.plumber-profile-shell { grid-template-columns: 14rem minmax(0, 1fr); }
}

@media (min-width: 1500px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell { width: min(100%, 96rem); }
}

.plumber-lead-card {
  position: relative;
}

.plumber-workspace-hero,
.plumber-leads-header,
.plumber-action-banner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}

.plumber-workspace-hero h2,
.plumber-leads-header h2,
.plumber-action-banner h2,
.plumber-lead-detail-hero h2,
.plumber-sticky-action h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.plumber-workspace-hero p,
.plumber-leads-header p,
.plumber-action-banner p,
.plumber-sticky-action p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-leads-page {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.plumber-leads-filter-form {
  display: grid;
  gap: 1rem;
}

.plumber-leads-filter-shell {
  display: grid;
  gap: 1rem;
}

.plumber-leads-filters {
  display: grid;
  gap: 0.9rem;
}

.plumber-leads-filter-control,
.plumber-leads-filter-actions {
  min-width: 0;
}

.plumber-work-area-trigger {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
  text-align: left;
  appearance: none;
  background-image: none;
}

.plumber-leads-filter-control .form-input,
.plumber-leads-filter-control .form-select,
.plumber-work-area-trigger {
  min-height: 2.75rem;
  border-radius: var(--radius-lg);
  border-width: 1px;
  box-shadow: none;
}

.plumber-work-area-trigger span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plumber-work-area-trigger svg,
.plumber-work-area-close svg {
  flex: 0 0 auto;
}

.plumber-work-area-close {
  min-height: 2.5rem;
  min-width: 2.5rem;
}

.plumber-work-area-note {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  padding: 1rem;
}

.plumber-work-area-note strong {
  display: block;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-relaxed);
}

.plumber-work-area-note a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-work-area-modal .modal-body {
  padding-top: 0.5rem;
}

.plumber-work-area-modal .modal-header {
  align-items: center;
}

.plumber-work-area-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.plumber-credit-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-credit-status__main,
.plumber-credit-status__state,
.plumber-credit-status__credits {
  display: flex;
  align-items: center;
}

.plumber-credit-status__main {
  min-width: 0;
  gap: 1rem;
}

.plumber-credit-status__state {
  gap: 0.5rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-credit-status__dot {
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-radius: 999px;
}

.plumber-credit-status__dot.is-live {
  background: var(--color-success-600);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.plumber-credit-status__dot.is-offline {
  background: var(--color-warning-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.plumber-credit-status__credits {
  gap: 0.35rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.plumber-credit-status__credits strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.plumber-credit-status__actions {
  flex: 0 0 auto;
}

.plumber-credit-status__actions .btn {
  border-radius: var(--radius-md);
  color: var(--color-brand-700);
  font-weight: var(--font-weight-bold);
}

.list-status-strip,
.list-result-summary {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.list-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.list-status-strip__items,
.list-status-pill,
.list-page-tabs,
.list-result-summary,
.plumber-workspace-event__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.list-status-strip__items,
.plumber-workspace-event__meta {
  flex-wrap: wrap;
}

.list-status-pill {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.list-status-pill__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
}

.list-status-pill__dot--success { background: #16a34a; }
.list-status-pill__dot--warning { background: #f59e0b; }
.list-status-pill__dot--neutral { background: #94a3b8; }

.list-status-pill__label,
.list-status-pill__value {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

.list-status-pill__value {
  font-weight: var(--font-weight-bold);
}

.list-page-tabs {
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.list-page-tabs::-webkit-scrollbar {
  display: none;
}

.list-page-tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.list-page-tabs__item.is-active {
  border-bottom-color: var(--color-brand-600);
  color: var(--color-brand-700);
}

.list-page-tabs__icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.list-page-tabs__count {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--color-background);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

/* Shared notification centre and top-bar notification drawer. */
.app-notification-popover {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.app-notification-popover__header,
.app-notification-popover__footer {
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #f8fafc;
}

.app-notification-popover__header strong { display: block; color: #0f172a; font-size: 0.9rem; }
.app-notification-popover__header span { display: block; margin-top: 0.1rem; color: #64748b; font-size: 0.75rem; }
.app-notification-popover__feed { max-height: min(23rem, calc(100vh - 11rem)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.app-notification-popover__feed::-webkit-scrollbar { width: 0.45rem; }
.app-notification-popover__feed::-webkit-scrollbar-thumb { border-radius: 999px; background: #cbd5e1; }
.app-notification-popover__footer { justify-content: center; gap: 0.5rem; border-top: 1px solid #e2e8f0; color: #2563eb; font-size: 0.84rem; font-weight: 700; transition: background 150ms ease; }
.app-notification-popover__footer:hover { background: #eff6ff; }
.notification-centre__feed > * { transition: transform 150ms ease, box-shadow 150ms ease; }
.notification-centre__feed > *:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06); }
.notification-centre .plumber-notification-row.is-unread { border-left: 3px solid #2563eb; background: #f0f7ff; }

html.dark .app-notification-popover { border-color: #334155; }
html.dark .app-notification-popover__header,
html.dark .app-notification-popover__footer { border-color: #334155; background: #1e293b; }
html.dark .app-notification-popover__header strong { color: #f8fafc; }
html.dark .app-notification-popover__header span { color: #94a3b8; }
html.dark .app-notification-popover__footer:hover { background: #26354b; }
html.dark .notification-centre .plumber-notification-row.is-unread { background: rgba(37, 99, 235, 0.14); }

.list-filter-row--lead-filters .list-filter-actions__buttons .btn-primary {
  gap: 0.45rem;
}

.list-filter-row--lead-filters .list-filter-actions__buttons .btn-primary::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h14'/%3E%3Cpath d='M7 10h10'/%3E%3Cpath d='M10 15h4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h14'/%3E%3Cpath d='M7 10h10'/%3E%3Cpath d='M10 15h4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.list-search-field {
  position: relative;
}

.list-search-field__icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.list-search-field__input {
  padding-left: 2.55rem;
}

.list-result-summary {
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 0.95rem;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.list-result-summary__copy {
  display: grid;
  gap: 0.15rem;
}

.list-result-summary__copy strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.list-result-summary__copy span,
.list-result-summary__meta,
.plumber-workspace-event__meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.list-result-summary__side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: center;
}

.list-result-summary__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.list-result-summary__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.list-inline-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.list-inline-sort__label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.list-inline-sort .form-select {
  min-width: 12rem;
  min-height: 2.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-radius: 0.85rem;
  box-shadow: var(--shadow-card);
}

.list-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-card);
}

.list-summary-chip strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.plumber-workspace-event__meta {
  margin-top: 0.45rem;
}

.plumber-workspace-event__meta span::before {
  content: "•";
  margin-right: 0.75rem;
  color: var(--color-text-tertiary);
}

.plumber-workspace-event__meta span:first-child::before {
  display: none;
}

.plumber-workspace-event__meta span::before {
  content: "\2022";
}

.admin-job-card .customer-job-meta {
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .list-filter-panel--collapsible:not([open]) > .list-filter-panel__content {
    display: block;
  }

  .list-filter-row {
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
  }

  .list-filter-row--lead-filters {
    grid-template-columns: minmax(0, 1.6fr) minmax(12rem, 1fr) minmax(11rem, 1fr) auto;
  }

  .list-filter-row.list-filter-row--history {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) auto;
  }
}

@media (max-width: 767px) {
  .notification-centre,
  .notification-centre .plumber-inbox-board,
  .notification-centre .plumber-inbox-panel,
  .notification-centre .plumber-notification-feed,
  .notification-centre .plumber-notification-row {
    box-sizing: border-box;
    min-width: 0;
  }

  .notification-centre .plumber-inbox-board {
    width: calc(100% + 2rem);
    max-width: none;
  }

  .notification-centre .plumber-inbox-panel,
  .notification-centre .plumber-notification-feed,
  .notification-centre .plumber-notification-row {
    width: 100%;
  }

  .app-notification-popover { position: fixed !important; top: 4.25rem; right: 0.75rem !important; left: 0.75rem; width: auto !important; margin: 0 !important; }
  .app-notification-popover__feed { max-height: min(60vh, 28rem); }
  .notification-centre .plumber-inbox-app__header { align-items: flex-start; }
  .notification-centre .plumber-inbox-app__header form { width: 100%; }
  .notification-centre .plumber-inbox-app__header .btn { width: 100%; justify-content: center; }
  .notification-centre .plumber-notification-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .notification-centre .plumber-notification-row__actions { grid-column: 2; justify-content: space-between; }
  .notification-centre .plumber-notification-row__topline { align-items: flex-start; }
  .notification-centre .plumber-notification-row__topline time { margin-top: 0.15rem; }
  .list-filter-panel--collapsible {
    padding: 0;
  }

  .list-filter-panel--collapsible > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    list-style: none;
  }

  .list-filter-panel--collapsible[open] > summary {
    border-bottom: 1px solid var(--color-border);
  }

  .list-filter-panel__summary-icon {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-0.15rem);
    transition: transform 150ms ease;
  }

  .list-filter-panel--collapsible[open] .list-filter-panel__summary-icon {
    transform: rotate(225deg) translateY(-0.15rem);
  }

  .list-filter-panel--collapsible > .list-filter-panel__content {
    padding: 0.85rem 1rem 1rem;
  }

  .list-filter-panel--leads {
    padding: 0.85rem;
    border-radius: var(--radius-lg);
  }

  .list-filter-row--lead-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.6rem;
  }

  .list-filter-row--lead-filters .plumber-leads-filter-control--search {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .list-filter-row--lead-filters .plumber-leads-filter-control--workarea {
    grid-column: 1;
    grid-row: 2;
  }

  .list-filter-row--lead-filters .plumber-leads-filter-control:not(.plumber-leads-filter-control--search):not(.plumber-leads-filter-control--workarea) {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }

  .list-filter-row--lead-filters .list-filter-actions {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .list-filter-row--lead-filters .form-label {
    display: none;
  }

  .list-filter-row--lead-filters .plumber-work-area-trigger span,
  .list-filter-row--lead-filters .form-select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .list-filter-row--lead-filters .list-filter-actions__buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto);
    width: 100%;
    gap: 0.6rem;
  }

  .list-filter-row--lead-filters .list-filter-actions__buttons .btn-primary {
    height: 3rem;
    width: 100%;
    min-width: 0;
    padding: 0 1rem;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
  }

  .list-filter-row--lead-filters .list-filter-actions__buttons .btn-secondary {
    display: inline-flex;
    height: 3rem;
    min-width: 0;
    justify-content: center;
    border-radius: var(--radius-lg);
  }

  .plumber-credit-status {
    gap: 0.6rem;
    padding: 0.65rem;
  }

  .plumber-credit-status__main {
    flex: 1 1 auto;
    gap: 0;
  }

  .plumber-credit-status__state {
    min-height: 2.25rem;
    padding-inline: 0.65rem;
  }

  .plumber-credit-status__credits {
    min-height: 2.25rem;
    padding-inline: 0.75rem;
    border-left: 1px solid var(--color-border);
  }

  .plumber-credit-status__actions .btn {
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.72rem;
  }

  .list-status-strip,
  .list-result-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .list-result-summary__side,
  .list-result-summary__actions,
  .list-result-summary__meta {
    justify-content: flex-start;
  }

  .list-inline-sort {
    width: 100%;
  }

  .list-inline-sort .form-select {
    min-width: 0;
    width: 100%;
  }

  .list-filter-actions__buttons {
    width: 100%;
  }

  .list-filter-actions__buttons .btn {
    flex: 1 1 0;
  }
}

.plumber-leads-notice {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #f6d7a7;
  border-radius: 0.9rem;
  background: #fff8ea;
}

html.dark .plumber-leads-notice {
  background: rgba(120, 53, 15, 0.18);
  border-color: rgba(245, 158, 11, 0.28);
}

.plumber-leads-notice strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-leads-notice p {
  margin-top: 0.2rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-leads-location-row,
.plumber-leads-countbar,
.plumber-leads-countbar__actions,
.plumber-lead-card__compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plumber-leads-location {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-primary);
}

.plumber-leads-location strong {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
}

.plumber-leads-location span,
.plumber-leads-countbar__summary {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-leads-link {
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-leads-toolbar--minimal {
  gap: 0;
}

.plumber-filter-chips--minimal {
  gap: 0.65rem;
}

.plumber-leads-countbar {
  padding-top: 0.15rem;
}

.plumber-leads-countbar__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.plumber-leads-countbar__summary strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-leads-sort {
  min-width: 8.5rem;
}

.plumber-leads-sort .form-select {
  min-height: 2.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.plumber-feed--minimal,
.plumber-feed-list--minimal {
  gap: 0.75rem;
}

.plumber-leads-header {
  display: grid;
}

.plumber-leads-header__copy {
  display: grid;
  gap: 0.5rem;
}

.plumber-leads-header__stats {
  display: grid;
  gap: var(--space-3);
}

.plumber-leads-header__stats div,
.plumber-detail-overview-card,
.plumber-proposal-panel,
.plumber-gallery-item,
.plumber-detail-side-list div {
  display: grid;
  gap: 0.3rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-leads-header__stats span,
.plumber-detail-overview-card span,
.plumber-gallery-item__body span,
.plumber-detail-side-list span,
.plumber-lead-detail-hero__eyebrow span:first-child {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.plumber-leads-header__stats strong,
.plumber-detail-overview-card strong,
.plumber-gallery-item__body strong,
.plumber-detail-side-list strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
}

.plumber-leads-header__stats small,
.plumber-detail-overview-card small {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

.plumber-hero-kicker,
.plumber-action-banner__label {
  margin-bottom: 0.35rem;
  color: var(--color-brand-700) !important;
  font-size: var(--font-size-xs) !important;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-hero-actions,
.plumber-lead-card__badges,
.plumber-activity-card__badges,
.plumber-lead-detail-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.plumber-action-banner {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffbeb;
}

html.dark .plumber-action-banner {
  background: rgba(120, 53, 15, 0.22);
}

.plumber-filter-chips,
.plumber-activity-tabs,
.plumber-app-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
}

.plumber-filter-chips::-webkit-scrollbar,
.plumber-activity-tabs::-webkit-scrollbar,
.plumber-app-tabs::-webkit-scrollbar {
  display: none;
}

.plumber-leads-toolbar,
.plumber-active-filters,
.plumber-feed,
.plumber-feed-list,
.plumber-detail-overview-grid,
.plumber-proposal-layout,
.plumber-detail-side-list {
  display: grid;
  gap: var(--space-4);
}

.plumber-leads-toolbar__search {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 3.2rem;
  padding: 0 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-leads-toolbar__search input {
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
}

.plumber-leads-toolbar__search input:focus {
  outline: none;
}

.plumber-leads-toolbar__actions {
  display: grid;
  gap: var(--space-3);
}

.plumber-active-filters {
  grid-template-columns: repeat(auto-fit, minmax(11rem, max-content));
}

.plumber-filter-token {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0 0.95rem;
  border: 1px solid rgba(35, 127, 255, 0.18);
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-filter-token--clear {
  justify-content: center;
  border-style: dashed;
  background: transparent;
  color: var(--color-text-secondary);
}

.plumber-filter-panel__header,
.plumber-feed__header,
.plumber-lead-detail-hero__eyebrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-filter-panel__header p,
.plumber-feed__header p {
  margin: 0.35rem 0 0;
}

.plumber-filter-panel__count {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.plumber-feed-list {
  gap: var(--space-3);
}

.plumber-filter-chips a,
.plumber-activity-tabs a,
.plumber-app-tab {
  display: inline-flex;
  min-height: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-filter-chips a.active,
.plumber-activity-tabs a.active,
.plumber-app-tab.active {
  border-color: rgba(35, 127, 255, 0.24);
  background: rgba(35, 127, 255, 0.1);
  color: var(--color-brand-700);
}

.plumber-tab-badge,
.plumber-activity-tabs span {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.72rem;
}

.plumber-feed-layout,
.plumber-detail-grid,
.plumber-detail-main,
.plumber-filter-form,
.plumber-timeline-list,
.plumber-list,
.plumber-mini-timeline,
.plumber-profile-menu {
  display: grid;
  gap: var(--space-4);
}

.plumber-filter-panel {
  display: none;
  padding: var(--space-5);
}

.plumber-filter-panel h2,
.plumber-bottom-sheet__header h2 {
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.plumber-filter-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-filter-actions,
.plumber-bottom-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.plumber-lead-card:hover,
.plumber-activity-card:hover {
  border-color: rgba(35, 127, 255, 0.25);
  box-shadow: var(--shadow-lg);
}

.plumber-lead-card__link,
.plumber-activity-card__link {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  color: inherit;
}

.plumber-lead-card__top,
.plumber-lead-card__topline,
.plumber-lead-card__footer,
.plumber-activity-card__aside {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-lead-card__cost,
.plumber-info-grid strong,
.plumber-profile-menu span {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-card__cost {
  display: grid;
  gap: 0.1rem;
  justify-items: end;
  text-align: right;
}

.plumber-lead-card__cost span {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.plumber-lead-card__title,
.plumber-activity-card h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.plumber-lead-card__description,
.plumber-activity-card p,
.plumber-readable-text,
.plumber-row-meta,
.plumber-muted,
.plumber-info-grid span,
.plumber-profile-menu strong {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-lead-card__description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plumber-lead-card__eyebrow,
.plumber-lead-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.plumber-lead-card__eyebrow {
  align-items: center;
  justify-content: space-between;
}

.plumber-lead-card__body {
  display: grid;
  gap: 0.55rem;
}

.plumber-lead-card__services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.plumber-lead-card--compact {
  position: relative;
  border-radius: 0.85rem;
  box-shadow: none;
  overflow: hidden;
}

@media (max-width: 390px) {
  .plumber-credit-status {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .plumber-credit-status__main {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .plumber-credit-status__actions,
  .plumber-credit-status__actions .btn {
    width: 100%;
  }

  .plumber-credit-status__actions .btn {
    justify-content: center;
  }
}

.plumber-lead-card--compact.plumber-lead-card--critical {
  border-left: 3px solid #dc2626;
}

.plumber-lead-card--compact.plumber-lead-card--urgent {
  border-left: 3px solid #7c3aed;
}

.plumber-lead-card--compact.plumber-lead-card--standard {
  border-left: 3px solid #2563eb;
}

.plumber-lead-card__link--compact {
  gap: 1rem;
  padding: 0.9rem 1rem;
}

.plumber-lead-card__compact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 0.9rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-brand-700);
}

.plumber-lead-card__compact-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke-width: 1.9;
}

.plumber-lead-card__compact-icon--green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success-600);
}

.plumber-lead-card__compact-icon--blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-brand-700);
}

.plumber-lead-card__compact-icon--violet {
  background: rgba(124, 58, 237, 0.11);
  color: #7c3aed;
}

.plumber-lead-card__compact-icon--amber {
  background: rgba(245, 158, 11, 0.14);
  color: var(--color-warning-600);
}

.plumber-lead-card__compact-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 auto;
}

.plumber-lead-card__compact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.plumber-lead-card__services--compact {
  margin-top: -0.1rem;
}

.plumber-lead-card__compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.plumber-lead-card__compact-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 0.9rem;
}

.plumber-lead-card__compact-stat {
  display: grid;
  gap: 0.15rem;
  padding-right: 0.9rem;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.plumber-lead-card__compact-stat:last-of-type {
  border-right: 0;
}

.plumber-lead-card__compact-label {
  color: var(--color-text-tertiary);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
}

.plumber-lead-card__compact-stat strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
}

.plumber-lead-card__cta--compact {
  align-self: center;
  justify-self: end;
  min-width: 10rem;
  justify-content: center;
  border-radius: 0.8rem;
  padding-inline: 1rem;
}

.plumber-lead-save-form {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
}

.plumber-lead-save-button,
.lead-detail-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-tertiary);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}

.plumber-lead-save-button:hover,
.lead-detail-save-button:hover,
.plumber-lead-save-button.is-saved,
.lead-detail-save-button.is-saved {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.plumber-lead-save-button:hover,
.lead-detail-save-button:hover {
  transform: translateY(-1px);
}

.plumber-lead-save-button svg,
.lead-detail-save-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.plumber-lead-card__detail {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.plumber-lead-card__detail svg,
.plumber-gallery-item__file svg {
  width: 1rem;
  height: 1rem;
}

.plumber-lead-card__state,
.plumber-lead-detail-hero__state {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-card__state--neutral,
.plumber-lead-detail-hero__state--neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-secondary);
}

.plumber-lead-card__state--success,
.plumber-lead-detail-hero__state--success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.plumber-lead-card__state--brand,
.plumber-lead-detail-hero__state--brand {
  background: rgba(35, 127, 255, 0.1);
  color: var(--color-brand-700);
}

.plumber-lead-card__cta {
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-card__meta,
.plumber-activity-card__meta,
.plumber-lead-detail-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-lead-card__meta span,
.plumber-lead-detail-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.plumber-lead-card__ref {
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.plumber-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.46);
}

.plumber-bottom-sheet__panel {
  width: 100%;
  max-height: min(86vh, 42rem);
  overflow-y: auto;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
  border-radius: 1rem 1rem 0 0;
  background: var(--color-surface);
}

.plumber-bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.plumber-inline-search {
  display: grid;
  gap: var(--space-3);
}

.plumber-activity-card__main {
  display: grid;
  gap: var(--space-3);
}

.plumber-activity-card__aside {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-row-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: inherit;
}

.plumber-row-link.unread {
  border-color: rgba(35, 127, 255, 0.25);
  background: rgba(35, 127, 255, 0.04);
}

.plumber-row-icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
}

.plumber-row-main {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.plumber-row-title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-row-aside {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.plumber-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.plumber-unread-dot {
  color: var(--color-brand-700);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-detail-hero,
.plumber-sticky-action {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
}

.plumber-lead-detail-hero__summary {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

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

.plumber-gallery-item {
  overflow: hidden;
  padding: 0;
  text-decoration: none;
}

.plumber-gallery-item__thumb,
.plumber-gallery-item__file {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.plumber-gallery-item__thumb {
  object-fit: cover;
}

.plumber-gallery-item__file {
  display: grid;
  place-items: center;
  background: rgba(35, 127, 255, 0.06);
  color: var(--color-brand-700);
}

.plumber-gallery-item__body {
  padding: var(--space-4);
}

.plumber-info-grid {
  display: grid;
  gap: var(--space-3);
}

.plumber-info-grid div,
.plumber-mini-timeline div {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-privacy-box,
.plumber-warning-box {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-privacy-box {
  border: 1px solid rgba(35, 127, 255, 0.18);
  background: rgba(35, 127, 255, 0.06);
}

.plumber-success-box {
  padding: var(--space-4);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(34, 197, 94, 0.08);
  color: #166534;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-warning-box {
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: #fffbeb;
  color: #92400e;
}

.plumber-detail-side-list {
  gap: var(--space-3);
}

.plumber-profile-menu a {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  color: inherit;
}

.plumber-profile-menu a:last-child {
  border-bottom: none;
}

.plumber-profile-menu strong {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

@media (min-width: 640px) {
  .plumber-leads-filter-shell {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 2.55fr);
    align-items: end;
  }

  .plumber-leads-filters {
    grid-template-columns: minmax(13rem, 1.45fr) minmax(11rem, 1fr) minmax(11rem, 1fr) auto;
    align-items: end;
  }

  .plumber-leads-notice {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .plumber-leads-header__stats,
  .plumber-detail-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plumber-leads-toolbar__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plumber-feed__header {
    align-items: center;
  }

  .plumber-inline-search {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .plumber-row-link {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .plumber-row-aside {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }

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

@media (max-width: 639px) {
  .plumber-leads-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }

  .plumber-leads-filter-actions .flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .plumber-work-area-trigger span {
    white-space: normal;
  }

  .plumber-leads-filter-control .form-input,
  .plumber-leads-filter-control .form-select,
  .plumber-work-area-trigger {
    min-height: 3rem;
    border-radius: 0.95rem;
  }

  .plumber-leads-location-row,
  .plumber-leads-countbar,
  .plumber-leads-countbar__actions,
  .plumber-lead-card__compact-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .plumber-lead-card__compact-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .plumber-lead-card__compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
  }

  .plumber-lead-card__compact-stat {
    padding-right: 0;
    border-right: 0;
  }

  .plumber-lead-card__cta--compact {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .plumber-leads-sort,
  .plumber-leads-countbar__actions .btn {
    width: 100%;
  }

  .plumber-work-area-modal__footer {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  .plumber-workspace-hero,
  .plumber-leads-header,
  .plumber-action-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
  }

  .plumber-leads-header {
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 28rem);
    align-items: center;
  }

  .plumber-leads-header__stats,
  .plumber-detail-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plumber-leads-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .plumber-leads-toolbar__actions {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: end;
  }

  .plumber-feed-layout {
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-filter-panel {
    position: sticky;
    top: 5.5rem;
    display: block;
  }

  .plumber-mobile-filter-button {
    display: none;
  }

  .plumber-detail-grid {
    grid-template-columns: minmax(0, 1fr) 21rem;
    align-items: start;
  }

  .plumber-proposal-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.9fr);
    align-items: start;
  }

  .plumber-sticky-action {
    position: sticky;
    top: 5.5rem;
  }

  .plumber-activity-card__link {
    grid-template-columns: minmax(0, 1fr) 8rem;
    align-items: center;
  }
}

.plumber-profile-shell {
  display: grid;
  gap: var(--space-6);
  max-width: 78rem;
  margin: 0 auto;
}

.plumber-profile-nav {
  display: grid;
  align-content: start;
  gap: var(--space-5);
}

.plumber-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.plumber-profile-avatar {
  display: inline-flex;
  width: 4rem;
  height: 4rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(35, 127, 255, 0.18);
  border-radius: 50%;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
  font-size: 1.35rem;
  font-weight: var(--font-weight-bold);
}

.plumber-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plumber-profile-identity h2 {
  overflow: hidden;
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-profile-identity p {
  margin: 0.15rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-profile-identity__eyebrow {
  color: var(--color-brand-700) !important;
  font-size: var(--font-size-xs) !important;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-profile-home-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.plumber-profile-home-summary > div {
  display: grid;
  gap: 0.15rem;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.plumber-profile-home-summary span,
.plumber-profile-row__description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.plumber-profile-home-summary strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.plumber-profile-preview {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  border: 1px solid rgba(35, 127, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(35, 127, 255, 0.06);
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-profile-preview.is-muted {
  border-color: rgba(245, 158, 11, 0.25);
  background: var(--color-warning-50);
  color: var(--color-warning-700);
}

.plumber-profile-section-list {
  display: grid;
  gap: var(--space-5);
}

.plumber-profile-section-list h3 {
  margin: var(--space-2) 0 calc(var(--space-2) * -1);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-profile-section {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.plumber-profile-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 4rem;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: inherit;
}

.plumber-profile-row:last-child {
  border-bottom: 0;
}

.plumber-profile-row:hover,
.plumber-profile-row.is-active {
  background: rgba(35, 127, 255, 0.06);
}

.plumber-profile-row.is-active {
  box-shadow: inset 3px 0 0 var(--color-brand-600);
}

.plumber-profile-row__icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-background);
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.plumber-profile-row__icon svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plumber-profile-row__body {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.plumber-profile-row__label {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-profile-row__meta,
.plumber-profile-row__description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-profile-row__meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.plumber-profile-row__badge {
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold);
}

.plumber-profile-row__alert {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #ef4444;
}

.plumber-profile-row__chevron {
  color: var(--color-text-tertiary);
  font-size: 1.35rem;
  line-height: 1;
}

.plumber-profile-detail {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

.plumber-profile-mobile-bar {
  display: none;
}

.plumber-profile-panel {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-profile-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-profile-panel__kicker {
  margin: 0 0 0.35rem;
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-profile-panel h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.35rem;
  font-weight: var(--font-weight-bold);
}

.plumber-profile-panel__description {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.plumber-profile-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-2);
}

.plumber-inline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

.plumber-inline-status.is-success {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.plumber-inline-status.is-warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

html.dark .plumber-inline-status {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

html.dark .plumber-inline-status.is-success {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

html.dark .plumber-inline-status.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.plumber-profile-summary-grid {
  display: grid;
  gap: var(--space-3);
}

.plumber-profile-summary-grid > div,
.plumber-document-status,
.plumber-document-row,
.plumber-id-guidance,
.plumber-profile-live-row,
.plumber-profile-readiness > div,
.plumber-profile-placeholder {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-profile-summary-grid > div {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4);
}

.plumber-profile-summary-grid strong {
  color: var(--color-text-primary);
  font-size: 1.4rem;
}

.plumber-profile-summary-grid span,
.plumber-profile-summary-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-profile-readiness {
  display: grid;
  gap: var(--space-3);
}

.plumber-profile-readiness > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.plumber-profile-readiness span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--color-warning-50);
  color: var(--color-warning-700);
  padding: 0.25rem 0.55rem;
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold);
}

.plumber-profile-readiness strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.plumber-profile-readiness .is-done span {
  background: var(--color-success-50);
  color: var(--color-success-700);
}

.plumber-profile-placeholder {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-5);
  text-align: center;
}

.plumber-profile-placeholder strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

.plumber-profile-placeholder span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.postcode-city-field {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1fr) auto minmax(7rem, 0.9fr);
  align-items: center;
  min-height: 2.75rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.postcode-city-field .form-input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.postcode-city-field__divider {
  color: var(--color-text-tertiary);
}

.postcode-city-field__city {
  overflow: hidden;
  padding: 0 var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-radius-control {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-radius-control__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.plumber-radius-control__top p {
  margin: 0.2rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-radius-control__top strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--color-text-primary);
  color: var(--color-surface);
  padding: 0.35rem 0.65rem;
  font-size: var(--font-size-xs);
}

.plumber-radius-control__slider {
  width: 100%;
  accent-color: var(--color-brand-600);
}

.plumber-radius-control__ticks {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.15rem;
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  text-align: center;
}

.plumber-profile-form-grid,
.plumber-profile-document-grid {
  display: grid;
  gap: var(--space-6);
}

.plumber-profile-service-grid {
  display: grid;
  gap: var(--space-3);
}

.plumber-profile-service-grid span {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-profile-live-row,
.plumber-id-guidance,
.plumber-document-status,
.plumber-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
}

.plumber-profile-live-row p,
.plumber-document-status p,
.plumber-document-row p {
  margin: 0;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

.plumber-profile-live-row span,
.plumber-id-guidance p,
.plumber-document-status span,
.plumber-document-row span {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-profile-sticky-actions {
  position: sticky;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-lg);
}

html.dark .plumber-profile-preview.is-muted,
html.dark .plumber-profile-readiness span {
  background: rgba(120, 53, 15, 0.22);
}

html.dark .plumber-profile-readiness .is-done span {
  background: rgba(22, 101, 52, 0.24);
}

@media (max-width: 1023px) {
  .plumber-profile-page-header {
    display: none;
  }

  .plumber-profile-shell {
    gap: 0;
  }

  .plumber-profile-shell.is-section-page .plumber-profile-nav {
    display: none;
  }

  .plumber-profile-shell:not(.is-section-page) .plumber-profile-detail {
    display: none;
  }

  .plumber-profile-shell.is-section-page .plumber-profile-mobile-bar {
    display: grid;
  }

  .plumber-profile-mobile-bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .plumber-profile-mobile-bar a {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 1.5rem;
    line-height: 1;
  }

  .plumber-profile-mobile-bar span {
    display: block;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
  }

  .plumber-profile-mobile-bar strong {
    display: block;
    overflow: hidden;
    color: var(--color-text-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .plumber-profile-nav {
    gap: var(--space-4);
  }

  .plumber-profile-identity,
  .plumber-profile-home-summary > div,
  .plumber-profile-preview,
  .plumber-profile-section,
  .plumber-profile-panel {
    box-shadow: none;
  }

  .plumber-profile-section-list {
    gap: var(--space-4);
  }

  .plumber-profile-section-list h3 {
    padding: 0 var(--space-1);
  }

  .plumber-profile-row {
    min-height: 4.25rem;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
  }

  .plumber-profile-row__description {
    display: none;
  }

  .plumber-profile-row__badge {
    display: none;
  }

  .plumber-profile-panel {
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .plumber-profile-panel__header {
    display: grid;
    gap: var(--space-3);
  }

  .plumber-profile-panel__header .btn,
  .plumber-profile-panel button[type="submit"],
  .plumber-profile-panel .plumber-row-actions,
  .plumber-profile-panel .plumber-row-actions .btn,
  .plumber-profile-document-grid button[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .plumber-profile-panel h2 {
    font-size: var(--font-size-xl);
  }

  .plumber-profile-panel__description {
    font-size: var(--font-size-sm);
  }

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

  .plumber-profile-readiness > div,
  .plumber-profile-live-row,
  .plumber-id-guidance,
  .plumber-document-status,
  .plumber-document-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .plumber-profile-readiness strong {
    text-align: left;
  }

  .plumber-document-row .flex,
  .plumber-document-row form,
  .plumber-document-row .btn {
    width: 100%;
  }

  .plumber-document-row .btn {
    justify-content: center;
  }

  .plumber-row-actions {
    display: grid;
    width: 100%;
  }

  .postcode-city-field {
    grid-template-columns: minmax(7rem, 1fr) auto minmax(5.5rem, 0.7fr);
  }

  .plumber-radius-control__top {
    display: grid;
  }

  .plumber-radius-control__top strong {
    justify-self: start;
  }
}

@media (min-width: 640px) {
  .plumber-profile-summary-grid,
  .plumber-profile-service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .plumber-profile-shell {
    grid-template-columns: 22rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-profile-nav {
    position: sticky;
    top: 5.5rem;
  }

  .plumber-profile-panel {
    padding: var(--space-6);
  }

  .plumber-profile-detail {
    align-content: start;
  }

  .plumber-profile-form-grid {
    grid-template-columns: 13rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-profile-document-grid {
    grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .plumber-profile-sticky-actions {
    bottom: var(--space-4);
  }
}

@media (prefers-color-scheme: dark) {
  .plumber-profile-sticky-actions {
    background: rgba(15, 23, 42, 0.92);
  }
}

/* Profile settings reference layout override */
.plumber-page .plumber-profile-shell {
  max-width: 76rem;
}

@media (max-width: 1023px) {
  .plumber-page .plumber-profile-page-header,
  .plumber-page .plumber-profile-home-summary,
  .plumber-page .plumber-profile-preview {
    display: none;
  }

  .plumber-page .plumber-profile-shell {
    max-width: 27rem;
    gap: var(--space-4);
    margin: 0 auto;
  }

  .plumber-page .plumber-profile-shell:not(.is-section-page) .plumber-profile-detail {
    display: none;
  }

  .plumber-page .plumber-profile-shell.is-section-page .plumber-profile-nav {
    display: none;
  }

  .plumber-page .plumber-profile-shell.is-section-page .plumber-profile-mobile-bar {
    display: grid;
  }

  .plumber-page .plumber-profile-nav {
    gap: var(--space-4);
  }

  .plumber-page .plumber-profile-identity {
    min-height: 5.75rem;
    padding: var(--space-4);
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-avatar {
    width: 3.25rem;
    height: 3.25rem;
  }

  .plumber-page .plumber-profile-identity__eyebrow {
    display: none;
  }

  .plumber-page .plumber-profile-identity h2 {
    font-size: var(--font-size-sm);
  }

  .plumber-page .plumber-profile-identity p {
    font-size: var(--font-size-xs);
  }

  .plumber-page .plumber-profile-section-list {
    gap: var(--space-4);
  }

  .plumber-page .plumber-profile-section-list h3 {
    margin: 0 0 calc(var(--space-2) * -1);
    padding: 0 var(--space-2);
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    font-weight: var(--font-weight-medium);
    text-transform: none;
  }

  .plumber-page .plumber-profile-section {
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-row {
    min-height: 3rem;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    padding: 0.75rem var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row:last-child {
    border-bottom: 0;
  }

  .plumber-page .plumber-profile-row.is-active,
  .plumber-page .plumber-profile-row:hover {
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row__icon {
    width: 1.15rem;
    height: 1.15rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-primary);
    font-size: 0.68rem;
  }

  .plumber-page .plumber-profile-row__label {
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
  }

  .plumber-page .plumber-profile-row__meta {
    justify-self: end;
    max-width: 7rem;
    font-size: 0.72rem;
  }

  .plumber-page .plumber-profile-row__description,
  .plumber-page .plumber-profile-row__badge,
  .plumber-page .plumber-profile-row__alert {
    display: none;
  }

  .plumber-page .plumber-profile-row__chevron {
    color: var(--color-text-secondary);
    font-size: 1rem;
  }

  .plumber-page .plumber-profile-mobile-bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
  }

  .plumber-page .plumber-profile-panel {
    padding: var(--space-4);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
  }
}

@media (min-width: 1024px) {
  .plumber-page .plumber-profile-page-header {
    max-width: 76rem;
    margin: 0 auto;
  }

  .plumber-page .plumber-profile-shell {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    min-height: 39rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }

  .plumber-page .plumber-profile-nav {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    gap: 0;
    padding: var(--space-5) var(--space-4);
    border: 0;
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-background);
    box-shadow: none;
    scrollbar-width: thin;
  }

  .plumber-page .plumber-profile-identity,
  .plumber-page .plumber-profile-home-summary,
  .plumber-page .plumber-profile-preview {
    display: none;
  }

  .plumber-page .plumber-profile-section-list {
    gap: var(--space-1);
  }

  .plumber-page .plumber-profile-section-list h3 {
    margin: var(--space-4) 0 var(--space-1);
    padding: 0 var(--space-3);
    color: var(--color-text-secondary);
    font-size: 0.68rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
  }

  .plumber-page .plumber-profile-section-list h3:first-of-type {
    margin-top: 0;
  }

  .plumber-page .plumber-profile-section {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .plumber-page .plumber-profile-row {
    min-height: 2.45rem;
    grid-template-columns: 1.35rem minmax(0, 1fr) auto;
    gap: var(--space-2);
    margin: 0.15rem 0;
    padding: 0.55rem var(--space-3);
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row:hover,
  .plumber-page .plumber-profile-row.is-active {
    background: rgba(35, 127, 255, 0.08);
    color: var(--color-brand-700);
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row__icon {
    width: 1.1rem;
    height: 1.1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-size: 0.7rem;
  }

  .plumber-page .plumber-profile-row__label {
    color: currentColor;
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
  }

  .plumber-page .plumber-profile-row__meta,
  .plumber-page .plumber-profile-row__description,
  .plumber-page .plumber-profile-row__badge,
  .plumber-page .plumber-profile-row__alert,
  .plumber-page .plumber-profile-row__chevron {
    display: none;
  }

  .plumber-page .plumber-profile-detail {
    display: grid;
    align-content: start;
    gap: var(--space-5);
    padding: var(--space-6);
    background: var(--color-surface);
  }

  .plumber-page .plumber-profile-panel {
    gap: var(--space-5);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-panel + .plumber-profile-panel,
  .plumber-page .space-y-6 > .plumber-profile-panel + .plumber-profile-panel {
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
  }

  .plumber-page .plumber-profile-panel__header {
    flex-wrap: nowrap;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  .plumber-page .plumber-profile-panel__kicker {
    display: none;
  }

  .plumber-page .plumber-profile-panel h2 {
    font-size: var(--font-size-xl);
  }

  .plumber-page .plumber-profile-panel__description {
    max-width: 36rem;
    font-size: var(--font-size-sm);
  }

  .plumber-page .plumber-profile-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plumber-page .plumber-profile-summary-grid > div,
  .plumber-page .plumber-document-status,
  .plumber-page .plumber-document-row,
  .plumber-page .plumber-id-guidance,
  .plumber-page .plumber-profile-live-row,
  .plumber-page .plumber-profile-readiness > div,
  .plumber-page .plumber-profile-placeholder {
    background: var(--color-surface);
  }
}

.plumber-onboarding-shell {
  display: grid;
  gap: var(--space-6);
  max-width: 68rem;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.plumber-onboarding-progress {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-onboarding-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Final plumber profile settings layout */
.plumber-profile-app-header {
  display: none;
}

@media (max-width: 767px) {
  .plumber-page {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  .plumber-page .plumber-profile-page-header {
    display: none;
  }

  .plumber-profile-app-header {
    display: block;
    max-width: 25rem;
    margin: 0 auto var(--space-3);
    padding: var(--space-1) var(--space-1) 0;
    text-align: center;
  }

  .plumber-profile-app-header h1 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
  }

  .plumber-page .plumber-profile-shell {
    display: block;
    max-width: 25rem;
    margin: 0 auto;
  }

  .plumber-page .plumber-profile-shell:not(.is-section-page) .plumber-profile-detail {
    display: none;
  }

  .plumber-page .plumber-profile-shell.is-section-page .plumber-profile-nav {
    display: none;
  }

  .plumber-page .plumber-profile-shell.is-section-page .plumber-profile-detail {
    display: grid;
    gap: var(--space-3);
  }

  .plumber-page .plumber-profile-mobile-bar {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .plumber-page .plumber-profile-mobile-bar a {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-mobile-bar span {
    display: none;
  }

  .plumber-page .plumber-profile-mobile-bar strong {
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-nav {
    display: grid;
    gap: var(--space-3);
  }

  .plumber-page .plumber-profile-identity {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: var(--space-3);
    align-items: center;
    min-height: 5.25rem;
    padding: var(--space-4);
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-color: var(--color-border);
    background: var(--color-background);
    font-size: var(--font-size-base);
  }

  .plumber-page .plumber-profile-identity__eyebrow,
  .plumber-page .plumber-profile-home-summary,
  .plumber-page .plumber-profile-preview,
  .plumber-page .plumber-profile-section-list > .plumber-profile-section:first-child {
    display: none;
  }

  .plumber-page .plumber-profile-identity h2 {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-identity p {
    margin-top: 0.15rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
  }

  .plumber-page .plumber-profile-section-list {
    display: grid;
    gap: var(--space-3);
  }

  .plumber-page .plumber-profile-section-list h3 {
    margin: 0 0 calc(var(--space-2) * -1);
    padding: 0 var(--space-2);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    text-transform: none;
  }

  .plumber-page .plumber-profile-section {
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-row {
    min-height: 3rem;
    grid-template-columns: 1.35rem minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    padding: 0.78rem var(--space-4);
    border: 0;
    border-bottom: 1px solid var(--color-border-light);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row:last-child {
    border-bottom: 0;
  }

  .plumber-page .plumber-profile-row.is-active,
  .plumber-page .plumber-profile-row:hover {
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row__icon {
    width: 1.2rem;
    height: 1.2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-primary);
    font-size: 0.7rem;
  }

  .plumber-page .plumber-profile-row__label {
    color: var(--color-text-primary);
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
  }

  .plumber-page .plumber-profile-row__meta {
    max-width: 7.5rem;
    justify-self: end;
    color: var(--color-text-secondary);
    font-size: 0.72rem;
  }

  .plumber-page .plumber-profile-row__description,
  .plumber-page .plumber-profile-row__badge,
  .plumber-page .plumber-profile-row__alert {
    display: none;
  }

  .plumber-page .plumber-profile-row__chevron {
    color: var(--color-text-secondary);
    font-size: 1rem;
  }

  .plumber-page .plumber-profile-panel {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
  }

  .plumber-page .plumber-profile-panel__header {
    display: grid;
    gap: var(--space-3);
  }

  .plumber-page .plumber-profile-panel__kicker {
    display: none;
  }

  .plumber-page .plumber-profile-panel h2 {
    font-size: var(--font-size-lg);
  }

  .plumber-page .plumber-profile-panel__description {
    font-size: var(--font-size-sm);
  }

  .plumber-page .plumber-profile-panel .btn,
  .plumber-page .plumber-profile-panel button[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .plumber-page .plumber-profile-summary-grid,
  .plumber-page .plumber-profile-form-grid,
  .plumber-page .plumber-profile-document-grid,
  .plumber-page .plumber-profile-service-grid {
    grid-template-columns: 1fr;
  }

  .plumber-page .plumber-profile-live-row,
  .plumber-page .plumber-id-guidance,
  .plumber-page .plumber-document-status,
  .plumber-page .plumber-document-row {
    align-items: stretch;
    flex-direction: column;
  }

  .plumber-page .plumber-profile-priority-list,
  .plumber-page .plumber-profile-complete-state {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
  }

  .plumber-page .plumber-profile-priority-list__header {
    display: grid;
    gap: 0.25rem;
  }

  .plumber-page .plumber-profile-priority-list__header strong,
  .plumber-page .plumber-profile-complete-state strong {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-priority-list__header span,
  .plumber-page .plumber-profile-complete-state span {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
  }

  .plumber-page .plumber-profile-priority-row {
    display: grid;
    gap: 0.2rem;
    min-height: 3rem;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
  }

  .plumber-page .plumber-profile-priority-row span {
    color: var(--color-brand-700);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-priority-row strong {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
  }
}

@media (min-width: 768px) {
  .plumber-page .plumber-profile-app-header {
    display: none;
  }

  .plumber-page .plumber-profile-page-header {
    max-width: 76rem;
    margin: 0 auto;
  }

  .plumber-page .plumber-profile-page-header .page-title {
    font-size: clamp(1.65rem, 2vw, 2rem);
    text-align: left;
  }

  .plumber-page .plumber-profile-page-header .page-description {
    max-width: 38rem;
  }

  .plumber-page .plumber-profile-shell {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 0;
    align-items: start;
    max-width: 76rem;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }

  .plumber-page .plumber-profile-nav {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
    padding: var(--space-5) var(--space-4);
    border: 0;
    border-right: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-background);
    box-shadow: none;
  }

  .plumber-page .plumber-profile-identity,
  .plumber-page .plumber-profile-home-summary,
  .plumber-page .plumber-profile-preview {
    display: none;
  }

  .plumber-page .plumber-profile-section-list {
    display: grid;
    gap: var(--space-1);
  }

  .plumber-page .plumber-profile-section-list h3 {
    margin: var(--space-4) 0 var(--space-1);
    padding: 0 var(--space-3);
    color: var(--color-text-secondary);
    font-size: 0.7rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0;
    text-transform: none;
  }

  .plumber-page .plumber-profile-section-list h3:first-of-type {
    margin-top: 0;
  }

  .plumber-page .plumber-profile-section {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .plumber-page .plumber-profile-row {
    min-height: 2.5rem;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: var(--space-2);
    margin: 0.12rem 0;
    padding: 0.6rem var(--space-3);
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-secondary);
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row:hover,
  .plumber-page .plumber-profile-row.is-active {
    background: rgba(35, 127, 255, 0.08);
    color: var(--color-brand-700);
    box-shadow: none;
  }

  .plumber-page .plumber-profile-row__icon {
    width: 1.1rem;
    height: 1.1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-size: 0.7rem;
  }

  .plumber-page .plumber-profile-row__label {
    color: currentColor;
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
  }

  .plumber-page .plumber-profile-row__meta,
  .plumber-page .plumber-profile-row__description,
  .plumber-page .plumber-profile-row__badge,
  .plumber-page .plumber-profile-row__alert,
  .plumber-page .plumber-profile-row__chevron {
    display: none;
  }

  .plumber-page .plumber-profile-detail {
    display: grid;
    align-content: start;
    gap: var(--space-5);
    min-width: 0;
    padding: var(--space-6);
    background: var(--color-surface);
  }

  .plumber-page .plumber-profile-mobile-bar {
    display: none;
  }

  .plumber-page .plumber-profile-panel {
    display: grid;
    gap: var(--space-5);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .plumber-page .plumber-profile-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  .plumber-page .plumber-profile-panel__kicker {
    display: none;
  }

  .plumber-page .plumber-profile-panel h2 {
    font-size: var(--font-size-xl);
  }

  .plumber-page .plumber-profile-panel__description {
    max-width: 38rem;
  }

  .plumber-page .plumber-profile-form-grid {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-page .plumber-profile-document-grid {
    grid-template-columns: minmax(17rem, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .plumber-page .plumber-profile-summary-grid,
  .plumber-page .plumber-profile-service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plumber-page .plumber-profile-priority-list,
  .plumber-page .plumber-profile-complete-state {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
  }

  .plumber-page .plumber-profile-priority-list__header {
    display: grid;
    gap: 0.25rem;
  }

  .plumber-page .plumber-profile-priority-list__header strong,
  .plumber-page .plumber-profile-complete-state strong {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-priority-list__header span,
  .plumber-page .plumber-profile-complete-state span {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
  }

  .plumber-page .plumber-profile-priority-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 3rem;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
  }

  .plumber-page .plumber-profile-priority-row span {
    color: var(--color-brand-700);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
  }

  .plumber-page .plumber-profile-priority-row strong {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-align: right;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .plumber-page .plumber-profile-shell {
    grid-template-columns: 12.5rem minmax(0, 1fr);
  }

  .plumber-page .plumber-profile-form-grid,
  .plumber-page .plumber-profile-document-grid {
    grid-template-columns: 1fr;
  }
}

/* Structural containment for profile settings responsive stability */
.settings-shell { display:grid; grid-template-columns:minmax(13rem,15rem) minmax(0,1fr); width:min(100%,76rem); margin:0 auto; overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-sm); }
.settings-shell__nav { min-width:0; padding:var(--space-4); border-right:1px solid var(--color-border); background:var(--color-surface-subtle); }
.settings-shell__identity { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2) var(--space-2) var(--space-4); }
.settings-shell__avatar { display:grid; place-items:center; flex:0 0 auto; width:2.75rem; height:2.75rem; border-radius:50%; background:var(--color-primary); color:white; font-weight:800; }
.settings-shell__identity p,.settings-shell__identity small { display:block; margin:0; color:var(--color-text-muted); font-size:.75rem; }.settings-shell__identity h2 { margin:.1rem 0; font-size:.95rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.settings-shell__summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35rem; margin-bottom:var(--space-4); padding:.7rem; border-radius:var(--radius-md); background:var(--color-surface); }.settings-shell__summary span { min-width:0; color:var(--color-text-muted); font-size:.68rem; text-align:center; }.settings-shell__summary b { display:block; color:var(--color-text); font-size:.9rem; }
.settings-shell__list { display:grid; gap:.2rem; }.settings-shell__list > p { margin:.85rem .5rem .25rem; color:var(--color-text-muted); font-size:.65rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.settings-shell__row { display:grid; grid-template-columns:2rem minmax(0,1fr) auto; align-items:center; gap:.6rem; min-height:2.75rem; padding:.5rem .55rem; border-radius:var(--radius-md); color:var(--color-text); text-decoration:none; }.settings-shell__row:hover,.settings-shell__row.is-active { background:var(--color-primary-subtle); color:var(--color-primary); }.settings-shell__icon { display:grid; place-items:center; width:1.8rem; height:1.8rem; border-radius:.55rem; background:var(--color-surface); }.settings-shell__icon svg { width:1rem; height:1rem; }.settings-shell__row-copy { min-width:0; }.settings-shell__row-copy strong,.settings-shell__row-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.settings-shell__row-copy strong { font-size:.82rem; }.settings-shell__row-copy small { color:var(--color-text-muted); font-size:.68rem; }.settings-shell__chevron { color:var(--color-text-muted); font-size:1.25rem; }
.settings-shell__content { min-width:0; padding:clamp(1rem,2.5vw,2rem); }.settings-shell__mobile-title { display:none; }.settings-panel { min-width:0; padding:clamp(1rem,2vw,1.5rem); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-sm); }.settings-panel header>p { margin:0; color:var(--color-primary); font-size:.72rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }.settings-panel header h2 { margin:.3rem 0; font-size:clamp(1.25rem,2vw,1.65rem); }.settings-panel header>span { display:block; color:var(--color-text-muted); line-height:1.55; }.settings-panel--danger { border-color:#fecaca; }.settings-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-4); margin-top:var(--space-5); }.settings-form-actions { display:flex; justify-content:flex-end; margin-top:var(--space-5); padding-top:var(--space-4); border-top:1px solid var(--color-border); }.settings-notice,.settings-inline-row,.settings-activity,.settings-property-card { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); margin-top:var(--space-5); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-subtle); }.settings-notice strong,.settings-inline-row strong,.settings-property-card strong { color:var(--color-text); }.settings-notice p,.settings-inline-row p,.settings-property-card p,.settings-property-card small,.settings-copy { margin:.35rem 0 0; color:var(--color-text-muted); line-height:1.5; }.settings-metrics,.settings-action-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); margin-top:var(--space-5); }.settings-metrics a,.settings-action-card { min-width:0; padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); color:var(--color-text); text-decoration:none; }.settings-metrics strong,.settings-metrics span,.settings-action-card strong,.settings-action-card small { display:block; }.settings-metrics strong { font-size:1.65rem; }.settings-metrics span,.settings-action-card small { color:var(--color-text-muted); font-size:.78rem; }.settings-action-card:hover { border-color:var(--color-primary); }.settings-action-icon { display:grid; place-items:center; width:2rem; height:2rem; margin-bottom:.7rem; border-radius:.6rem; background:var(--color-primary-subtle); color:var(--color-primary); font-weight:800; }.settings-subsection { margin-top:var(--space-6); }.settings-subsection h3 { margin:0 0 var(--space-3); font-size:1rem; }.settings-activity { margin-top:.6rem; padding:.75rem; }.settings-activity>span { width:.55rem; height:.55rem; margin-top:.4rem; border-radius:50%; background:var(--color-primary); }.settings-activity>div { flex:1; min-width:0; }.settings-activity p { margin:.15rem 0 0; color:var(--color-text-muted); font-size:.82rem; }.settings-activity time,.settings-activity a { color:var(--color-text-muted); font-size:.75rem; white-space:nowrap; }.settings-property-list { display:grid; gap:.75rem; margin-top:var(--space-5); }.settings-property-card { margin:0; }.settings-property-actions { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:flex-end; }.settings-badge { display:inline-flex; padding:.15rem .45rem; border-radius:99px; background:var(--color-primary-subtle); color:var(--color-primary); font-size:.7rem; font-weight:800; }.settings-link-list { display:grid; margin-top:var(--space-5); border-top:1px solid var(--color-border); }.settings-link-list a { display:flex; justify-content:space-between; gap:var(--space-3); padding:1rem 0; border-bottom:1px solid var(--color-border); color:var(--color-text); text-decoration:none; }.settings-link-list span { color:var(--color-text-muted); font-size:.82rem; text-align:right; }.settings-empty { color:var(--color-text-muted); }
@media (max-width:899px) { .settings-shell { grid-template-columns:minmax(0,1fr); overflow:visible; border:0; box-shadow:none; background:transparent; }.settings-shell__nav { padding:0 0 var(--space-3); border:0; background:transparent; }.settings-shell__identity,.settings-shell__summary { display:none; }.settings-shell__list { display:flex; gap:.45rem; overflow-x:auto; padding:.1rem .1rem .5rem; scrollbar-width:none; }.settings-shell__list::-webkit-scrollbar{display:none}.settings-shell__list>p { display:none; }.settings-shell__row { display:flex; flex:0 0 auto; min-height:2.75rem; padding:.45rem .75rem; border:1px solid var(--color-border); background:var(--color-surface); white-space:nowrap; }.settings-shell__row-copy small,.settings-shell__chevron { display:none; }.settings-shell__content { padding:0; }.settings-shell__mobile-title { display:block; margin:0 0 var(--space-3); }.settings-shell__mobile-title span,.settings-shell__mobile-title strong { display:block; }.settings-shell__mobile-title span { color:var(--color-text-muted); font-size:.75rem; }.settings-shell__mobile-title strong { font-size:1.15rem; }.settings-form-grid { grid-template-columns:minmax(0,1fr); }.settings-form-actions { position:sticky; bottom:0; z-index:5; padding:var(--space-3) 0 calc(var(--space-3) + env(safe-area-inset-bottom)); background:var(--color-surface); }.settings-form-actions .btn { width:100%; min-height:2.75rem; }.settings-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.settings-action-grid { grid-template-columns:minmax(0,1fr); }.settings-notice,.settings-inline-row,.settings-property-card { flex-direction:column; }.settings-property-actions { width:100%; justify-content:flex-start; }.settings-link-list a { flex-direction:column; gap:.2rem; }.settings-link-list span { text-align:left; } }

/* Shared portal settings foundation. Customer adopts it first; plumber remains
   on its current protected presentation until its later no-behaviour migration. */
.portal-settings { display:grid; gap:var(--space-6); max-width:76rem; margin:0 auto; }
.portal-settings__navigation { display:grid; align-content:start; gap:var(--space-4); min-width:0; }
.portal-settings__identity { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
.portal-settings__avatar { display:grid; place-items:center; width:4rem; height:4rem; border:1px solid rgba(35,127,255,.18); border-radius:50%; background:rgba(35,127,255,.08); color:var(--color-brand-700); font-size:1.35rem; font-weight:var(--font-weight-bold); }
.portal-settings__identity p,.portal-settings__identity span { margin:0; color:var(--color-text-secondary); font-size:var(--font-size-sm); }.portal-settings__identity p { color:var(--color-brand-700); font-size:var(--font-size-xs); font-weight:var(--font-weight-bold); text-transform:uppercase; }.portal-settings__identity h2 { overflow:hidden; margin:.15rem 0; color:var(--color-text-primary); font-size:1rem; font-weight:var(--font-weight-bold); text-overflow:ellipsis; white-space:nowrap; }
.portal-settings__summary,.portal-settings__metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-2); }.portal-settings__summary>div,.portal-settings__metrics>a { display:grid; gap:.25rem; padding:var(--space-3); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:inherit; text-decoration:none; }.portal-settings__summary span,.portal-settings__metrics span,.portal-settings__metrics small { color:var(--color-text-secondary); font-size:var(--font-size-xs); }.portal-settings__summary strong { color:var(--color-text-primary); font-size:var(--font-size-lg); }.portal-settings__metrics strong { color:var(--color-text-primary); font-size:1.75rem; line-height:1.1; }
.portal-settings__group { display:grid; gap:var(--space-2); }.portal-settings__group h3 { margin:var(--space-1) var(--space-1) 0; color:var(--color-text-secondary); font-size:var(--font-size-xs); font-weight:var(--font-weight-bold); text-transform:uppercase; }.portal-settings__rows { overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
.portal-settings__row { display:grid; grid-template-columns:2.25rem minmax(0,1fr) auto auto; align-items:center; gap:var(--space-3); min-height:4rem; padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--color-border); color:inherit; text-decoration:none; }.portal-settings__row:last-child { border-bottom:0; }.portal-settings__row:hover,.portal-settings__row.is-active { background:rgba(35,127,255,.06); }.portal-settings__row.is-active { box-shadow:inset 3px 0 0 var(--color-brand-600); }.portal-settings__row-icon { display:inline-flex; width:2rem; height:2rem; align-items:center; justify-content:center; border-radius:var(--radius-md); background:var(--color-background); color:var(--color-brand-700); }.portal-settings__row-icon svg { width:1.05rem; height:1.05rem; }.portal-settings__row-body { display:grid; min-width:0; gap:.15rem; }.portal-settings__row-body strong { color:var(--color-text-primary); font-size:var(--font-size-sm); font-weight:var(--font-weight-semibold); }.portal-settings__row-body small { overflow:hidden; color:var(--color-text-secondary); font-size:var(--font-size-xs); text-overflow:ellipsis; white-space:nowrap; }.portal-settings__row-alert { width:.55rem; height:.55rem; border-radius:50%; background:#ef4444; }.portal-settings__row-chevron { color:var(--color-text-tertiary); font-size:1.35rem; }.portal-settings__logout { display:flex; align-items:center; justify-content:space-between; min-height:3rem; padding:0 var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); color:var(--color-text-secondary); font-size:var(--font-size-sm); font-weight:var(--font-weight-semibold); text-decoration:none; }
.portal-settings__detail,.portal-settings__stack { display:grid; gap:var(--space-6); min-width:0; }.portal-settings__mobile-header { display:none; }.portal-settings__panel { display:grid; gap:var(--space-5); min-width:0; padding:var(--space-6); border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }.portal-settings__panel--danger { border-color:rgba(239,68,68,.32); }.portal-settings__panel-header { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--space-3); }.portal-settings__panel-header p { margin:0 0 .35rem; color:var(--color-brand-700); font-size:var(--font-size-xs); font-weight:var(--font-weight-bold); text-transform:uppercase; }.portal-settings__panel-header h2 { margin:0; color:var(--color-text-primary); font-size:1.35rem; font-weight:var(--font-weight-bold); }.portal-settings__panel-header>div>span { display:block; max-width:42rem; margin-top:.45rem; color:var(--color-text-secondary); font-size:var(--font-size-sm); line-height:var(--line-height-normal); }
.portal-settings__attention,.portal-settings__ready { display:grid; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-subtle); }.portal-settings__attention>div:first-child,.portal-settings__ready { display:grid; gap:.3rem; }.portal-settings__attention strong,.portal-settings__ready strong { color:var(--color-text-primary); }.portal-settings__attention span,.portal-settings__ready span { color:var(--color-text-secondary); font-size:var(--font-size-sm); }.portal-settings__attention-list { overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); }.portal-settings__attention-list a,.portal-settings__attention-list button { display:flex; width:100%; align-items:center; justify-content:space-between; gap:var(--space-3); min-height:3.25rem; padding:var(--space-3) var(--space-4); border:0; border-bottom:1px solid var(--color-border); background:transparent; color:var(--color-text-primary); font:inherit; font-size:var(--font-size-sm); text-align:left; text-decoration:none; }.portal-settings__attention-list form:last-child button,.portal-settings__attention-list>a:last-child { border-bottom:0; }.portal-settings__attention-list span { color:var(--color-brand-700); font-size:var(--font-size-xs); font-weight:var(--font-weight-bold); }.portal-settings__overview-actions { display:flex; flex-wrap:wrap; gap:var(--space-3); }
.portal-settings__form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-5); }.portal-settings__actions { display:flex; justify-content:flex-end; padding-top:var(--space-2); }.portal-settings__item-list,.portal-settings__subsection { display:grid; gap:var(--space-3); }.portal-settings__item { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-subtle); }.portal-settings__item strong { color:var(--color-text-primary); }.portal-settings__item strong em { display:inline-flex; margin-left:.45rem; padding:.15rem .45rem; border-radius:99px; background:rgba(35,127,255,.08); color:var(--color-brand-700); font-size:.7rem; font-style:normal; }.portal-settings__item p,.portal-settings__item small,.portal-settings__status-row p,.portal-settings__activity p,.portal-settings__copy { margin:.35rem 0 0; color:var(--color-text-secondary); font-size:var(--font-size-sm); line-height:1.5; }.portal-settings__item-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--space-2); }.portal-settings__subform { display:grid; gap:var(--space-5); padding-top:var(--space-5); border-top:1px solid var(--color-border); }.portal-settings__subform h3,.portal-settings__subsection h3 { margin:0; color:var(--color-text-primary); font-size:1rem; }.portal-settings__toggle-list { display:grid; gap:var(--space-4); }.portal-settings__status-row,.portal-settings__activity { display:flex; align-items:flex-start; justify-content:space-between; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-subtle); }.portal-settings__status-row strong,.portal-settings__activity strong { color:var(--color-text-primary); }.portal-settings__activity>div { min-width:0; }.portal-settings__activity time,.portal-settings__activity a { color:var(--color-text-secondary); font-size:var(--font-size-xs); white-space:nowrap; }.portal-settings__links { display:grid; border-top:1px solid var(--color-border); }.portal-settings__links a { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); padding:var(--space-4) 0; border-bottom:1px solid var(--color-border); color:var(--color-text-primary); text-decoration:none; }.portal-settings__links span { color:var(--color-text-secondary); font-size:var(--font-size-sm); text-align:right; }.portal-settings__empty { margin:0; color:var(--color-text-secondary); font-size:var(--font-size-sm); }
@media (min-width:1024px) { .portal-settings { grid-template-columns:22rem minmax(0,1fr); align-items:start; }.portal-settings__navigation { position:sticky; top:5.5rem; }.portal-settings__detail { align-content:start; } }
@media (max-width:1023px) { .customer-page:has(.customer-settings) .customer-page-header { display:none; }.customer-page:has(.customer-settings) { padding-bottom:calc(5.75rem + env(safe-area-inset-bottom)); }.portal-settings { gap:0; }.portal-settings:not(.is-section-page) .portal-settings__detail { display:none; }.portal-settings.is-section-page .portal-settings__navigation { display:none; }.portal-settings.is-section-page .portal-settings__mobile-header { display:grid; }.portal-settings__identity,.portal-settings__summary>div,.portal-settings__rows,.portal-settings__logout,.portal-settings__panel { box-shadow:none; }.portal-settings__navigation { gap:var(--space-4); }.portal-settings__group { gap:var(--space-2); }.portal-settings__row { min-height:4.25rem; }.portal-settings__mobile-header { grid-template-columns:auto minmax(0,1fr); align-items:center; gap:var(--space-3); margin-bottom:var(--space-4); }.portal-settings__mobile-header a { display:inline-flex; width:2.5rem; height:2.5rem; align-items:center; justify-content:center; border:1px solid var(--color-border); border-radius:50%; background:var(--color-surface); color:var(--color-text-primary); font-size:1.5rem; text-decoration:none; }.portal-settings__mobile-header span { display:block; color:var(--color-text-secondary); font-size:var(--font-size-xs); font-weight:var(--font-weight-semibold); }.portal-settings__mobile-header strong { display:block; overflow:hidden; color:var(--color-text-primary); font-size:var(--font-size-lg); text-overflow:ellipsis; white-space:nowrap; }.portal-settings__panel { padding:var(--space-4); }.portal-settings__panel-header { display:grid; gap:var(--space-3); }.portal-settings__panel-header .btn,.portal-settings__panel button[type="submit"],.portal-settings__actions .btn { width:100%; justify-content:center; }.portal-settings__form-grid { grid-template-columns:minmax(0,1fr); }.portal-settings__actions { position:sticky; bottom:calc(4.9rem + env(safe-area-inset-bottom)); z-index:5; margin:0 calc(var(--space-4) * -1) calc(var(--space-4) * -1); padding:var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); border-top:1px solid var(--color-border); background:var(--color-surface); }.portal-settings__overview-actions,.portal-settings__item-actions { width:100%; }.portal-settings__overview-actions .btn { flex:1; }.portal-settings__item,.portal-settings__status-row { flex-direction:column; }.portal-settings__item-actions { justify-content:flex-start; }.portal-settings__links a { align-items:flex-start; flex-direction:column; gap:.2rem; }.portal-settings__links span { text-align:left; } }
@media (max-width:420px) { .portal-settings__summary>div { padding:var(--space-2); }.portal-settings__summary span { font-size:.68rem; }.portal-settings__panel h2 { font-size:1.2rem; }.portal-settings__metrics { gap:var(--space-2); }.portal-settings__metrics>a { padding:var(--space-3); }.portal-settings__metrics strong { font-size:1.45rem; } }

/* Customer settings: match the finished plumber desktop frame. The shared
   primitive stays portal-neutral; these are customer presentation rules only. */
@media (min-width:1024px) {
  #main-content .customer-page:has(.customer-settings) .customer-page-header {
    width:min(100%, 90rem);
    margin:0 auto;
  }
  #main-content .customer-page .customer-settings__header-status {
    display:inline-flex;
    min-height:2.25rem;
    align-items:center;
    justify-content:center;
    padding:0 var(--space-4);
    border:1px solid transparent;
    border-radius:var(--radius-full);
    background:var(--color-surface-subtle);
    color:var(--color-text-secondary);
    font:inherit;
    font-size:var(--font-size-sm);
    font-weight:var(--font-weight-semibold);
  }
  #main-content .customer-page .customer-settings__header-status--verified {
    border-color:rgba(34,197,94,.3);
    background:rgba(34,197,94,.1);
    color:#15803d;
  }
  #main-content .customer-page .customer-settings__header-status--pending {
    border-color:rgba(245,158,11,.35);
    background:rgba(245,158,11,.1);
    color:#a16207;
    cursor:pointer;
  }
  #main-content .customer-page .customer-settings {
    grid-template-columns:14rem minmax(0,1fr);
    gap:0;
    width:min(100%, 90rem);
    max-width:100%;
    min-height:39rem;
    overflow:hidden;
    border:1px solid var(--color-border);
    border-radius:var(--radius-lg);
    background:var(--color-surface);
    box-shadow:var(--shadow-card);
  }

  #main-content .customer-page .customer-settings .portal-settings__navigation {
    align-content:start;
    gap:var(--space-3);
    padding:var(--space-5) var(--space-4);
    border-right:1px solid var(--color-border);
    background:var(--color-surface-subtle);
    box-shadow:none;
  }

  #main-content .customer-page .customer-settings .portal-settings__identity,
  #main-content .customer-page .customer-settings .portal-settings__summary {
    display:none;
  }

  #main-content .customer-page .customer-settings .portal-settings__group { gap:var(--space-1); }
  #main-content .customer-page .customer-settings .portal-settings__group:first-of-type h3 { display:none; }
  #main-content .customer-page .customer-settings .portal-settings__group h3 { margin:var(--space-4) 0 var(--space-1); padding:0 var(--space-3); font-size:.68rem; letter-spacing:0; }
  #main-content .customer-page .customer-settings .portal-settings__rows { overflow:visible; border:0; border-radius:0; background:transparent; box-shadow:none; }
  #main-content .customer-page .customer-settings .portal-settings__row { grid-template-columns:1.35rem minmax(0,1fr); gap:var(--space-2); min-height:2.45rem; margin:.15rem 0; padding:.55rem var(--space-3); border:0; border-radius:var(--radius-md); background:transparent; box-shadow:none; }
  #main-content .customer-page .customer-settings .portal-settings__row:hover,
  #main-content .customer-page .customer-settings .portal-settings__row.is-active { background:rgba(35,127,255,.08); color:var(--color-brand-700); box-shadow:none; }
  #main-content .customer-page .customer-settings .portal-settings__row-body small { display:none; }
  #main-content .customer-page .customer-settings .portal-settings__row-icon { width:1.1rem; height:1.1rem; border:0; border-radius:0; background:transparent; color:currentColor; }
  #main-content .customer-page .customer-settings .portal-settings__row-icon svg { width:1rem; height:1rem; }
  #main-content .customer-page .customer-settings .portal-settings__row-body strong { color:currentColor; font-size:.82rem; }
  #main-content .customer-page .customer-settings .portal-settings__row-alert,
  #main-content .customer-page .customer-settings .portal-settings__row-chevron { display:none; }
  #main-content .customer-page .customer-settings .portal-settings__logout { min-height:2.45rem; margin:.15rem 0; padding:.55rem var(--space-3); border:0; border-radius:var(--radius-md); background:transparent; }

  #main-content .customer-page .customer-settings .portal-settings__detail { align-content:start; gap:var(--space-5); padding:var(--space-6); overflow:hidden; background:var(--color-surface); }
  #main-content .customer-page .customer-settings .portal-settings__panel { min-height:0; gap:var(--space-5); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  #main-content .customer-page .customer-settings .portal-settings__panel--danger { padding:var(--space-5); border:1px solid rgba(239,68,68,.32); border-radius:var(--radius-lg); background:var(--color-surface); }
  #main-content .customer-page .customer-settings .portal-settings__stack { gap:var(--space-5); padding:0; }
  #main-content .customer-page .customer-settings .portal-settings__stack .portal-settings__panel { min-height:0; padding:0; border:0; border-radius:0; background:transparent; }
  #main-content .customer-page .customer-settings .portal-settings__stack .portal-settings__panel + .portal-settings__panel { padding-top:var(--space-5); border-top:1px solid var(--color-border); }
  #main-content .customer-page .customer-settings .portal-settings__panel-header { flex-wrap:nowrap; padding-bottom:var(--space-4); border-bottom:1px solid var(--color-border); }
  #main-content .customer-page .customer-settings .portal-settings__panel-header p { display:none; }
  #main-content .customer-page .customer-settings .portal-settings__panel-header h2 { font-size:var(--font-size-xl); }
}

@media (max-width:1023px) {
  #main-content .customer-page .customer-settings__header-status { display:none; }
  #main-content .customer-page .customer-settings { width:100%; max-width:none; margin:0; }
  #main-content .customer-page .customer-settings .portal-settings__navigation { width:100%; }
  #main-content .customer-page .customer-settings .portal-settings__identity,
  #main-content .customer-page .customer-settings .portal-settings__summary,
  #main-content .customer-page .customer-settings .portal-settings__group,
  #main-content .customer-page .customer-settings .portal-settings__rows,
  #main-content .customer-page .customer-settings .portal-settings__row,
  #main-content .customer-page .customer-settings .portal-settings__logout { width:100%; }
  #main-content .customer-page .customer-settings .portal-settings__navigation { gap:var(--space-4); }
  #main-content .customer-page .customer-settings .portal-settings__identity { padding:var(--space-4); }
  #main-content .customer-page .customer-settings .portal-settings__row { min-height:4.4rem; padding:var(--space-3) var(--space-4); }
  #main-content .customer-page .customer-settings .portal-settings__row-body small { display:block; }
}
@media (max-width:420px) { .settings-metrics { gap:.45rem; }.settings-metrics a { padding:.75rem .5rem; }.settings-metrics strong { font-size:1.3rem; }.settings-metrics span { font-size:.68rem; } }
#main-content .app-content,
#main-content .animate-rise,
#main-content .plumber-page,
#main-content .plumber-page .section-stack {
  min-width: 0;
}

#main-content .plumber-page {
  width: 100%;
}

#main-content .plumber-page .section-stack {
  width: 100%;
  max-width: 100%;
}

#main-content .plumber-page .plumber-profile-page-header,
#main-content .plumber-page .plumber-profile-shell {
  width: min(100%, 76rem);
  max-width: 100%;
}

#main-content .plumber-page .plumber-profile-shell,
#main-content .plumber-page .plumber-profile-detail,
#main-content .plumber-page .plumber-profile-panel,
#main-content .plumber-page .plumber-profile-panel > *,
#main-content .plumber-page .plumber-profile-form-grid,
#main-content .plumber-page .plumber-profile-document-grid,
#main-content .plumber-page .plumber-profile-summary-grid,
#main-content .plumber-page .grid,
#main-content .plumber-page .form-group,
#main-content .plumber-page .form-input,
#main-content .plumber-page .form-select,
#main-content .plumber-page .form-textarea {
  min-width: 0;
}

#main-content .plumber-page .form-input,
#main-content .plumber-page .form-select,
#main-content .plumber-page .form-textarea {
  max-width: 100%;
}

#main-content .plumber-page .plumber-profile-nav {
  min-width: 0;
}

@media (hover: hover) and (pointer: fine) {
}

@media (min-width: 1024px) {
  #main-content .plumber-page .plumber-profile-shell {
    grid-template-columns: clamp(12rem, 17vw, 14rem) minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-profile-detail {
    overflow: hidden;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #main-content .plumber-page .plumber-profile-shell {
    grid-template-columns: minmax(11rem, 12rem) minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-profile-detail {
    padding: var(--space-5);
  }
}

@media (max-width: 767px) {
  #main-content .plumber-page .plumber-profile-app-header {
    max-width: 28rem;
  }

  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: min(100%, 28rem);
    max-width: 28rem;
  }
}

/* Tablet and zoomed desktop profile settings stability */
@media (min-width: 1200px) {
  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: min(100%, 76rem);
  }

  #main-content .plumber-page .plumber-profile-shell {
    grid-template-columns: 14rem minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-profile-nav {
    border-right: 1px solid var(--color-border);
    border-bottom: 0;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: 100%;
  }

  #main-content .plumber-page .plumber-profile-page-header {
    padding-inline: 0;
  }

  #main-content .plumber-page .plumber-profile-page-header .page-header-inner {
    align-items: flex-start;
    gap: var(--space-4);
  }

  #main-content .plumber-page .plumber-profile-page-header .page-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #main-content .plumber-page .plumber-profile-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  #main-content .plumber-page .plumber-profile-nav {
    position: static;
    display: block;
    width: 100%;
    padding: var(--space-3);
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--color-surface-subtle);
  }

  #main-content .plumber-page .plumber-profile-identity,
  #main-content .plumber-page .plumber-profile-home-summary,
  #main-content .plumber-page .plumber-profile-preview {
    display: none;
  }

  #main-content .plumber-page .plumber-profile-section-list {
    display: flex;
    gap: var(--space-2);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: var(--space-1);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  #main-content .plumber-page .plumber-profile-section-list::-webkit-scrollbar {
    display: none;
  }

  #main-content .plumber-page .plumber-profile-section-list h3 {
    display: none;
  }

  #main-content .plumber-page .plumber-profile-section {
    display: contents;
  }

  #main-content .plumber-page .plumber-profile-row {
    flex: 0 0 auto;
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 2.75rem;
    width: max-content;
    max-width: 13rem;
    padding: 0 var(--space-3);
    border-radius: var(--radius-md);
    white-space: nowrap;
    scroll-snap-align: start;
  }

  #main-content .plumber-page .plumber-profile-row__icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  #main-content .plumber-page .plumber-profile-row__body {
    min-width: 0;
    overflow: hidden;
  }

  #main-content .plumber-page .plumber-profile-row__label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #main-content .plumber-page .plumber-profile-row__meta,
  #main-content .plumber-page .plumber-profile-row__description,
  #main-content .plumber-page .plumber-profile-row__badge,
  #main-content .plumber-page .plumber-profile-row__alert,
  #main-content .plumber-page .plumber-profile-row__chevron {
    display: none;
  }

  #main-content .plumber-page .plumber-profile-detail {
    width: 100%;
    padding: var(--space-5);
    overflow: visible;
  }

  #main-content .plumber-page .plumber-profile-panel {
    width: 100%;
  }

  #main-content .plumber-page .plumber-profile-panel__header {
    align-items: flex-start;
    gap: var(--space-4);
  }

  #main-content .plumber-page .plumber-profile-panel__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #main-content .plumber-page .plumber-profile-form-grid,
  #main-content .plumber-page .plumber-profile-document-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-profile-summary-grid,
  #main-content .plumber-page .plumber-profile-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  #main-content .plumber-page .plumber-profile-detail {
    padding: var(--space-4);
  }

  #main-content .plumber-page .plumber-profile-panel__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-profile-summary-grid,
  #main-content .plumber-page .plumber-profile-service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: 100%;
    max-width: 100%;
  }

  #main-content .plumber-page .plumber-profile-shell {
    display: grid;
    grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
  }

  #main-content .plumber-page .plumber-profile-nav {
    display: grid;
    align-content: start;
    border-right: 1px solid var(--color-border);
    border-bottom: 0;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #main-content .plumber-page .plumber-profile-section-list {
    display: grid;
    gap: var(--space-1);
    overflow: visible;
  }

  #main-content .plumber-page .plumber-profile-section-list h3 {
    display: block;
  }

  #main-content .plumber-page .plumber-profile-section {
    display: block;
  }

  #main-content .plumber-page .plumber-profile-row {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  #main-content .plumber-page .plumber-profile-detail {
    padding: var(--space-5);
    overflow: hidden;
  }
}

/* Part 2 marketplace workflow and responsive workspace polish */
.plumber-conversation-grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.plumber-conversation-main {
  min-width: 0;
}

.plumber-message-list {
  display: grid;
  gap: var(--space-3);
}

.plumber-message {
  display: flex;
  justify-content: flex-start;
}

.plumber-message.is-own {
  justify-content: flex-end;
}

.plumber-message__bubble {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 42rem);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-message.is-own .plumber-message__bubble {
  border-color: rgba(35, 127, 255, 0.22);
  background: rgba(35, 127, 255, 0.07);
}

.plumber-message__bubble span {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-message__bubble p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-message__bubble time {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-xs);
}

.plumber-message-form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.plumber-inbox-shell {
  display: grid;
  gap: var(--space-6);
}

.plumber-inbox-shell--messages {
  grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
  align-items: start;
}

.plumber-inbox-pane {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-inbox-pane--empty {
  min-height: 28rem;
  place-items: center;
}

.plumber-inbox-pane__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-inbox-pane__title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.plumber-inbox-pane__description {
  margin: 0.35rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-inbox-search {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 18rem;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-background);
}

.plumber-inbox-search svg {
  width: 1rem;
  height: 1rem;
  color: var(--color-text-tertiary);
}

.plumber-inbox-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plumber-inbox-search input:focus {
  outline: none;
}

.plumber-inbox-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.plumber-inbox-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.82);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  transition: 180ms ease;
}

.plumber-inbox-chip:hover,
.plumber-inbox-chip.active {
  border-color: rgba(35, 127, 255, 0.26);
  background: rgba(239, 246, 255, 0.9);
  color: var(--color-brand-700);
}

.plumber-inbox-thread-list,
.plumber-notification-list,
.plumber-thread-workspace__messages {
  display: grid;
  gap: var(--space-3);
}

.plumber-inbox-thread {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.15rem;
  background: rgba(248, 250, 252, 0.82);
  color: inherit;
  text-decoration: none;
  transition: 180ms ease;
}

.plumber-inbox-thread:hover,
.plumber-inbox-thread.is-active {
  border-color: rgba(35, 127, 255, 0.3);
  background: rgba(239, 246, 255, 0.92);
}

.plumber-inbox-thread__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.1);
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-inbox-thread__body {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.plumber-inbox-thread__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-inbox-thread__topline strong {
  min-width: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-inbox-thread__topline span,
.plumber-inbox-thread__preview,
.plumber-inbox-thread__meta,
.plumber-thread-workspace__meta span,
.plumber-message-form__actions p,
.plumber-notification-item__topline time,
.plumber-notification-item__copy p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-inbox-thread__title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.45;
}

.plumber-inbox-thread__preview {
  line-height: var(--line-height-relaxed);
}

.plumber-inbox-thread__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.plumber-inbox-thread__meta {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.plumber-inbox-thread__reply-flag {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.12);
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.plumber-inbox-thread__aside {
  display: flex;
  align-items: flex-start;
}

.plumber-inbox-detail-stack {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.plumber-thread-workspace__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.plumber-thread-workspace__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.plumber-thread-workspace__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.plumber-thread-workspace__messages {
  min-height: 18rem;
}

.plumber-inbox-backlink {
  display: none;
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
}

.plumber-message-form--workspace {
  margin-top: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.plumber-message-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-message-form__actions p {
  margin: 0;
  line-height: var(--line-height-relaxed);
}

.plumber-notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.15rem;
  background: rgba(248, 250, 252, 0.82);
}

.plumber-notification-item.is-unread {
  border-color: rgba(35, 127, 255, 0.24);
  background: rgba(239, 246, 255, 0.88);
}

.plumber-notification-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.95rem;
  color: var(--color-brand-700);
  background: rgba(35, 127, 255, 0.08);
}

.plumber-notification-item__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.plumber-notification-item__icon.tone-credit_purchase {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.plumber-notification-item__icon.tone-document_approved {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.plumber-notification-item__icon.tone-document_rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.plumber-notification-item__icon.tone-message_received,
.plumber-notification-item__icon.tone-proposal_received,
.plumber-notification-item__icon.tone-proposal_accepted {
  background: rgba(35, 127, 255, 0.12);
  color: var(--color-brand-700);
}

.plumber-notification-item__copy {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.plumber-notification-item__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.plumber-notification-item__topline h3 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-notification-item__copy p {
  margin: 0;
  line-height: var(--line-height-relaxed);
}

.plumber-notification-item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

html.dark .plumber-inbox-pane {
  background: rgba(15, 23, 42, 0.94);
}

html.dark .plumber-inbox-search,
html.dark .plumber-inbox-thread,
html.dark .plumber-notification-item,
html.dark .plumber-inbox-thread__meta {
  background: rgba(15, 23, 42, 0.74);
}

html.dark .plumber-inbox-chip {
  border-color: rgba(71, 85, 105, 0.5);
  background: rgba(15, 23, 42, 0.72);
}

html.dark .plumber-inbox-chip:hover,
html.dark .plumber-inbox-chip.active,
html.dark .plumber-inbox-thread:hover,
html.dark .plumber-inbox-thread.is-active,
html.dark .plumber-notification-item.is-unread {
  background: rgba(30, 41, 59, 0.95);
}

html.dark .plumber-inbox-thread__reply-flag {
  background: rgba(59, 130, 246, 0.18);
  color: rgb(147, 197, 253);
}

html.dark .plumber-notification-item__icon.tone-credit_purchase,
html.dark .plumber-notification-item__icon.tone-document_approved {
  color: rgb(134, 239, 172);
}

html.dark .plumber-notification-item__icon.tone-document_rejected {
  color: rgb(252, 165, 165);
}

.plumber-inbox-stage {
  display: grid;
  gap: 1.5rem;
}

.plumber-inbox-workspace {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1rem, 1vw + 0.8rem, 1.5rem);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.07), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.plumber-inbox-workspace__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.plumber-inbox-workspace__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 2.1vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plumber-inbox-workspace__description {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.97rem;
  line-height: 1.6;
}

.plumber-inbox-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.plumber-inbox-nav__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.95rem;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: 180ms ease;
}

.plumber-inbox-nav__tab:hover,
.plumber-inbox-nav__tab.active {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(239, 246, 255, 0.95);
  color: #2563eb;
}

.plumber-inbox-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.34rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.plumber-inbox-shell {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.plumber-inbox-shell--messages {
  grid-template-columns: minmax(16rem, 17rem) minmax(0, 1fr) minmax(14rem, 15rem);
}

.plumber-inbox-column {
  min-width: 0;
  padding: 1rem;
}

.plumber-inbox-column--list,
.plumber-inbox-column--thread {
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.plumber-inbox-search {
  min-height: 2.8rem;
  padding: 0 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.plumber-inbox-search input {
  font-size: 0.9rem;
}

.plumber-inbox-filter-button,
.plumber-inbox-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #dbe4f0;
  border-radius: 0.8rem;
  background: #fff;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.plumber-inbox-filter-button svg,
.plumber-inbox-icon-button svg {
  width: 1rem;
  height: 1rem;
}

.plumber-inbox-chip-row--tight {
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.plumber-inbox-chip {
  min-height: 2rem;
  padding: 0.32rem 0.75rem;
  border-color: #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.plumber-inbox-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 0.68rem;
}

.plumber-inbox-chip.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.plumber-inbox-chip.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.plumber-inbox-thread-list {
  gap: 0.55rem;
}

.plumber-inbox-thread {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  background: transparent;
}

.plumber-inbox-thread:hover,
.plumber-inbox-thread.is-active {
  border-color: rgba(191, 219, 254, 0.95);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.96));
}

.plumber-inbox-thread__avatar {
  width: 2.65rem;
  height: 2.65rem;
  background: #eff6ff;
  color: #334155;
  font-size: 0.82rem;
}

.plumber-inbox-thread__subtitle {
  color: #334155;
  font-size: 0.77rem;
  font-weight: 700;
}

.plumber-inbox-thread__preview {
  font-size: 0.76rem;
  line-height: 1.45;
}

.plumber-inbox-thread__side {
  display: grid;
  justify-items: end;
  align-content: space-between;
  gap: 0.45rem;
  min-height: 3rem;
}

.plumber-inbox-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.plumber-inbox-status-chip--active {
  background: #dcfce7;
  color: #15803d;
}

.plumber-inbox-status-chip--shortlisted {
  background: #fef3c7;
  color: #b45309;
}

.plumber-inbox-thread__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #2563eb;
}

.plumber-thread-workspace {
  display: grid;
  gap: 1rem;
  height: 100%;
}

.plumber-thread-workspace__header--minimal {
  align-items: center;
  padding-bottom: 0.2rem;
}

.plumber-thread-workspace__contact {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.plumber-thread-workspace__service {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.plumber-thread-workspace__service span {
  margin-inline: 0.35rem;
}

.plumber-thread-workspace__icons {
  display: flex;
  gap: 0.5rem;
}

.plumber-thread-workspace__messages--framed {
  gap: 0.8rem;
  min-height: 27rem;
  max-height: 27rem;
  padding: 0.35rem 0.2rem 0.15rem;
  overflow: auto;
}

.plumber-thread-workspace__day {
  justify-self: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  background: #f8fafc;
}

.plumber-message__bubble--soft {
  width: min(100%, 20rem);
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.plumber-message.is-own .plumber-message__bubble--soft {
  background: #dbeafe;
  border-color: rgba(96, 165, 250, 0.26);
}

.plumber-message__bubble--soft span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.65rem;
  font-weight: 800;
}

.plumber-message.is-own .plumber-message__bubble--soft span {
  display: none;
}

.plumber-message__bubble--soft p {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.6;
}

.plumber-message__bubble--soft time {
  justify-self: end;
}

.plumber-thread-workspace__attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: start;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}

.plumber-message-form--panel {
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 0;
}

.plumber-message-form__textarea {
  min-height: 4.8rem;
  border-radius: 0.9rem;
  resize: none;
}

.plumber-message-form__panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plumber-message-form__utility {
  display: flex;
  gap: 0.45rem;
}

.plumber-inbox-context-card {
  display: grid;
  gap: 1rem;
  height: 100%;
}

.plumber-inbox-context-card__header {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.plumber-inbox-context-card__header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.plumber-inbox-context-card__rows {
  display: grid;
  gap: 0.95rem;
}

.plumber-inbox-context-card__rows div {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #eef2f7;
}

.plumber-inbox-context-card__rows span {
  color: #64748b;
  font-size: 0.75rem;
}

.plumber-inbox-context-card__rows strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.plumber-notification-list--flat {
  gap: 0;
}

.plumber-notification-item {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.7rem;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
}

.plumber-notification-item.is-unread {
  background: transparent;
}

.plumber-notification-item__icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
}

.plumber-notification-item__topline h3 {
  font-size: 0.92rem;
}

.plumber-notification-item__copy p {
  color: #64748b;
  font-size: 0.82rem;
}

.plumber-notification-item__meta {
  display: grid;
  justify-items: end;
  gap: 0.55rem;
  color: #64748b;
  font-size: 0.78rem;
}

.plumber-notification-empty {
  display: grid;
  place-items: center;
  min-height: 28rem;
  padding: 2rem 1rem;
  text-align: center;
}

.plumber-notification-empty__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 6.4rem;
  height: 6.4rem;
  margin-bottom: 1.4rem;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(219, 234, 254, 0.92), rgba(239, 246, 255, 0.8));
  color: #2563eb;
}

.plumber-notification-empty__icon svg {
  width: 2.2rem;
  height: 2.2rem;
}

.plumber-notification-empty__icon span {
  position: absolute;
  right: 1.15rem;
  bottom: 1.25rem;
  width: 0.95rem;
  height: 0.95rem;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #22c55e;
}

.plumber-notification-empty h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.9rem;
  font-weight: 800;
}

.plumber-notification-empty p {
  width: min(100%, 25rem);
  margin: 0.7rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.65;
}

.plumber-inbox-footer-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 1rem;
  align-items: stretch;
}

.plumber-inbox-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.plumber-inbox-benefits article,
.plumber-inbox-footer-callout {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.82);
}

.plumber-inbox-benefits strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.plumber-inbox-benefits span,
.plumber-inbox-footer-callout {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.6;
}

.plumber-inbox-footer-callout {
  display: flex;
  align-items: center;
  color: #2563eb;
  background: rgba(239, 246, 255, 0.82);
}

html.dark .plumber-inbox-workspace {
  border-color: rgba(51, 65, 85, 0.9);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.96));
}

html.dark .plumber-inbox-workspace__title,
html.dark .plumber-thread-workspace__contact,
html.dark .plumber-inbox-context-card__header h3,
html.dark .plumber-notification-empty h3 {
  color: #f8fafc;
}

html.dark .plumber-inbox-workspace__description,
html.dark .plumber-inbox-thread__preview,
html.dark .plumber-inbox-thread__subtitle,
html.dark .plumber-thread-workspace__service,
html.dark .plumber-notification-item__copy p,
html.dark .plumber-notification-empty p,
html.dark .plumber-inbox-benefits span,
html.dark .plumber-inbox-footer-callout {
  color: #94a3b8;
}

html.dark .plumber-inbox-nav__tab {
  color: #cbd5e1;
}

html.dark .plumber-inbox-nav__tab:hover,
html.dark .plumber-inbox-nav__tab.active {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(96, 165, 250, 0.22);
  color: #93c5fd;
}

html.dark .plumber-inbox-shell,
html.dark .plumber-inbox-filter-button,
html.dark .plumber-inbox-icon-button,
html.dark .plumber-notification-empty__icon,
html.dark .plumber-inbox-benefits article,
html.dark .plumber-inbox-footer-callout {
  border-color: rgba(51, 65, 85, 0.92);
  background: rgba(15, 23, 42, 0.88);
}

html.dark .plumber-inbox-column--list,
html.dark .plumber-inbox-column--thread {
  border-right-color: rgba(51, 65, 85, 0.88);
}

html.dark .plumber-inbox-search,
html.dark .plumber-inbox-thread:hover,
html.dark .plumber-inbox-thread.is-active,
html.dark .plumber-message__bubble--soft,
html.dark .plumber-thread-workspace__day,
html.dark .plumber-thread-workspace__attachment-pill,
html.dark .plumber-inbox-chip {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(51, 65, 85, 0.92);
  color: #e2e8f0;
}

html.dark .plumber-inbox-chip.active {
  background: #2563eb;
  border-color: #2563eb;
}

html.dark .plumber-message.is-own .plumber-message__bubble--soft {
  background: rgba(30, 64, 175, 0.44);
}

html.dark .plumber-inbox-context-card__rows div,
html.dark .plumber-notification-item {
  border-bottom-color: rgba(51, 65, 85, 0.75);
}

@media (max-width: 1199px) {
  .plumber-inbox-shell--messages {
    grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
  }

  .plumber-inbox-column--context {
    display: none;
  }

  .plumber-inbox-footer-note,
  .plumber-inbox-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .plumber-inbox-workspace {
    padding: 0.9rem;
    border-radius: 1.25rem;
  }

  .plumber-inbox-workspace__hero {
    padding-top: 0.1rem;
  }

  .plumber-inbox-workspace__title {
    font-size: 1.95rem;
  }

  .plumber-inbox-nav {
    justify-content: space-between;
    gap: 0.5rem;
  }

  .plumber-inbox-nav__tab {
    flex: 1 1 0;
    justify-content: center;
    min-height: 2.7rem;
    padding-inline: 0.75rem;
    font-size: 0.88rem;
  }

  .plumber-inbox-shell--messages {
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-inbox-column {
    padding: 0.8rem;
  }

  .plumber-inbox-column--list,
  .plumber-inbox-column--thread {
    border-right: 0;
  }

  .plumber-inbox-shell--messages:not(.is-thread-open) .plumber-inbox-column--thread,
  .plumber-inbox-shell--messages:not(.is-thread-open) .plumber-inbox-column--context {
    display: none;
  }

  .plumber-inbox-shell--messages.is-thread-open .plumber-inbox-column--list {
    display: none;
  }

  .plumber-inbox-shell--messages.is-thread-open .plumber-inbox-column--context {
    display: block;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
  }

  .plumber-message-form__panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .plumber-inbox-thread__side {
    justify-items: end;
  }

  .plumber-thread-workspace__header--minimal {
    align-items: flex-start;
  }

  .plumber-thread-workspace__messages--framed {
    min-height: 22rem;
    max-height: 22rem;
  }

  .plumber-inbox-backlink {
    display: inline-flex;
    margin-bottom: 0.45rem;
  }

  .plumber-notification-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding-inline: 0.2rem;
  }

  .plumber-notification-item__actions {
    justify-content: flex-end;
  }

  .plumber-inbox-footer-note,
  .plumber-inbox-benefits {
    display: none;
  }
}

.lead-location-map-shell {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background: var(--color-surface-subtle);
}

.lead-location-map {
  width: 100%;
  min-height: 18.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
  isolation: isolate;
}

.lead-location-map .leaflet-control-attribution,
.lead-location-map .leaflet-control-zoom a {
  font-family: inherit;
}

.lead-location-map .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-tertiary);
}

.lead-location-map .leaflet-control-attribution a {
  color: inherit;
}

.lead-location-map .leaflet-bar a {
  color: var(--color-text-primary);
}

.lead-location-map .leaflet-tile {
  filter: saturate(1.04) contrast(1.01);
}

.lead-location-map__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.86);
}

.lead-location-map__label {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.lead-location-map__meta {
  margin: 0.35rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.lead-location-map__badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: rgb(37, 99, 235);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.lead-location-map__pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: rgb(37, 99, 235);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

html.dark .lead-location-map {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

html.dark .lead-location-map .leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.88);
  color: var(--color-text-tertiary);
}

html.dark .lead-location-map .leaflet-bar a,
html.dark .lead-location-map .leaflet-control-zoom a {
  background: rgb(15, 23, 42);
  color: rgb(226, 232, 240);
  border-bottom-color: rgba(148, 163, 184, 0.32);
}

html.dark .lead-location-map__footer {
  background: rgba(15, 23, 42, 0.84);
}

html.dark .lead-location-map__badge {
  background: rgba(59, 130, 246, 0.18);
  color: rgb(147, 197, 253);
}

@media (max-width: 767px) {
  .lead-location-map {
    min-height: 15rem;
  }

  .lead-location-map__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1199px) {
  .plumber-inbox-shell--messages {
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-inbox-detail-stack {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1200px) {
  .plumber-inbox-detail-stack {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 18rem);
  }
}

@media (max-width: 767px) {
  .plumber-inbox-pane,
  .plumber-thread-workspace__messages,
  .plumber-notification-item {
    padding: var(--space-4);
  }

  .plumber-thread-workspace__header,
  .plumber-message-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .plumber-inbox-thread {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plumber-inbox-thread__aside {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .plumber-inbox-shell--messages.is-thread-open .plumber-inbox-pane--list {
    display: none;
  }

  .plumber-inbox-backlink {
    display: inline-flex;
  }
}

.plumber-info-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

html.dark .plumber-success-box {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
}

@media (min-width: 1200px) {
  #main-content .plumber-page {
    max-width: min(100%, 96rem);
    margin-inline: auto;
  }

  #main-content .plumber-page .page-header,
  #main-content .plumber-page .section-stack {
    width: 100%;
    max-width: 100%;
  }

  #main-content .plumber-page .plumber-feed-layout {
    grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-detail-grid,
  #main-content .plumber-page .plumber-conversation-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  }

  .plumber-conversation-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  }

  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: min(100%, 90rem);
  }
}

@media (min-width: 1500px) {
  #main-content .plumber-page {
    max-width: min(100%, 104rem);
  }

  #main-content .plumber-page .plumber-profile-page-header,
  #main-content .plumber-page .plumber-profile-shell {
    width: min(100%, 96rem);
  }

  #main-content .plumber-page .plumber-feed-layout {
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-detail-grid,
  #main-content .plumber-page .plumber-conversation-grid,
  .plumber-conversation-grid {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #main-content .plumber-page .plumber-profile-row {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
  }

  #main-content .plumber-page .plumber-profile-row__icon {
    align-self: center;
    justify-self: center;
  }

  #main-content .plumber-page .plumber-profile-row__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    align-self: center;
  }

  #main-content .plumber-page .plumber-profile-row__label {
    line-height: 1.15;
  }

  #main-content .plumber-page .plumber-profile-row__meta {
    max-width: 100%;
    text-align: left;
  }
}

@media (max-width: 767px) {
  #main-content .plumber-page {
    max-width: 100%;
  }

  #main-content .plumber-page,
  #main-content .plumber-page .section-stack,
  #main-content .plumber-page .page-header,
  #main-content .plumber-page .page-header-inner,
  #main-content .plumber-page .page-actions,
  #main-content .plumber-page .customer-surface,
  #main-content .plumber-page .customer-surface-body,
  #main-content .plumber-page .customer-job-card,
  #main-content .plumber-page .plumber-lead-card,
  #main-content .plumber-page .plumber-activity-card,
  #main-content .plumber-page .plumber-sticky-action,
  #main-content .plumber-page .plumber-lead-detail-hero,
  #main-content .plumber-page form,
  #main-content .plumber-page .form-group {
    min-width: 0;
  }

  #main-content .plumber-page .page-header {
    padding-bottom: 0;
  }

  #main-content .plumber-page .page-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  #main-content .plumber-page .page-title {
    font-size: 1.55rem;
    line-height: 1.12;
  }

  #main-content .plumber-page .page-description {
    max-width: 100%;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
  }

  #main-content .plumber-page .page-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: var(--space-2);
  }

  #main-content .plumber-page .page-actions .btn,
  #main-content .plumber-page .plumber-action-banner .btn,
  #main-content .plumber-page .plumber-filter-actions .btn,
  #main-content .plumber-page .plumber-bottom-sheet__actions .btn,
  #main-content .plumber-page .customer-job-actions .btn,
  #main-content .plumber-page .plumber-message-form .btn {
    width: 100%;
    justify-content: center;
  }

  #main-content .plumber-page .plumber-workspace-hero,
  #main-content .plumber-page .plumber-leads-header,
  #main-content .plumber-page .plumber-action-banner,
  #main-content .plumber-page .plumber-lead-detail-hero,
  #main-content .plumber-page .plumber-sticky-action {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  #main-content .plumber-page .plumber-workspace-hero,
  #main-content .plumber-page .plumber-leads-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: var(--space-3);
  }

  #main-content .plumber-page .plumber-hero-actions {
    justify-content: flex-end;
    align-self: start;
  }

  #main-content .plumber-page .plumber-hero-actions .btn {
    width: auto;
    min-width: 0;
    white-space: nowrap;
  }

  #main-content .plumber-page .plumber-workspace-hero h2,
  #main-content .plumber-page .plumber-leads-header h2,
  #main-content .plumber-page .plumber-action-banner h2,
  #main-content .plumber-page .plumber-lead-detail-hero h2,
  #main-content .plumber-page .plumber-sticky-action h2 {
    font-size: 1.35rem;
  }

  #main-content .plumber-page .plumber-lead-card__top,
  #main-content .plumber-page .plumber-lead-card__topline,
  #main-content .plumber-page .plumber-lead-card__footer,
  #main-content .plumber-page .plumber-feed__header,
  #main-content .plumber-page .customer-job-card-header,
  #main-content .plumber-page .customer-job-card-body {
    align-items: stretch;
    flex-direction: column;
  }

  #main-content .plumber-page .plumber-leads-header,
  #main-content .plumber-page .plumber-leads-toolbar__actions,
  #main-content .plumber-page .plumber-detail-overview-grid,
  #main-content .plumber-page .plumber-gallery-grid,
  #main-content .plumber-page .plumber-proposal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  #main-content .plumber-page .plumber-feed__header .btn,
  #main-content .plumber-page .plumber-leads-toolbar__actions .btn {
    width: 100%;
    justify-content: center;
  }

  #main-content .plumber-page .plumber-row-link {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    border-radius: var(--radius-lg);
    padding: var(--space-3);
  }

  #main-content .plumber-page .plumber-filter-chips,
  #main-content .plumber-page .plumber-app-tabs,
  #main-content .plumber-page .plumber-activity-tabs {
    margin-inline: calc(var(--space-1) * -1);
    padding-inline: var(--space-1);
  }

  #main-content .plumber-page .plumber-filter-chips a,
  #main-content .plumber-page .plumber-app-tab,
  #main-content .plumber-page .plumber-activity-tabs a {
    min-height: 2.45rem;
    padding-inline: 0.85rem;
    font-size: 0.82rem;
  }

  #main-content .plumber-page .plumber-profile-row {
    grid-template-columns: 2rem minmax(0, 1fr) 1rem;
    align-items: center;
    min-height: 3.25rem;
    column-gap: 0.65rem;
    padding-block: 0.75rem;
  }

  #main-content .plumber-page .plumber-profile-row__icon {
    align-self: center;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    background: rgba(35, 127, 255, 0.08);
    color: var(--color-brand-700);
  }

  #main-content .plumber-page .plumber-profile-row__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    align-items: center;
    align-self: center;
    min-width: 0;
    min-height: 1.4rem;
  }

  #main-content .plumber-page .plumber-profile-row__label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    white-space: nowrap;
  }

  #main-content .plumber-page .plumber-profile-row__meta {
    align-self: start;
    justify-self: start;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    text-align: left;
  }

  #main-content .plumber-page .plumber-profile-row__chevron {
    align-self: center;
    justify-self: end;
  }

  #main-content .plumber-page .plumber-profile-form-actions,
  #main-content .plumber-page .plumber-profile-form-actions .btn {
    width: 100%;
  }

  #main-content .plumber-page .plumber-profile-form-actions .btn {
    justify-content: center;
  }

  .plumber-conversation-grid,
  .plumber-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-message__bubble {
    width: min(100%, 22rem);
  }
}

.plumber-onboarding-progress p,
.plumber-onboarding-progress small {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-onboarding-progress strong {
  color: var(--color-text-primary);
  font-size: 1.25rem;
}

.plumber-onboarding-progress__bar {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-background);
}

.plumber-onboarding-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-brand-600);
}

.plumber-onboarding-layout {
  display: grid;
  gap: var(--space-6);
}

.plumber-onboarding-steps {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.plumber-onboarding-steps a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.1rem var(--space-3);
  align-items: center;
  min-height: 3.5rem;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: inherit;
}

.plumber-onboarding-steps a.is-active {
  border-color: rgba(35, 127, 255, 0.25);
  background: rgba(35, 127, 255, 0.06);
}

.plumber-onboarding-steps span {
  grid-row: span 2;
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-background);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-onboarding-steps strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plumber-onboarding-steps small {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-onboarding-main {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.plumber-onboarding-card {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  scroll-margin-top: 5.5rem;
}

.plumber-onboarding-card__step {
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-onboarding-card h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.55rem;
  font-weight: var(--font-weight-bold);
}

.plumber-onboarding-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.plumber-onboarding-facts,
.plumber-onboarding-options {
  display: grid;
  gap: var(--space-3);
}

.plumber-onboarding-facts div,
.plumber-onboarding-options div {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
}

.plumber-onboarding-options div.is-selected {
  border-color: rgba(35, 127, 255, 0.28);
  background: rgba(35, 127, 255, 0.06);
}

.plumber-onboarding-facts span,
.plumber-onboarding-options span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-onboarding-facts strong,
.plumber-onboarding-options strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plumber-onboarding-blocker {
  padding: var(--space-4);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  background: #fffbeb;
  color: #92400e !important;
}

@media (min-width: 720px) {
  .plumber-onboarding-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .plumber-onboarding-layout {
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-onboarding-steps {
    position: sticky;
    top: 5.5rem;
  }

  .plumber-onboarding-card {
    padding: var(--space-6);
  }
}

.plumber-verification-shell {
  display: grid;
  gap: var(--space-6);
  max-width: 68rem;
  margin: 0 auto;
}

.plumber-verification-sidebar {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.plumber-verification-steps {
  display: grid;
  gap: var(--space-2);
}

.plumber-verification-steps button {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.1rem var(--space-3);
  align-items: center;
  min-height: 3.5rem;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: inherit;
  text-align: left;
}

.plumber-verification-steps button.is-active {
  border-color: rgba(35, 127, 255, 0.28);
  background: rgba(35, 127, 255, 0.08);
}

.plumber-verification-steps span {
  grid-row: span 2;
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-background);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-verification-steps strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plumber-verification-steps small {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.plumber-verification-main {
  min-width: 0;
}

.plumber-verification-card {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-verification-step-label {
  margin: 0;
  color: var(--color-brand-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.plumber-verification-card h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.55rem;
  font-weight: var(--font-weight-bold);
}

.plumber-verification-card p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.plumber-verification-status-grid {
  display: grid;
  gap: var(--space-3);
}

.plumber-verification-status-grid div,
.plumber-selected-id {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
}

.plumber-verification-status-grid span,
.plumber-selected-id span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.plumber-verification-status-grid strong,
.plumber-selected-id strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.plumber-verification-note {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  background: #fffbeb;
  color: #92400e;
}

.plumber-verification-note strong,
.plumber-verification-note p {
  color: inherit;
}

.plumber-id-options {
  display: grid;
  gap: var(--space-3);
}

.plumber-id-options label {
  display: flex;
  min-height: 3.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-id-options input {
  order: 2;
  accent-color: var(--color-brand-600);
}

.plumber-verification-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (max-width: 767px) {
  .plumber-verification-shell {
    width: min(100%, 28rem);
    gap: var(--space-4);
  }

  .plumber-verification-sidebar {
    gap: var(--space-3);
  }

  .plumber-verification-sidebar .plumber-onboarding-progress {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .plumber-verification-steps {
    display: flex;
    gap: var(--space-2);
    margin-inline: calc(var(--space-1) * -1);
    overflow-x: auto;
    padding: 0 var(--space-1) var(--space-1);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .plumber-verification-steps::-webkit-scrollbar {
    display: none;
  }

  .plumber-verification-steps button {
    flex: 0 0 9.5rem;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    min-height: 3rem;
    padding: var(--space-2) var(--space-3);
    scroll-snap-align: start;
  }

  .plumber-verification-steps span {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.78rem;
  }

  .plumber-verification-steps strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .plumber-verification-card {
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .plumber-verification-card h2 {
    font-size: 1.28rem;
    line-height: 1.18;
  }

  .plumber-verification-card p {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
  }

  .plumber-verification-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-verification-actions > span {
    display: none;
  }

  .plumber-verification-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 720px) {
  .plumber-verification-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .plumber-verification-shell {
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: start;
  }

  .plumber-verification-sidebar {
    position: sticky;
    top: 5.5rem;
  }

  .plumber-verification-card {
    padding: var(--space-6);
  }
}

/* Guided verification wizard */
.plumber-verification-shell {
  width: min(100%, 58rem);
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.plumber-verification-progress {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.plumber-verification-progress__top,
.plumber-verification-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.plumber-verification-progress__top p,
.plumber-verification-progress__meta {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-verification-progress__top strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.plumber-verification-progress__top > span {
  display: inline-flex;
  min-width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(35, 127, 255, 0.1);
  color: var(--color-brand-700);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
}

.plumber-verification-progress__meta {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.plumber-verification-progress__dots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1.25rem, 1fr));
  gap: 0.45rem;
}

.plumber-verification-progress__dots span {
  display: block;
  height: 0.35rem;
  border-radius: var(--radius-full);
  background: var(--color-border);
}

.plumber-verification-progress__dots span.is-past,
.plumber-verification-progress__dots span.is-complete {
  background: rgba(34, 197, 94, 0.75);
}

.plumber-verification-progress__dots span.is-active {
  background: var(--color-brand-600);
}

.plumber-verification-main {
  display: grid;
  width: min(100%, 48rem);
  margin: 0 auto;
}

.plumber-verification-card {
  overflow: hidden;
  gap: var(--space-5);
  width: 100%;
}

.plumber-verification-card > form,
.plumber-verification-card .space-y-5,
.plumber-verification-card .space-y-4 {
  min-width: 0;
}

.plumber-verification-upload {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
}

.plumber-verification-card label,
.plumber-verification-card .form-group {
  min-width: 0;
}

.plumber-verification-card .grid {
  min-width: 0;
}

.plumber-verification-card .form-input,
.plumber-verification-card .form-select,
.plumber-verification-card .form-textarea {
  width: 100%;
  max-width: 100%;
}

.plumber-verification-status-grid div,
.plumber-selected-id,
.plumber-id-options label,
.plumber-verification-note,
.plumber-document-status {
  min-width: 0;
}

.plumber-id-options label {
  border-radius: var(--radius-lg);
}

.plumber-id-options label:has(input:checked) {
  border-color: rgba(35, 127, 255, 0.35);
  background: rgba(35, 127, 255, 0.08);
}

.plumber-verification-actions {
  padding-top: var(--space-2);
}

.plumber-verification-actions .btn {
  min-height: 2.75rem;
}

@media (min-width: 768px) {
  .plumber-verification-shell {
    gap: var(--space-6);
  }

  .plumber-verification-progress {
    padding: var(--space-6);
  }

  .plumber-verification-card {
    padding: var(--space-7);
  }

  .plumber-verification-actions {
    justify-content: flex-end;
  }

  .plumber-verification-actions .btn:first-child {
    margin-right: auto;
  }
}

@media (min-width: 1200px) {
  .plumber-verification-shell {
    width: min(100%, 64rem);
  }

  .plumber-verification-main {
    width: min(100%, 52rem);
  }
}

@media (max-width: 767px) {
  #main-content .plumber-page:has(.plumber-verification-shell) {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  .plumber-verification-shell {
    width: min(100%, 28rem);
    gap: var(--space-3);
  }

  .plumber-verification-progress {
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-xs);
  }

  .plumber-verification-progress__top {
    align-items: flex-start;
  }

  .plumber-verification-progress__top strong {
    max-width: 16rem;
    font-size: 1.15rem;
  }

  .plumber-verification-progress__top > span {
    min-width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.85rem;
    font-size: var(--font-size-sm);
  }

  .plumber-verification-progress__meta {
    gap: var(--space-2);
    font-size: 0.76rem;
  }

  .plumber-verification-card {
    gap: var(--space-4);
    padding: var(--space-4);
    border: 0;
    border-radius: 1.1rem;
    box-shadow: var(--shadow-xs);
  }

  .plumber-verification-step-label {
    font-size: 0.78rem;
  }

  .plumber-verification-card h2 {
    font-size: 1.35rem;
  }

  .plumber-verification-status-grid {
    gap: var(--space-2);
  }

  .plumber-verification-status-grid div,
  .plumber-selected-id,
  .plumber-verification-note {
    padding: var(--space-3);
    border-radius: 0.9rem;
  }

  .plumber-id-options {
    gap: var(--space-2);
  }

  .plumber-id-options label {
    min-height: 3.25rem;
    padding-inline: var(--space-3);
  }

  .plumber-verification-actions {
    gap: var(--space-2);
  }
}

/* ============================================
   PLUMBER PORTAL RESPONSIVE FOUNDATION REFRESH
   Scoped to plumber workspace and focused
   onboarding so customer/admin remain unchanged.
   ============================================ */

.plumber-app-body {
  background:
    radial-gradient(circle at top left, rgba(35, 127, 255, 0.08), transparent 24rem),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
}

.plumber-app-root {
  --plumber-floating-clearance: 0px;
  min-height: 100vh;
  color: var(--color-text-primary);
}

.plumber-app-root--focused {
  padding: var(--space-4);
  background:
    radial-gradient(circle at top right, rgba(35, 127, 255, 0.08), transparent 22rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.plumber-global-banner {
  width: min(100% - 2rem, 92rem);
  margin: var(--space-4) auto 0;
  padding: var(--space-4);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-xl);
  background: rgba(255, 247, 237, 0.92);
  box-shadow: var(--shadow-sm);
}

.plumber-global-banner__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.plumber-shell {
  min-height: 100vh;
}

.plumber-shell__sidebar {
  display: none;
}

.plumber-shell__main {
  min-width: 0;
}

.plumber-shell__content {
  padding: 0 var(--space-4) calc(6.5rem + env(safe-area-inset-bottom) + var(--plumber-floating-clearance));
}

.plumber-shell__brand {
  display: grid;
  gap: var(--space-2);
}

.plumber-shell__logo,
.plumber-focused-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-primary);
  text-decoration: none;
}

.plumber-shell__logo span,
.plumber-focused-shell__brand span {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.plumber-shell__brand p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-shell__status,
.plumber-status-bar,
.plumber-page-header,
.plumber-grouped-list,
.plumber-form-section,
.plumber-step-progress,
.plumber-inline-notice,
.plumber-feedback-state,
.plumber-focused-shell__body > .plumber-responsive-container {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.plumber-shell__status,
.plumber-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
}

.plumber-shell__status strong,
.plumber-status-bar strong {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.plumber-shell__status p,
.plumber-status-bar p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-shell__status-dot,
.plumber-status-bar__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.plumber-shell__status-dot.is-live,
.plumber-status-bar__dot.is-live {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.plumber-status-bar__meta,
.plumber-status-bar__state {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.plumber-shell__nav {
  display: grid;
  gap: var(--space-2);
}

.plumber-shell__nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

.plumber-shell__nav-link:hover,
.plumber-shell__nav-link.is-active {
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
}

.plumber-shell__nav-link small {
  display: inline-flex;
  min-width: 1.45rem;
  height: 1.45rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.12);
  color: var(--color-brand-700);
  font-size: 0.7rem;
  font-weight: 800;
}

.plumber-responsive-container {
  width: min(100%, 72rem);
  margin: 0 auto;
}

.plumber-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}

.plumber-page-header__kicker {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plumber-page-header__title {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.04;
}

.plumber-page-header__description {
  max-width: 42rem;
  margin-top: 0.5rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.plumber-step-progress {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
}

.plumber-step-progress__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.plumber-step-progress__meta p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plumber-step-progress__meta strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.plumber-step-progress__meta span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-align: right;
}

.plumber-step-progress__bar {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: hidden;
}

.plumber-step-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-brand-500), var(--color-brand-700));
}

.plumber-grouped-list,
.plumber-form-section {
  overflow: hidden;
}

.plumber-grouped-list__header,
.plumber-form-section__header {
  padding: var(--space-5) var(--space-5) 0;
}

.plumber-grouped-list__header h2,
.plumber-form-section__header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.plumber-grouped-list__header p,
.plumber-form-section__header p {
  margin-top: 0.45rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-grouped-list__body,
.plumber-form-section__body {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
}

.plumber-list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.25rem;
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
  text-decoration: none;
}

.plumber-list-row.is-selected {
  border-color: rgba(35, 127, 255, 0.36);
  background: rgba(239, 246, 255, 0.9);
}

.plumber-list-row__copy {
  min-width: 0;
}

.plumber-list-row__title-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.plumber-list-row__title-line strong {
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-list-row__title-line span,
.plumber-list-row__copy p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-list-row__copy p {
  margin-top: 0.4rem;
  line-height: var(--line-height-relaxed);
}

.plumber-inline-notice,
.plumber-feedback-state {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
}

.plumber-inline-notice strong,
.plumber-feedback-state strong {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-inline-notice p,
.plumber-feedback-state p {
  margin-top: 0.35rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.plumber-inline-notice--success,
.plumber-feedback-state--success {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.94);
}

.plumber-inline-notice--warning {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(255, 251, 235, 0.96);
}

.plumber-inline-notice--error,
.plumber-feedback-state--error {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(254, 242, 242, 0.96);
}

.plumber-feedback-state--loading {
  align-items: center;
}

.plumber-feedback-state__dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--color-brand-600);
  box-shadow: 0 0 0 6px rgba(35, 127, 255, 0.14);
}

.plumber-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.plumber-status-badge--neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-secondary);
}

.plumber-status-badge--success {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.plumber-status-badge--warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.plumber-status-badge--error {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.plumber-step-footer {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  background: transparent;
}

.plumber-step-footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0 calc(var(--space-2) + env(safe-area-inset-bottom));
}

.plumber-focused-shell {
  width: min(100%, 84rem);
  margin: 0 auto;
}

/* Verification centre: content-sized by design so short desktop steps never
   leave an empty panel below the form. */
.plumber-verification-centre__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.plumber-verification-centre__header h1 { margin: .35rem 0; color: var(--color-text-primary); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.06; }
.plumber-verification-centre__header p:not(.plumber-onboarding-stage__eyebrow) { max-width: 44rem; margin: 0; color: var(--color-text-secondary); line-height: 1.6; }
.plumber-verification-centre__layout { display: grid; gap: var(--space-5); align-items: start; }
.plumber-verification-centre__rail { display: none; }
.plumber-verification-centre__progress { display: grid; gap: .3rem; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.plumber-verification-centre__progress strong { color: var(--color-text-primary); font-size: var(--font-size-base); }
.plumber-verification-centre__progress span { color: var(--color-text-secondary); font-size: var(--font-size-xs); line-height: 1.45; }
.plumber-verification-centre__rail nav { display: grid; gap: .45rem; }
.plumber-verification-centre__step { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .65rem; align-items: center; min-height: 4rem; padding: .65rem; border: 1px solid transparent; border-radius: var(--radius-md); color: inherit; text-decoration: none; }
.plumber-verification-centre__step:hover, .plumber-verification-centre__step.is-active { background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.14); }
.plumber-verification-centre__step > span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--color-background); color: var(--color-text-secondary); font-size: var(--font-size-sm); font-weight: 800; }
.plumber-verification-centre__step.is-complete > span { background: #dcfce7; color: #15803d; }
.plumber-verification-centre__step strong, .plumber-verification-centre__step small { display: block; }
.plumber-verification-centre__step strong { color: var(--color-text-primary); font-size: var(--font-size-sm); }
.plumber-verification-centre__step small { margin-top: .15rem; color: var(--color-text-secondary); font-size: .72rem; line-height: 1.25; }
.plumber-service-picker__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.plumber-service-picker__scroll-hint { display: none; }
@media (min-width: 1024px) {
  .plumber-verification-centre__layout { grid-template-columns: 18rem minmax(0, 1fr); }
  .plumber-verification-centre__rail { position: sticky; top: 1.5rem; display: grid; gap: var(--space-4); }
  .plumber-onboarding-panel { min-height: 0; }
}
@media (max-width: 640px) {
  .plumber-verification-centre__header { display: grid; gap: var(--space-3); }
  .plumber-verification-centre__header { padding: .25rem .25rem 0; }
  .plumber-verification-centre__header h1 { font-size: 1.55rem; }
  .plumber-verification-centre__header p:not(.plumber-onboarding-stage__eyebrow) { font-size: .84rem; line-height: 1.45; }
  .plumber-verification-centre__header form, .plumber-verification-centre__header .btn { width: 100%; }
  .plumber-verification-centre__rail { display: grid; gap: .65rem; margin: 0 -.25rem; padding: .7rem .25rem .1rem; overflow: hidden; }
  .plumber-verification-centre__progress { padding: .7rem .85rem; border-radius: .85rem; }
  .plumber-verification-centre__progress span { display: none; }
  .plumber-verification-centre__rail nav { display: flex; gap: .5rem; overflow-x: auto; padding: 0 .15rem .35rem; scroll-snap-type: x proximity; scrollbar-width: none; }
  .plumber-verification-centre__rail nav::-webkit-scrollbar { display: none; }
  .plumber-verification-centre__step { grid-template-columns: 1.75rem minmax(4.8rem, 1fr); flex: 0 0 auto; min-width: 8.15rem; min-height: 3.6rem; padding: .55rem; border-color: rgba(148, 163, 184, .16); background: rgba(255, 255, 255, .78); scroll-snap-align: start; }
  .plumber-verification-centre__step > span { width: 1.75rem; height: 1.75rem; font-size: .72rem; }
  .plumber-verification-centre__step strong { font-size: .72rem; line-height: 1.2; }
  .plumber-verification-centre__step small { display: none; }
  .plumber-onboarding-panel > .plumber-step-progress { display: none; }
}

.plumber-focused-shell__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-5);
}

.plumber-focused-shell__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.plumber-focused-shell__body {
  display: grid;
  gap: var(--space-5);
}

.plumber-onboarding-aside,
.plumber-onboarding-panel {
  display: grid;
  gap: var(--space-4);
}

.plumber-onboarding-aside {
  display: none;
}

.plumber-onboarding-stage {
  display: grid;
  gap: var(--space-4);
}

.plumber-onboarding-stage__eyebrow {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plumber-onboarding-stage h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.02;
}

.plumber-onboarding-stage > p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

.plumber-onboarding-summary {
  display: grid;
  gap: var(--space-3);
}

.plumber-onboarding-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.82);
}

.plumber-onboarding-summary span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.plumber-onboarding-summary strong {
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.plumber-inline-actions,
.plumber-step-actions-cluster,
.plumber-step-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.plumber-focused-shell__actions--mobile-only {
  width: 100%;
}

.plumber-service-picker {
  display: grid;
  gap: var(--space-4);
}

.plumber-service-picker__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.plumber-service-picker__search {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3.4rem;
  flex: 1 1 18rem;
  padding: 0 var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: #fff;
}

.plumber-service-picker__search svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-text-secondary);
  flex: 0 0 auto;
}

.plumber-service-picker__search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  outline: 0;
}

.plumber-service-picker__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(35, 127, 255, 0.08);
  color: var(--color-brand-700);
  font-size: 0.78rem;
  font-weight: 800;
}

.plumber-service-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.plumber-service-picker__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.plumber-service-picker__chips .is-empty {
  color: var(--color-text-secondary);
}

.plumber-service-picker__list {
  display: grid;
  gap: var(--space-3);
  max-height: min(29rem, 56vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, .35) transparent;
  padding-right: var(--space-1);
}

.plumber-onboarding-stage--services .plumber-form-section {
  min-height: 0;
}

.plumber-onboarding-stage--services .plumber-form-section__body {
  min-height: 0;
}

.plumber-service-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.5rem;
  height: auto;
  box-sizing: border-box;
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}

.plumber-service-option:hover {
  border-color: rgba(35, 127, 255, 0.26);
  transform: translateY(-1px);
}

.plumber-service-option.is-selected {
  border-color: rgba(35, 127, 255, 0.34);
  background: rgba(239, 246, 255, 0.92);
}

.plumber-service-option__copy {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.plumber-service-option__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  min-width: 0;
}

.plumber-service-option__title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.plumber-service-option__copy strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.35;
}

.plumber-service-option__copy small {
  display: block;
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: .78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plumber-service-option__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.plumber-service-option__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.plumber-service-option__meta .is-highlight {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.plumber-service-option__check {
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
  align-self: center;
  border: 1.5px solid rgba(148, 163, 184, 0.5);
  border-radius: 0.4rem;
  background: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.plumber-service-option.is-selected .plumber-service-option__check {
  border-color: var(--color-brand-600);
  background: var(--color-brand-600);
}

.plumber-service-option.is-selected .plumber-service-option__check::after {
  content: "";
  width: 0.36rem;
  height: 0.65rem;
  margin-top: -0.05rem;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.plumber-id-choice-grid {
  display: grid;
  gap: var(--space-3);
}

.plumber-id-choice {
  display: grid;
  gap: 0.35rem;
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}

.plumber-id-choice:hover {
  border-color: rgba(35, 127, 255, 0.28);
  transform: translateY(-1px);
}

.plumber-id-choice.is-selected {
  border-color: rgba(35, 127, 255, 0.36);
  background: rgba(239, 246, 255, 0.92);
}

.plumber-id-choice strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.plumber-id-choice span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

@media (max-width: 767px) {
  .plumber-global-banner {
    width: min(100% - 1.25rem, 40rem);
    margin-top: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: 1.1rem;
  }

  .plumber-shell__content {
    padding-inline: var(--space-3);
    padding-bottom: calc(6.85rem + env(safe-area-inset-bottom) + var(--plumber-floating-clearance));
  }

  .plumber-status-bar {
    display: none;
  }

  .plumber-page-header,
  .plumber-grouped-list__header,
  .plumber-form-section__header,
  .plumber-grouped-list__body,
  .plumber-form-section__body,
  .plumber-step-progress,
  .plumber-inline-notice,
  .plumber-feedback-state {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .plumber-page-header {
    gap: var(--space-3);
  }

  .plumber-page-header__title {
    font-size: 1.55rem;
  }

  .plumber-page-header__actions {
    display: grid;
    width: 100%;
  }

  .plumber-page-header__actions .btn,
  .plumber-step-footer__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .plumber-step-footer__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-inline-notice,
  .plumber-feedback-state,
  .plumber-list-row {
    gap: var(--space-3);
  }

  .plumber-list-row {
    padding: var(--space-3);
  }

  .plumber-focused-shell__header {
    padding-bottom: var(--space-4);
  }

  .plumber-focused-shell__actions {
    width: 100%;
  }

  .plumber-focused-shell__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .plumber-service-picker__toolbar {
    align-items: stretch;
  }

  .plumber-onboarding-stage--services {
    gap: var(--space-3);
  }

  .plumber-onboarding-stage--services h1 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .plumber-onboarding-stage--services > p {
    font-size: .88rem;
    line-height: 1.45;
  }

  .plumber-onboarding-stage--services .plumber-form-section {
    border-radius: 1.1rem;
  }

  .plumber-onboarding-stage--services .plumber-form-section__header {
    padding: var(--space-4) var(--space-4) 0;
  }

  .plumber-onboarding-stage--services .plumber-form-section__body {
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .plumber-service-picker {
    gap: var(--space-3);
  }

  .plumber-service-picker__search {
    min-height: 3rem;
    border-radius: .85rem;
  }

  .plumber-service-picker__count {
    min-height: 2rem;
    padding: 0 .7rem;
    font-size: .7rem;
  }

  .plumber-service-picker__actions .btn {
    flex: 1 1 0;
    min-height: 2.75rem;
  }

  .plumber-service-picker__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .2rem;
    scrollbar-width: none;
  }

  .plumber-service-picker__chips::-webkit-scrollbar { display: none; }
  .plumber-service-picker__chips span { flex: 0 0 auto; }

  .plumber-service-picker__scroll-hint {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: -.1rem 0 0;
    color: var(--color-text-secondary);
    font-size: .72rem;
  }

  .plumber-service-picker__scroll-hint::before {
    content: "↕";
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: var(--color-brand-700);
    font-weight: 800;
  }

  .plumber-service-picker__list {
    max-height: min(48vh, 25rem);
    overflow-y: auto;
    padding: .1rem .25rem .15rem 0;
    border-radius: .85rem;
    scroll-snap-type: y proximity;
    -webkit-overflow-scrolling: touch;
  }

  .plumber-service-option {
    min-height: 3.6rem;
    gap: var(--space-3);
    padding: .75rem;
    border-radius: .75rem;
  }

  .plumber-service-option__copy { gap: .25rem; }
  .plumber-service-option__copy strong { font-size: .84rem; }
  .plumber-service-option__copy small { font-size: .7rem; }
  .plumber-service-option__meta { gap: .3rem; }
  .plumber-service-option__meta span { min-height: 1.45rem; padding-inline: .5rem; font-size: .64rem; }
  .plumber-service-option__check { width: 1.2rem; height: 1.2rem; }

  .plumber-onboarding-summary > div,
  .plumber-step-actions-cluster,
  .plumber-step-inline-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .plumber-inline-actions .btn,
  .plumber-step-actions-cluster .btn,
  .plumber-step-inline-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .plumber-shell__content {
    padding-inline: var(--space-6);
  }

  .plumber-page-header__actions {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  .plumber-focused-shell__actions--mobile-only {
    display: none;
  }

  .plumber-shell {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: var(--space-6);
    width: min(100%, 110rem);
    margin: 0 auto;
    padding: var(--space-6);
  }

  .plumber-shell__sidebar {
    position: sticky;
    top: var(--space-6);
    display: grid;
    align-content: start;
    gap: var(--space-5);
    height: calc(100vh - (var(--space-6) * 2));
    padding: var(--space-5);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  }

  .plumber-shell__content {
    padding: 0;
  }

  .plumber-focused-shell__body {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .plumber-step-footer__actions {
    padding-bottom: 0;
  }
}

@media (min-width: 1280px) {
  .plumber-shell {
    width: min(100%, 116rem);
    grid-template-columns: 19rem minmax(0, 1fr);
  }

  .plumber-focused-shell {
    width: min(100%, 92rem);
  }
}

@media (min-width: 1440px) {
  .plumber-shell {
    width: min(100%, 120rem);
  }

  .plumber-focused-shell__body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Inbox rebuild */
.plumber-inbox-app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.plumber-inbox-app__header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2vw, 2.35rem);
  font-weight: 700;
  color: #0f172a;
}

.plumber-inbox-app__header p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: #64748b;
}

.plumber-inbox-tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.plumber-inbox-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.1rem;
  border-bottom: 2px solid transparent;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.plumber-inbox-tabs__link.is-active {
  border-bottom-color: #2563eb;
  color: #0f172a;
}

.plumber-inbox-tabs__badge {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.plumber-inbox-board {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: calc(100dvh - 12.75rem);
  min-height: 42rem;
}

.plumber-inbox-board--notifications {
  grid-template-columns: minmax(0, 1fr);
}

.plumber-inbox-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  box-shadow: 0 20px 45px -32px rgba(15, 23, 42, 0.28);
}

.plumber-inbox-panel--list,
.plumber-inbox-panel--notifications {
  overflow: hidden;
}

.plumber-inbox-panel--thread {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.plumber-thread-stage__icon svg,
.plumber-thread-mobile-page__icon svg,
.plumber-thread-composer__attach svg {
  width: 1rem;
  height: 1rem;
}

.plumber-thread-stage__icon,
.plumber-thread-mobile-page__icon {
  display: inline-flex;
  width: 2.8rem;
  height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe4f0;
  border-radius: 0.9rem;
  background: #fff;
  color: #475569;
}

.plumber-inbox-chipbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.9rem 1rem 1rem;
}

.plumber-inbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.plumber-inbox-chip.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.plumber-thread-list,
.plumber-notification-feed {
  display: flex;
  flex-direction: column;
}

.plumber-thread-row,
.plumber-notification-row {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.plumber-thread-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  border-top: 1px solid #eef2f7;
}

.plumber-thread-row:first-child,
.plumber-notification-row:first-child {
  border-top: 1px solid #eef2f7;
}

.plumber-thread-row:hover,
.plumber-notification-row:hover {
  background: #f8fbff;
}

.plumber-thread-row.is-active {
  background: #eff6ff;
}

.plumber-thread-row__avatar,
.plumber-chat-bubble__avatar {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e7eefb;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 700;
}

.plumber-thread-row__copy,
.plumber-notification-row__copy {
  min-width: 0;
}

.plumber-thread-row__topline,
.plumber-notification-row__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plumber-thread-row__topline strong,
.plumber-notification-row__topline h2 {
  min-width: 0;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.plumber-thread-row__topline time,
.plumber-notification-row__topline time {
  color: #94a3b8;
  font-size: 0.76rem;
  white-space: nowrap;
}

.plumber-thread-row__subtitle {
  display: block;
  margin-top: 0.15rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}

.plumber-thread-row__preview,
.plumber-notification-row__copy p {
  display: block;
  margin-top: 0.3rem;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-thread-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.plumber-thread-row__status,
.plumber-inbox-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.plumber-thread-row__status.is-open {
  background: #eef2ff;
  color: #4338ca;
}

.plumber-thread-row__status.is-active {
  background: #dcfce7;
  color: #166534;
}

.plumber-thread-row__status.is-shortlisted {
  background: #fef3c7;
  color: #92400e;
}

.plumber-thread-row__count {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.plumber-thread-stage {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
}

.plumber-thread-stage__header,
.plumber-thread-mobile-page__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #eef2f7;
}

.plumber-thread-stage__identity h2,
.plumber-thread-mobile-page__backline h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.plumber-thread-stage__identity p,
.plumber-thread-mobile-page__backline p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.plumber-thread-stage__identity span {
  margin: 0 0.3rem;
}

.plumber-thread-stage__actions,
.plumber-thread-mobile-page__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.plumber-thread-stage__actions {
  position: relative;
}

.plumber-thread-stage__messages,
.plumber-thread-mobile-page__messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
}

.plumber-thread-stage__day {
  align-self: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.plumber-chat-bubble {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
}

.plumber-chat-bubble.is-own {
  justify-content: flex-end;
}

.plumber-chat-bubble__content {
  max-width: min(34rem, 82%);
  padding: 0.9rem 1rem 0.7rem;
  border-radius: 1.2rem;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 10px 20px -18px rgba(15, 23, 42, 0.5);
}

.plumber-chat-bubble.is-own .plumber-chat-bubble__content {
  background: #dbeafe;
}

.plumber-chat-bubble__content p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.plumber-chat-bubble__content time {
  display: block;
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  text-align: right;
}

.plumber-chat-bubble__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.plumber-chat-bubble__image {
  padding: 0;
  border: 0;
  border-radius: 0.9rem;
  overflow: hidden;
  background: transparent;
}

.plumber-chat-bubble__image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.plumber-thread-dropdown {
  display: none;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 50px -26px rgba(15, 23, 42, 0.35);
}

.plumber-thread-dropdown.is-open {
  display: block;
}

.plumber-thread-dropdown--desktop {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(22rem, calc(100vw - 3rem));
  z-index: 4;
}

.plumber-thread-dropdown--mobile {
  position: absolute;
  top: calc(100% - 0.15rem);
  left: 1rem;
  right: 1rem;
  z-index: 6;
}

.plumber-thread-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.plumber-thread-dropdown__header strong {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.plumber-thread-dropdown__close {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
}

.plumber-thread-dropdown__close svg {
  width: 0.95rem;
  height: 0.95rem;
}

.plumber-thread-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.plumber-thread-drawer__grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.plumber-thread-drawer__grid span {
  display: block;
  margin-bottom: 0.2rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plumber-thread-drawer__grid strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.plumber-thread-composer,
.plumber-thread-mobile-page__composer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid #eef2f7;
  margin-top: auto;
}

.plumber-thread-composer textarea,
.plumber-thread-mobile-page__composer textarea {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
  border: 1px solid #dbe4f0;
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.plumber-thread-composer__actions,
.plumber-thread-mobile-page__composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plumber-thread-composer__attach {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.plumber-thread-composer__attach input {
  display: none;
}

.plumber-thread-readonly {
  margin: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dbe4f0;
  border-radius: 1rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.9rem;
}

.plumber-thread-mobile-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 6.75rem);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  overflow: hidden;
}

.plumber-thread-mobile-page__backline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.plumber-thread-mobile-page__back {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.plumber-thread-mobile-page__back svg {
  width: 1.1rem;
  height: 1.1rem;
}

.plumber-notification-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border-top: 1px solid #eef2f7;
}

.plumber-notification-row__icon {
  display: inline-flex;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.plumber-notification-row__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.plumber-notification-row__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.plumber-notification-row__actions a {
  color: #2563eb;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.plumber-notification-row__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #2563eb;
}

.plumber-inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 19rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.plumber-inbox-empty--thread {
  min-height: 24rem;
}

.plumber-inbox-empty__icon {
  display: inline-flex;
  width: 4.5rem;
  height: 4.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.plumber-inbox-empty__icon svg {
  width: 2rem;
  height: 2rem;
}

.plumber-inbox-empty h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 700;
}

.plumber-inbox-empty p {
  max-width: 28rem;
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.plumber-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.82);
}

.plumber-image-lightbox.hidden {
  display: none;
}

.plumber-image-lightbox img {
  max-width: min(90vw, 62rem);
  max-height: 84vh;
  border-radius: 1rem;
  transition: transform 0.18s ease;
  transform-origin: center center;
}

.plumber-image-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
}

.plumber-image-lightbox--gallery {
  gap: 1rem;
}

.plumber-image-lightbox__chrome {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.plumber-image-lightbox__counter {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  pointer-events: auto;
}

.plumber-image-lightbox__toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  pointer-events: auto;
}

.plumber-image-lightbox__tool,
.plumber-image-lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.plumber-image-lightbox__tool {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.9rem;
}

.plumber-image-lightbox__tool--close {
  padding: 0 1rem;
}

.plumber-image-lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  margin: 0;
}

.plumber-image-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(90vw, 62rem);
  min-height: min(70vh, 42rem);
}

.plumber-image-lightbox__caption {
  max-width: min(90vw, 48rem);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  text-align: center;
}

.plumber-image-lightbox__nav {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
}

.plumber-image-lightbox__nav svg {
  width: 1.2rem;
  height: 1.2rem;
}

.plumber-image-lightbox__nav--prev {
  left: 1.25rem;
}

.plumber-image-lightbox__nav--next {
  right: 1.25rem;
}

html.dark .plumber-inbox-app__header h1,
html.dark .plumber-inbox-tabs__link.is-active,
html.dark .plumber-thread-row__topline strong,
html.dark .plumber-notification-row__topline h2,
html.dark .plumber-thread-stage__identity h2,
html.dark .plumber-thread-mobile-page__backline h1,
html.dark .plumber-thread-drawer__grid strong,
html.dark .plumber-inbox-empty h2 {
  color: #f8fafc;
}

html.dark .plumber-inbox-app__header p,
html.dark .plumber-inbox-tabs__link,
html.dark .plumber-thread-row__subtitle,
html.dark .plumber-thread-row__preview,
html.dark .plumber-notification-row__copy p,
html.dark .plumber-thread-stage__identity p,
html.dark .plumber-thread-mobile-page__backline p,
html.dark .plumber-thread-readonly,
html.dark .plumber-inbox-empty p {
  color: #94a3b8;
}

html.dark .plumber-inbox-tabs,
html.dark .plumber-thread-row,
html.dark .plumber-notification-row,
html.dark .plumber-thread-stage__header,
html.dark .plumber-thread-mobile-page__header,
html.dark .plumber-thread-composer,
html.dark .plumber-thread-mobile-page__composer {
  border-color: #1e293b;
}

html.dark .plumber-inbox-panel,
html.dark .plumber-thread-mobile-page {
  background: #0f172a;
  border-color: #1e293b;
}

html.dark .plumber-thread-stage__icon,
html.dark .plumber-thread-mobile-page__icon,
html.dark .plumber-thread-composer textarea,
html.dark .plumber-thread-mobile-page__composer textarea,
html.dark .plumber-thread-dropdown,
html.dark .plumber-thread-readonly,
html.dark .plumber-inbox-empty__icon {
  background: #111827;
  border-color: #334155;
  color: #cbd5e1;
}

html.dark .plumber-thread-dropdown__header strong {
  color: #f8fafc;
}

html.dark .plumber-thread-dropdown__close {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

html.dark .plumber-thread-row:hover,
html.dark .plumber-notification-row:hover,
html.dark .plumber-thread-row.is-active {
  background: rgba(37, 99, 235, 0.12);
}

html.dark .plumber-chat-bubble__content {
  background: #111827;
  color: #f8fafc;
}

html.dark .plumber-chat-bubble.is-own .plumber-chat-bubble__content {
  background: rgba(37, 99, 235, 0.22);
}

@media (max-width: 1023px) {
  .plumber-inbox-app__header p {
    font-size: 0.88rem;
  }

  .plumber-inbox-board {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .plumber-inbox-panel--thread {
    display: none;
  }

  .plumber-inbox-panel,
  .plumber-thread-mobile-page {
    border-radius: 1.25rem;
  }

  .plumber-inbox-chipbar.is-collapsed-mobile {
    display: none;
  }

  .plumber-thread-drawer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .plumber-inbox-panel,
  .plumber-thread-mobile-page {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .plumber-inbox-board {
    gap: 0;
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .plumber-inbox-app {
    gap: 0.75rem;
  }

  .plumber-inbox-app__header {
    padding: 0 0.1rem;
  }

  .plumber-inbox-app__header h1 {
    font-size: 1.45rem;
  }

  .plumber-inbox-tabs {
    margin: 0 -1rem;
    padding: 0 1rem;
    background: #fff;
  }

  .plumber-inbox-chipbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .plumber-thread-row,
  .plumber-notification-row {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .plumber-thread-row__preview,
  .plumber-notification-row__copy p {
    white-space: normal;
  }

  .plumber-thread-mobile-page {
    min-height: calc(100dvh - 5.5rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .plumber-thread-mobile-page__messages {
    padding-bottom: 0.4rem;
  }

  .plumber-chat-bubble__content {
    max-width: 88%;
  }

  .plumber-image-lightbox__chrome {
    top: 0.85rem;
    left: 0.85rem;
    right: 0.85rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .plumber-image-lightbox__toolbar {
    align-self: flex-end;
  }

  .plumber-image-lightbox__stage {
    min-width: min(92vw, 32rem);
    min-height: min(60vh, 28rem);
  }

  .plumber-image-lightbox__nav {
    width: 2.7rem;
    height: 2.7rem;
  }

  .plumber-image-lightbox__nav--prev {
    left: 0.7rem;
  }

  .plumber-image-lightbox__nav--next {
    right: 0.7rem;
  }

  html.dark .plumber-inbox-tabs {
    background: #0f172a;
  }
}

/* Chat refresh */
.chat-surface {
  --chat-header-height: 0px;
  --chat-composer-height: 0px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 18%, #f8fafc 100%);
}

.chat-surface--conversation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.chat-thread-feed-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.chat-thread-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.chat-thread-header__main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.chat-thread-header__avatar {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
}

.chat-thread-header__copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.chat-thread-header__copy h1,
.chat-thread-header__copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-header__copy p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 600;
}

.chat-thread-header__copy p span {
  margin: 0;
}

.chat-thread-header__copy > span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.35;
}

.chat-thread-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.chat-thread-header__back,
.chat-thread-header__icon {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe4f0;
  border-radius: 0.9rem;
  background: #fff;
  color: #475569;
  flex-shrink: 0;
}

.chat-thread-header__back svg,
.chat-thread-header__icon svg {
  width: 1rem;
  height: 1rem;
}

.chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 14px 28px -22px rgba(37, 99, 235, 0.8);
}

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

.chat-call-button {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.chat-call-button svg {
  width: 0.95rem;
  height: 0.95rem;
}

.chat-call-button.is-enabled {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.chat-call-button.is-locked,
.chat-call-button.is-unavailable {
  color: #94a3b8;
  background: #f8fafc;
}

.chat-thread-feed {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 1rem 1rem 0.55rem;
  scroll-padding-top: calc(var(--chat-header-height) + 0.85rem);
  scroll-padding-bottom: 0.75rem;
}

.chat-thread-feed::-webkit-scrollbar {
  width: 0.55rem;
}

.chat-thread-feed::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.chat-thread-feed__day {
  align-self: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.96);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -24px rgba(15, 23, 42, 0.9);
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
  touch-action: pan-y;
}

.chat-message.is-own {
  justify-content: flex-end;
}

.chat-message__avatar {
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.chat-message__bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(38rem, 84%);
  padding: 0.95rem 1rem 0.75rem;
  border-radius: 1.35rem 1.35rem 1.35rem 0.45rem;
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 20px 38px -30px rgba(15, 23, 42, 0.35);
  touch-action: pan-y;
}

.chat-message.is-own .chat-message__bubble {
  border-radius: 1.35rem 1.35rem 0.45rem 1.35rem;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: rgba(134, 239, 172, 0.95);
}

.chat-message__bubble.is-media-only {
  max-width: min(24rem, 72vw);
  padding: 0.7rem 0.7rem 0.6rem;
}

.chat-message__bubble::after {
  content: "";
  position: absolute;
  left: -0.35rem;
  bottom: 0.8rem;
  width: 0.75rem;
  height: 0.75rem;
  background: inherit;
  border-left: 1px solid rgba(226, 232, 240, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  transform: rotate(45deg);
}

.chat-message.is-own .chat-message__bubble::after {
  left: auto;
  right: -0.35rem;
  border-left: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(134, 239, 172, 0.95);
  border-top: 1px solid rgba(134, 239, 172, 0.95);
}

.chat-message__bubble p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.58;
  font-size: 0.95rem;
}

.chat-message__reply {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid #2563eb;
  border-radius: 0.85rem;
  background: rgba(241, 245, 249, 0.85);
}

.chat-message__reply strong {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-message__reply span {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.45;
}

.chat-message.is-own .chat-message__reply {
  background: rgba(255, 255, 255, 0.58);
}

.chat-message__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.55rem;
}

.chat-message__gallery.is-single {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 22.5rem);
}

.chat-message__image {
  padding: 0;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 16px 28px -24px rgba(15, 23, 42, 0.65);
}

.chat-message__image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.chat-message__gallery.is-single .chat-message__image img {
  aspect-ratio: 4 / 5;
  max-height: 18rem;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.chat-message__meta time {
  white-space: nowrap;
}

.chat-message__reply-action {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #0f172a;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.chat-message__reply-action svg {
  width: 0.92rem;
  height: 0.92rem;
}

.chat-message:hover .chat-message__reply-action,
.chat-message:focus-within .chat-message__reply-action {
  opacity: 1;
}

.chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.chat-composer__quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
}

.chat-composer__chip {
  flex: 0 0 auto;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  scroll-snap-align: start;
  white-space: nowrap;
}

.chat-composer__reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.chat-composer__reply-copy {
  min-width: 0;
}

.chat-composer__reply-copy strong,
.chat-composer__reply-copy span {
  display: block;
}

.chat-composer__reply-copy strong {
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-composer__reply-copy span {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-composer__reply-clear {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #475569;
}

.chat-composer__reply-clear svg {
  width: 0.9rem;
  height: 0.9rem;
}

.chat-composer__entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.chat-composer__attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 0.95rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #dbe4f0;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-composer__attach input {
  display: none;
}

.chat-composer__attach svg {
  width: 1rem;
  height: 1rem;
}

.chat-composer__field {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #dbe4f0;
  border-radius: 1.2rem;
  background: #fff;
}

.chat-composer [data-chat-textarea] {
  width: 100%;
  min-height: 1.55rem;
  max-height: 10rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  line-height: 1.45;
  resize: none;
  outline: none;
}

.chat-composer__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
}

.chat-composer__jump {
  display: inline-flex;
  width: 3.25rem;
  min-width: 3.25rem;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  box-shadow: 0 14px 30px -24px rgba(37, 99, 235, 0.6);
}

.chat-composer__jump.hidden {
  display: none;
}

.chat-composer__jump svg {
  width: 1rem;
  height: 1rem;
}

.chat-composer__send svg {
  width: 1rem;
  height: 1rem;
}

.chat-thread-header--customer {
  padding-bottom: 0.8rem;
}

html.dark .chat-surface {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #111827 24%, #0f172a 100%);
}

html.dark .chat-thread-header,
html.dark .chat-composer {
  background: rgba(15, 23, 42, 0.9);
  border-color: #334155;
}

html.dark .chat-thread-header__copy h1,
html.dark .chat-thread-header__copy h2,
html.dark .chat-message__bubble p,
html.dark .chat-message__reply strong,
html.dark .chat-composer [data-chat-textarea] {
  color: #f8fafc;
}

html.dark .chat-thread-header__copy p,
html.dark .chat-thread-header__copy > span,
html.dark .chat-message__meta,
html.dark .chat-message__reply span {
  color: #cbd5e1;
}

html.dark .chat-call-button,
html.dark .chat-thread-header__back,
html.dark .chat-thread-header__icon,
html.dark .chat-composer__attach,
html.dark .chat-composer__field,
html.dark .chat-composer__chip,
html.dark .chat-composer__reply-clear,
html.dark .chat-message__reply-action {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark .chat-call-button.is-enabled {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

html.dark .chat-message__bubble {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

html.dark .chat-message.is-own .chat-message__bubble {
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
  border-color: #14b8a6;
}

html.dark .chat-message__bubble::after {
  border-left-color: #334155;
  border-bottom-color: #334155;
}

html.dark .chat-message.is-own .chat-message__bubble::after {
  border-top-color: #14b8a6;
  border-right-color: #14b8a6;
}

html.dark .chat-message__reply {
  background: rgba(15, 23, 42, 0.56);
}

html.dark .chat-composer__reply-preview {
  background: rgba(30, 41, 59, 0.92);
  border-color: #334155;
}

html.dark .chat-composer__jump {
  background: #111827;
  border-color: #334155;
  color: #93c5fd;
}

@media (max-width: 1023px) {
  .chat-thread-header__copy > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-message__reply-action {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  #main-content.app-main--mobile-chat {
    height: calc(100dvh - 4rem);
    min-height: calc(100dvh - 4rem);
    overflow: hidden;
    overscroll-behavior: none;
  }

  #main-content.app-main--mobile-chat > .app-main__viewport--mobile-chat,
  #main-content.app-main--mobile-chat .app-content--mobile-chat,
  #main-content.app-main--mobile-chat .animate-rise--mobile-chat {
    height: 100%;
  }

  #main-content.app-main--mobile-chat .app-content--mobile-chat {
    max-width: none;
    padding: 0;
    overflow: hidden;
  }

  #main-content .plumber-page--mobile-chat,
  #main-content .customer-page--mobile-chat {
    gap: 0;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding-bottom: 0;
  }

  #main-content .plumber-page--mobile-chat .section-stack--mobile-chat {
    gap: 0;
    height: 100%;
    min-height: 0;
  }

  #main-content .plumber-page--mobile-chat .section-stack--mobile-chat > * {
    min-height: 0;
  }

  #main-content .customer-page--mobile-chat .customer-section-stack--mobile-chat {
    gap: 0;
    height: 100%;
    min-height: 0;
  }

  #main-content .customer-page--mobile-chat .customer-section-stack--mobile-chat > * {
    min-height: 0;
  }

  #main-content .plumber-page--mobile-chat .chat-surface--mobile-chat,
  #main-content .customer-page--mobile-chat .chat-surface--mobile-chat {
    margin: 0;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
  }

  #main-content .customer-page--mobile-chat .page-header {
    display: none;
  }

  .chat-thread-header {
    gap: 0.7rem;
    padding: 0.85rem 0.85rem 0.75rem;
  }

  .chat-thread-header--mobile {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .chat-thread-header--mobile .chat-thread-header__actions {
    align-self: center;
  }

  .chat-thread-header--mobile .chat-thread-header__main {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
  }

  .chat-thread-header__mobile-only {
    display: inline-flex;
  }

  .chat-thread-header__avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .chat-thread-header__copy h1,
  .chat-thread-header__copy h2 {
    font-size: 0.96rem;
  }

  .chat-thread-header__copy p {
    font-size: 0.76rem;
  }

  .chat-thread-header__copy > span {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .chat-call-button span {
    display: none;
  }

  .chat-call-button {
    min-width: 2.7rem;
    width: 2.7rem;
    padding: 0;
  }

  .chat-thread-feed {
    gap: 0.8rem;
    padding-right: 0.85rem;
    padding-left: 0.85rem;
    padding-bottom: 0.45rem;
    scroll-padding-bottom: 0.65rem;
    scrollbar-width: none;
  }

  .chat-thread-feed::-webkit-scrollbar {
    display: none;
  }

  .chat-message {
    gap: 0.5rem;
  }

  .chat-message__avatar {
    width: 2.05rem;
    height: 2.05rem;
  }

  .chat-message__bubble {
    max-width: min(100%, calc(100% - 2.55rem));
    gap: 0.5rem;
    padding: 0.82rem 0.88rem 0.7rem;
  }

  .chat-message__bubble.is-media-only {
    max-width: min(18rem, 100%);
    padding: 0.55rem 0.55rem 0.5rem;
  }

  .chat-message__bubble p {
    font-size: 0.9rem;
  }

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

  .chat-message__gallery.is-single {
    width: min(100%, 16.5rem);
  }

  .chat-message__gallery.is-single .chat-message__image img {
    max-height: 13.5rem;
  }

  .chat-message__reply-action {
    top: 0.5rem;
    right: 0.45rem;
  }

  .chat-composer {
    padding: 0.65rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .chat-composer__quick-replies {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.45rem;
    margin: 0 -0.1rem;
    padding: 0 0.1rem 0.15rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .chat-composer__quick-replies::-webkit-scrollbar {
    display: none;
  }

  .chat-composer__chip {
    max-width: min(80vw, 15rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-composer__reply-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
  }

  .chat-composer__reply-copy span {
    white-space: nowrap;
  }

  .chat-composer__entry {
    gap: 0.5rem;
    align-items: end;
  }

  .chat-composer__attach {
    position: relative;
    width: 2.95rem;
    min-width: 2.95rem;
    min-height: 2.95rem;
    padding: 0;
    border-radius: 999px;
  }

  .chat-composer__attach-label {
    display: none;
  }

  .chat-composer__attach[data-has-selection="true"]::after {
    content: attr(data-attachment-count);
    position: absolute;
    top: -0.15rem;
    right: -0.1rem;
    display: inline-flex;
    min-width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
  }

  .chat-composer__field {
    min-height: 2.95rem;
    padding: 0.55rem 0.85rem;
    border-radius: 1.35rem;
  }

  .chat-composer__jump {
    width: 2.95rem;
    min-width: 2.95rem;
    min-height: 2.95rem;
  }

  .chat-composer__send {
    width: 2.95rem;
    min-width: 2.95rem;
    min-height: 2.95rem;
    padding: 0;
    border-radius: 999px;
  }

  .chat-composer__send-label {
    display: none;
  }

  .plumber-thread-mobile-page__back,
  .plumber-thread-mobile-page__icon {
    width: 2.45rem;
    height: 2.45rem;
  }

  .plumber-thread-mobile-page__actions {
    gap: 0.5rem;
  }

}

/* Plumber lead detail: website-led desktop and app-led mobile */
.plumber-lead-detail {
  width: 100%;
  padding-bottom: 7.5rem;
}

.plumber-lead-detail__layout {
  display: grid;
  width: 100%;
  /* Keep the editorial detail layout broad on zoomed-out and ultrawide workspaces. */
  max-width: 96rem;
  margin: 0 auto;
}

.plumber-lead-detail__content {
  min-width: 0;
  background: var(--color-surface);
}

.plumber-lead-detail__app-bar {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  min-height: 3.65rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.plumber-lead-detail__app-bar > strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.plumber-lead-detail__app-action {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--color-text-primary);
}

.plumber-lead-detail__app-action:hover {
  background: var(--color-background);
  color: var(--color-brand-700);
}

.plumber-lead-detail__app-action svg {
  width: 1.2rem;
  height: 1.2rem;
}

.plumber-lead-detail__app-bar .lead-detail-save-button {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  box-shadow: none;
}

.plumber-lead-detail__desktop-back,
.plumber-lead-detail__desktop-save,
.plumber-lead-detail__aside {
  display: none;
}

.plumber-lead-detail__mobile-action {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding: 0;
}

.plumber-lead-detail__hero,
.plumber-lead-detail__section {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.plumber-lead-detail__hero {
  padding-top: 1rem;
}

.plumber-lead-detail__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.plumber-lead-detail__heading-copy {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
}

.plumber-lead-detail__heading h1 {
  max-width: 48rem;
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.55rem, 6vw, 2.15rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.plumber-lead-detail__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.plumber-lead-detail__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
  margin-top: 1rem;
}

.plumber-lead-detail__meta span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.45;
}

.plumber-lead-detail__meta span:last-child {
  grid-column: 1 / -1;
}

.plumber-lead-detail__meta svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  color: var(--color-text-tertiary);
}

.plumber-lead-detail__meta .plumber-lead-detail__meta--urgent,
.plumber-lead-detail__meta .plumber-lead-detail__meta--urgent svg {
  color: var(--color-danger-600);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-detail__section h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
}

.plumber-lead-detail__description {
  max-width: 48rem;
  margin: 0.65rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.75;
  white-space: pre-line;
}

.plumber-lead-detail__details {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
}

.plumber-lead-detail__detail {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.plumber-lead-detail__detail:last-child {
  border-bottom: 0;
}

.plumber-lead-detail__detail dt {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.plumber-lead-detail__detail dt svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--color-text-tertiary);
}

.plumber-lead-detail__detail dd {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.plumber-lead-detail__detail dd.plumber-lead-detail__detail--urgent {
  color: var(--color-danger-600);
}

.plumber-lead-detail__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.plumber-lead-detail__gallery-item {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-background);
  color: inherit;
  cursor: pointer;
}

.plumber-lead-detail__gallery-item img,
.plumber-lead-detail__file-preview {
  width: 100%;
  aspect-ratio: 1.25 / 1;
}

.plumber-lead-detail__gallery-item img {
  display: block;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.plumber-lead-detail__gallery-item:hover img {
  transform: scale(1.025);
}

.plumber-lead-detail__preview-icon {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.plumber-lead-detail__preview-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.plumber-lead-detail__file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem;
  color: var(--color-text-secondary);
}

.plumber-lead-detail__file-preview svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-brand-700);
}

.plumber-lead-detail__file-preview small {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plumber-lead-detail__gallery-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.plumber-lead-detail__map {
  margin-top: 0.8rem;
  border-radius: 0.75rem;
}

.plumber-lead-detail__map .lead-location-map {
  min-height: 11rem;
}

.plumber-lead-detail__map .lead-location-map__footer {
  gap: 0.75rem;
  padding: 0.75rem;
}

.plumber-lead-detail__map .lead-location-map__label {
  font-size: var(--font-size-xs);
}

.plumber-lead-detail__map .lead-location-map__meta {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.plumber-lead-detail__map-empty {
  margin-top: 0.8rem;
  padding: 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-background);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.plumber-lead-detail__section--activity {
  border-bottom: 0;
}

.plumber-lead-detail__activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
}

.plumber-lead-detail__activity-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.85rem;
}

.plumber-lead-detail__activity-item + .plumber-lead-detail__activity-item {
  border-left: 1px solid var(--color-border);
}

.plumber-lead-detail__activity-item svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--color-brand-700);
}

.plumber-lead-detail__activity-item strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
}

.plumber-lead-detail__activity-item span {
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  line-height: 1.35;
}

.plumber-lead-mobile-action {
  position: fixed;
  right: 0;
  bottom: env(safe-area-inset-bottom);
  left: 0;
  z-index: 34;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 4rem;
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.plumber-lead-mobile-action__copy {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.plumber-lead-mobile-action__copy strong {
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-lead-mobile-action__copy span {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plumber-lead-mobile-action__button {
  flex: 0 0 auto;
}

.plumber-lead-mobile-action__button .btn {
  min-height: 2.5rem;
  min-width: 7.75rem;
  justify-content: center;
  border-radius: 0.65rem;
  padding-inline: 1rem;
}

html.dark .plumber-lead-mobile-action {
  background: rgba(15, 23, 42, 0.97);
}

@media (max-width: 767px) {
  .app-topbar--mobile-detail {
    display: none;
  }

  .app-shell--mobile-detail {
    padding-top: 4rem !important;
  }

  .plumber-lead-detail {
    width: auto;
    margin: calc(var(--space-6) * -1) calc(var(--space-4) * -1) 0;
  }
}

@media (max-width: 479px) {
  .plumber-lead-detail__meta {
    grid-template-columns: 1fr;
  }

  .plumber-lead-detail__meta span:last-child {
    grid-column: auto;
  }

  .plumber-lead-detail__activity {
    grid-template-columns: 1fr;
  }

  .plumber-lead-detail__activity-item + .plumber-lead-detail__activity-item {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }
}

@media (min-width: 768px) {
  .plumber-lead-detail__hero,
  .plumber-lead-detail__section {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .plumber-lead-detail__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  .plumber-lead-detail__detail:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .plumber-lead-detail__gallery {
    gap: 0.8rem;
  }

  .plumber-lead-detail__gallery-item img,
  .plumber-lead-detail__file-preview {
    aspect-ratio: 1.45 / 1;
  }
}

@media (min-width: 1024px) {
  .plumber-lead-detail {
    padding-bottom: 0;
  }

  .plumber-lead-detail__app-bar,
  .plumber-lead-mobile-action {
    display: none;
  }

  .plumber-lead-detail__layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
    align-items: start;
    gap: 2rem;
  }

  .plumber-lead-detail__content {
    padding: 1.5rem 2rem 0;
  }

  .plumber-lead-detail__desktop-back,
  .plumber-lead-detail__desktop-save,
  .plumber-lead-detail__aside {
    display: block;
  }

  .plumber-lead-detail__mobile-action {
    display: none;
  }

  .plumber-lead-detail__hero {
    padding: 1.2rem 0 1.5rem;
  }

  .plumber-lead-detail__section {
    padding: 1.5rem 0;
  }

  .plumber-lead-detail__heading h1 {
    font-size: clamp(2rem, 3vw, 2.65rem);
  }

  .plumber-lead-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 1.1rem;
  }

  .plumber-lead-detail__meta span {
    font-size: var(--font-size-sm);
  }

  .plumber-lead-detail__section h2 {
    font-size: 1.08rem;
  }

  .plumber-lead-detail__description {
    font-size: var(--font-size-base);
  }

  .plumber-lead-detail__detail dd {
    text-align: left;
  }

  .plumber-lead-detail__map .lead-location-map {
    min-height: 14.5rem;
  }

  .plumber-lead-detail__activity {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .plumber-lead-detail__activity-item {
    justify-content: center;
    padding: 1rem 1.25rem;
  }

  .plumber-lead-detail__activity-item span {
    font-size: var(--font-size-xs);
  }

  .plumber-lead-detail__aside {
    position: sticky;
    top: 5.5rem;
  }

  .plumber-lead-decision {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }

  .plumber-lead-decision__intro,
  .plumber-lead-decision__price,
  .plumber-lead-decision__primary,
  .plumber-lead-decision__benefits,
  .plumber-lead-decision__privacy {
    margin: 0;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .plumber-lead-decision__intro {
    padding-top: 1.35rem;
    padding-bottom: 1rem;
  }

  .plumber-lead-decision__intro--warning {
    background: rgba(245, 158, 11, 0.08);
  }

  .plumber-lead-decision__intro h2 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 1.15rem;
    font-weight: var(--font-weight-bold);
  }

  .plumber-lead-decision__intro p {
    margin: 0.5rem 0 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
  }

  .plumber-lead-decision__price {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.25rem;
    padding-bottom: 1rem;
  }

  .plumber-lead-decision__price span {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .plumber-lead-decision__price strong {
    color: var(--color-brand-700);
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.15;
  }

  .plumber-lead-decision__price small {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
  }

  .plumber-lead-decision__primary {
    display: grid;
    gap: 0.65rem;
    padding-bottom: 1.15rem;
  }

  .plumber-lead-decision__primary .btn {
    justify-content: center;
  }

  .plumber-lead-decision__text-link,
  .plumber-lead-decision__back {
    color: var(--color-brand-700);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-align: center;
  }

  .plumber-lead-decision__benefits {
    display: grid;
    gap: 0.75rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    border-top: 1px solid var(--color-border);
  }

  .plumber-lead-decision__benefits div {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    line-height: 1.45;
  }

  .plumber-lead-decision__benefits svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--color-success-600);
  }

  .plumber-lead-decision__privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .plumber-lead-decision__privacy svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--color-brand-700);
  }

  .plumber-lead-decision__back {
    display: block;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--color-border);
  }
}

/* Shared job detail standard: editorial desktop, dedicated mobile app screen */
.job-detail-standard {
  width: 100%;
  padding-bottom: 7.5rem;
}

.job-detail-layout {
  display: grid;
  width: 100%;
  /* Shared customer, plumber-active, and admin detail canvas. */
  max-width: 96rem;
  margin: 0 auto;
}

.job-detail-main {
  min-width: 0;
  background: var(--color-surface);
}

.customer-job-header-options {
  position: relative;
}

.customer-job-header-options summary {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
}

.customer-job-header-options summary::-webkit-details-marker {
  display: none;
}

.customer-job-header-options summary:hover {
  background: var(--color-background);
  color: var(--color-brand-700);
}

.customer-job-header-options__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 10.5rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.customer-job-header-options__menu button {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  padding-inline: 0.65rem;
  text-align: left;
}

.customer-job-header-options__menu button:hover {
  background: var(--color-background);
  color: var(--color-brand-700);
}

.job-detail-desktop-back,
.job-detail-aside {
  display: none;
}

.job-detail-hero__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.job-detail-hero__title-row h1 {
  min-width: 0;
  flex: 1 1 auto;
}

.job-detail-hero__action {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.job-detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.job-detail-back-link:hover {
  color: var(--color-brand-700);
}

.job-detail-back-link svg {
  width: 1rem;
  height: 1rem;
}

.job-detail-hero,
.job-detail-section {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.job-detail-hero {
  padding-top: 1rem;
}

.job-detail-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--color-brand-700);
  font-size: 0.68rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.job-detail-hero h1 {
  max-width: 50rem;
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.job-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.job-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
  margin-top: 1rem;
}

.job-detail-meta__item {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.45;
}

.job-detail-meta__item svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  color: var(--color-text-tertiary);
}

.job-detail-meta__item.is-danger,
.job-detail-meta__item.is-danger svg {
  color: var(--color-danger-600);
  font-weight: var(--font-weight-bold);
}

.job-detail-meta__item.is-success,
.job-detail-meta__item.is-success svg {
  color: var(--color-success-600);
}

.job-detail-meta__dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: currentColor;
}

.job-detail-section__heading h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
}

.job-detail-section__heading p {
  margin: 0.25rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

.job-detail-section__body {
  margin-top: 0.75rem;
}

.job-detail-inline-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-background);
}

.job-detail-inline-notice.is-success {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.08);
}

.job-detail-inline-notice > div {
  display: grid;
  gap: 0.15rem;
}

.job-detail-inline-notice strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.job-detail-inline-notice span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.45;
}

.job-detail-copy {
  max-width: 50rem;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.75;
  white-space: pre-line;
}

.job-detail-empty {
  padding: 1rem;
  border: 1px dashed var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-background);
}

.job-detail-empty.is-compact {
  padding: 0.85rem;
}

.job-detail-empty strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.job-detail-empty p {
  margin: 0.25rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

.job-detail-definition {
  display: grid;
  margin: 0;
}

.job-detail-definition__row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.job-detail-definition__row:last-child {
  border-bottom: 0;
}

.job-detail-definition__label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.job-detail-definition__row dd {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.job-detail-definition__row dd.is-danger {
  color: var(--color-danger-600);
}

.job-detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.job-detail-gallery__item {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 0.7rem;
  background: var(--color-background);
  cursor: pointer;
}

.job-detail-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 1.3 / 1;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.job-detail-gallery__item:hover img {
  transform: scale(1.025);
}

.job-detail-gallery__file {
  display: flex;
  min-height: 6.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-align: center;
}

.job-detail-map-shell {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
}

.job-detail-map-shell .lead-location-map {
  min-height: 11rem;
}

.job-detail-activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
}

.job-detail-activity__item {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem;
}

.job-detail-activity__item + .job-detail-activity__item {
  border-left: 1px solid var(--color-border);
}

.job-detail-activity__item strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
}

.job-detail-activity__item span {
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.job-detail-activity__item small {
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  line-height: 1.4;
}

.job-detail-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-detail-timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.job-detail-timeline__item:not(:last-child)::before {
  position: absolute;
  top: 0.8rem;
  bottom: -0.15rem;
  left: 0.29rem;
  width: 1px;
  background: var(--color-border);
  content: "";
}

.job-detail-timeline__marker {
  position: relative;
  z-index: 1;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.35rem;
  border: 2px solid var(--color-surface);
  border-radius: 999px;
  background: var(--color-brand-600);
  box-shadow: 0 0 0 1px var(--color-brand-300);
}

.job-detail-timeline__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.job-detail-timeline__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.job-detail-timeline time,
.job-detail-timeline p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.job-detail-timeline p {
  margin: 0.3rem 0 0;
  line-height: 1.55;
}

.job-detail-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.job-detail-person__avatar {
  display: inline-flex;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-brand-600);
  color: #fff;
  font-weight: var(--font-weight-bold);
}

.job-detail-person__avatar.is-success {
  background: var(--color-success-600);
}

.job-detail-person div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.job-detail-person strong {
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-person span {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-action-panel {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.job-detail-action-panel__heading {
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.job-detail-action-panel__heading h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.job-detail-action-panel__heading p {
  margin: 0.35rem 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

.job-detail-action-panel > :not(.job-detail-action-panel__heading) {
  margin-right: 1.25rem;
  margin-left: 1.25rem;
}

.job-detail-action-panel > :last-child {
  margin-bottom: 1.25rem;
}

.job-detail-action-panel .job-detail-definition {
  grid-template-columns: 1fr;
}

.job-detail-action-panel .job-detail-definition__row {
  grid-template-columns: minmax(4.5rem, 0.55fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.job-detail-action-panel .job-detail-definition__row dd {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.job-detail-action-panel.is-warning .job-detail-action-panel__heading {
  background: rgba(245, 158, 11, 0.08);
}

.job-detail-mobile-action {
  position: fixed;
  right: 0;
  bottom: env(safe-area-inset-bottom);
  left: 0;
  z-index: 34;
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.job-detail-mobile-action__copy {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.job-detail-mobile-action__copy strong {
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-mobile-action__copy span {
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-mobile-action__controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.job-detail-mobile-action .btn {
  min-height: 2.5rem;
  justify-content: center;
}

.job-detail-lightbox[hidden] {
  display: none;
}

.job-detail-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.job-detail-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
}

.job-detail-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(64rem, 100%);
  height: min(80vh, 46rem);
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
}

.job-detail-lightbox__stage {
  display: grid;
  height: 100%;
  place-items: center;
  overflow: hidden;
}

.job-detail-lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 160ms ease;
}

.job-detail-lightbox__close,
.job-detail-lightbox__nav,
.job-detail-lightbox__tools button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
}

.job-detail-lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 0.55rem 0.75rem;
}

.job-detail-lightbox__nav {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
}

.job-detail-lightbox__tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  color: #fff;
}

.job-detail-lightbox__tools button {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
}

html.dark .job-detail-mobile-action {
  background: rgba(15, 23, 42, 0.97);
}

@media (max-width: 767px) {
  /* Detail pages own the mobile bottom edge, so their CTA replaces workspace navigation. */
  .customer-page.customer-page--mobile-detail,
  .plumber-page.plumber-page--mobile-detail {
    padding-bottom: 0;
  }

  .plumber-lead-detail,
  .job-detail-standard {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .job-detail-standard {
    width: auto;
    margin: calc(var(--space-6) * -1) calc(var(--space-4) * -1) 0;
  }

  .job-detail-standard.is-admin {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 479px) {
  .job-detail-meta {
    grid-template-columns: 1fr;
  }

  .job-detail-activity {
    grid-template-columns: 1fr;
  }

  .job-detail-activity__item + .job-detail-activity__item {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }
}

@media (min-width: 768px) {
  .job-detail-hero,
  .job-detail-section {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .job-detail-definition {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  .job-detail-definition__row:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .job-detail-standard {
    padding-bottom: 0;
  }

  .job-detail-mobile-action {
    display: none;
  }

  .job-detail-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: start;
    gap: 2rem;
  }

  .job-detail-main {
    padding: 1.5rem 2rem 0;
  }

  .job-detail-desktop-back,
  .job-detail-aside {
    display: block;
  }

  .job-detail-hero {
    padding: 1.2rem 0 1.5rem;
  }

  .job-detail-section {
    padding: 1.5rem 0;
  }

  .job-detail-inline-notice {
    margin: 1.25rem 0 0;
  }

  .job-detail-hero h1 {
    font-size: clamp(2rem, 3vw, 2.65rem);
  }

  .job-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
  }

  .job-detail-meta__item {
    font-size: var(--font-size-sm);
  }

  .job-detail-section__heading h2 {
    font-size: 1.08rem;
  }

  .job-detail-copy {
    font-size: var(--font-size-base);
  }

  .job-detail-definition__row dd {
    text-align: left;
  }

  .job-detail-action-panel .job-detail-definition__row dd {
    text-align: right;
  }

  .job-detail-map-shell .lead-location-map {
    min-height: 14rem;
  }

  .job-detail-aside {
    position: sticky;
    top: 5.5rem;
  }
}

@media (min-width: 1280px) {
  .plumber-lead-detail__layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 2.5rem;
  }

  .plumber-lead-detail__content {
    padding-right: 2.5rem;
    padding-left: 2.5rem;
  }
}

/* Customer and admin detail decisions: one clear rail, plus a real tablet layout. */
.job-detail-decision-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.job-detail-decision-state > span:last-child {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.job-detail-panel-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.job-detail-panel-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.job-detail-panel-section__title {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.68rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.job-detail-panel-section__heading a {
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.job-detail-panel-section__heading a:hover {
  color: var(--color-brand-800);
  text-decoration: underline;
}

.job-detail-panel-muted {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.6;
}

.job-detail-checklist {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-detail-checklist li {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
}

.job-detail-checklist li > span {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--color-success-600);
  font-size: 0.68rem;
  font-weight: var(--font-weight-bold);
}

.job-detail-checklist strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
}

.job-detail-panel-actions {
  display: grid;
  gap: 0.65rem;
  padding-top: 1rem;
}

.job-detail-panel-actions .btn {
  min-height: 2.75rem;
  justify-content: center;
}

.job-detail-panel-link {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.job-detail-panel-link:hover {
  background: var(--color-brand-50);
  color: var(--color-brand-800);
}

.job-detail-panel-link--danger {
  color: var(--color-text-secondary);
}

.job-detail-panel-link--danger:hover {
  background: var(--color-background);
  color: var(--color-brand-700);
}

.job-detail-admin-control {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--color-brand-700);
}

.job-detail-admin-control:hover {
  border-color: var(--color-brand-600);
  background: var(--color-brand-50);
  color: var(--color-brand-800);
}

.job-detail-panel-section--recent {
  border-bottom: 0;
}

.job-detail-rail-activity {
  display: grid;
  gap: 0;
}

.job-detail-rail-activity__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.job-detail-rail-activity__item:last-child {
  border-bottom: 0;
}

.job-detail-rail-activity__item strong {
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
}

.job-detail-rail-activity__item span,
.job-detail-rail-activity__item p {
  color: var(--color-text-secondary);
  font-size: 0.68rem;
}

.job-detail-rail-activity__item p {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.45;
}

.job-detail-tablet-panel,
.job-detail-mobile-options {
  display: none;
}

/* Customer detail: a compact decision rail rather than a dashboard-style checklist. */
.customer-job-action-panel {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.customer-job-action-panel__status,
.customer-job-action-panel__metric,
.customer-job-action-panel__plumber,
.customer-job-action-panel__notice,
.customer-job-action-panel__actions {
  padding: 1rem;
}

.customer-job-action-panel__status,
.customer-job-action-panel__metric,
.customer-job-action-panel__plumber,
.customer-job-action-panel__notice {
  border-bottom: 1px solid var(--color-border);
}

.customer-job-action-panel__status {
  display: grid;
  gap: 0.55rem;
}

.customer-job-action-panel__status > p,
.customer-job-action-panel__metric > span,
.customer-job-action-panel__plumber > p,
.customer-job-action-panel__notice > strong {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.customer-job-action-panel__status > span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

.customer-job-action-panel__status .badge,
.customer-job-action-panel__status .status-badge {
  justify-self: start;
  width: max-content;
}

.customer-job-action-panel__metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.15rem 0.75rem;
}

.customer-job-action-panel__metric > strong {
  grid-column: 1;
  color: var(--color-text-primary);
  font-size: 1.9rem;
  font-weight: var(--font-weight-bold);
  line-height: 1;
}

.customer-job-action-panel__metric > small {
  grid-column: 2;
  grid-row: 2;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  padding-bottom: 0.2rem;
}

.customer-job-action-panel__plumber {
  display: grid;
  gap: 0.75rem;
}

.customer-job-action-panel__plumber > span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
}

.customer-job-action-panel__notice {
  display: grid;
  gap: 0.35rem;
  background: var(--color-background);
}

.customer-job-action-panel__notice > strong {
  font-size: var(--font-size-xs);
}

.customer-job-action-panel__notice > span {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

.customer-job-action-panel__actions {
  display: grid;
  gap: 0.55rem;
}

.customer-job-action-panel__actions .btn {
  min-height: 2.7rem;
  justify-content: center;
}

@media (min-width: 1280px) {
  .job-detail-standard.is-customer .job-detail-layout {
    max-width: 96rem;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .job-detail-standard.is-customer .job-detail-aside {
    /* Align the decision rail with the post-title detail content, not the back link. */
    margin-top: 8.5rem;
  }
}

@media (max-width: 767px) {
  .job-detail-standard.is-customer .job-detail-mobile-options,
  .job-detail-standard.is-admin .job-detail-mobile-options {
    display: block;
    margin: 0 1rem 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .job-detail-mobile-options summary {
    color: var(--color-brand-700);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
  }

  .job-detail-mobile-options > strong {
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
  }

  .job-detail-mobile-options > p {
    margin: 0.2rem 0 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    line-height: 1.5;
  }

  .job-detail-mobile-options__body {
    display: grid;
    gap: 0.65rem;
    padding-top: 0.8rem;
  }

  .job-detail-mobile-options--admin {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-background);
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .job-detail-standard.is-customer,
  .job-detail-standard.is-admin {
    padding-bottom: 0;
  }

  .portal-job-detail-mobile-action {
    display: none;
  }

  .job-detail-standard.is-customer .job-detail-layout,
  .job-detail-standard.is-admin .job-detail-layout {
    display: block;
    max-width: 58rem;
  }

  .job-detail-standard.is-customer .job-detail-main,
  .job-detail-standard.is-admin .job-detail-main {
    padding: 1.5rem 2rem 0;
  }

  .job-detail-standard.is-customer .job-detail-desktop-back,
  .job-detail-standard.is-admin .job-detail-desktop-back {
    display: block;
  }

  .job-detail-standard.is-customer .job-detail-aside,
  .job-detail-standard.is-admin .job-detail-aside {
    display: none;
  }

  .job-detail-standard.is-customer .job-detail-hero,
  .job-detail-standard.is-admin .job-detail-hero,
  .job-detail-standard.is-customer .job-detail-section,
  .job-detail-standard.is-admin .job-detail-section {
    padding-right: 0;
    padding-left: 0;
  }

  .job-detail-standard.is-customer .job-detail-inline-notice,
  .job-detail-standard.is-admin .job-detail-inline-notice {
    margin-right: 0;
    margin-left: 0;
  }

  .job-detail-standard.is-customer .job-detail-tablet-panel,
  .job-detail-standard.is-admin .job-detail-tablet-panel {
    display: block;
    margin: 1.25rem 0 1.5rem;
  }

  .job-detail-tablet-panel .job-detail-action-panel {
    box-shadow: none;
  }

  .job-detail-tablet-panel .job-detail-panel-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-detail-tablet-panel .job-detail-panel-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .job-detail-tablet-panel .job-detail-panel-actions .job-detail-panel-link {
    grid-column: 1 / -1;
  }

  .job-detail-tablet-panel .customer-job-action-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(13rem, 0.85fr);
    box-shadow: none;
  }

  .job-detail-tablet-panel .customer-job-action-panel__status {
    grid-column: 1 / -1;
  }

  .job-detail-tablet-panel .customer-job-action-panel__metric,
  .job-detail-tablet-panel .customer-job-action-panel__plumber,
  .job-detail-tablet-panel .customer-job-action-panel__notice {
    border-bottom: 0;
  }

  .job-detail-tablet-panel .customer-job-action-panel__metric,
  .job-detail-tablet-panel .customer-job-action-panel__plumber {
    border-right: 1px solid var(--color-border);
  }

  .job-detail-tablet-panel .customer-job-action-panel__actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--color-border);
  }

  .job-detail-tablet-panel .customer-job-action-panel__actions .btn {
    grid-column: 1 / -1;
  }

  .job-detail-tablet-panel .customer-job-action-panel__actions .job-detail-panel-link {
    grid-column: auto;
  }
}

/* Final customer alias layer: same desktop profile-settings primitives and
   dimensions as plumber settings, now using the shared markup classes. */
@media (min-width: 1024px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell { width:min(100%, 76rem); max-width:100%; margin-inline:auto; }
  #main-content .customer-page .customer-settings.plumber-profile-shell { grid-template-columns:13.5rem minmax(0,1fr); gap:0; align-items:stretch; min-height:39rem; overflow:hidden; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); box-shadow:var(--shadow-card); }
  #main-content .customer-page .customer-settings .plumber-profile-nav { position:relative; top:auto; align-self:stretch; min-height:100%; max-height:none; gap:0; padding:var(--space-5) var(--space-4); overflow:visible; border:0; border-right:1px solid var(--color-border); border-radius:0; background:var(--color-background); box-shadow:none; }
  #main-content .customer-page .customer-settings .plumber-profile-identity,
  #main-content .customer-page .customer-settings .plumber-profile-home-summary { display:none; }
  #main-content .customer-page .customer-settings .plumber-profile-section-list { display:grid; gap:var(--space-1); }
  #main-content .customer-page .customer-settings .plumber-profile-section-list h3 { margin:var(--space-4) 0 var(--space-1); padding:0 var(--space-3); color:var(--color-text-secondary); font-size:.68rem; font-weight:var(--font-weight-bold); letter-spacing:0; }
  #main-content .customer-page .customer-settings .plumber-profile-section { overflow:visible; border:0; border-radius:0; background:transparent; }
  #main-content .customer-page .customer-settings .plumber-profile-row { display:grid; grid-template-columns:1.35rem minmax(0,1fr) auto; gap:var(--space-2); min-height:2.45rem; margin:.15rem 0; padding:.55rem var(--space-3); border:0; border-radius:var(--radius-md); background:transparent; box-shadow:none; }
  #main-content .customer-page .customer-settings .plumber-profile-row:hover,
  #main-content .customer-page .customer-settings .plumber-profile-row.is-active { background:rgba(35,127,255,.08); color:var(--color-brand-700); box-shadow:none; }
  #main-content .customer-page .customer-settings .plumber-profile-row__icon { width:1.1rem; height:1.1rem; border:0; border-radius:0; background:transparent; color:currentColor; }
  #main-content .customer-page .customer-settings .plumber-profile-row__label { color:currentColor; font-size:.82rem; font-weight:var(--font-weight-semibold); }
  #main-content .customer-page .customer-settings .plumber-profile-row__meta,
  #main-content .customer-page .customer-settings .plumber-profile-row__description,
  #main-content .customer-page .customer-settings .plumber-profile-row__badge,
  #main-content .customer-page .customer-settings .plumber-profile-row__alert,
  #main-content .customer-page .customer-settings .plumber-profile-row__chevron { display:none; }
  #main-content .customer-page .customer-settings .plumber-profile-detail { display:grid; align-content:start; gap:var(--space-5); padding:var(--space-6); overflow:hidden; background:var(--color-surface); }
  #main-content .customer-page .customer-settings .plumber-profile-panel { gap:var(--space-5); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  #main-content .customer-page .customer-settings .plumber-profile-panel__header { flex-wrap:nowrap; padding-bottom:var(--space-4); border-bottom:1px solid var(--color-border); }
  #main-content .customer-page .customer-settings .plumber-profile-panel__kicker { display:none; }
  #main-content .customer-page .customer-settings .plumber-profile-panel h2 { font-size:var(--font-size-xl); }
  #main-content .customer-page .customer-settings .plumber-profile-panel__description { max-width:36rem; font-size:var(--font-size-sm); }
}
@media (min-width:1200px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell { width:min(100%,90rem); }
  #main-content .customer-page .customer-settings.plumber-profile-shell { grid-template-columns:14rem minmax(0,1fr); }
}
@media (min-width:1500px) {
  #main-content .customer-page .customer-profile-page-header,
  #main-content .customer-page .customer-settings.plumber-profile-shell { width:min(100%,96rem); }
}

/* At very wide effective viewports (including zoomed-out desktop windows),
   use the workspace instead of preserving a small centred content island.
   This deliberately changes only container widths: browser zoom, font sizing,
   controls and all normal responsive breakpoints remain browser-controlled. */
@media (min-width: 1920px) {
  #main-content .app-content,
  #main-content .admin-shell .app-content {
    max-width: none;
  }

  #main-content .plumber-page,
  #main-content .customer-page,
  #main-content .admin-shell .page-stack {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  #main-content .plumber-page .page-header,
  #main-content .plumber-page .section-stack,
  #main-content .customer-page .page-header,
  #main-content .customer-page .section-stack {
    width: 100%;
    max-width: none;
  }
}

/* Customer response workspace */
.customer-responses {
  display: grid;
  gap: 1rem;
  width: min(100%, 78rem);
  margin: 0 auto;
  color: #0f172a;
}

.customer-responses__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.customer-responses__heading h1,
.customer-responses__heading p,
.customer-responses__heading h2,
.customer-responses h3 { margin: 0; }
.customer-responses__heading h1 { margin-top: .3rem; font-size: clamp(1.65rem, 2.4vw, 2.25rem); line-height: 1.15; }
.customer-responses__heading p { margin-top: .4rem; color: #64748b; font-size: .92rem; }
.customer-responses__back { display: inline-flex; align-items: center; gap: .35rem; color: #2563eb; font-size: .82rem; font-weight: 700; text-decoration: none; }
.customer-responses__back svg { width: 1rem; height: 1rem; }
.customer-responses__back--list { display: none; }
.customer-responses-context {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: .85rem 1rem;
  border: 1px solid #dbe3ee;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.customer-responses-context__icon { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; border-radius: .65rem; background: #eff6ff; color: #2563eb; }
.customer-responses-context__icon svg { width: 1.2rem; height: 1.2rem; }
.customer-responses-context__copy { display: grid; min-width: 0; gap: .15rem; }
.customer-responses-context__copy strong { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.customer-responses-context__copy span { color: #64748b; font-size: .78rem; }
.customer-responses-context__meta { display: flex; align-items: center; gap: .65rem; margin-left: auto; white-space: nowrap; }
.customer-responses-context__count { color: #1d4ed8; font-size: .76rem; font-weight: 700; }

.customer-responses-board { display: grid; grid-template-columns: minmax(19rem, 22rem) minmax(0, 1fr); min-height: 38rem; overflow: hidden; border: 1px solid #dbe3ee; border-radius: .9rem; background: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.06); }
.customer-responses-list { min-width: 0; border-right: 1px solid #e2e8f0; background: #fff; }
.customer-responses-list__heading { padding: 1rem 1rem .75rem; }
.customer-responses-list__heading h2 { font-size: 1rem; }
.customer-responses-list__heading p { margin: .25rem 0 0; color: #64748b; font-size: .76rem; }
.customer-responses-filter-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; padding: 0 1rem .7rem; }
.customer-responses-search { display: flex; align-items: center; min-width: 0; gap: .45rem; padding: 0 .7rem; border: 1px solid #dbe3ee; border-radius: .6rem; background: #f8fafc; color: #64748b; }
.customer-responses-search svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.customer-responses-search input { width: 100%; min-width: 0; height: 2.2rem; border: 0; outline: 0; background: transparent; color: #0f172a; font-size: .78rem; }
.customer-responses-filter-form select { max-width: 7.5rem; height: 2.2rem; padding: 0 .45rem; border: 1px solid #dbe3ee; border-radius: .6rem; background: #fff; color: #334155; font-size: .72rem; }
.customer-responses-filter-chips { display: flex; gap: .4rem; overflow-x: auto; padding: 0 1rem .75rem; scrollbar-width: none; }
.customer-responses-filter-chips::-webkit-scrollbar { display: none; }
.customer-responses-filter-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .28rem; min-height: 2rem; padding: 0 .65rem; border: 1px solid #dbe3ee; border-radius: 999px; color: #475569; font-size: .72rem; font-weight: 700; text-decoration: none; }
.customer-responses-filter-chip span { display: grid; min-width: 1rem; height: 1rem; place-items: center; border-radius: 999px; background: #e2e8f0; font-size: .64rem; }
.customer-responses-filter-chip.is-active { border-color: #2563eb; background: #2563eb; color: #fff; }
.customer-responses-filter-chip.is-active span { background: rgba(255,255,255,.22); }
.customer-responses-list__rows { display: grid; border-top: 1px solid #e2e8f0; }
.customer-response-row { display: grid; grid-template-columns: 2.3rem minmax(0,1fr) auto; gap: .65rem; align-items: start; min-width: 0; padding: .85rem 1rem; border-bottom: 1px solid #e2e8f0; color: inherit; text-decoration: none; }
.customer-response-row:hover { background: #f8fafc; }
.customer-response-row.is-active { position: relative; background: #eff6ff; box-shadow: inset 3px 0 #2563eb; }
.customer-response-row__avatar, .customer-response-profile-head__avatar { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .72rem; font-weight: 800; }
.customer-response-row__copy { display: grid; min-width: 0; gap: .2rem; }
.customer-response-row__topline { display: flex; align-items: center; min-width: 0; gap: .35rem; }
.customer-response-row__topline strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.customer-response-verified { display: inline-flex; flex: 0 0 auto; padding: .15rem .35rem; border: 1px solid #bbf7d0; border-radius: 999px; background: #f0fdf4; color: #15803d; font-size: .59rem; font-weight: 800; }
.customer-response-row__trust { color: #a16207; font-size: .67rem; }
.customer-response-row__detail, .customer-response-row__price { overflow: hidden; color: #64748b; font-size: .67rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.customer-response-row__price { color: #475569; }
.customer-response-row__meta { display: grid; justify-items: end; gap: .3rem; color: #94a3b8; font-size: .63rem; }
.customer-response-row__meta svg { width: .9rem; height: .9rem; }
.customer-response-row__unread { display: grid; min-width: 1.1rem; height: 1.1rem; place-items: center; border-radius: 999px; background: #2563eb; color: #fff; font-size: .62rem; font-weight: 800; }
.customer-responses-list__empty { padding: 2rem 1rem; color: #64748b; font-size: .8rem; text-align: center; }

.customer-responses-detail { display: grid; min-width: 0; align-content: start; background: #fff; }
.customer-response-profile-head { display: flex; align-items: center; gap: .8rem; padding: 1.15rem 1.25rem .95rem; }
.customer-response-profile-head__avatar { width: 3rem; height: 3rem; font-size: .86rem; }
.customer-response-profile-head__title { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.customer-response-profile-head h2 { font-size: 1.1rem; }
.customer-response-profile-head p, .customer-response-profile-head span { margin: .2rem 0 0; color: #64748b; font-size: .76rem; }
.customer-response-profile-head p { color: #a16207; }
.customer-response-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.customer-response-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 3rem; padding: .5rem; color: #64748b; font-size: .78rem; font-weight: 700; text-decoration: none; }
.customer-response-tab svg { width: 1rem; height: 1rem; }
.customer-response-tab b { display: grid; min-width: 1rem; height: 1rem; place-items: center; border-radius: 999px; background: #2563eb; color: #fff; font-size: .6rem; }
.customer-response-tab.is-active { color: #2563eb; }
.customer-response-tab.is-active::after { position: absolute; right: 1rem; bottom: -1px; left: 1rem; height: 2px; background: #2563eb; content: ""; }
.customer-response-tab-content { min-height: 20rem; padding: 1.2rem 1.25rem; }
.customer-response-facts, .customer-response-profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.customer-response-facts > div, .customer-response-profile-stats > div { display: grid; gap: .25rem; padding: .7rem .8rem; border: 1px solid #dbe3ee; border-radius: .65rem; background: #f8fafc; }
.customer-response-facts span, .customer-response-profile-stats span { color: #64748b; font-size: .66rem; }
.customer-response-facts strong, .customer-response-profile-stats strong { color: #0f172a; font-size: .77rem; line-height: 1.35; }
.customer-response-message, .customer-response-about, .customer-response-services, .customer-response-reviews { margin-top: .9rem; padding: 1rem; border: 1px solid #dbe3ee; border-radius: .7rem; }
.customer-response-message h3, .customer-response-about h3, .customer-response-services h3, .customer-response-reviews h3 { font-size: .92rem; }
.customer-response-message p, .customer-response-about p, .customer-response-reviews > p { margin: .65rem 0 0; color: #475569; font-size: .82rem; line-height: 1.65; white-space: pre-line; }
.customer-response-price-note { display: grid; gap: .25rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; font-size: .75rem; }
.customer-response-price-note span { color: #64748b; line-height: 1.45; }
.customer-response-privacy-note { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; padding: .75rem .85rem; border: 1px solid #bfdbfe; border-radius: .65rem; background: #eff6ff; color: #1e40af; font-size: .75rem; line-height: 1.45; }
.customer-response-privacy-note svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.customer-response-services > div { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.customer-response-services span { padding: .32rem .5rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: .68rem; font-weight: 700; }
.customer-response-review { position: relative; display: grid; gap: .25rem; padding: .75rem 0; border-top: 1px solid #e2e8f0; }
.customer-response-review:first-of-type { margin-top: .5rem; }
.customer-response-review strong { color: #a16207; font-size: .74rem; }
.customer-response-review p { margin: 0; padding-right: 5rem; color: #475569; font-size: .75rem; line-height: 1.45; }
.customer-response-review time { position: absolute; top: .75rem; right: 0; color: #94a3b8; font-size: .66rem; }
.customer-response-profile > .btn { margin-top: .9rem; }
.customer-response-chat { display: grid; gap: .65rem; min-height: 22rem; }
.customer-response-chat__notice { padding: .65rem .75rem; border: 1px solid #bfdbfe; border-radius: .6rem; background: #eff6ff; color: #1e40af; font-size: .73rem; line-height: 1.45; }
.customer-response-chat__surface { min-height: 18rem; border: 1px solid #dbe3ee; border-radius: .7rem; box-shadow: none; }
.customer-response-chat__messages { max-height: 22rem; min-height: 13rem; }
.customer-response-actions { display: flex; justify-content: flex-end; gap: .65rem; padding: .9rem 1.25rem; border-top: 1px solid #e2e8f0; background: #fff; }
.customer-response-actions .btn { min-width: 9.5rem; justify-content: center; }
.customer-response-actions__status { align-self: center; color: #64748b; font-size: .78rem; font-weight: 600; }
.customer-responses-empty { display: grid; justify-items: center; gap: .7rem; padding: 4rem 1.5rem; border: 1px solid #dbe3ee; border-radius: .9rem; background: #fff; text-align: center; }
.customer-responses-empty__icon { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 999px; background: #eff6ff; color: #2563eb; }
.customer-responses-empty__icon svg { width: 1.4rem; height: 1.4rem; }
.customer-responses-empty h2 { font-size: 1.1rem; }
.customer-responses-empty p { max-width: 28rem; margin: 0; color: #64748b; font-size: .84rem; line-height: 1.55; }

.customer-job-responses-callout { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .8rem; align-items: center; padding: .85rem .9rem; border: 1px solid #bfdbfe; border-radius: .7rem; background: #eff6ff; color: inherit; text-decoration: none; }
.customer-job-responses-callout:hover { border-color: #60a5fa; background: #dbeafe; }
.customer-job-responses-callout__count { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .6rem; background: #2563eb; color: #fff; font-size: .92rem; font-weight: 800; }
.customer-job-responses-callout__copy { display: grid; gap: .2rem; min-width: 0; }
.customer-job-responses-callout__copy strong { font-size: .82rem; }
.customer-job-responses-callout__copy small { color: #475569; font-size: .72rem; line-height: 1.4; }
.customer-job-responses-callout__action { display: inline-flex; align-items: center; gap: .25rem; color: #1d4ed8; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.customer-job-responses-callout__action svg { width: 1rem; height: 1rem; }
.job-detail-activity__link { color: inherit; text-decoration: none; }
.job-detail-activity__link:hover { background: #f8fafc; }

html.dark .customer-responses, html.dark .customer-responses h1, html.dark .customer-responses h2, html.dark .customer-responses h3, html.dark .customer-response-facts strong, html.dark .customer-response-profile-stats strong { color: #f8fafc; }
html.dark .customer-responses-context, html.dark .customer-responses-board, html.dark .customer-responses-list, html.dark .customer-responses-detail, html.dark .customer-response-actions, html.dark .customer-responses-empty { border-color: #334155; background: #1e293b; }
html.dark .customer-responses-list, html.dark .customer-responses-detail, html.dark .customer-response-actions { background: #0f172a; }
html.dark .customer-response-row, html.dark .customer-response-tabs, html.dark .customer-response-profile-head, html.dark .customer-response-actions { border-color: #334155; }
html.dark .customer-response-row:hover, html.dark .customer-response-row.is-active, html.dark .customer-response-facts > div, html.dark .customer-response-profile-stats > div { background: #1e293b; }
html.dark .customer-responses-search, html.dark .customer-responses-filter-form select, html.dark .customer-response-message, html.dark .customer-response-about, html.dark .customer-response-services, html.dark .customer-response-reviews, html.dark .customer-response-chat__surface { border-color: #334155; background: #1e293b; color: #f8fafc; }
html.dark .customer-response-message p, html.dark .customer-response-about p, html.dark .customer-response-review p, html.dark .customer-responses__heading p, html.dark .customer-responses-context__copy span, html.dark .customer-response-row__detail, html.dark .customer-response-row__price { color: #94a3b8; }

@media (max-width: 767px) {
  .customer-responses { gap: .75rem; width: 100%; }
  .customer-responses__heading { align-items: flex-start; padding: 0 .1rem; }
  .customer-responses__heading h1 { font-size: 1.35rem; }
  .customer-responses__heading p, .customer-responses__job-link { display: none; }
  .customer-responses-context { padding: .75rem; }
  .customer-responses-context__meta .status-badge { display: none; }
  .customer-responses-context__count { font-size: .68rem; }
  .customer-responses-board { display: block; min-height: 0; overflow: visible; border-radius: .75rem; }
  .customer-responses-board.is-mobile-detail .customer-responses-list { display: none; }
  .customer-responses-board:not(.is-mobile-detail) .customer-responses-detail { display: none; }
  .customer-responses-board.is-mobile-detail .customer-responses-detail { display: grid; }
  .customer-responses-board.is-mobile-detail ~ * { display: none; }
  .customer-responses-board:not(.is-mobile-detail) + .customer-response-actions { display: none; }
  .customer-responses-board.is-mobile-detail .customer-response-profile-head { padding: .95rem; }
  .customer-responses-board.is-mobile-detail .customer-response-tab-content { min-height: 0; padding: .9rem; }
  .customer-responses-board.is-mobile-detail .customer-response-actions { position: sticky; bottom: calc(4.7rem + env(safe-area-inset-bottom)); z-index: 8; padding: .75rem .9rem calc(.75rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(15,23,42,.08); }
  .customer-response-actions .btn { flex: 1; min-width: 0; }
  .customer-response-tab { min-height: 3.2rem; font-size: .7rem; }
  .customer-response-tab span { max-width: 5.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .customer-response-facts, .customer-response-profile-stats { grid-template-columns: 1fr; }
  .customer-response-chat__messages { max-height: none; min-height: 16rem; }
  .customer-response-chat__surface { min-height: 0; }
  .customer-responses-board.is-mobile-detail .customer-responses-list + .customer-responses-detail ~ * { display: none; }
  .customer-responses-board.is-mobile-detail .customer-responses-list { border-right: 0; }
  .customer-responses-board.is-mobile-detail + .customer-response-actions { display: flex; }
  .customer-responses-board.is-mobile-detail ~ .modal-backdrop { z-index: 40; }
  .customer-responses-board.is-mobile-detail .customer-response-actions { border-bottom-right-radius: .75rem; border-bottom-left-radius: .75rem; }
  .customer-responses-board.is-mobile-detail .customer-response-tabs { position: sticky; top: 0; z-index: 3; background: #fff; }
  html.dark .customer-responses-board.is-mobile-detail .customer-response-tabs { background: #0f172a; }
  .customer-responses-board.is-mobile-detail ~ .customer-responses-empty { display: none; }
  .customer-responses-board.is-mobile-detail .customer-response-chat .chat-composer { padding-bottom: calc(.65rem + env(safe-area-inset-bottom)); }
  .customer-responses-board.is-mobile-detail .customer-response-chat { padding-bottom: 4.5rem; }
  .customer-responses-board.is-mobile-detail .customer-response-actions + * { display: none; }
  .customer-responses-board.is-mobile-detail .customer-response-actions { display: flex; }
  .customer-responses-board.is-mobile-detail .customer-response-profile-head ~ .customer-response-tabs { top: 0; }
  .customer-responses-board.is-mobile-detail .customer-response-tab-content { overflow: visible; }
  .customer-responses-board.is-mobile-detail .customer-response-review p { padding-right: 0; }
  .customer-responses-board.is-mobile-detail .customer-response-review time { position: static; }
  .customer-responses-board.is-mobile-detail .customer-response-privacy-note { font-size: .7rem; }
  .customer-responses-board.is-mobile-detail .customer-response-message p { font-size: .8rem; }
  .customer-responses-board.is-mobile-detail .customer-response-profile > .btn { width: 100%; justify-content: center; }
  .customer-responses-board.is-mobile-detail .customer-response-chat__notice { font-size: .7rem; }
  .customer-responses-board.is-mobile-detail .customer-response-actions__status { width: 100%; text-align: center; }
  .customer-responses-board.is-mobile-detail .customer-response-actions:has(.customer-response-actions__status) { justify-content: center; }
  .customer-responses-board.is-mobile-detail .customer-response-actions:has(.btn:only-child) .btn { width: 100%; }
  .customer-responses-board.is-mobile-detail .customer-response-actions:has(.btn) { display: flex; }
  .customer-responses__back--list { display: none; }
  .customer-responses.is-mobile-detail .customer-responses__back--job { display: none; }
  .customer-responses.is-mobile-detail .customer-responses__back--list { display: inline-flex; }
}

/* ============================================
   MOBILE-FIRST FOUNDATION — PHASES 1 & 2
   This final layer is deliberately portal-neutral. It provides a stable
   responsive contract while older page styles are progressively migrated.
   ============================================ */

:root {
  --mobile-page-padding: 1rem;
  --mobile-page-padding-wide: 1.25rem;
  --mobile-section-gap: 1.25rem;
  --mobile-control-height: 2.75rem;
  --mobile-icon-button-size: 2.75rem;
  --mobile-bottom-nav-space: calc(5.75rem + env(safe-area-inset-bottom));
  --app-header-height: 4rem;
}

html,
body {
  max-width: 100%;
}

.app-shell,
#main-content,
.app-content,
.portal-page,
.portal-page-content {
  min-width: 0;
}

#main-content {
  overflow-x: clip;
}

.portal-page {
  width: 100%;
}

.portal-page-header {
  min-width: 0;
}

.portal-page-header .page-title {
  text-wrap: balance;
}

.portal-bottom-nav {
  isolation: isolate;
}

@media (max-width: 767px) {
  .app-content {
    padding: var(--mobile-page-padding) var(--mobile-page-padding) var(--mobile-bottom-nav-space);
  }

  .portal-page,
  .page-stack {
    gap: var(--mobile-section-gap);
  }

  .section-stack {
    gap: var(--mobile-section-gap);
  }

  .portal-page-header,
  .page-header {
    gap: var(--space-3);
  }

  .portal-page-header .page-header-inner,
  .page-header-inner {
    gap: var(--space-3);
  }

  .portal-page-header .page-title,
  .page-title {
    font-size: clamp(1.35rem, 6.3vw, 1.65rem);
    line-height: 1.15;
  }

  .portal-page-header .page-description,
  .page-description {
    margin-top: var(--space-1);
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions > .btn,
  .page-actions > a.btn,
  .page-actions > button.btn {
    flex: 1 1 auto;
    min-height: var(--mobile-control-height);
    justify-content: center;
  }

  .btn:not(.btn-sm),
  .form-input,
  .form-select,
  textarea.form-textarea {
    min-height: var(--mobile-control-height);
  }

  .btn-icon {
    min-width: var(--mobile-control-height);
  }

  .portal-bottom-nav {
    min-height: var(--mobile-bottom-nav-space);
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
  }

  .portal-bottom-nav__item {
    min-height: 3.35rem;
  }

  .customer-page,
  .plumber-page {
    padding-bottom: var(--mobile-bottom-nav-space);
  }

  .admin-shell .app-content {
    padding-bottom: var(--mobile-bottom-nav-space);
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .app-content {
    padding-left: var(--mobile-page-padding-wide);
    padding-right: var(--mobile-page-padding-wide);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .portal-page,
  .app-content {
    padding-bottom: var(--mobile-bottom-nav-space);
  }
}

@media (min-width: 1024px) {
  .customer-page,
  .plumber-page {
    padding-bottom: 0;
  }
}
