/* SayInvoice Photos & costs — intentionally isolated from the document UI. */

.capture-type-toggle {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 326px);
}

.capture-type-button {
  padding-inline: 10px;
}

.capture-photo-button.is-active {
  background: var(--slate-900);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
}

.record-camera-icon {
  display: none;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-button.is-photo-mode .record-mic-icon {
  display: none;
}

.record-button.is-photo-mode .record-camera-icon {
  display: block;
}

.record-button.is-photo-mode .record-button-core {
  background: var(--slate-900);
  color: var(--white);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.32);
}

.record-button.is-photo-mode .record-button-glow {
  background: rgba(51, 65, 85, 0.22);
}

.review-photo-action {
  margin: 14px 0 4px;
}

.review-photo-button {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.98));
  color: var(--slate-900);
  text-align: left;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.review-photo-button:active {
  transform: scale(0.99);
}

.review-photo-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.22);
}

.review-photo-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.review-photo-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.review-photo-copy strong {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.15;
}

.review-photo-copy small {
  overflow: hidden;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.review-photo-chevron {
  color: var(--slate-400);
  font-size: 1.7rem;
  font-weight: 400;
}

.history-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 14px 0 16px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  background: var(--slate-100);
}

.history-view-button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.87rem;
  font-weight: 900;
}

.history-view-button.is-active {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.history-screen.is-photo-library .history-utility-bar {
  visibility: hidden;
  pointer-events: none;
}

.photo-library-view {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
}

.photo-library-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.photo-library-intro h3 {
  margin: 3px 0 4px;
  font-size: 1.35rem;
  line-height: 1.05;
}

.photo-library-intro p:not(.eyebrow) {
  max-width: 300px;
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-library-add-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: var(--orange-500);
  color: var(--slate-900);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.24);
}

.photo-library-add-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.photo-job-scope-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.94);
}

.photo-job-scope-banner strong,
.photo-job-scope-banner span {
  display: block;
}

.photo-job-scope-banner strong {
  font-size: 0.91rem;
  font-weight: 900;
}

.photo-job-scope-banner span {
  margin-top: 2px;
  color: var(--slate-600);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
}

.photo-job-scope-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.photo-job-scope-banner button {
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--blue-600, #2563eb);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 900;
}

.photo-job-scope-banner button.is-quiet {
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: var(--white);
  color: var(--slate-700);
}

.photo-library-search {
  position: relative;
  display: block;
}

.photo-library-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--slate-400);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.photo-library-search input {
  min-height: 46px;
  padding-left: 40px;
  border-width: 1px;
  border-color: var(--slate-200);
  border-radius: 15px;
  background: var(--white);
  font-size: 0.9rem;
}

.photo-library-filters {
  display: flex;
  gap: 7px;
  margin-inline: -2px;
  padding: 2px;
  overflow-x: auto;
}

.photo-library-filter {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.photo-library-filter.is-active {
  border-color: var(--slate-900);
  background: var(--slate-900);
  color: var(--white);
}

.photo-storage-status {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(241, 245, 249, 0.72);
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.photo-storage-status strong {
  color: var(--slate-700);
}

.photo-library-state-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.photo-library-state-counts > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--slate-500);
  text-align: center;
}

.photo-library-state-counts > span.has-attention {
  background: #fff7ed;
  color: #9a3412;
}

.photo-library-state-counts strong {
  font-size: 0.88rem;
  line-height: 1;
}

.photo-storage-quota {
  color: var(--slate-400);
  font-size: 0.67rem;
  text-align: right;
}

.photo-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.photo-library-show-more {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 15px;
  background: var(--white);
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045);
}

.photo-library-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.photo-library-card.has-attention {
  border-color: rgba(249, 115, 22, 0.28);
}

.photo-library-card-button {
  width: 100%;
  display: grid;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.photo-library-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--slate-100), var(--slate-200));
}

.photo-library-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease;
}

.photo-library-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--slate-400);
  opacity: 1;
  transition: opacity 160ms ease;
}

.photo-library-thumb img.is-decoded,
.photo-preview-frame img.is-decoded {
  opacity: 1;
}

.photo-library-thumb-placeholder.is-retired {
  opacity: 0;
}

.photo-library-thumb-placeholder svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.photo-kind-badge,
.photo-sync-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--white);
  font-size: 0.63rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.photo-sync-badge.is-error {
  background: #fff1f0;
  color: #9f2d26;
}

