/* BioStock — pamja.
 *
 * Rregulli i vetëm që i mban të gjitha të tjerat:
 * stafi është 50+ vjeç dhe nuk ka pse t'i dijë zakonet e aplikacioneve.
 * Prandaj: shënjestra të mëdha, tekst i madh, asnjë lëvizje e fshehtë
 * (pa rrëshqitje, pa shtypje të gjatë, pa menu të varura), një punë për ekran,
 * dhe çdo veprim thotë me fjalë çka bëri.
 *
 * Gjuha vizuale: sfond gati i bardhë me nuancë të gjelbër, karta të bardha me
 * hije shumë të butë dhe kënde të rrumbullakëta, dhe një jeshile e thellë si i
 * vetmi theks. Ngjyra e fortë përdoret vetëm aty ku thotë diçka — statusi i një
 * reagjenti ose veprimi kryesor i ekranit.
 */

/* ── Ngjyrat ────────────────────────────────────────────────────────────── */
:root {
  --sfond:        oklch(0.968 0.006 155);
  --siperfaqe:    oklch(0.945 0.008 155);
  --ngritur:      oklch(1 0 0);
  --kufi:         oklch(0.915 0.007 155);
  --kufi-fort:    oklch(0.845 0.010 155);
  --boje:         oklch(0.225 0.018 160);
  --heshtur:      oklch(0.525 0.015 160);
  --zbehte:       oklch(0.695 0.014 158);

  --theks:        oklch(0.325 0.055 158);
  --theks-fort:   oklch(0.255 0.048 158);
  --theks-zbehte: oklch(0.945 0.018 158);

  --kuq:          oklch(0.545 0.155 25);
  --kuq-sfond:    oklch(0.945 0.035 22);
  --kuq-boje:     oklch(0.455 0.150 25);

  --verdhe:       oklch(0.735 0.135 78);
  --verdhe-sfond: oklch(0.955 0.055 85);
  --verdhe-boje:  oklch(0.505 0.110 68);

  --gjelber:      oklch(0.505 0.100 158);
  --gjelber-sfond:oklch(0.948 0.032 158);
  --gjelber-boje: oklch(0.405 0.090 158);

  --hije:         0 1px 2px rgba(18,40,30,.04), 0 6px 18px rgba(18,40,30,.055);
  --hije-larte:   0 4px 12px rgba(18,40,30,.10), 0 20px 48px rgba(18,40,30,.16);

  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', ui-monospace, Consolas, monospace;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --r: 16px;
  --r-vogel: 11px;
  --sipër: env(safe-area-inset-top, 0px);
  --poshtë: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="drite"]) {
    --sfond:        oklch(0.185 0.012 160);
    --siperfaqe:    oklch(0.228 0.013 160);
    --ngritur:      oklch(0.258 0.014 160);
    --kufi:         oklch(0.318 0.014 160);
    --kufi-fort:    oklch(0.415 0.016 160);
    --boje:         oklch(0.955 0.008 158);
    --heshtur:      oklch(0.735 0.014 158);
    --zbehte:       oklch(0.585 0.014 158);

    --theks:        oklch(0.755 0.105 158);
    --theks-fort:   oklch(0.845 0.095 158);
    --theks-zbehte: oklch(0.305 0.045 158);

    --kuq:          oklch(0.665 0.165 25);
    --kuq-sfond:    oklch(0.315 0.070 25);
    --kuq-boje:     oklch(0.845 0.105 25);

    --verdhe:       oklch(0.775 0.140 80);
    --verdhe-sfond: oklch(0.325 0.058 75);
    --verdhe-boje:  oklch(0.870 0.100 82);

    --gjelber:      oklch(0.680 0.125 158);
    --gjelber-sfond:oklch(0.298 0.050 158);
    --gjelber-boje: oklch(0.855 0.105 158);

    --hije:         0 1px 2px rgba(0,0,0,.30), 0 6px 18px rgba(0,0,0,.26);
    --hije-larte:   0 4px 14px rgba(0,0,0,.42), 0 20px 48px rgba(0,0,0,.40);
  }
}

/* ── Bazat ──────────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Asnjë zoom në telefon.
 *
 * Dy prekje të shpejta mbi një buton janë gabim i zakonshëm kur gishti nxiton,
 * dhe shfletuesi e merr si «zmadho». Në një aplikacion me shënjestra të mëdha
 * zmadhimi nuk sjell asgjë — vetëm e humb vendin ku ishe.
 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}
body { touch-action: pan-x pan-y; }
button, a, input, select, textarea, label { touch-action: manipulation; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  color: var(--boje);
  background: var(--sfond);
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

:focus-visible { outline: 3px solid var(--theks); outline-offset: 2px; border-radius: 6px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.fsheh { display: none !important; }
.vetem-lexues {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Struktura ──────────────────────────────────────────────────────────── */
#app { min-height: 100dvh; display: flex; flex-direction: column; }

