/* ==========================================================================
   MoveFlow – Betrieb & Lager
   ========================================================================== */
.ops-tabs { margin-bottom: 20px; }
.ops-body { min-width: 0; }
.ops-card .card__title svg { width: 16px; height: 16px; color: var(--c-text-3); }

/* Farbtöne für Icons */
.ops-tone--red { background: var(--c-red-bg) !important; color: var(--c-red) !important; }
.ops-tone--amber { background: var(--c-amber-bg) !important; color: var(--c-amber) !important; }
.ops-tone--orange { background: var(--c-orange-bg) !important; color: var(--c-orange) !important; }
.ops-tone--blue { background: var(--c-blue-bg) !important; color: var(--c-blue) !important; }
.ops-tone--green { background: var(--c-green-bg) !important; color: var(--c-green) !important; }
.ops-tone--violet { background: var(--c-violet-bg) !important; color: var(--c-violet) !important; }
.ops-tone--teal { background: var(--c-teal-bg) !important; color: var(--c-teal) !important; }
.ops-tone--gray { background: var(--c-gray-bg) !important; color: var(--c-gray-text) !important; }

/* Übersicht */
.ops-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ops-tile { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 16px 16px; text-align: left; font: inherit; color: inherit; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); cursor: pointer; transition: box-shadow var(--t), border-color var(--t), transform var(--t); min-width: 0; }
.ops-tile:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-2); transform: translateY(-1px); }
.ops-tile__icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; }
.ops-tile__icon svg { width: 19px; height: 19px; }
.ops-tile__body { display: flex; flex-direction: column; min-width: 0; gap: 1px; padding-right: 14px; }
.ops-tile__label { font-size: 12.5px; color: var(--c-text-3); font-weight: 600; }
.ops-tile__value { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ops-tile__sub { font-size: 12px; color: var(--c-text-3); line-height: 1.35; }
.ops-tile__alert { display: block; margin-top: 7px; }
.ops-tile__chev { position: absolute; top: 16px; right: 12px; width: 15px; height: 15px; color: var(--c-text-4); transition: transform var(--t), color var(--t); }
.ops-tile:hover .ops-tile__chev { color: var(--c-primary); transform: translateX(2px); }
.ops-overview { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ops-todo { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; }
.ops-todo__chev { width: 15px; height: 15px; color: var(--c-text-4); flex-shrink: 0; margin-left: auto; }
.list__item:hover .ops-todo__chev { color: var(--c-primary); }

/* Kennzahlen */
.ops-stat .stat-box__label svg { width: 14px; height: 14px; }
.ops-stat--red { background: var(--c-red-bg); border-color: color-mix(in srgb, var(--c-red) 25%, var(--c-border)); }
.ops-stat--red .stat-box__value { color: var(--c-red-text); }
.ops-stat--amber { background: var(--c-amber-bg); border-color: color-mix(in srgb, var(--c-amber) 30%, var(--c-border)); }
.ops-stat--amber .stat-box__value { color: var(--c-amber-text); }
.ops-stat--green .stat-box__value { color: var(--c-green-text); }
.ops-stat .stat-box__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tabellen */
.ops-table td { vertical-align: middle; }
.ops-table tr.is-urgent td:first-child { box-shadow: inset 3px 0 0 var(--c-red); }
.ops-table tr.is-urgent td { background: color-mix(in srgb, var(--c-red-bg) 45%, transparent); }
.ops-table .cell-sub a { color: var(--c-text-2); font-weight: 550; }
.ops-table .cell-sub a:hover { color: var(--c-primary); }
.ops-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.ops-status { display: inline-flex; align-items: center; gap: 3px; padding: 1px; border: 0; background: transparent; border-radius: var(--r-full); cursor: pointer; }
.ops-status > svg { width: 13px; height: 13px; color: var(--c-text-3); }
.ops-status:hover .badge { box-shadow: inset 0 0 0 1px currentColor; }
.ops-deadline { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--c-text-2); white-space: nowrap; }
.ops-deadline svg { width: 14px; height: 14px; color: var(--c-text-3); }
.ops-deadline.is-soon { color: var(--c-amber-text); font-weight: 650; }
.ops-deadline.is-soon svg { color: var(--c-amber); }
.ops-deadline.is-late { color: var(--c-red-text); font-weight: 650; }
.ops-deadline.is-late svg { color: var(--c-red); }
.ops-clamp { display: block; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-tabs .tab { padding-left: 10px; padding-right: 10px; }
.cal-ev.is-stacked { box-shadow: 0 0 0 1.5px var(--c-surface), var(--shadow-sm); }
.cal-ev.is-stacked:hover { z-index: 30 !important; }
.ops-readonly { 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); font-size: 13.5px; }

/* Material */
.ops-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.ops-item { display: flex; align-items: center; gap: 9px; }
.ops-item > svg { width: 16px; height: 16px; color: var(--c-text-3); flex-shrink: 0; }
.ops-level { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.ops-level .progress { height: 5px; }
.ops-qty { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; }
.ops-qty.is-in { color: var(--c-green-text); }
.ops-qty.is-out { color: var(--c-text-2); }

/* Einlagerung */
.ops-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ops-box { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 14px; text-align: left; font: inherit; color: inherit; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); cursor: pointer; transition: box-shadow var(--t), border-color var(--t); overflow: hidden; }
.ops-box::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c-green); }
.ops-box--belegt::before { background: var(--c-blue); }
.ops-box--reserviert::before { background: var(--c-amber); }
.ops-box:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.ops-box__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ops-box__name { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; font-family: var(--font-mono); }
.ops-box__size { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c-text-3); }
.ops-box__size svg { width: 14px; height: 14px; }
.ops-box__customer { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.ops-box__customer span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-box__dates { font-size: 12px; color: var(--c-text-3); }
.ops-box__free { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--c-primary); }
.ops-box__free svg { width: 14px; height: 14px; }
.ops-box__note { font-size: 12px; color: var(--c-text-2); background: var(--c-surface-2); border-radius: var(--r-sm); padding: 6px 8px; margin-top: auto; }
.ops-box--frei { background: var(--c-surface-2); border-style: dashed; }
.ops-box--add { align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--c-border-2); background: transparent; color: var(--c-text-3); font-weight: 600; box-shadow: none; }
.ops-box--add::before { display: none; }
.ops-box--add svg { width: 22px; height: 22px; }
.ops-box--add:hover { color: var(--c-primary); border-color: var(--c-primary-200); background: var(--c-primary-50); }

