/* Sprint 13: Elektro Auftrag Detail V1
   Scope: central app screen styling only. No backend writes, no Supabase changes. */

.jobDetailShell,
.jobDetailShell * {
  box-sizing: border-box;
}

.jobDetailShell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.jobBackButton {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(27, 36, 48, 0.12);
  border-radius: 999px;
  background: #FFFFFF;
  color: #1B2430;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(11, 15, 20, 0.04);
}

.jobDetailGrid {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}

.jobMainColumn,
.jobSideColumn {
  min-width: 0;
  display: grid;
  gap: clamp(14px, 1.8vw, 18px);
  align-content: start;
}

.jobHeaderCard,
.jobInfoCard,
.jobActionCard,
.jobFooterCta {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(27, 36, 48, 0.1);
  border-radius: 22px;
  background: #FFFFFF;
  color: #1B2430;
  box-shadow: 0 16px 36px rgba(11, 15, 20, 0.07);
}

.jobHeaderCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(12px, 1.8vw, 18px);
  min-height: 180px;
  align-content: space-between;
  padding: clamp(18px, 2.4vw, 26px);
  background:
    radial-gradient(circle at 82% 12%, rgba(184, 255, 44, 0.24), transparent 34%),
    radial-gradient(circle at 14% 100%, rgba(53, 214, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #0B0F14 0%, #14202B 72%, #1B2430 100%);
  color: #FFFFFF;
}

.jobHeaderCard::after {
  content: "";
  position: absolute;
  inset: auto -16% -54% auto;
  width: min(260px, 62vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.jobChipRow {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobStatusChip,
.jobPriorityChip,
.jobNumberChip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.jobStatusChip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.jobNumberChip {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.status-geplant,
.status-rapport-eingereicht {
  background: rgba(53, 214, 255, 0.18);
  color: #DDF8FF;
}

.status-in-arbeit,
.status-gepruft {
  background: rgba(184, 255, 44, 0.18);
  color: #ECFFD4;
}

.status-neu {
  background: rgba(208, 215, 222, 0.22);
  color: #F8FAFC;
}

.status-pausiert,
.status-rapport-offen {
  background: rgba(245, 158, 11, 0.18);
  color: #FFF0CE;
}

.status-zuruckgewiesen {
  background: rgba(220, 38, 38, 0.16);
  color: #FFD8D8;
}

.status-abgeschlossen {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
}

.jobPriorityChip {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.priority-hoch {
  background: rgba(245, 158, 11, 0.2);
  color: #FFE7B4;
}

.priority-normal {
  background: rgba(184, 255, 44, 0.16);
  color: #ECFFD4;
}

.priority-tief {
  background: rgba(53, 214, 255, 0.14);
  color: #DDF8FF;
}

.jobHeaderText {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.jobHeaderText span,
.jobSectionEyebrow,
.jobFooterCta span {
  display: inline-flex;
  color: #667382;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jobHeaderText span {
  color: rgba(255, 255, 255, 0.62);
}

.jobHeaderText h2 {
  max-width: 780px;
  margin: 7px 0 9px;
  color: #FFFFFF;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.jobHeaderText p {
  max-width: 58ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.96rem, 1.25vw, 1.06rem);
  line-height: 1.45;
}

.jobInfoCard,
.jobActionCard {
  padding: clamp(18px, 2.4vw, 26px);
}

.jobDescriptionCard p,
.jobInfoCard p,
.jobInfoCard address,
.jobActionCard p {
  margin: 10px 0 0;
  color: #667382;
  font-size: 1rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.jobDescriptionCard p {
  color: #1B2430;
  font-size: clamp(1.08rem, 1.5vw, 1.18rem);
}

.jobHintGrid {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: clamp(14px, 1.8vw, 18px);
}

.jobInfoCard.safety {
  border-color: rgba(245, 158, 11, 0.22);
}

.jobSectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jobSectionHead strong {
  color: #667382;
  font-size: 0.85rem;
}

.jobChecklist {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: job-step;
}

.jobChecklist li {
  counter-increment: job-step;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #1B2430;
  font-weight: 760;
  line-height: 1.42;
}

.jobChecklist li::before {
  content: counter(job-step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0B0F14;
  color: #B8FF2C;
  font-size: 0.76rem;
  font-weight: 950;
}

.jobActionCard {
  background:
    linear-gradient(180deg, rgba(184, 255, 44, 0.12), transparent 52%),
    #FFFFFF;
}

.jobActionCard h3 {
  margin: 8px 0 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.jobActionStack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.jobPrimaryAction,
.jobSecondaryAction,
.jobFooterCta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 920;
  text-decoration: none;
  cursor: pointer;
}

.jobPrimaryAction,
.jobFooterCta button {
  background: #B8FF2C;
  color: #0B0F14;
  box-shadow: 0 12px 24px rgba(131, 201, 0, 0.18);
}

.jobPrimaryAction:hover,
.jobFooterCta button:hover {
  background: #83C900;
}

.jobSecondaryAction {
  background: #F8FAFC;
  border-color: rgba(27, 36, 48, 0.1);
  color: #1B2430;
}

.jobSecondaryAction.link {
  width: 100%;
  margin-top: 16px;
}

.jobSecondaryAction.subtle {
  width: 100%;
  margin-top: 14px;
  min-height: 42px;
  color: #667382;
}

.jobInfoCard h3 {
  margin: 8px 0 0;
  font-size: 1.18rem;
  line-height: 1.18;
}

.jobInfoCard address {
  font-style: normal;
}

.jobMaterialList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.jobMaterialList span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(27, 36, 48, 0.1);
  border-radius: 999px;
  background: #F8FAFC;
  color: #1B2430;
  font-size: 0.86rem;
  font-weight: 850;
}

.jobFooterCta {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 24px);
  background: #0B0F14;
  color: #FFFFFF;
}

.jobFooterCta span {
  color: rgba(255, 255, 255, 0.58);
}

.jobFooterCta strong {
  display: block;
  margin-top: 6px;
  color: #FFFFFF;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.32;
}

@media (min-width: 760px) {
  .jobHintGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jobFooterCta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 980px) {
  .jobDetailGrid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
  }

  .jobHeaderCard {
    min-height: 220px;
  }

  .jobSideColumn {
    position: sticky;
    top: 18px;
  }
}

@media (max-width: 520px) {
  .jobDetailShell {
    padding-bottom: 112px;
  }

  .jobHeaderCard {
    min-height: 180px;
    border-radius: 20px;
  }

  .jobHeaderText h2 {
    font-size: clamp(1.8rem, 9vw, 2.25rem);
  }

  .jobInfoCard,
  .jobActionCard,
  .jobFooterCta {
    border-radius: 18px;
  }

  .jobPrimaryAction,
  .jobSecondaryAction,
  .jobFooterCta button {
    width: 100%;
  }
}
