/* ==========================================================================
   MoveFlow – Angebote & Angebotsgenerator
   ========================================================================== */
.off-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.off-kpis .kpi__value { font-size: 26px; }

/* --- Follow-up-System --- */
.off-fu { border-color: color-mix(in srgb, var(--c-amber) 38%, var(--c-border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-amber) 9%, transparent); }
.off-fu__list { display: flex; flex-direction: column; gap: 10px; }
.off-fu__item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-amber-bg); flex-wrap: wrap; }
.off-fu__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--c-amber-text); flex-shrink: 0; box-shadow: var(--shadow-xs); }
.off-fu__icon svg { width: 17px; height: 17px; }
.off-fu__body { flex: 1; min-width: 220px; }
.off-fu__title { font-weight: 600; font-size: 14px; }
.off-fu__title a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-amber) 60%, transparent); text-underline-offset: 3px; }
.off-fu__sub { font-size: 12.5px; color: var(--c-amber-text); margin-top: 1px; }
.off-fu__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.off-fu__actions .btn--secondary { background: rgba(255, 255, 255, .9); }

.off-table td, .off-table th { padding-left: 12px; padding-right: 12px; }
.off-via { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--c-surface-3); vertical-align: -4px; margin-left: 4px; }
.off-via svg { width: 11px; height: 11px; }

/* --- Generator --- */
.off-gen { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.off-form { min-width: 0; }
.off-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--c-navy-800); color: #fff; font-size: 12px; font-weight: 700; margin-right: 2px; }
.off-addr-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--c-text-2); margin-bottom: 10px; }
.off-addr-label svg { width: 15px; height: 15px; color: var(--c-text-3); }
.off-stepper { display: flex; align-items: stretch; height: 40px; border: 1px solid var(--c-border-2); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow-xs); max-width: 180px; }
.off-stepper button { width: 42px; display: grid; place-items: center; color: var(--c-text-2); background: var(--c-surface-2); }
.off-stepper button:hover { background: var(--c-surface-3); color: var(--c-text); }
.off-stepper button svg { width: 15px; height: 15px; }
.off-stepper .input { border: 0; border-radius: 0; box-shadow: none; text-align: center; font-weight: 700; font-size: 15px; height: 100%; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); }

.off-svcs { display: flex; flex-direction: column; }
.off-svc { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px; gap: 12px; align-items: center; padding: 9px 20px; border-bottom: 1px solid var(--c-border); transition: background var(--t-fast); }
.off-svc:last-child { border-bottom: 0; }
.off-svc:hover { background: var(--c-hover); }
.off-svc.is-on { background: var(--c-primary-50); }
.off-svc__check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.off-svc__check input { position: absolute; opacity: 0; pointer-events: none; }
.off-svc__check .check-tile__box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--c-border-3); display: grid; place-items: center; flex-shrink: 0; transition: all var(--t-fast); }
.off-svc__check .check-tile__box svg { width: 12px; height: 12px; color: #fff; opacity: 0; stroke-width: 3.2; }
.off-svc__check input:checked + .check-tile__box { background: var(--c-primary); border-color: var(--c-primary); }
.off-svc__check input:checked + .check-tile__box svg { opacity: 1; }
.off-svc__check input:focus-visible + .check-tile__box { box-shadow: var(--ring); }
.off-svc__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--c-surface-3); color: var(--c-text-2); flex-shrink: 0; }
.off-svc.is-on .off-svc__icon { background: #fff; color: var(--c-primary); }
.off-svc__icon svg { width: 15px; height: 15px; }
.off-svc__label { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; min-width: 0; }
.off-svc__label small { font-size: 11.5px; font-weight: 500; color: var(--c-text-3); }
.off-svc__qty, .off-svc__price { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-3); }
.off-svc__qty .input, .off-svc__price .input { text-align: right; }
.off-svc:not(.is-on) .off-svc__qty, .off-svc:not(.is-on) .off-svc__price { opacity: .45; }