.krye {
  position: sticky; top: 0; z-index: 40;
  padding: calc(var(--sipër) + 10px) 16px 10px;
  background: color-mix(in oklab, var(--sfond) 90%, transparent);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 12px; min-height: 60px;
}
.krye-titull { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.krye-nen { font-size: 13px; color: var(--heshtur); font-weight: 450; }

/* Titulli i ekranit rri në mes në telefon, siç e pret dora që mban telefonin. */
.krye.mesi .krye-titull { text-align: center; }

.krye-alarm {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; border-radius: 12px; color: var(--boje);
}
.krye-alarm svg { width: 23px; height: 23px; }
.krye-alarm.ka::after {
  content: ''; position: absolute; top: 8px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--kuq); box-shadow: 0 0 0 2.5px var(--sfond);
}

/* ── Logoja ─────────────────────────────────────────────────────────────── */
.logo {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  text-decoration: none; color: var(--boje);
  padding: 4px 8px 4px 4px; margin-left: -4px; border-radius: var(--r-vogel);
}
.logo:hover { background: var(--siperfaqe); }
.logo-emri {
  font-size: 17.5px; font-weight: 700; letter-spacing: -0.022em; white-space: nowrap;
}

.marka { font-size: 13px; font-weight: 600; letter-spacing: .17em; color: var(--heshtur); }

.trupi { flex: 1; padding: 8px 12px calc(28px + var(--poshtë)); }
.trupi.gjere { max-width: 1400px; width: 100%; margin: 0 auto; padding: 22px 24px 60px; }

.mbrapa {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 46px; padding: 0 14px 0 8px; margin-left: -8px;
  border-radius: var(--r-vogel); font-size: 16px; font-weight: 550; color: var(--theks);
}
.mbrapa:active { background: var(--theks-zbehte); }
.mbrapa svg { width: 22px; height: 22px; }

/* ── Titujt ─────────────────────────────────────────────────────────────── */
.data-madhe { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; line-height: 1.16;
  margin-top: 4px; }
.udhezim { margin-top: 4px; font-size: 15px; color: var(--heshtur); }
.seksion {
  font-size: 13px; font-weight: 650; letter-spacing: .02em;
  color: var(--heshtur); margin: 26px 2px 10px;
}
.seksion:first-child { margin-top: 4px; }

/* ── Kartat e aparateve — ekrani i parë ─────────────────────────────────── */
.aparate { display: flex; flex-direction: column; gap: 14px; }

.aparat {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 162px; padding: 16px 16px 16px 14px;
  background: var(--ngritur); border: 1px solid transparent;
  border-radius: 18px; box-shadow: var(--hije);
  text-align: left; transition: transform .06s;
}
.aparat:active { transform: scale(.985); }

/* Fotografia rri drejtpërdrejt mbi kartë — pa kuti gri, si te dizajni. */
.aparat-foto {
  flex: none; width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; overflow: hidden;
}
.aparat-foto img { width: 100%; height: 100%; object-fit: contain; }
.aparat-foto svg { width: 44px; height: 44px; color: var(--zbehte); }

.aparat-mes { flex: 1; min-width: 0; }
.aparat-emri { font-size: 18px; font-weight: 680; letter-spacing: -0.015em; line-height: 1.22;
  padding-right: 20px; }