.photo-sync-badge {
  right: 8px;
  left: auto;
  background: rgba(255, 247, 237, 0.94);
  color: #c2410c;
}

.photo-library-card-copy {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 10px;
}

.photo-library-upload-state {
  min-height: 38px;
  display: grid;
  gap: 5px;
  margin: -2px 10px 10px;
  color: var(--slate-500);
  font-size: 0.66rem;
  font-weight: 800;
}

.photo-library-upload-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.photo-library-upload-copy strong,
.photo-library-upload-state.is-complete strong,
.photo-library-upload-state.is-waiting > strong {
  overflow: hidden;
  color: var(--slate-600);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-library-upload-copy small {
  color: var(--slate-400);
  font-size: 0.64rem;
}

.photo-library-upload-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.photo-library-upload-track i {
  width: var(--photo-upload-progress, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue-500);
  transition: width 240ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms ease;
}

.photo-library-upload-state.is-waiting .photo-library-upload-track i {
  background: var(--slate-400);
}

.photo-library-upload-state.is-error .photo-library-upload-track i {
  background: var(--orange-500);
}

.photo-library-upload-state.is-complete,
.photo-library-upload-state.is-waiting:not([role="progressbar"]) {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-library-upload-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  animation: photoUploadSettled 180ms ease-out;
}

.photo-library-card-copy strong,
.photo-library-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-library-card-copy strong {
  font-size: 0.83rem;
  font-weight: 900;
}

.photo-library-card-copy span {
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 700;
}

.photo-library-card-copy small {
  color: var(--slate-400);
  font-size: 0.65rem;
  font-weight: 800;
}

.photo-library-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 26px 20px;
  border: 1px dashed var(--slate-300);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.7);
  color: var(--slate-500);
  text-align: center;
}

.photo-library-empty strong,
.photo-library-empty span {
  display: block;
}

.photo-library-empty strong {
  margin-bottom: 5px;
  color: var(--slate-800);
  font-size: 0.98rem;
}

.photo-library-empty span {
  max-width: 270px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.photo-library-empty button {
  min-width: 44px;
  min-height: 44px;
}

.history-photo-summary {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--slate-200);
}

.history-photo-summary-button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-050);
  color: var(--slate-900);
  text-align: left;
}

.history-photo-summary-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--white);
  color: var(--slate-700);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.history-photo-summary-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.history-photo-summary-copy {
  min-width: 0;
}

.history-photo-summary-copy strong,
.history-photo-summary-copy small {
  display: block;
}

.history-photo-summary-copy strong {
  font-size: 0.84rem;
  font-weight: 900;
}

.history-photo-summary-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-photo-summary-count {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--white);
  color: var(--slate-700);
  font-size: 0.7rem;
  font-weight: 900;
}

.photo-flow-modal {
  position: fixed;
  inset: 0;
  z-index: 116;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 12px calc(12px + var(--app-safe-bottom-inset));
  pointer-events: none;
}

.photo-flow-modal.is-open {
  pointer-events: auto;
}

body.app-body.is-app-store-screenshot .photo-flow-modal {
  right: auto;
  width: var(--app-store-screenshot-logical-width, 100%);
  max-width: 100%;
}

.photo-flow-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.photo-flow-modal.is-open .photo-flow-backdrop {
  opacity: 1;
}

.photo-flow-sheet {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 24px), 460px);
  min-width: 0;
  max-width: 100%;
  max-height: min(91dvh, 790px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 30px 30px 22px 22px;
  background: var(--white);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.38);
  outline: none;
  opacity: 0;
  transform: translateY(18px) scale(0.99);
  transition: opacity 180ms ease, transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-flow-modal.is-open .photo-flow-sheet {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.photo-flow-handle {
  width: 42px;
  height: 5px;
  margin: 9px auto 2px;
  border-radius: 999px;
  background: var(--slate-200);
}

.photo-flow-content {
  max-height: calc(min(91dvh, 790px) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.photo-flow-shell {
  display: grid;
  gap: 15px;
  padding: 8px 18px calc(18px + var(--app-safe-bottom-inset));
}

.photo-flow-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 8px;
}

.photo-flow-header-copy {
  min-width: 0;
  padding-top: 2px;
  text-align: center;
}

.photo-flow-header-copy .eyebrow {
  margin: 0 0 3px;
}

.photo-flow-header h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.05;
}

.photo-flow-header p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--slate-500);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.4;
}

