:root {
  --supervisor-ios-bg: #f4f4f6;
  --supervisor-ios-surface: #ffffff;
  --supervisor-ios-ink: #17171a;
  --supervisor-ios-muted: #77777f;
  --supervisor-ios-line: #dedfe5;
  --supervisor-ios-soft: #f1f1f5;
  --supervisor-ios-orange: #ff5a14;
  --supervisor-ios-green: #15a34a;
  --supervisor-ios-radius: 16px;
  --supervisor-ios-shadow: 0 4px 18px rgba(28, 28, 30, .07);
}

body.supervisor-app,
body.supervisor-profile-app {
  color: var(--supervisor-ios-ink);
  background: var(--supervisor-ios-bg) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .role-shell {
  width: min(100vw, 460px) !important;
  max-width: 460px !important;
  padding: calc(80px + env(safe-area-inset-top)) 16px calc(90px + env(safe-area-inset-bottom)) !important;
  overflow: visible !important;
  background: var(--supervisor-ios-bg) !important;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-app-header {
  position: fixed !important;
  top: 0;
  left: 50%;
  z-index: 40;
  display: grid !important;
  width: min(100vw, 460px) !important;
  min-height: calc(66px + env(safe-area-inset-top)) !important;
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px !important;
  border-bottom: 1px solid rgba(60, 60, 67, .12) !important;
  background: rgba(255, 255, 255, .97) !important;
  transform: translateX(-50%);
}

.supervisor-header-back {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--supervisor-ios-ink);
  padding: 0;
}

.supervisor-header-back svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand {
  display: flex !important;
  min-width: 0;
  align-items: center !important;
  justify-content: center;
  gap: 11px !important;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand-logo {
  width: 36px !important;
  height: 36px !important;
  flex-basis: 36px !important;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand-copy {
  display: block !important;
  min-width: 0;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand-copy strong {
  overflow: hidden;
  color: #111114;
  font-size: 23px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand-copy span {
  display: none;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-avatar {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-color: rgba(255, 90, 20, .15) !important;
  background: #fff0e9 !important;
  color: #d94400 !important;
  font-size: 12px !important;
}

body.supervisor-app[data-supervisor-section="home"] .supervisor-header-back {
  display: none !important;
}

body.supervisor-app[data-supervisor-section="home"] .supervisor-app-header {
  grid-template-columns: minmax(0, 1fr) 42px !important;
}

body.supervisor-app .supervisor-section-hidden {
  display: none !important;
}

body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .role-card {
  width: 100%;
  margin: 0;
}

/* Survey */
body.supervisor-app #site-survey {
  display: grid;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 !important;
  box-shadow: none;
}

body.supervisor-app #site-survey > .role-card-title {
  display: none;
}

body.supervisor-app [data-survey-step-section] {
  scroll-margin-top: calc(78px + env(safe-area-inset-top));
}

.survey-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 5px 0 8px;
}

.survey-progress::before {
  position: absolute;
  top: 21px;
  right: 12.5%;
  left: 12.5%;
  height: 1px;
  background: #dadbe1;
  content: "";
}

body.supervisor-app .survey-progress button {
  position: relative;
  z-index: 1;
  display: grid !important;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  align-content: start;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #74757d;
  padding: 0 2px;
  font-family: inherit;
}

.survey-progress button span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #ced0d7;
  border-radius: 50%;
  background: var(--supervisor-ios-bg);
  font-size: 15px;
  font-weight: 500;
}

.survey-progress button strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.survey-progress button.is-active {
  color: var(--supervisor-ios-orange);
}

.survey-progress button.is-active span {
  border-color: var(--supervisor-ios-orange);
  background: var(--supervisor-ios-orange);
  color: #fff;
}

body.supervisor-app .site-survey-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
}

body.supervisor-app .site-section {
  display: grid !important;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  border: 1px solid #e7e7ec !important;
  border-radius: var(--supervisor-ios-radius) !important;
  background: var(--supervisor-ios-surface) !important;
  padding: 14px !important;
  box-shadow: var(--supervisor-ios-shadow);
}

body.supervisor-app .site-section-title {
  color: var(--supervisor-ios-ink) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.supervisor-app .site-field-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 9px !important;
}

body.supervisor-app .site-field-grid.compact-field-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: end;
}