.aparat-nen { margin-top: 4px; font-size: 14px; color: var(--heshtur);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ditët dhe unaza rrinë në një rresht: fjala majtas, forma djathtas. */
.aparat-dite { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-top: 14px; }
.aparat-shigjete { flex: none; color: var(--zbehte); font-size: 22px; line-height: 1; }
/* Shigjeta e kartës së aparatit rri në qoshe, që numri i ditëve të marrë vendin e vet. */
.aparat-kend { position: absolute; top: 15px; right: 15px;
  color: var(--zbehte); font-size: 21px; line-height: 1; }

/* Etiketa mbi numër: fjala e parë, numri i dytë — ashtu si lexohet. */
.mbi-numer { font-size: 13.5px; color: var(--heshtur); white-space: nowrap; }
/* Numri mbetet i zi: ngjyrën e mban pilla dhe unaza, që të mos flasin të tria njëherësh. */
.numer { font-size: 26px; font-weight: 680; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 2px; }
.numer.kritik { color: var(--kuq); }
.numer.ulet   { color: var(--verdhe-boje); }
.njesi { margin-top: 4px; font-size: 12px; color: var(--heshtur); }

/* ── Unaza e ditëve — sa mbetet nga kufiri, pa lexuar asnjë numër ───────── */
.unaz { flex: none; width: 50px; height: 50px; display: block; }
.unaz circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.unaz .gjurma { stroke: var(--siperfaqe); }
.unaz .harku  { stroke: var(--gjelber); transform: rotate(-90deg); transform-origin: 50% 50%; }
.unaz[data-status="ulet"]   .harku { stroke: var(--verdhe); }
.unaz[data-status="kritik"] .harku { stroke: var(--kuq); }

/* ── Shenjat ────────────────────────────────────────────────────────────── */
.shenje {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 10px;
  font-size: 13.5px; font-weight: 620; letter-spacing: 0; white-space: nowrap;
}
.shenje.kritik { background: var(--kuq-sfond);     color: var(--kuq-boje); }
.shenje.ulet   { background: var(--verdhe-sfond);  color: var(--verdhe-boje); }
.shenje.ok     { background: var(--gjelber-sfond); color: var(--gjelber-boje); }
.shenje.info   { background: var(--theks-zbehte);  color: var(--theks); }
.shenje.qete   { background: var(--siperfaqe);     color: var(--heshtur); }

/* ── Rreshti i statistikave — katër numra që përmbledhin ekranin ────────── */
.stat-rresht {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--ngritur); border-radius: var(--r);
  box-shadow: var(--hije); padding: 14px 6px;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0 4px; min-width: 0;
}
.stat + .stat { border-left: 1px solid var(--kufi); }
.stat svg { width: 23px; height: 23px; color: var(--gjelber); }
.stat[data-ngjyre="ulet"] svg   { color: var(--verdhe); }
.stat[data-ngjyre="qete"] svg   { color: var(--heshtur); }
.stat[data-ngjyre="kritik"] svg { color: var(--kuq); }
.stat b { font-size: 23px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span {
  font-size: 11.5px; color: var(--heshtur); text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* ── Fotografia e aparatit, sa gjerësia e ekranit ───────────────────────── */
.aparat-hero {
  background: var(--ngritur); border-radius: var(--r); box-shadow: var(--hije);
  padding: 14px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
}
.aparat-hero img { max-width: 100%; max-height: 168px; object-fit: contain; }

/* ── Dy fjalët e para: statusi dhe ditët ────────────────────────────────── */
.permbledhje-dyshe {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--siperfaqe); border-radius: var(--r); overflow: hidden;
}
.permbledhje-dyshe > div { padding: 14px 16px; }
.permbledhje-dyshe > div + div { border-left: 1px solid var(--kufi); }

/* ── Skedat ─────────────────────────────────────────────────────────────── */
.skeda-rresht {
  display: flex; gap: 4px; margin: 18px 0 14px;
  border-bottom: 1px solid var(--kufi);
}
.skeda-rresht button {
  flex: 1; min-height: 48px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 17px; font-weight: 600; color: var(--heshtur);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.skeda-rresht button.aktiv { color: var(--theks); border-bottom-color: var(--theks); font-weight: 700; }
.skeda-numer {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--verdhe); color: #fff;
  font-size: 13px; font-weight: 700;
}

/* ── Kërkimi ────────────────────────────────────────────────────────────── */
.kerkimi { position: relative; margin-bottom: 12px; }
.kerkimi svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--zbehte); pointer-events: none;
}
.kerkimi input {
  width: 100%; min-height: 56px; padding: 0 16px 0 46px;
  background: var(--ngritur); border: 1px solid var(--kufi);
  border-radius: var(--r-vogel); font-size: 16px;
}
.kerkimi input:focus { outline: none; border-color: var(--theks); }
.kerkimi input::placeholder { color: var(--zbehte); }

/* ── Rreshtat e listës ──────────────────────────────────────────────────── */
.lista { display: flex; flex-direction: column; gap: 10px; }

.rresht {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  width: 100%; min-height: 100px; padding: 14px 14px 14px 12px;
  background: var(--ngritur); border: 1px solid transparent;
  border-radius: 14px; box-shadow: var(--hije); text-align: left;
}
button.rresht:active { transform: scale(.99); }

/* Shishja e reagjentit: kapaku merr ngjyrën e statusit, trupi mbetet i qetë.
   Forma njihet me një shikim, para se të lexohet emri. */
.viale {
  flex: none; width: 54px; height: 68px; border-radius: 12px;
  background: var(--siperfaqe);
  display: flex; align-items: center; justify-content: center;
}
.viale-shishe { width: 30px; height: 41px; display: block; }
.viale-foto { max-width: 38px; max-height: 56px; object-fit: contain; display: block; }