/* Entsorgung */
.ops-missing { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ops-missing .chip { background: var(--c-surface); }
.ops-missing .chip svg { width: 13px; height: 13px; }

/* Subunternehmer */
.ops-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ops-sub { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.ops-sub.is-paused { opacity: .78; }
.ops-sub__head { display: flex; align-items: center; gap: 12px; }
.ops-sub__id { flex: 1; min-width: 0; }
.ops-sub__name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-sub__meta { font-size: 12.5px; color: var(--c-text-3); }
.ops-sub__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-sub__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ops-sub__stats > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--c-surface-2); border: 1px solid var(--c-border); min-width: 0; }
.ops-sub__stats span { font-size: 11px; color: var(--c-text-3); font-weight: 550; }
.ops-sub__stats strong { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-sub__last { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--c-text-2); }
.ops-sub__last svg { width: 14px; height: 14px; color: var(--c-text-3); flex-shrink: 0; margin-top: 2px; }
.ops-sub__actions { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.ops-sub__actions .btn { flex: 1; padding: 0 8px; }

/* Bewertungen */
.ops-stars { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; letter-spacing: 0; }
.ops-stars span { color: var(--c-border-3); }
.ops-stars span.is-on { color: #f5a300; }
.ops-rating .stat-box__label svg { width: 14px; height: 14px; }
.ops-rating .stat-box__value { display: flex; align-items: center; gap: 8px; }
.ops-dist { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.ops-dist__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 24px; align-items: center; gap: 6px; font-size: 11px; color: var(--c-text-3); }
.ops-dist__track { height: 5px; border-radius: var(--r-full); background: var(--c-surface-3); overflow: hidden; }
.ops-dist__track span { display: block; height: 100%; background: #f5a300; border-radius: var(--r-full); }
.ops-dist__row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.ops-asked { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--c-green-text); font-weight: 550; }
.ops-asked svg { width: 13px; height: 13px; }

/* Mehrere Lager (Tarif Business) */
.ops-wh { overflow-x: auto; }
.ops-whcap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ops-whcap__item { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--c-border); background: var(--c-surface); }
.ops-whcap__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ops-whcap__top .fw-600 { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ops-whcap__top svg { width: 14px; height: 14px; color: var(--c-text-3); flex-shrink: 0; }
.ops-box__wh { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--c-text-3); }
.ops-box__wh svg { width: 12px; height: 12px; }

@media (max-width: 1280px) {
  .ops-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-overview, .ops-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .ops-tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ops-tile { padding: 14px; }
  .ops-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ops-box { min-height: 130px; padding: 12px; }
  .ops-subs { grid-template-columns: minmax(0, 1fr); }
  .ops-sub__actions { flex-wrap: wrap; }
}