body.supervisor-app .site-field-grid.compact-reference-pair {
  grid-template-columns: minmax(118px, .7fr) minmax(0, 1.3fr) !important;
}

body.supervisor-app .site-survey-form label {
  display: grid !important;
  gap: 5px !important;
  color: #33343a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

body.supervisor-app .site-survey-form input,
body.supervisor-app .site-survey-form textarea,
body.supervisor-app .site-survey-form select {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  border: 1px solid #d3d4db !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--supervisor-ios-ink) !important;
  padding: 8px 11px !important;
  box-shadow: none !important;
  font: 400 15px/1.25 -apple-system, BlinkMacSystemFont, "SF Pro Text", Arial, sans-serif !important;
}

body.supervisor-app .site-survey-form textarea {
  min-height: 74px !important;
}

body.supervisor-app .site-survey-form input[readonly] {
  background: #f5f5f7 !important;
  color: #55565e !important;
  font-weight: 500 !important;
}

body.supervisor-app .site-survey-form input:focus,
body.supervisor-app .site-survey-form textarea:focus,
body.supervisor-app .site-survey-form select:focus,
body.supervisor-app .history-search input:focus {
  border-color: var(--supervisor-ios-orange) !important;
  outline: 3px solid rgba(255, 90, 20, .16) !important;
  outline-offset: 1px;
}

body.supervisor-app .machine-list-panel,
body.supervisor-app .machine-card {
  border-color: #e2e3e8 !important;
  border-radius: 12px !important;
  background: #fbfbfc !important;
}

body.supervisor-app .machine-list-head,
body.supervisor-app .machine-entry-head {
  color: var(--supervisor-ios-muted) !important;
  font-size: 12px !important;
  text-transform: none !important;
}

body.supervisor-app .machine-dimension-row,
body.supervisor-app .machine-compact-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.supervisor-app .machine-compact-row {
  grid-template-columns: minmax(0, 2fr) minmax(90px, 1fr) !important;
}

body.supervisor-app .resource-chip-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.supervisor-app .resource-chip {
  display: grid !important;
  min-height: 76px !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-content: center !important;
  align-items: center !important;
  gap: 8px 9px !important;
  border: 1px solid #dedfe5 !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 10px !important;
  color: #33343a !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

body.supervisor-app .resource-chip > input[type="checkbox"] {
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  accent-color: var(--supervisor-ios-orange) !important;
}

body.supervisor-app .resource-chip-text {
  min-width: 0;
  color: #33343a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left !important;
}

body.supervisor-app .resource-measure {
  display: none !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  border: 1px solid #d8d9df !important;
  border-radius: 9px !important;
  background: #f7f7f9 !important;
  padding: 0 9px 0 0 !important;
}

body.supervisor-app .resource-chip .resource-measure input.ton-input,
body.supervisor-app .resource-chip .resource-measure input.qty-input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  padding: 6px 8px !important;
  color: var(--supervisor-ios-ink) !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: left !important;
}

body.supervisor-app .resource-measure span {
  color: #73747d !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

body.supervisor-app .resource-chip:has(> input[type="checkbox"]:checked) {
  border-color: rgba(255, 90, 20, .55) !important;
  background: #fff8f4 !important;
}

body.supervisor-app .resource-chip:has(> input[type="checkbox"]:checked) .resource-chip-text {
  color: #c74408;
}

body.supervisor-app .resource-chip:has(> input[type="checkbox"]:checked) .resource-measure {
  display: grid !important;
}

body.supervisor-app .resource-chip.is-hidden {
  display: none !important;
}

body.supervisor-app .resource-measure:focus-within {
  border-color: var(--supervisor-ios-orange) !important;
  box-shadow: 0 0 0 3px rgba(255, 90, 20, .13) !important;
}

body.supervisor-app .site-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

body.supervisor-app .site-actions button,
body.supervisor-app .site-actions a {
  min-height: 44px !important;
  border: 1px solid #d5d6dc !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #55565e !important;
  padding: 9px 11px !important;
  font: 600 13px/1.15 -apple-system, BlinkMacSystemFont, "SF Pro Text", Arial, sans-serif !important;
}

body.supervisor-app .site-actions .primary,
body.supervisor-app .site-survey-form > .site-actions > .primary {
  grid-column: 1 / -1;
  min-height: 50px !important;
  border-color: var(--supervisor-ios-orange) !important;
  background: var(--supervisor-ios-orange) !important;
  color: #fff !important;
  font-size: 16px !important;
}

body.supervisor-app .site-result {
  color: var(--supervisor-ios-muted);
  font-size: 12px;
}

/* History */
body.supervisor-app #survey-history {
  display: grid;
  gap: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 !important;
  box-shadow: none;
}

body.supervisor-app #survey-history > .role-card-title {
  order: 3;
  margin-bottom: -14px;
  border: 1px solid #e2e3e8;
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: #fff;
  padding: 19px 18px 10px;
  box-shadow: var(--supervisor-ios-shadow);
}