.rresht-mes { flex: 1; min-width: 0; }
.rresht-emri { font-size: 17.5px; font-weight: 680; line-height: 1.25; letter-spacing: -0.01em; }
.rresht-nen { margin-top: 5px; font-size: 13.5px; color: var(--heshtur);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rresht-fund { flex: none; text-align: right; display: flex; flex-direction: column;
  align-items: flex-end; gap: 8px; }
.rresht-sasia { white-space: nowrap; font-size: 14px; color: var(--heshtur); }
.rresht-sasia b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rresht-shigjete { flex: none; color: var(--zbehte); font-size: 20px; line-height: 1; margin-left: -4px; }

.ndaresi {
  display: flex; align-items: center; gap: 12px; margin: 20px 2px 10px;
  font-size: 13px; font-weight: 650; color: var(--heshtur);
}
.ndaresi::after { content: ''; flex: 1; height: 1px; background: var(--kufi); }

/* ── Butonat ────────────────────────────────────────────────────────────── */
.buton {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 56px; padding: 0 22px; border-radius: 14px;
  font-size: 16.5px; font-weight: 620; letter-spacing: -0.005em;
  border: 1px solid transparent; transition: transform .06s, background .12s;
}
.buton:active { transform: scale(.98); }
.buton.plot   { width: 100%; }
.buton.kryesor{ background: var(--theks); color: oklch(0.99 0.005 155); }
.buton.kryesor:active { background: var(--theks-fort); }
.buton.dyte   { background: var(--ngritur); color: var(--theks); border-color: var(--kufi-fort); }
.buton.dyte:active { background: var(--siperfaqe); }
.buton.rrezik { background: var(--kuq); color: oklch(0.99 0.005 155); }
.buton.hije   { color: var(--theks); }
.buton.hije:active { background: var(--theks-zbehte); }
.buton[disabled] { opacity: .45; pointer-events: none; }
/* Veprimi kryesor i ekranit shkruhet me shkronja të mëdha — një i tillë për faqe. */
.buton.madh { min-height: 64px; font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.buton svg { width: 22px; height: 22px; flex: none; }

.butona { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.butona.rresht { flex-direction: row; }
.butona.rresht > * { flex: 1; }

/* ── Kartat ─────────────────────────────────────────────────────────────── */
.karte {
  background: var(--ngritur); border: 1px solid transparent;
  border-radius: var(--r); padding: 17px; box-shadow: var(--hije);
}
.karte + .karte { margin-top: 12px; }
.karte-titull { font-size: 15px; font-weight: 650; margin-bottom: 10px; }

.qeteso { background: var(--siperfaqe); box-shadow: none; }

.paralajmerim {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-vogel); font-size: 14.5px; line-height: 1.4;
  background: var(--verdhe-sfond); color: var(--verdhe-boje);
}
.paralajmerim.kuq { background: var(--kuq-sfond); color: var(--kuq-boje); }
.paralajmerim.info{ background: var(--theks-zbehte); color: var(--theks); }
.paralajmerim svg { width: 21px; height: 21px; flex: none; margin-top: 1px; }

/* ── Shiriti i përparimit ───────────────────────────────────────────────── */
.perparimi { background: var(--ngritur); border-radius: var(--r); padding: 15px 17px; box-shadow: var(--hije); }
.perparimi-krye { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.perparimi-krye b { flex: 1; font-size: 15px; font-weight: 600; }
.perparimi-krye span { font-size: 14px; color: var(--heshtur); font-variant-numeric: tabular-nums; }
.perparimi-vije { height: 8px; border-radius: 4px; background: var(--siperfaqe); overflow: hidden; }
.perparimi-vije i { display: block; height: 100%; border-radius: 4px; background: var(--gjelber);
  transition: width .2s ease-out; }

/* ── Hapat e nisjes ─────────────────────────────────────────────────────────
   Numrat janë sekuencë e vërtetë: hapi 2 nuk bëhet para hapit 1. */
.hapat-nisjes { counter-reset: hn; display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.hapat-nisjes li { counter-increment: hn; position: relative; padding-left: 42px; }
.hapat-nisjes li::before {
  content: counter(hn); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--theks-zbehte); color: var(--theks);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.hapat-nisjes b { display: block; font-size: 16px; font-weight: 650; }
.hapat-nisjes span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--heshtur); line-height: 1.4; }

/* Reagjenti pa kasetë brenda: nuk është alarm, por nuk fshihet as. */
.rresht.bosh-aparati { border: 1.5px dashed var(--kufi-fort); box-shadow: none; background: transparent; }
.rresht.bosh-aparati .rresht-emri { color: var(--heshtur); }

/* ── Zgjedhje me dy përgjigje ────────────────────────────────────────────────
   Përdoret kur programi duhet të pyesë diçka që vetëm njeriu e di — p.sh. a u
   ndërrua kaseta. Të dyja përgjigjet duken njësoj të mëdha; asnjëra s'fshihet. */
.zgjedhjet { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.zgjedhje {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: 100%; min-height: 64px; padding: 12px 16px; text-align: left;
  background: var(--ngritur); border: 2px solid var(--kufi); border-radius: 13px;
}
.zgjedhje b { font-size: 16px; font-weight: 650; }
.zgjedhje span { font-size: 13.5px; color: var(--heshtur); line-height: 1.35; }
.zgjedhje.aktiv { border-color: var(--theks); background: var(--theks-zbehte); }
.zgjedhje.aktiv b { color: var(--theks); }
.zgjedhje:active { transform: scale(.99); }

/* ── Numëruesi (− 38 +) ─────────────────────────────────────────────────── */
.numerues { display: flex; align-items: center; gap: 0; flex: none; }
.numerues button {
  width: 54px; height: 54px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--siperfaqe); border: 1px solid var(--kufi);
  font-size: 26px; font-weight: 400; line-height: 1; color: var(--boje);
}
.numerues button:first-child { border-radius: var(--r-vogel) 0 0 var(--r-vogel); }
.numerues button:last-child  { border-radius: 0 var(--r-vogel) var(--r-vogel) 0; }
.numerues button:active { background: var(--kufi); }
.numerues input {
  width: 72px; height: 54px; flex: none; text-align: center;
  font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--ngritur); border: 1px solid var(--kufi);
  border-left: none; border-right: none;
}
.numerues input:focus { outline: none; background: var(--theks-zbehte); }

/* ── Fushat ─────────────────────────────────────────────────────────────── */
.fushe { display: block; margin-bottom: 16px; }
.fushe-etikete { display: block; font-size: 14px; font-weight: 600; color: var(--heshtur); margin-bottom: 7px; }
.fushe input, .fushe select, .fushe textarea {
  width: 100%; min-height: 54px; padding: 0 15px;
  background: var(--ngritur); border: 1px solid var(--kufi);
  border-radius: var(--r-vogel); font-size: 17px;
}
.fushe textarea { padding: 14px 15px; min-height: 90px; resize: vertical; line-height: 1.4; }
.fushe input:focus, .fushe select:focus, .fushe textarea:focus {
  outline: none; border-color: var(--theks); box-shadow: 0 0 0 3px var(--theks-zbehte);
}
.fushe input[readonly] { background: var(--siperfaqe); color: var(--heshtur); }
.fushe-ndihme { margin-top: 6px; font-size: 13px; color: var(--heshtur); }
.dy-fusha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Hyrja ──────────────────────────────────────────────────────────────── */
.hyrje {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px 24px;
  background: var(--sfond);
}
.hyrje-gjethet {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62dvh;
  width: 100%; pointer-events: none;
}
.hyrje-brenda {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 340px;
}
.hyrje-shenja { margin-bottom: 14px; filter: drop-shadow(0 10px 24px rgba(18,40,30,.16)); }
.hyrje-emri {
  font-family: var(--serif); font-size: 46px; font-weight: 600;
  letter-spacing: -0.012em; line-height: 1.02; color: var(--theks);
}
.hyrje-nen { margin-top: 4px; }
.hyrje-ftese { margin-top: 30px; font-size: 16.5px; font-weight: 550; color: var(--boje); }

.pin-pika { display: flex; gap: 18px; margin: 16px 0 24px; }
.pin-pika i {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.8px solid var(--zbehte); background: transparent;
  transition: background .12s, border-color .12s, transform .12s;
}
.pin-pika i.mbushur { background: var(--theks); border-color: var(--theks); transform: scale(1.06); }

.pin-tastiere { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px;
  width: 100%; max-width: 312px; }
.pin-tastiere button {
  height: 56px; border-radius: 14px; background: var(--ngritur);
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(18,40,30,.05), 0 3px 10px rgba(18,40,30,.045);
  font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--boje);
}
.pin-tastiere button:active { background: var(--theks-zbehte); transform: scale(.96); }
.pin-tastiere button.pa-kufi { background: var(--siperfaqe); box-shadow: none; }
.pin-tastiere button.pa-kufi svg { width: 24px; height: 24px; color: var(--heshtur); }
.pin-gabim { color: var(--kuq); font-weight: 600; min-height: 20px; margin-top: 10px; font-size: 15px; }