/* Zusammenfassung */
.off-summary { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.off-summary__card { overflow: hidden; box-shadow: var(--shadow-md); }
.off-sum__head { padding: 18px 20px 16px; background: linear-gradient(135deg, var(--c-navy-800), var(--c-navy-950)); color: #fff; }
.off-sum__eyebrow { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #9db8ff; text-transform: uppercase; letter-spacing: .07em; }
.off-sum__eyebrow svg { width: 13px; height: 13px; }
.off-sum__customer { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.off-sum__customer .text-muted { color: #8391a9 !important; font-weight: 500; font-size: 15px; }
.off-sum__meta { font-size: 12.5px; color: #aeb8ca; margin-top: 2px; line-height: 1.5; }
.off-sum__lines { padding: 14px 20px 6px; display: flex; flex-direction: column; gap: 9px; max-height: 320px; overflow-y: auto; }
.off-sum__line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.off-sum__line span { display: flex; flex-direction: column; color: var(--c-text-2); min-width: 0; }
.off-sum__line small { font-size: 11.5px; color: var(--c-text-3); }
.off-sum__line strong { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.off-sum__line--discount strong { color: var(--c-green-text); }
.off-sum__totals { margin: 10px 20px 0; padding-top: 12px; border-top: 1px solid var(--c-border); display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.off-sum__totals > div { display: flex; justify-content: space-between; color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.off-sum__totals strong { color: var(--c-text); font-weight: 600; }
.off-sum__grand { margin-top: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-primary-50); align-items: baseline; }
.off-sum__grand span { color: var(--c-primary-700) !important; font-weight: 650; }
.off-sum__grand strong { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--c-primary-700) !important; }
.off-sum__valid { display: flex; align-items: center; gap: 6px; padding: 10px 20px 0; font-size: 12px; color: var(--c-text-3); }
.off-sum__valid svg { width: 13px; height: 13px; }
.off-summary__actions { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 18px; }
.off-summary__hint { display: flex; gap: 8px; font-size: 12px; color: var(--c-text-3); padding: 0 6px; }
.off-summary__hint svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--c-green); }

/* --- Detail / Vorschau --- */
.off-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.off-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.off-stage { background: #e9edf2; border-radius: var(--r-lg); padding: 24px; display: flex; justify-content: center; min-width: 0; overflow-x: auto; }
.off-stage .paper { min-height: 0; }
.off-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
.off-side__label { font-size: 12px; font-weight: 650; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .06em; }
.off-status-btn { display: inline-flex; align-items: center; gap: 3px; border-radius: var(--r-full); padding: 2px; }
.off-status-btn > svg { width: 14px; height: 14px; color: var(--c-text-3); }
.off-status-btn:hover .badge { box-shadow: inset 0 0 0 1px currentColor; }
.off-total { display: flex; flex-direction: column; margin-top: 14px; }
.off-total span { font-size: 12.5px; color: var(--c-text-3); font-weight: 550; }
.off-total strong { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
.off-total small { font-size: 12.5px; color: var(--c-text-3); }
.off-valid { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 10px; border-radius: var(--r-full); background: var(--c-surface-3); font-size: 12px; font-weight: 550; color: var(--c-text-2); }
.off-valid svg { width: 13px; height: 13px; }
.off-valid.is-expired { background: var(--c-red-bg); color: var(--c-red-text); }
.off-actions { display: flex; flex-direction: column; gap: 8px; padding: 0 20px 20px; }
.off-actions__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.off-actions__grid .btn { padding: 0 8px; }
.off-fu-banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--c-amber-bg); border: 1px solid color-mix(in srgb, var(--c-amber) 30%, transparent); color: var(--c-amber-text); }
.off-fu-banner > svg { width: 20px; height: 20px; flex-shrink: 0; }
.off-fu-banner strong { display: block; color: var(--c-text); font-size: 13.5px; }
.off-fu-banner span { font-size: 12.5px; }
.off-fu-banner .btn--secondary { background: rgba(255, 255, 255, .9); }

.off-hist { display: flex; flex-direction: column; }
.off-hist__item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.off-hist__item:last-child { padding-bottom: 0; }
.off-hist__item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1.5px; background: var(--c-border); }
.off-hist__item:last-child::before { display: none; }
.off-hist__dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-3); color: var(--c-text-4); flex-shrink: 0; }
.off-hist__dot svg { width: 13px; height: 13px; }
.off-hist__item.is-done .off-hist__dot { background: var(--c-primary-50); color: var(--c-primary); }
.off-hist__item.is-green.is-done .off-hist__dot { background: var(--c-green-bg); color: var(--c-green); }
.off-hist__item.is-red.is-done .off-hist__dot { background: var(--c-red-bg); color: var(--c-red); }
.off-hist__body { display: flex; flex-direction: column; padding-top: 3px; min-width: 0; }
.off-hist__label { font-size: 13px; font-weight: 600; }
.off-hist__item:not(.is-done) .off-hist__label { color: var(--c-text-3); font-weight: 500; }
.off-hist__date { font-size: 12px; color: var(--c-text-3); }
.off-hist__text { font-size: 12px; color: var(--c-red-text); margin-top: 2px; }
.off-cust { color: inherit; }
.off-cust:hover .person__name { color: var(--c-primary); }
.off-break { word-break: break-all; }

/* --- Responsive --- */
@media (max-width: 1360px) {
  .off-gen { grid-template-columns: minmax(0, 1fr) 340px; }
  .off-detail { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1180px) {
  .off-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .off-gen, .off-detail { grid-template-columns: minmax(0, 1fr); }
  .off-summary, .off-side { position: static; }
  .off-detail .off-side { order: -1; }
}
@media (max-width: 680px) {
  .off-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .off-kpis .kpi__value { font-size: 21px; }
  .off-svc { grid-template-columns: minmax(0, 1fr) 1fr; padding: 10px 16px; }
  .off-svc__check { grid-column: 1 / -1; }
  .off-stage { padding: 10px; margin: 0 -16px; border-radius: 0; }
  .off-fu__actions { width: 100%; }
  .off-fu__actions .btn { flex: 1 1 calc(50% - 6px); }
}