body.supervisor-app #survey-history > .role-card-title strong {
  color: var(--supervisor-ios-ink);
  font-size: 20px !important;
  font-weight: 700;
}

body.supervisor-app #survey-history > .role-card-title .role-badge,
body.supervisor-app #survey-history > .site-actions {
  display: none !important;
}

body.supervisor-app .history-search {
  order: 1;
  display: grid;
  gap: 7px;
}

body.supervisor-app .history-search-row {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body.supervisor-app .history-search-row::before {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 2px solid #858691;
  border-radius: 50%;
  content: "";
  transform: translateY(-58%);
}

body.supervisor-app .history-search-row::after {
  position: absolute;
  top: calc(50% + 7px);
  left: 31px;
  z-index: 1;
  width: 8px;
  height: 2px;
  background: #858691;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

body.supervisor-app .history-search input {
  min-height: 52px !important;
  border: 1px solid #d8d9df !important;
  border-radius: 13px !important;
  background: #fff !important;
  padding: 11px 14px 11px 48px !important;
  color: var(--supervisor-ios-ink) !important;
  font: 400 16px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", Arial, sans-serif !important;
}

body.supervisor-app .history-search button {
  display: none !important;
}

body.supervisor-app .history-search-count {
  padding-left: 3px;
  color: var(--supervisor-ios-muted) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

.history-filter {
  order: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dedfe5;
  border-radius: 13px;
  background: #fff;
}

body.supervisor-app .history-filter button {
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #666772;
  padding: 9px 6px 6px;
  font: 500 15px/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Text", Arial, sans-serif;
}

body.supervisor-app .history-filter button.is-active {
  border-bottom-color: var(--supervisor-ios-orange);
  color: var(--supervisor-ios-orange);
}

body.supervisor-app .recent-survey-list {
  order: 4;
  display: block !important;
  overflow: hidden;
  border: 1px solid #e2e3e8;
  border-radius: 0 0 15px 15px;
  background: #fff;
  box-shadow: var(--supervisor-ios-shadow);
}

body.supervisor-app .recent-survey-list.is-collapsed {
  display: block !important;
}

body.supervisor-app .survey-history-card {
  display: block;
  margin: 0;
  border: 0 !important;
  border-bottom: 1px solid #e6e6eb !important;
  border-radius: 0 !important;
  background: #fff !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body.supervisor-app .survey-history-card:last-child {
  border-bottom: 0 !important;
}

body.supervisor-app .survey-history-summary {
  display: grid !important;
  min-height: 84px;
  grid-template-columns: 48px minmax(0, 1fr) auto 18px !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 11px 12px !important;
}

.survey-history-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 11px;
  background: #f5f5f7;
  color: #66676f;
}

.survey-history-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.supervisor-app .survey-history-title {
  gap: 4px;
}

body.supervisor-app .survey-history-title strong {
  overflow: hidden;
  color: var(--supervisor-ios-ink);
  font-size: 16px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.supervisor-app .survey-history-title span {
  overflow: hidden;
  color: var(--supervisor-ios-muted);
  font-size: 12px !important;
  font-weight: 450 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.supervisor-app .survey-history-summary-right {
  display: grid;
  justify-items: end;
  gap: 5px;
}

body.supervisor-app .survey-status-badge {
  min-height: 27px;
  border: 1px solid #cfd0d6;
  border-radius: 7px;
  background: #fff !important;
  color: #55565e !important;
  padding: 5px 7px;
  font-size: 10px !important;
  font-weight: 550 !important;
  white-space: nowrap;
}

body.supervisor-app .survey-status-badge[data-status="pending"],
body.supervisor-app .survey-status-badge[data-status="survey-pending"] {
  border-color: var(--supervisor-ios-orange);
  color: var(--supervisor-ios-orange) !important;
}

body.supervisor-app .survey-status-badge[data-status="survey-done"],
body.supervisor-app .survey-status-badge[data-status="complete-work"] {
  border-color: #3ec66b;
  color: var(--supervisor-ios-green) !important;
}

.survey-history-date {
  color: var(--supervisor-ios-muted);
  font-size: 10px;
  white-space: nowrap;
}

body.supervisor-app .survey-history-chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #55565e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.supervisor-app .survey-history-card.is-expanded .survey-history-chevron {
  transform: rotate(90deg);
}

body.supervisor-app .survey-history-body {
  gap: 12px;
  border-top: 1px solid #ececf0;
  padding: 13px 14px 15px 71px;
}

body.supervisor-app .survey-history-meta-grid {
  grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr) !important;
}

body.supervisor-app .survey-history-actions a,
body.supervisor-app .survey-history-actions button {
  min-height: 36px;
  border: 1px solid #d7d8de;
  border-radius: 8px;
  background: #fff;
  color: #55565e;
  font-family: inherit;
  font-size: 11px;
}

body.supervisor-app .survey-history-actions .primary {
  border-color: var(--supervisor-ios-orange);
  background: var(--supervisor-ios-orange);
  color: #fff;
}

/* Documents */
body.supervisor-app #prepare-document {
  display: grid;
  gap: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 !important;
  box-shadow: none;
}

body.supervisor-app .mobile-app-topbar,
body.supervisor-app .mobile-nav-shell {
  display: none !important;
}

body.supervisor-app #prepare-document > .role-card-title {
  display: none;
}

