/* ==========================================================================
   MoveFlow – Aufträge / Umzüge
   ========================================================================== */

/* --- Liste: Kennzahlen --- */
.job-stats { margin-bottom: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-stat {
  text-align: left; cursor: pointer; background: var(--c-surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.job-stat:hover { border-color: var(--c-border-2); box-shadow: var(--shadow-sm); }
.job-stat .stat-box__label svg { width: 14px; height: 14px; }
.job-stat.is-active { border-color: var(--c-primary); box-shadow: inset 0 0 0 1px var(--c-primary); background: var(--c-primary-50); }
.job-stat--warn .stat-box__value { color: var(--c-orange-text); }
.job-stat--warn.is-active { border-color: var(--c-orange); box-shadow: inset 0 0 0 1px var(--c-orange); background: var(--c-orange-bg); }
.job-survey-toggle { font-size: 13px; color: var(--c-text-2); }
.job-chipbar { gap: 8px; }
.job-chip-x svg { width: 13px; height: 13px; }

/* --- Tabelle --- */
.job-table th, .job-table td { padding-left: 11px; padding-right: 11px; }
.job-table td .cell-main, .job-table td .cell-sub { white-space: normal; }
.job-table td:nth-child(2) .cell-main { white-space: nowrap; }
.job-table .route { white-space: normal; flex-wrap: wrap; }
.job-cell-veh { max-width: 150px; }
.job-row--muted td { opacity: .55; }
.job-row--muted .cell-main { text-decoration: line-through; }
.job-dur { font-size: 11.5px; color: var(--c-text-3); margin-left: 4px; }
.job-cell-veh .tag { height: 18px; font-size: 10.5px; }
.job-status-btn { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border-radius: var(--r-full); }
.job-status-btn > svg { width: 14px; height: 14px; color: var(--c-text-3); transition: transform var(--t-fast); }
.job-status-btn:hover .badge { box-shadow: inset 0 0 0 1px currentColor; }
.job-status-btn:hover > svg { transform: translateY(1px); color: var(--c-text); }
.job-status-btn--lg > svg { width: 16px; height: 16px; }

/* --- Board --- */
.job-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.job-col { display: flex; flex-direction: column; background: var(--c-surface-3); border: 1px solid var(--c-border); border-radius: var(--r-lg); min-height: 300px; max-height: calc(100vh - 300px); transition: background var(--t-fast), border-color var(--t-fast); }
.job-col.is-over { background: var(--c-primary-50); border-color: var(--c-primary-200); }
.job-col__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.job-col__title { font-size: 13px; font-weight: 650; }
.job-col__count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--r-full); background: var(--c-surface); font-size: 11.5px; font-weight: 650; color: var(--c-text-2); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--c-border); }
.job-col__sum { margin-left: auto; font-size: 12px; color: var(--c-text-3); }
.job-col__body { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; overflow-y: auto; flex: 1; }
.job-col__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 8px; border: 1.5px dashed var(--c-border-2); border-radius: var(--r-md); color: var(--c-text-4); font-size: 12px; }
.job-col__empty svg { width: 18px; height: 18px; }
.job-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 11px 12px 9px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow var(--t-fast), border-color var(--t-fast), opacity var(--t-fast), transform var(--t-fast); }
.job-card:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.job-card.is-today { border-color: var(--c-primary-200); box-shadow: 0 0 0 1px var(--c-primary-100); }
.job-card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.job-card__top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.job-card__num { font-size: 11.5px; font-weight: 600; color: var(--c-text-3); }
.job-card__title { font-weight: 650; font-size: 13.5px; margin-top: 6px; }
.job-card__route { font-size: 12.5px; color: var(--c-text-2); margin-top: 2px; }
.job-card__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-3); margin-top: 6px; }
.job-card__meta svg { width: 13px; height: 13px; }
.job-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--c-border); }
.job-card__price { margin-left: auto; font-size: 12.5px; font-weight: 650; }
.job-card__menu { width: 26px; height: 26px; margin-right: -4px; }

/* --- Formular --- */
.job-endhint { height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); background: var(--c-surface-2); border: 1px dashed var(--c-border-2); font-weight: 600; color: var(--c-text-2); }
.job-svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.job-svc { display: flex; gap: 6px; align-items: stretch; }
.job-svc .check-tile { flex: 1; }
.job-svc__qty { width: 70px; flex-shrink: 0; height: auto; text-align: center; }