/* Butoni rri poshtë, larg tastierës: shtypet me qëllim, jo me gabim. */
.hyrje-fund-butona { width: 100%; margin-top: 42px; }
.hyrje-fund {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  font-size: 14px; color: var(--heshtur);
}
.hyrje-fund svg { width: 18px; height: 18px; color: var(--gjelber); }

/* ── Fleta e poshtme ────────────────────────────────────────────────────── */
.mbulese {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(14,34,26,.42); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: shfaqu .16s ease-out;
}
.flete {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--sfond); border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(22px + var(--poshtë));
  box-shadow: var(--hije-larte); animation: ngjitu .2s cubic-bezier(.2,.8,.3,1);
}
.flete-doreze { width: 42px; height: 4px; border-radius: 2px; background: var(--kufi-fort); margin: 8px auto 16px; }
.flete-titull { font-size: 21px; font-weight: 680; letter-spacing: -0.015em; margin-bottom: 4px; }
.flete-nen { font-size: 15px; color: var(--heshtur); margin-bottom: 18px; }

/* Menuja «Më shumë» — çdo rresht një ekran, me fjalë të plota. */
.menu-flete { display: flex; flex-direction: column; gap: 8px; }
.menu-flete button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 62px; padding: 0 16px; border-radius: var(--r-vogel);
  background: var(--ngritur); box-shadow: var(--hije);
  font-size: 16.5px; font-weight: 600; text-align: left;
}
.menu-flete button:active { background: var(--siperfaqe); }
.menu-flete svg { width: 23px; height: 23px; flex: none; color: var(--theks); }
.menu-flete span { flex: 1; }
.menu-flete i { color: var(--zbehte); font-size: 20px; font-style: normal; }

