.request-flow-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-flow-image {
  width: calc(33.333% - 6px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.request-flow-image-button {
  width: calc(33.333% - 6px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.request-flow-image-button .request-flow-image { width: 100%; display: block; }

.request-photo-upload { margin-top: 4px; }
.request-photo-upload-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.request-photo-upload-head span { color: var(--muted); font-size: .9rem; }
.request-photo-drop {
  width: 100%; min-height: 98px; display: grid; place-content: center; gap: 3px;
  border: 1px dashed var(--green); border-radius: 10px; background: #f8fbf4; color: var(--green); cursor: pointer;
}
.request-photo-drop .lucide { width: 22px; height: 22px; margin: 0 auto; }
.request-photo-drop small { color: var(--muted); font-weight: 400; }
.request-photo-drop.is-dragging { background: #e8f4d3; outline: 2px solid var(--lime); }
.request-photo-drop.is-full { opacity: .56; cursor: not-allowed; border-style: solid; }
.request-photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.request-photo-preview { position: relative; width: 78px; height: 78px; margin: 0; }
.request-photo-preview img { width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.request-photo-preview button { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 50%; background: var(--green); color: white; }
.request-photo-preview button .lucide { width: 14px; height: 14px; }

.request-image-lightbox {
  width: min(96vw, 1120px); max-width: none; height: min(92vh, 820px); padding: 18px 30px 22px;
  border: 1px solid rgb(255 255 255 / .12); border-radius: 14px; color: #fff;
  background: radial-gradient(circle at 50% 0%, #21352f 0%, #101817 55%, #0c1211 100%);
  box-shadow: 0 28px 72px rgb(0 0 0 / .48); overflow: hidden;
}
.request-image-lightbox::backdrop { background: rgb(3 12 10 / .8); backdrop-filter: blur(4px); }
.request-image-toolbar { position: relative; display: flex; align-items: center; justify-content: center; height: 34px; font-weight: 700; }
.request-image-toolbar span { font-size: .95rem; }
.request-image-zoom { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; }
.request-image-zoom button { width: 30px; height: 30px; border: 1px solid rgb(255 255 255 / .26) !important; border-radius: 7px; background: rgb(255 255 255 / .08); }
.request-image-zoom button:hover:not(:disabled) { border-color: var(--lime) !important; background: rgb(198 245 102 / .16); }
.request-image-zoom button:disabled { opacity: .4; cursor: not-allowed; }
.request-image-zoom button .lucide { width: 17px; height: 17px; }
.request-image-zoom [data-lightbox-reset] { width: auto; padding: 0 9px; font-size: .78rem; font-weight: 700; }
.request-image-lightbox button { display: grid; place-items: center; padding: 0; border: 0; color: #fff; cursor: pointer; }
.request-image-lightbox button .lucide { width: 27px; height: 27px; }
.request-image-close { position: absolute; right: 0; top: 0; width: 36px; height: 36px; background: transparent; }
.request-image-close:hover { color: var(--lime); }
.request-image-stage { position: relative; display: flex; align-items: center; justify-content: center; height: calc(100% - 118px); min-height: 300px; padding: 12px 70px; overflow: hidden; }
.request-image-stage > img { display: block; max-width: 100%; width: auto; max-height: 100%; height: auto; object-fit: contain; border-radius: 9px; box-shadow: 0 16px 40px rgb(0 0 0 / .3); cursor: zoom-in; user-select: none; -webkit-user-drag: none; transform-origin: center center; }
.request-image-stage.is-zoomed > img { cursor: grab; }
.request-image-stage.is-dragging > img { cursor: grabbing; }
.request-image-nav { position: absolute; top: calc(50% - 27px); z-index: 1; width: 54px; height: 54px; border: 1px solid rgb(255 255 255 / .25) !important; border-radius: 50%; background: rgb(7 14 12 / .35); }
.request-image-nav:hover { border-color: var(--lime) !important; background: rgb(198 245 102 / .16); }
.request-image-nav.previous { left: 4px; }
.request-image-nav.next { right: 4px; }
.request-image-thumbnails { display: flex; justify-content: center; gap: 12px; min-height: 70px; padding-top: 8px; }
.request-image-thumbnail { width: 86px; height: 66px; overflow: hidden; border: 2px solid transparent !important; border-radius: 8px; background: transparent; opacity: .7; }
.request-image-thumbnail:hover { opacity: 1; }
.request-image-thumbnail.is-active { border-color: var(--lime) !important; box-shadow: 0 0 0 2px rgb(198 245 102 / .18); opacity: 1; }
.request-image-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .request-image-lightbox { width: 100vw; height: 100dvh; padding: 14px; border: 0; border-radius: 0; }
  .request-image-stage { padding: 8px 42px; }
  .request-image-nav { width: 40px; height: 40px; }
  .request-image-nav.previous { left: 0; }
  .request-image-nav.next { right: 0; }
  .request-image-thumbnail { width: 62px; height: 50px; }
}

.flow-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-right: 6px;
  vertical-align: -3px;
  stroke-width: 2;
}

.flow-card .account-card-actions,
.flow-card .dashboard-feed-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-card .account-card-actions button,
.flow-card .dashboard-feed-actions button {
  white-space: nowrap;
}

.flow-card .dashboard-feed-main,
.flow-card .dashboard-feed-content,
.flow-card .account-card-content,
.flow-card .dashboard-feed-title,
.flow-card .account-card-heading {
  min-width: 0;
}

/* Only free-form copy may wrap inside a card. Do not apply this to every span:
   the status badge belongs to the auto-sized grid column in account cards. */
.flow-card .account-card-heading h3,
.flow-card .dashboard-feed-title b,
.flow-card .card-description,
.flow-card .job-professional,
.flow-card .dashboard-feed-description,
.flow-card .dashboard-feed-content > p {
  overflow-wrap: break-word;
}

.flow-card .request-title-button {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s ease;
}

.flow-card .request-title-button:hover,
.flow-card .request-title-button:focus-visible {
  color: var(--green);
  text-decoration: underline;
}

.flow-card.account-card .account-card-content {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.flow-card .status-badge {
  max-width: none;
  white-space: nowrap;
}

/* Only cards explicitly flagged as no-media drop the image column */
.account-card.account-card--no-media {
  grid-template-columns: minmax(0, 1fr);
}

.account-card.flow-card .account-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.account-card.flow-card .account-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.account-card.flow-card .account-card-heading {
  min-width: 0;
  flex: 1;
}

.account-card.flow-card .status-badge {
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: auto;
}

.flow-card .card-meta,
.flow-card .dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.account-card.flow-card .card-meta {
  margin-top: auto;
  padding-top: 0.35rem;
}

.flow-quote-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: .82rem;
}

.flow-quote-summary b {
  color: var(--green);
}

.flow-amount {
  margin: 8px 0;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

/* Job Detail Modal & Timeline */
#input-modal:has(.job-detail-view) {
  max-width: 620px;
  width: min(620px, 95vw);
}

.job-detail-view {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  text-align: left;
  color: var(--ink);
}

.job-detail-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-surface, #f8fafc);
  border: none;
  border-radius: 12px;
}

.job-detail-participants {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.job-detail-participants p {
  margin: 0;
  color: var(--muted);
}

.job-detail-participants b {
  color: var(--ink);
}

.job-detail-price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
}

.job-detail-price-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.job-detail-price-box .flow-amount {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
}

.job-detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.job-detail-section h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--ink);
}

.job-detail-description {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-line;
}

.flow-modal-muted {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

.job-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 0.4rem;
  padding-left: 1.85rem;
}

.job-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 12px;
  width: 2px;
  background: var(--line, #e2e8f0);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.15rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.85rem;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.timeline-item.is-done .timeline-marker {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.timeline-item.is-active .timeline-marker {
  background: #fff;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.timeline-item.is-pending .timeline-marker {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.timeline-check {
  width: 11px;
  height: 11px;
  stroke: #fff;
  stroke-width: 3;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
}

.timeline-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.timeline-date {
  font-size: 0.76rem;
  color: var(--muted);
}

.timeline-body {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  margin-top: 0.25rem;
  padding: 0.18rem 0.5rem;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
}

.timeline-duration--success {
  background: #e3f5e9;
  color: #167253;
}

.timeline-icon {
  width: 13px;
  height: 13px;
}