/* --- Detail: Hero mit Routen-Band --- */
.job-hero { margin-bottom: 8px; }
.job-band { height: auto; padding: 18px 24px 16px; display: flex; align-items: center; gap: 20px; color: #fff; }
.job-band__route { flex: 1; display: flex; align-items: center; gap: 18px; min-width: 0; }
.job-band__city { display: flex; flex-direction: column; min-width: 0; }
.job-band__city span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #9db0d6; font-weight: 600; }
.job-band__city strong { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-band__city--to { text-align: right; }
.job-band__line { position: relative; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 6px, transparent 6px 12px); border-radius: 2px; min-width: 60px; }
.job-band__fill { position: absolute; left: 0; top: 0; bottom: 0; background: #8fb0ff; border-radius: 2px; box-shadow: 0 0 12px rgba(143, 176, 255, .8); }
.job-band__truck { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--c-primary); display: grid; place-items: center; box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .5); }
.job-band__truck svg { width: 17px; height: 17px; }
.job-hero[data-status="bestaetigt"] .job-band__truck, .job-hero[data-status="anfrage"] .job-band__truck, .job-hero[data-status="besichtigung"] .job-band__truck { left: 0 !important; transform: translate(0, -50%); }
.job-hero[data-status="abgeschlossen"] .job-band__truck { left: 100% !important; transform: translate(-100%, -50%); color: var(--c-green); }
.job-hero[data-status="unterwegs"] .job-band__truck { color: var(--c-amber-text); animation: jobPulse 2s infinite; }
@keyframes jobPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }
.job-band__km { padding: 6px 12px; border-radius: var(--r-full); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); font-size: 13px; font-weight: 650; white-space: nowrap; }
.job-hero__id { min-width: 0; flex: 1; }
.job-hero__title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.job-dotsep { color: var(--c-text-4); }
.job-hero .hero__eyebrow > span { display: inline-flex; align-items: center; gap: 4px; }
.job-stat-sub { font-size: 12px; font-weight: 500; color: var(--c-text-3); }
.job-hero__stats .hero-stat__value { font-size: 15px; }

/* Stepper */
.job-steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 22px; }
.job-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 0 4px; }
.job-step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--c-border); }
.job-step:first-child::before { display: none; }
.job-step.is-done::before, .job-step.is-current::before { background: var(--c-green); }
.job-step__dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--c-surface); border: 2px solid var(--c-border-2); color: var(--c-text-3); }
.job-step__dot svg { width: 13px; height: 13px; stroke-width: 3; }
.job-step.is-done .job-step__dot { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.job-step.is-current .job-step__dot { border-color: var(--c-primary); color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-100); }
.job-step__label { font-size: 11.5px; font-weight: 600; color: var(--c-text-3); }
.job-step.is-done .job-step__label { color: var(--c-text-2); }
.job-step.is-current .job-step__label { color: var(--c-text); }
.job-step__sub { font-size: 10.5px; color: var(--c-text-4); margin-top: -3px; }
.job-cancelled { margin-top: 18px; }
.job-tabs { margin-top: 20px; }

/* --- Übersicht --- */
.job-checks { display: flex; flex-direction: column; gap: 6px; }
.job-check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-border); }
.job-check__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--c-surface); border: 1.5px dashed var(--c-border-3); color: var(--c-text-4); }
.job-check__icon svg { width: 13px; height: 13px; }
.job-check.is-ok .job-check__icon { background: var(--c-green); border: 0; color: #fff; }
.job-check.is-ok .job-check__icon svg { stroke-width: 3; }
.job-check__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.job-check__label { font-size: 13.5px; font-weight: 600; }
.job-check__sub { font-size: 12px; color: var(--c-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-check:not(.is-ok) { background: var(--c-surface); }
.job-cust { color: inherit; }
.job-cust:hover .person__name { color: var(--c-primary); }
.job-break { word-break: break-all; }
.job-contact-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.job-contact-btns .btn { padding: 0 6px; }
.job-route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.job-route__mid { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--c-text-3); font-size: 12px; font-weight: 600; }
.job-route__mid svg { width: 20px; height: 20px; color: var(--c-text-4); }
.job-addr-mini { position: relative; padding: 12px 14px 12px 16px; border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-border); min-width: 0; }
.job-addr-mini::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-blue); }
.job-addr-mini--green::before { background: var(--c-green); }
.job-addr-mini__title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--c-text-3); }
.job-addr-mini__street { font-weight: 650; margin-top: 3px; }
.job-addr-mini__city { font-size: 13px; color: var(--c-text-2); }
.job-addr-mini__meta { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }
.job-notes { white-space: pre-line; font-size: 13.5px; }
.job-internal { background: repeating-linear-gradient(135deg, var(--c-surface), var(--c-surface) 10px, var(--c-surface-2) 10px, var(--c-surface-2) 20px); }