.photo-flow-back,
.photo-flow-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 1.35rem;
  font-weight: 800;
}

.photo-flow-header-spacer {
  width: 44px;
}

.photo-source-list,
.photo-choice-list {
  display: grid;
  gap: 9px;
}

.photo-source-option,
.photo-choice-option {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 17px;
  background: var(--white);
  color: var(--slate-900);
  text-align: left;
}

.photo-source-option:active,
.photo-choice-option:active {
  border-color: var(--slate-400);
  background: var(--slate-050);
}

.photo-source-option:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.photo-source-option-icon,
.photo-choice-option-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--slate-100);
  color: var(--slate-700);
}

.photo-source-option.is-primary .photo-source-option-icon {
  background: var(--slate-900);
  color: var(--white);
}

.photo-choice-option.is-receipt .photo-choice-option-icon {
  background: #fff7ed;
  color: #c2410c;
}

.photo-choice-option.is-job .photo-choice-option-icon {
  background: #eff6ff;
  color: #2563eb;
}

.photo-source-option-icon svg,
.photo-choice-option-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-source-option-copy,
.photo-choice-option-copy {
  min-width: 0;
}

.photo-source-option-copy strong,
.photo-source-option-copy small,
.photo-choice-option-copy strong,
.photo-choice-option-copy small {
  display: block;
}

.photo-source-option-copy strong,
.photo-choice-option-copy strong {
  font-size: 0.94rem;
  font-weight: 900;
}

.photo-source-option-copy small,
.photo-choice-option-copy small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-option-chevron {
  color: var(--slate-400);
  font-size: 1.55rem;
}

.photo-privacy-note,
.photo-info-note,
.photo-warning-note,
.photo-offline-note {
  margin: 0;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--slate-050);
  color: var(--slate-600);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
}

.photo-warning-note {
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: #fff7ed;
  color: #9a3412;
}

.photo-offline-note {
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: #eff6ff;
  color: #1d4ed8;
}

.photo-preview-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  background: var(--slate-100);
}

.photo-preview-frame.is-compact {
  aspect-ratio: 16 / 9;
}

.photo-preview-frame.is-receipt {
  aspect-ratio: 2 / 1;
}

.photo-preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--slate-900);
}

.photo-preview-status {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.photo-job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 16px;
  background: #eff6ff;
}

.photo-job-card-label {
  margin: 0 0 3px;
  color: #2563eb;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.photo-job-card strong,
.photo-job-card span {
  display: block;
}

.photo-job-card strong {
  font-size: 0.94rem;
  font-weight: 900;
}

.photo-job-card span {
  margin-top: 3px;
  color: var(--slate-600);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-job-card button {
  align-self: center;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 900;
}

.photo-fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.photo-fieldset legend,
.photo-field > span {
  margin-bottom: 7px;
  color: var(--slate-700);
  font-size: 0.74rem;
  font-weight: 900;
}

.photo-role-options,
.photo-scope-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.photo-scope-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-role-option,
.photo-scope-option {
  min-height: 64px;
  padding: 8px 7px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--white);
  color: var(--slate-600);
  text-align: center;
}

.photo-role-option strong,
.photo-role-option small,
.photo-scope-option strong,
.photo-scope-option small {
  display: block;
}

.photo-role-option strong,
.photo-scope-option strong {
  color: var(--slate-800);
  font-size: 0.8rem;
  font-weight: 900;
}

.photo-role-option small,
.photo-scope-option small {
  margin-top: 3px;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
}

.photo-role-option.is-active,
.photo-scope-option.is-active {
  border-color: var(--blue-500);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.photo-pdf-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--slate-050);
}

.photo-pdf-toggle strong,
.photo-pdf-toggle small {
  display: block;
}

.photo-pdf-toggle strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.photo-pdf-toggle small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.photo-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.photo-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--slate-300);
  transition: background 140ms ease;
}

.photo-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  transition: transform 140ms ease;
}

.photo-switch input:checked + .photo-switch-track {
  background: var(--blue-500);
}

.photo-switch input:checked + .photo-switch-track::after {
  transform: translateX(20px);
}

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

.photo-field {
  display: grid;
}