@keyframes shfaqu { from { opacity: 0 } }
@keyframes ngjitu { from { transform: translateY(22px) } }

/* ── Njoftimi ───────────────────────────────────────────────────────────── */
.njoftim {
  position: fixed; left: 50%; bottom: calc(22px + var(--poshtë)); z-index: 120;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 16px 0 18px; max-width: min(560px, calc(100vw - 28px));
  background: var(--boje); color: var(--sfond);
  border-radius: 14px; box-shadow: var(--hije-larte);
  font-size: 15.5px; font-weight: 550;
  animation: ngjitu .2s cubic-bezier(.2,.8,.3,1);
}
.njoftim.mire { background: var(--theks); color: oklch(0.99 0.005 155); }
.njoftim.keq  { background: var(--kuq);   color: oklch(0.99 0.005 155); }
.njoftim svg { width: 22px; height: 22px; flex: none; }
.njoftim button {
  margin-left: 6px; padding: 0 14px; min-height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.18); color: inherit; font-weight: 650; font-size: 15px;
}

/* ── Kamera ─────────────────────────────────────────────────────────────── */
.skaner { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.skaner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.skaner-mbi { position: relative; flex: 1; display: flex; flex-direction: column; }
.skaner-krye {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--sipër) + 12px) 14px 12px;
  background: linear-gradient(rgba(0,0,0,.72), transparent); color: #fff;
}
.skaner-krye button { color: #fff; min-height: 46px; padding: 0 14px; border-radius: 10px;
  font-size: 16px; font-weight: 600; background: rgba(255,255,255,.16); }
.skaner-titull { flex: 1; font-size: 17px; font-weight: 620; }

/* Katër qoshe të gjelbra në vend të një kornize të plotë: syri e kap formën
   menjëherë, dhe barkodi mbetet i pambuluar. */
.skaner-shenjester {
  position: relative; z-index: 2; margin: auto; width: min(84vw, 400px); height: 168px;
  border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45);
}
.skaner-shenjester .qoshe {
  position: absolute; width: 34px; height: 34px; border: 4px solid #5DD39E;
}
.skaner-shenjester .lm { top: -2px; left: -2px;  border-right: none; border-bottom: none; border-radius: 14px 0 0 0; }
.skaner-shenjester .dm { top: -2px; right: -2px; border-left: none;  border-bottom: none; border-radius: 0 14px 0 0; }
.skaner-shenjester .lp { bottom: -2px; left: -2px;  border-right: none; border-top: none; border-radius: 0 0 0 14px; }
.skaner-shenjester .dp { bottom: -2px; right: -2px; border-left: none;  border-top: none; border-radius: 0 0 14px 0; }
.skaner-vije {
  position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 2px;
  background: #46d39a; box-shadow: 0 0 12px #46d39a; animation: skano 2.1s ease-in-out infinite;
}
@keyframes skano { 0%,100% { top: 12px } 50% { top: calc(100% - 15px) } }