/* --- Adressen --- */
.job-addr { position: relative; overflow: hidden; }
.job-addr::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c-blue); }
.job-addr--green::before { background: var(--c-green); }
.job-addr__street { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.job-addr__city { color: var(--c-text-2); font-size: 14.5px; }
.job-addr__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.job-addr__facts > div { padding: 10px 12px; border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-border); display: flex; flex-direction: column; gap: 2px; }
.job-addr__facts span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--c-text-3); font-weight: 600; }
.job-addr__facts svg { width: 14px; height: 14px; }
.job-addr__facts strong { font-size: 13.5px; font-weight: 650; }

/* --- Inventar --- */
.job-quickadd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.job-quickadd__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--c-text-2); white-space: nowrap; height: 32px; }
.job-quickadd__label svg { width: 14px; height: 14px; }
.job-quickadd .chip { height: 28px; font-size: 12px; }
.job-inv__room td { background: var(--c-surface-2); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-2); padding-top: 8px !important; padding-bottom: 8px !important; }
.job-inv__room span { font-weight: 500; color: var(--c-text-3); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.job-inv__ok { width: 15px; height: 15px; color: var(--c-green); display: inline-block; vertical-align: -2px; margin-right: 6px; }
.job-inv tr.is-loaded .cell-main { color: var(--c-text-2); }
.job-stepper { display: inline-flex; align-items: center; border: 1px solid var(--c-border-2); border-radius: 8px; overflow: hidden; background: var(--c-surface); }
.job-stepper button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--c-text-2); }
.job-stepper button:hover { background: var(--c-surface-3); color: var(--c-text); }
.job-stepper button svg { width: 13px; height: 13px; }
.job-stepper span { min-width: 30px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }

