/* ==========================================================================
   Medis Stok Takibi — hero: tek sahne "Bir lotun yolculuğu" (Giriş → Yerleşim → Konsinye → Kullanım → Miat → Sorgu)
   Yalnız medis-stok-takibi.html yükler. İşaretleme: medis-stok-takibi.html içinde.
   Kart sitenin .mock / .mock-bar / .mock-foot dilini kullanır; renkler style.css token'larına bağlı.
   Küçük yazılar --medis-fs (12 px; fareyle eğim açık cihazlarda 12,5 px). Sahne üstündeki etiketler 13 px.
   ==========================================================================*/

/* ---- hero yerleşimi (WMS / EMPİ / B2B / BI ile aynı): metin keskinliği için flat, dar ekranda scale yerine kartın düzeni ---- */
.lp-hero .medis-vis .hs-3d { transform-style: flat; }
.lp-hero .medis-vis .fl.chip small { font-size: 13px; }
.lp-hero .medis-vis .fl.chip > div { transition: transform .18s ease; }
.lp-hero .medis-vis .fl.chip.medis-swap > div { transform: translateY(-2px); }   /* metin hiçbir anda boş/gizli olmaz */
@media (max-width: 960px) {
  .lp-hero .medis-vis { height: auto; }
  .lp-hero .medis-vis .hs-3d { scale: none; width: min(540px, 100%); margin-left: auto; margin-right: auto; }
}

/* ---- kart ---- */
.medis-card { --medis-fs: 12.5px; font-size: 12.5px; line-height: 1.4; }   /* dokunmatikte de 12,5 px: dar kartta sol uç 11 px altına inmesin (ölçüldü) */
.medis-in { container-type: inline-size; }
.medis-bar { padding: 11px 14px 11px 16px; }
.medis-bar b { white-space: nowrap; }
.medis-ex { color: var(--muted); font-size: var(--medis-fs); white-space: nowrap; }