body.supervisor-app #prepare-document > .role-meta {
  margin: 0 2px;
  color: var(--supervisor-ios-muted);
  font-size: 15px;
  line-height: 1.4;
}

.doc-current-job {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e6eb;
  border-radius: var(--supervisor-ios-radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--supervisor-ios-shadow);
}

.doc-current-job > span {
  color: #5e5f67;
  font-size: 14px;
}

.doc-current-job > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.doc-current-job svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #666772;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-current-job p {
  display: grid;
  gap: 5px;
  margin: 0;
}

.doc-current-job strong {
  overflow: hidden;
  color: var(--supervisor-ios-ink);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-current-job small {
  overflow: hidden;
  color: var(--supervisor-ios-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prepare-doc-heading,
.recent-documents h2 {
  margin: 2px 2px -8px;
  color: var(--supervisor-ios-ink);
  font-size: 20px;
  font-weight: 700;
}

body.supervisor-app .prepare-doc-actions {
  display: grid;
  gap: 10px;
}

body.supervisor-app .prepare-doc-actions a {
  display: grid;
  min-height: 92px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e3e8;
  border-radius: 20px;
  background: #fff;
  color: var(--supervisor-ios-ink);
  padding: 12px 13px;
  box-shadow: 0 5px 16px rgba(36, 38, 45, .055);
  font-family: inherit;
  text-decoration: none;
}

body.supervisor-app .prepare-doc-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  background: #edf5ff;
  color: #0a84ff;
}

body.supervisor-app .prepare-doc-action-jha .prepare-doc-icon {
  background: #fff3e8;
  color: #ff8a1f;
}

body.supervisor-app .prepare-doc-action-lift .prepare-doc-icon {
  background: #ecf9ef;
  color: #20a94b;
}

body.supervisor-app .prepare-doc-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.supervisor-app .prepare-doc-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.supervisor-app .prepare-doc-actions strong {
  color: var(--supervisor-ios-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

body.supervisor-app .prepare-doc-copy small {
  color: var(--supervisor-ios-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

body.supervisor-app .prepare-doc-disclosure {
  display: grid;
  min-width: 44px;
  align-items: center;
  justify-items: end;
  gap: 5px;
}

body.supervisor-app .prepare-doc-disclosure small {
  color: var(--supervisor-ios-orange);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
}

body.supervisor-app .prepare-doc-actions .doc-chevron {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #8b8c94;
  stroke-width: 2;
}

.recent-documents {
  display: grid;
  gap: 13px;
}

.recent-documents > div {
  overflow: hidden;
  border: 1px solid #e2e3e8;
  border-radius: var(--supervisor-ios-radius);
  background: #fff;
  box-shadow: var(--supervisor-ios-shadow);
}

.recent-document-row {
  display: grid;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) 17px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e6e6eb;
  color: var(--supervisor-ios-ink);
  padding: 12px 16px;
  text-decoration: none;
}

.recent-document-row:last-child {
  border-bottom: 0;
}

.recent-document-row span {
  display: grid;
  gap: 4px;
}

.recent-document-row strong {
  font-size: 15px;
}

.recent-document-row small {
  color: var(--supervisor-ios-muted);
  font-size: 12px;
}

.recent-document-row svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #55565e;
  stroke-width: 2;
}

/* Shared bottom tab refinements */
body.supervisor-app .supervisor-tab-bar,
body.supervisor-profile-app .profile-tab-bar {
  min-height: calc(70px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(60, 60, 67, .16);
  background: rgba(255, 255, 255, .98);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

body.supervisor-app .supervisor-tab-bar button,
body.supervisor-app .supervisor-tab-bar a {
  font-size: 11px !important;
  font-weight: 500 !important;
  outline: none !important;
}

body.supervisor-profile-app .profile-tab-bar a {
  outline: none !important;
}

/* Profile */
body.supervisor-profile-app {
  min-height: 100vh;
  margin: 0;
  padding: 0 0 calc(88px + env(safe-area-inset-bottom)) !important;
  overflow-x: hidden;
}

body.supervisor-profile-app *,
body.supervisor-profile-app *::before,
body.supervisor-profile-app *::after {
  box-sizing: border-box;
}

body.supervisor-profile-app .global-nav,
body.supervisor-profile-app .mobile-app-topbar,
body.supervisor-profile-app .mobile-nav-shell,
body.supervisor-profile-app .mobile-bottom-tabs,
body.supervisor-profile-app .mobile-context-actions,
body.supervisor-profile-app .mobile-install-prompt {
  display: none !important;
}

.supervisor-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.profile-app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid !important;
  min-height: 66px;
  grid-template-columns: 44px minmax(0, 1fr) 44px !important;
  align-items: center !important;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, calc((100vw - 430px) / 2)) 8px;
  border-bottom: 1px solid rgba(60, 60, 67, .12);
  background: rgba(255, 255, 255, .97);
}

.profile-app-header > a,
.profile-app-header > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
}

.profile-app-header > a {
  color: var(--supervisor-ios-ink);
}

.profile-app-header > a svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-app-header > div {
  display: flex !important;
  min-width: 0;
  align-items: center !important;
  justify-content: center;
  gap: 12px;
}

.profile-app-header img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.profile-app-header h1 {
  margin: 0;
  color: #111114;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}

.profile-app-header > span {
  border: 1px solid rgba(255, 90, 20, .15);
  background: #fff0e9;
  color: #d94400;
  font-size: 12px;
  font-weight: 800;
}

.profile-page {
  display: grid;
  width: min(100%, 430px);
  gap: 18px;
  margin: 0 auto;
  padding: 28px 16px 36px;
}

.profile-identity {
  display: grid;
  justify-items: center;
  gap: 11px;
  padding: 2px 0 8px;
}

.profile-avatar-large {
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border-radius: 50%;
  background: #ffe4d5;
  color: var(--supervisor-ios-orange);
  font-size: 44px;
  font-weight: 650;
}

.profile-identity h2 {
  margin: 0;
  color: var(--supervisor-ios-ink);
  font-size: 27px;
  font-weight: 720;
  line-height: 1.15;
  text-align: center;
}

.profile-role-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  background: #e9e9ec;
  color: #777780;
  padding: 6px 18px;
  font-size: 16px;
}

.profile-info-card,
.profile-settings-card {
  overflow: hidden;
  border: 1px solid #e2e3e8;
  border-radius: var(--supervisor-ios-radius);
  background: #fff;
  box-shadow: var(--supervisor-ios-shadow);
}

.profile-info-card > div {
  display: grid;
  min-height: 67px;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 12px;
  margin: 0 16px;
  border-bottom: 1px solid #e6e6eb;
}

.profile-info-card > div:last-child {
  border-bottom: 0;
}

.profile-info-card span {
  color: var(--supervisor-ios-ink);
  font-size: 15px;
  font-weight: 500;
}

.profile-info-card strong {
  overflow-wrap: anywhere;
  color: var(--supervisor-ios-muted);
  font-size: 15px;
  font-weight: 400;
  text-align: right;
}

.profile-settings-card a {
  display: grid;
  min-height: 72px;
  grid-template-columns: 31px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 13px;
  color: var(--supervisor-ios-ink);
  padding: 12px 17px;
  font-size: 16px;
  text-decoration: none;
}

.profile-settings-card a + a {
  border-top: 1px solid #e6e6eb;
}

.profile-settings-card svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-settings-card svg:last-child {
  width: 18px;
  height: 18px;
  color: #666772;
}

.profile-sign-out {
  width: 100%;
  min-height: 54px;
  border: 1px solid #e2e3e8;
  border-radius: 14px;
  background: #fff;
  color: var(--supervisor-ios-orange);
  box-shadow: var(--supervisor-ios-shadow);
  font: 600 17px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", Arial, sans-serif;
}

.profile-tab-bar {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 50;
  display: grid !important;
  width: min(100%, 430px);
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  transform: translateX(50%);
  padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
}

.profile-tab-bar a {
  display: grid;
  min-width: 0;
  min-height: 52px;
  place-content: center;
  justify-items: center;
  gap: 4px;
  color: #3e3f45;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.profile-tab-bar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-tab-bar a[aria-current="page"] {
  color: var(--supervisor-ios-orange);
}

@media (max-width: 390px) {
  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .role-shell {
    padding-right: 11px !important;
    padding-left: 11px !important;
  }

  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-app-header {
    margin: 0 !important;
    padding-right: 11px !important;
    padding-left: 11px !important;
  }

  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-brand-copy strong,
  .profile-app-header h1 {
    font-size: 20px !important;
  }

  .survey-progress button strong {
    font-size: 11px;
  }

  body.supervisor-app .survey-history-summary {
    grid-template-columns: 43px minmax(0, 1fr) auto 16px !important;
    gap: 8px !important;
  }

  .survey-history-icon {
    width: 43px;
    height: 43px;
  }

  body.supervisor-app .prepare-doc-actions a {
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 11px;
  }

  body.supervisor-app .prepare-doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  body.supervisor-app .prepare-doc-disclosure {
    min-width: 20px;
  }

  body.supervisor-app .prepare-doc-disclosure small {
    display: none;
  }
}

@media (min-width: 760px) {
  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .role-shell,
  .profile-page {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
  }

  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .supervisor-app-header {
    width: min(100vw, 760px) !important;
  }

  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .site-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.supervisor-app[data-supervisor-section]:not([data-supervisor-section="home"]) .site-field-grid.single {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .profile-app-header {
    padding-right: max(20px, calc((100vw - 760px) / 2));
    padding-left: max(20px, calc((100vw - 760px) / 2));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .supervisor-header-back,
  .survey-progress button,
  .history-filter button,
  .prepare-doc-actions a,
  .profile-tab-bar a,
  .supervisor-tab-bar a,
  .supervisor-tab-bar button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
  }

  .supervisor-header-back:active,
  .survey-progress button:active,
  .prepare-doc-actions a:active,
  .profile-tab-bar a:active,
  .supervisor-tab-bar a:active,
  .supervisor-tab-bar button:active {
    transform: scale(.985);
  }
}