.photo-field.is-wide {
  grid-column: 1 / -1;
}

.photo-field input,
.photo-field select {
  min-height: 46px;
  padding: 10px 11px;
  border-width: 1px;
  border-radius: 13px;
  font-size: 0.92rem;
}

.photo-ai-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 800;
}

.photo-ai-retry {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.96);
  color: var(--blue-600);
  font: inherit;
  cursor: pointer;
}

.photo-ai-retry:disabled {
  cursor: default;
  opacity: 0.55;
}

.photo-ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--slate-200);
  border-top-color: var(--orange-500);
  border-radius: 50%;
  animation: photoSpin 700ms linear infinite;
}

.photo-flow-actions {
  position: sticky;
  bottom: calc(-18px - var(--app-safe-bottom-inset));
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 1px -18px calc(-18px - var(--app-safe-bottom-inset));
  padding: 12px 18px calc(18px + var(--app-safe-bottom-inset));
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.photo-flow-primary,
.photo-flow-secondary,
.photo-flow-ghost,
.photo-flow-danger {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 900;
}

.photo-flow-primary {
  border: 0;
  background: var(--orange-500);
  color: var(--slate-900);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.22);
}

.photo-flow-primary.is-blue {
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.22);
}

.photo-flow-secondary {
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-800);
}

.photo-flow-ghost {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--slate-500);
}

.photo-flow-danger {
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: #fff1f2;
  color: #be123c;
}

.photo-job-search {
  display: grid;
  gap: 9px;
}

.photo-job-search input {
  min-height: 46px;
  border-width: 1px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.photo-job-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
  background: var(--slate-100);
}

.photo-job-filter {
  min-height: 44px;
  padding: 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.74rem;
  font-weight: 900;
}

.photo-job-filter.is-active {
  background: var(--white);
  color: var(--slate-900);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.07);
}

.photo-job-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
}

.photo-job-option {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 15px;
  background: var(--white);
  color: var(--slate-900);
  text-align: left;
}

.photo-job-option.is-selected {
  border-color: var(--blue-500);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.photo-job-option strong,
.photo-job-option span,
.photo-job-option small {
  display: block;
}

.photo-job-option strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.photo-job-option span {
  margin-top: 3px;
  color: var(--slate-600);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
}

.photo-job-option small {
  margin-top: 4px;
  color: var(--slate-400);
  font-size: 0.66rem;
  font-weight: 800;
}

.photo-job-option-total {
  align-self: center;
  color: var(--slate-800);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.photo-success-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px 10px 6px;
  text-align: center;
}

.photo-success-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #dcfce7;
  color: #15803d;
  font-size: 1.8rem;
  font-weight: 900;
}

.photo-success-card strong {
  max-width: 330px;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.3;
}

.photo-success-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.photo-detail-meta {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--slate-050);
}

.photo-detail-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--slate-500);
  font-size: 0.74rem;
  font-weight: 700;
}

.photo-detail-meta-row strong {
  color: var(--slate-800);
  font-weight: 900;
  text-align: right;
}

.photo-link-list {
  display: grid;
  gap: 8px;
}

.photo-link-list button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--slate-900);
  text-align: left;
}

.photo-link-list button > span:first-child,
.photo-link-list strong,
.photo-link-list small {
  min-width: 0;
  display: block;
}

.photo-link-list strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-link-list small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.68rem;
  font-weight: 750;
}

.photo-link-list button > span:last-child {
  color: var(--blue-600, #2563eb);
  font-size: 0.7rem;
  font-weight: 900;
}

body.photo-flow-open {
  overflow: hidden;
}

@keyframes photoSheetIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (min-width: 620px) {
  .photo-flow-modal {
    align-items: center;
  }

  .photo-flow-sheet {
    border-radius: 30px;
  }

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

@media (max-width: 370px) {
  .capture-type-toggle {
    width: min(100%, 302px);
  }

  .capture-type-button {
    min-height: 44px;
    padding-inline: 7px;
    font-size: 0.86rem;
  }

  .photo-flow-shell {
    padding-inline: 14px;
  }

  .photo-flow-actions {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .photo-form-grid {
    grid-template-columns: 1fr;
  }

  .photo-field.is-wide {
    grid-column: auto;
  }

  .photo-role-option small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-flow-sheet,
  .photo-ai-spinner {
    animation: none;
  }
}