/* sayaçlar */
.medis-kpis { display: flex; justify-content: flex-end; gap: 6px; margin: 0; padding: 8px 12px 0; background: var(--blue-50); }
.medis-kpis div { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.medis-kpis div::after { content: ""; position: absolute; inset: -3px; border-radius: 999px; border: 2px solid var(--blue-500); opacity: var(--on, 0); }
.medis-kpis dt { font-size: var(--medis-fs); line-height: 16px; font-weight: 500; color: var(--muted); }
.medis-kpis dd { margin: 0; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.medis-kpis .medis-d { display: inline-block; width: .62em; text-align: center; }

/* sahne */
.medis-scene { position: relative; background: linear-gradient(180deg, var(--blue-50), #fff 78%); }
.medis-stage { position: relative; }
.medis-scene-svg { display: block; width: 100%; height: auto; }

/* müşteri etiketi (onayda işaret açılır) */
.medis-tag { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 7px; background: rgba(255, 255, 255, .95); border: 1px solid var(--blue-200); box-shadow: 0 6px 12px -8px rgba(var(--navy-950-rgb), .45); font-size: 13px; line-height: 1; font-weight: 600; color: var(--navy-800); white-space: nowrap; }
.medis-tag .medis-ok { display: block; width: 0; height: 14px; border-radius: 50%; text-decoration: none; overflow: hidden; margin-right: -4px;
  background: var(--navy-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.medis-tag::after { content: ""; position: absolute; inset: -3px; border-radius: 9px; border: 2px solid var(--blue-500); opacity: var(--on, 0); }

/* adımlar + durum */
.medis-foot { display: block; }   /* site: .mock-foot flex; burada adımlar üstte, durum altta */
.medis-steps { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.medis-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.medis-steps li + li::before, .medis-steps li + li::after { content: ""; position: absolute; top: 9px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; border-radius: 2px; background: var(--line); }
.medis-steps li + li::after { background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(var(--c, 0)); }
.medis-nd, .medis-nd svg { display: block; width: 20px; height: 20px; overflow: visible; }
.medis-nd .medis-tr { fill: #fff; stroke: var(--line); stroke-width: 2; }
.medis-nd .medis-pr { fill: none; stroke: url(#medis-gStep); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 47.12; stroke-dashoffset: 47.12; transform: rotate(-90deg); transform-origin: 10px 10px; }
.medis-nd .medis-fi { fill: var(--navy-700); opacity: 0; transform-origin: 10px 10px; }
.medis-nd .medis-ck { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; }
.medis-lb { font-size: var(--medis-fs); line-height: 15px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.medis-status { display: flex; align-items: center; gap: 9px; margin: 9px 4px 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.medis-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 3px rgba(var(--blue-500-rgb), .16); }
.medis-st { position: relative; flex: 1; min-width: 0; height: 18px; }
.medis-st > span { position: absolute; inset: 0 0 auto 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* miat vurgusu: sayfanın uyarı rozetiyle aynı ton */
.medis-card { --medis-warn: #9a4a00; --medis-warn-bg: #fff3e2; }
.medis-tag.medis-l { transform: translate(0, -100%); }
.medis-tag.medis-r { transform: translate(-100%, -100%); }
.medis-tag.medis-fat { transform: translate(-50%, -100%); opacity: 0; }

/* lot kartı: sağ üstte (ana deponun ve hastanenin üstü) */
.medis-lot { position: absolute; left: 62%; right: 1%; top: 2%; padding: 6px 7px 6px; border-radius: 12px; background: rgba(255, 255, 255, .97); border: 1px solid var(--blue-200); box-shadow: 0 14px 28px -16px rgba(var(--navy-950-rgb), .45); font-size: var(--medis-fs); line-height: 16px; }
.medis-lh { display: grid; margin: 0 1px 4px; }
.medis-lh > div { grid-area: 1 / 1; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; white-space: nowrap; }
.medis-lh b { font-weight: 600; color: var(--ink); }
.medis-lh span { color: var(--muted); }
.medis-lh1 { align-items: center !important; justify-content: flex-start !important; padding: 0 6px; border-radius: 7px; border: 1px solid var(--blue-300); background: #fff; opacity: 0; }
.medis-lh1 b { min-width: 60px; letter-spacing: .02em; color: var(--navy-800) !important; }
.medis-lh1 span { margin-left: auto; color: var(--blue-600) !important; font-weight: 600; }
.medis-sico { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--blue-500); stroke-width: 1.6; stroke-linecap: round; }
.medis-lot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.medis-lot li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 30px; gap: 5px; align-items: center; padding: 0 5px; border-radius: 6px; background: var(--blue-50); white-space: nowrap; opacity: 0; }
.medis-lot li::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px var(--blue-500); opacity: var(--on, 0); }
.medis-lot li span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.medis-lot li i { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.medis-lot li b { text-align: right; font-weight: 600; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.medis-lh0 .medis-skt { padding: 0 6px; border-radius: 6px; background: var(--blue-50); color: var(--navy-800) !important; font-weight: 600; opacity: 0; }
.medis-lh0 .medis-skt.medis-warn { background: var(--medis-warn-bg); color: var(--medis-warn) !important; }

/* orta genişlik: durum satırı iki satıra kadar */
@container (max-width: 499px) {
  .medis-scene { display: grid; }
  .medis-stage { grid-area: 1 / 1; }
  .medis-lot { position: relative; grid-area: 2 / 1; left: auto; right: auto; top: auto; margin: 0 10px 10px; }
  .medis-status { align-items: flex-start; min-height: 36px; }
  .medis-dot { margin-top: 5px; }
  .medis-st { height: 36px; }
  .medis-st > span { white-space: normal; }
}
/* dar kart: lot kartı sahnenin altında; etiketler gizli */
@container (max-width: 440px) {
  .medis-bar { padding: 10px 12px; }
  .medis-ex { display: none; }
  .medis-kpis { justify-content: flex-start; gap: 4px; padding: 7px 10px 0; }
  .medis-kpis div { flex: 1 1 auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 8px; border-radius: 10px; }
  .medis-kpis div::after { border-radius: 12px; }
  .medis-tag { display: none; }
  .medis-foot { padding: 9px 6px 10px; }
  .medis-status { font-size: 12.5px; line-height: 17px; }
  .medis-st { height: 34px; }
  /* adım etiketleri iki sıra (komşular çakışmasın); son etiket sağa yaslı */
  .medis-steps li:nth-child(even) .medis-lb { margin-top: 17px; }
  .medis-steps li:last-child .medis-lb { align-self: flex-end; }
}
@container (max-width: 300px) {
  .medis-kpis div { padding: 3px 5px; }
}