.skaner-fund {
  position: relative; z-index: 2; padding: 18px 16px calc(24px + var(--poshtë));
  background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; text-align: center;
}
.skaner-ndihme { font-size: 15.5px; opacity: .92; margin-bottom: 14px; line-height: 1.35; }
.skaner-butona { display: flex; gap: 10px; }
.skaner-butona .buton { flex: 1; background: rgba(255,255,255,.17); color: #fff; }
.skaner-butona .buton.kryesor { background: #fff; color: #111; }

/* ── Tabela (kompjuter) ─────────────────────────────────────────────────── */
.tabele-mbeshtjelle { overflow-x: auto; border-radius: var(--r); background: var(--ngritur);
  box-shadow: var(--hije); }
table.tab { width: 100%; min-width: 720px; font-size: 15px; }
table.tab th {
  position: sticky; top: 0; z-index: 1; text-align: left; white-space: nowrap;
  padding: 13px 14px; background: var(--siperfaqe); border-bottom: 1px solid var(--kufi);
  font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--heshtur);
}
table.tab td { padding: 13px 14px; border-bottom: 1px solid var(--kufi); vertical-align: middle; }
table.tab tr:last-child td { border-bottom: none; }
table.tab tr[data-status="kritik"] td:first-child { box-shadow: inset 4px 0 0 var(--kuq); }
table.tab tr[data-status="ulet"]   td:first-child { box-shadow: inset 4px 0 0 var(--verdhe); }
table.tab .djathtas { text-align: right; font-variant-numeric: tabular-nums; }
table.tab tr.vija-kufirit td {
  padding: 8px 14px; background: var(--siperfaqe);
  font-size: 12px; font-weight: 650; letter-spacing: .04em; color: var(--heshtur); text-align: center;
}
table.tab tbody tr.klikueshme:hover { background: var(--siperfaqe); cursor: pointer; }

/* ── Shiriti anësor (kompjuter) ─────────────────────────────────────────────
   Majtas rri gjithçka që zgjidhet; djathtas gjithçka që bëhet. Vendi i secilit
   ekran nuk lëviz kurrë, prandaj dora e mëson pa e lexuar. */
.skema { display: flex; min-height: 100dvh; }
.permbajtja { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.anesore {
  flex: none; width: 238px; display: flex; flex-direction: column;
  background: var(--ngritur); border-right: 1px solid var(--kufi);
  padding: 16px 12px calc(14px + var(--poshtë));
  position: sticky; top: 0; height: 100dvh;
}
.anesore-krye { padding: 6px 6px 18px; }

.menu { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.menu a {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 12px; border-radius: 10px;
  font-size: 15px; font-weight: 570; color: var(--heshtur); text-decoration: none;
}
.menu a svg { width: 20px; height: 20px; flex: none; }
.menu a:hover { background: var(--siperfaqe); color: var(--boje); }
.menu a.aktiv { background: var(--theks-zbehte); color: var(--theks); font-weight: 640; }
.menu a.aktiv svg { stroke-width: 2.3; }

.anesore-njeriu {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-top: 10px; padding: 10px 10px; border-radius: 10px;
  border-top: 1px solid var(--kufi); text-align: left;
}
.anesore-njeriu:hover { background: var(--siperfaqe); }
.anesore-fytyre {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--siperfaqe); color: var(--heshtur);
  display: flex; align-items: center; justify-content: center;
}
.anesore-fytyre svg { width: 19px; height: 19px; }
.anesore-emri { flex: 1; min-width: 0; }
.anesore-emri b { display: block; font-size: 14.5px; font-weight: 620; line-height: 1.2; }
.anesore-emri span { display: block; font-size: 12.5px; color: var(--heshtur); }
.anesore-njeriu .lidhja span { display: none; }

/* ── Shiriti i poshtëm (telefon) ────────────────────────────────────────── */
.shiriti {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; gap: 4px; padding: 6px 8px calc(6px + var(--poshtë));
  background: var(--ngritur);
  border-top: 1px solid var(--kufi);
}
.shiriti a, .shiriti button {
  flex: 1; min-height: 58px; border-radius: 12px; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--zbehte);
}
.shiriti a.aktiv { color: var(--theks); }
.shiriti a.aktiv svg { stroke-width: 2.3; }
.shiriti a.aktiv[href="#/"] svg { fill: currentColor; }
.shiriti svg { width: 24px; height: 24px; }

/* ── Rreshti i kostos ───────────────────────────────────────────────────── */
.kosto-madhe { font-size: 42px; font-weight: 660; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.shiritth { height: 9px; border-radius: 5px; background: var(--siperfaqe); overflow: hidden; margin-top: 8px; }
.shiritth i { display: block; height: 100%; border-radius: 5px; background: var(--theks); }

/* ── Gjendja bosh ───────────────────────────────────────────────────────── */
.bosh { text-align: center; padding: 52px 22px; color: var(--heshtur); }
.bosh svg { width: 46px; height: 46px; color: var(--zbehte); margin-bottom: 14px; }
.bosh b { display: block; font-size: 17px; color: var(--boje); margin-bottom: 6px; }

/* ── Treguesi i lidhjes ─────────────────────────────────────────────────── */
.lidhja { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--heshtur); }
.lidhja i { width: 9px; height: 9px; border-radius: 50%; background: var(--gjelber); flex: none; }
.lidhja.jashte i { background: var(--verdhe); }
.lidhja.vetem i  { background: var(--zbehte); }

/* ── Kompjuteri ─────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  body { font-size: 16px; }
  .krye { padding: 18px 28px 12px; background: transparent; backdrop-filter: none; }
  .krye.mesi .krye-titull { text-align: left; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; }
  .trupi { padding: 8px 28px 48px; }
  .aparate { display: grid; grid-template-columns: repeat(auto-fill, minmax(325px, 1fr)); }
  .aparat { min-height: 132px; }
  .aparat-foto { width: 116px; height: 88px; }
  .buton.plot { width: auto; min-width: 230px; }
  .butona { flex-direction: row; }
  .shiriti { display: none; }
  .stat-rresht { padding: 18px 10px; }
  .stat b { font-size: 24px; }
}

@media (max-width: 899px) {
  .vetem-kompjuter { display: none !important; }
}

@media (min-width: 900px) and (max-width: 1320px) {
  .logo-emri { display: none; }
  .menu a { padding: 9px 9px; font-size: 14px; }
}
@media (min-width: 900px) {
  .vetem-telefon { display: none !important; }
}

@media print {
  .krye, .shiriti, .butona, .mbrapa { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .trupi { padding: 0; }
  .karte, .tabele-mbeshtjelle { box-shadow: none; border: 1px solid #ccc; }
  table.tab { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Rafti i kasetave — si te ekrani i vetë INTEGRA-s ───────────────────────
   Pllaka të verdha në kolona. Stafi e njeh formën para se të lexojë fjalët. */
:root {
  --kasete-sfond: oklch(0.945 0.085 100);
  --kasete-kufi:  oklch(0.795 0.095 98);
  --kasete-boje:  oklch(0.325 0.045 92);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="drite"]) {
    --kasete-sfond: oklch(0.42 0.075 100);
    --kasete-kufi:  oklch(0.58 0.085 98);
    --kasete-boje:  oklch(0.95 0.03 95);
  }
}