/* --- Team & Fahrzeug --- */
.job-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.job-member { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--c-border); background: var(--c-surface-2); }
.job-member__body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.job-member__name { font-weight: 650; color: var(--c-text); }
.job-member__name:hover { color: var(--c-primary); }
.job-member__role { font-size: 12px; color: var(--c-text-3); }
.job-member__actions { display: flex; gap: 2px; }
.job-vehicle { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--c-border); background: var(--c-surface-2); color: inherit; }
.job-vehicle:hover { border-color: var(--c-border-2); color: inherit; box-shadow: var(--shadow-sm); }
.job-vehicle__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--c-navy-800); color: #fff; flex-shrink: 0; }
.job-vehicle__icon svg { width: 18px; height: 18px; }
.job-vehicle__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.job-vehicle__name { font-weight: 650; }
.job-vehicle__meta { font-size: 12px; color: var(--c-text-3); }
.job-plate { display: inline-flex; align-items: center; height: 24px; padding: 0 8px 0 18px; border: 1.5px solid #1b1b1b; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; background: linear-gradient(90deg, #1f4fbf 0 12px, #fff 12px); color: #111; white-space: nowrap; }
.job-qty { width: 76px; text-align: center; margin: 0 auto; }

/* --- Kalkulation --- */
.job-calc__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.job-calc__head span { font-size: 13px; color: var(--c-text-2); font-weight: 600; }
.job-calc__head strong { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; }
.job-calc__bar { display: flex; gap: 2px; height: 14px; border-radius: var(--r-full); overflow: hidden; background: var(--c-surface-3); }
.job-calc__bar span { display: block; min-width: 3px; }
.job-calc__rows { display: flex; flex-direction: column; margin-top: 16px; }
.job-calc__row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 70px 100px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--c-border); }
.job-calc__sw { width: 10px; height: 10px; border-radius: 3px; }
.job-calc__label { font-size: 13.5px; font-weight: 550; display: flex; flex-direction: column; }
.job-calc__label small { font-size: 11.5px; color: var(--c-text-3); font-weight: 500; }
.job-calc__pct { text-align: right; font-size: 12.5px; color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.job-calc__val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.job-calc__kv { margin-top: 6px; }
.job-calc__kv .kv__row--total .kv__val { font-size: 20px; }
.job-margin .card__body { display: flex; flex-direction: column; align-items: center; text-align: center; }
.job-gauge { --tone: var(--c-green); width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tone) calc(var(--p) * 1%), var(--c-surface-3) 0); margin: 6px auto 14px; }
.job-gauge--amber { --tone: var(--c-amber); }
.job-gauge--red { --tone: var(--c-red); }
.job-gauge__inner { width: 132px; height: 132px; border-radius: 50%; background: var(--c-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--c-border); }
.job-gauge__inner strong { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; }
.job-gauge__inner span { font-size: 12px; color: var(--c-text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.job-margin__text { font-size: 13.5px; color: var(--c-text-2); max-width: 260px; }
.job-margin .kv { width: 100%; text-align: left; }

/* --- Dokumente & Rechnung --- */
.job-genrow { text-align: left; }
.job-invoice__sums { display: flex; gap: 22px; }
.job-invoice__sums div { display: flex; flex-direction: column; }
.job-invoice__sums span { font-size: 11.5px; color: var(--c-text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.job-invoice__sums strong { font-size: 16px; font-variant-numeric: tabular-nums; }

/* --- Responsive --- */
@media (max-width: 1180px) {
  .job-steps { overflow-x: auto; grid-template-columns: repeat(8, 100px); padding-bottom: 4px; }
}
@media (max-width: 1023px) {
  .job-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .job-stats { gap: 10px; }
  .job-band { padding: 14px 16px; }
  .job-band__city strong { font-size: 14.5px; }
  .job-band__km { display: none; }
  .job-hero .hero__actions { width: 100%; }
  .job-hero .hero__actions .btn:not(.btn--icon) { flex: 1; }
  .job-route { grid-template-columns: 1fr; }
  .job-route__mid { flex-direction: row; justify-content: center; }
  .job-route__mid svg { transform: rotate(90deg); }
  .job-addr__facts { grid-template-columns: 1fr; }
  .job-quickadd { flex-direction: column; gap: 6px; }
  .job-board { grid-auto-columns: 82vw; margin: 0 -16px; padding: 0 16px 10px; }
  .job-col { max-height: none; }
  .job-calc__row { grid-template-columns: 10px minmax(0, 1fr) 90px; }
  .job-calc__pct { display: none; }
  .job-invoice__sums { gap: 14px; }
}

/* Kunden-Tracking (Seitenspalte der Übersicht) */
.job-track__text { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--c-text-2); }
.job-track__facts { display: grid; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.job-track__facts > div:not(.progress) { display: flex; align-items: center; gap: 8px; }
.job-track__facts svg { width: 15px; height: 15px; color: var(--c-text-3); flex-shrink: 0; }
.job-track__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.job-track__fb { margin-bottom: 12px; padding: 12px; border-radius: var(--r-md); background: var(--c-surface-2); }
.job-track__stars { font-size: 18px; letter-spacing: 2px; color: #f59e0b; }
.job-track__fb p { margin: 6px 0; font-size: 13.5px; font-style: italic; }
.job-track__fb span { font-size: 12px; color: var(--c-text-3); }

/* Beweisfotos (Schadens-Beweissicherung) */
.job-ev td { vertical-align: top; }
.job-ev__shots { display: flex; flex-wrap: wrap; gap: 6px; }
.job-ev__shot { position: relative; width: 132px; height: 92px; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-md); background: #0a1222; cursor: pointer; }
.job-ev__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.job-ev__shot span { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 2px 4px; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .55); }
.job-ev__shot span svg { width: 11px; height: 11px; }
.job-ev__none { padding: 8px 0; font-size: 12.5px; color: var(--c-text-3); }