.rafti {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.kasete {
  display: flex; flex-direction: column; gap: 3px;
  min-height: 122px; padding: 12px 13px; text-align: left;
  border: 1.5px solid var(--kasete-kufi); border-radius: 12px;
  background: var(--kasete-sfond); color: var(--kasete-boje);
  transition: transform .06s;
}
.kasete:active { transform: scale(.97); }
.kasete[data-status="ulet"]   { background: var(--verdhe-sfond); border-color: var(--verdhe); }
.kasete[data-status="kritik"] { background: var(--kuq-sfond); border-color: var(--kuq); color: var(--kuq-boje); }
.kasete[data-status="bosh"]   { background: var(--siperfaqe); border-color: var(--kufi);
                                border-style: dashed; color: var(--zbehte); }
.kasete.ndryshuar { box-shadow: 0 0 0 3px var(--theks); }

.kasete-emri { font-size: 14.5px; font-weight: 700; line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kasete-numri { font-size: 29px; font-weight: 650; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: auto; }
.kasete-njesi { font-size: 11px; opacity: .78; }
.kasete-lot { font-size: 11px; line-height: 1.3; opacity: .75;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kasete-raft { font-size: 11px; opacity: .82; margin-top: 2px; }

/* ── Lista e pozicioneve — si «Reagent Load List» i cobas-it ─────────────── */
.pozicionet { border-radius: var(--r); overflow: hidden;
  background: var(--ngritur); box-shadow: var(--hije); }
.pozicionet-krye, .pozicion {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 15px;
}
.pozicionet-krye {
  min-height: 42px; background: var(--siperfaqe); border-bottom: 1px solid var(--kufi);
  font-size: 11.5px; font-weight: 650; letter-spacing: .02em;
  color: var(--heshtur);
}
.pozicion { min-height: 68px; border-bottom: 1px solid var(--kufi); text-align: left; }
.pozicion:last-child { border-bottom: none; }
.pozicion:active { background: var(--siperfaqe); }
.pozicion.ndryshuar { box-shadow: inset 4px 0 0 var(--theks); }
.pozicion[data-status="ulet"]   { box-shadow: inset 4px 0 0 var(--verdhe); }
.pozicion[data-status="kritik"] { box-shadow: inset 4px 0 0 var(--kuq); }

.poz-nr    { flex: none; width: 30px; text-align: right;
             font-size: 15px; font-weight: 550; color: var(--heshtur);
             font-variant-numeric: tabular-nums; }
.poz-emri  { flex: 1; min-width: 0; }
.poz-emri b { display: block; font-size: 16px; font-weight: 620; line-height: 1.2; }
.poz-emri span { display: block; font-size: 12px; line-height: 1.3; color: var(--heshtur);
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poz-status{ flex: none; width: 96px; font-size: 13px; color: var(--heshtur); }
.poz-nr2   { flex: none; width: 78px; text-align: right;
             font-size: 22px; font-weight: 640; line-height: 1; font-variant-numeric: tabular-nums; }
.poz-nr2 small { display: block; font-size: 10.5px; font-weight: 400; color: var(--heshtur); margin-top: 4px; }

@media (max-width: 560px) {
  .poz-status { display: none; }
  .rafti { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
  .pin-tastiere { grid-template-columns: repeat(3, 84px); }
}

/* ── Fusha e madhe e numrit, për ndryshimin me një prekje ───────────────── */
.numer-titull { text-align: center; font-size: 17px; font-weight: 600; color: var(--heshtur);
  margin-bottom: 4px; }
.numer-madh {
  width: 100%; min-height: 92px; text-align: center;
  font-size: 62px; font-weight: 660; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.035em; color: var(--theks);
  background: transparent; border: none;
}
.numer-madh:focus { outline: none; }
.numer-njesi { text-align: center; font-size: 17px; color: var(--heshtur); margin-top: 2px; }
.hapat-shpejte { display: flex; gap: 9px; margin-top: 16px; }
.hapat-shpejte button {
  flex: 1; min-height: 54px; border-radius: 12px;
  background: var(--siperfaqe); border: 1px solid transparent;
  font-size: 16.5px; font-weight: 600; color: var(--boje);
  font-variant-numeric: tabular-nums;
}
.hapat-shpejte button:active { background: var(--kufi); }
