:root { --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, system-ui, sans-serif; --ui-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --ui-head: var(--ui-font); } /* iş kaydı ekranıyla aynı */
:root {
  --bg: #f6f4f2;
  --card: #ffffff;
  --ink: #1f1b1d;
  --muted: #6d6569;
  --line: #e6e0dd;
  --brand: #b3245c;
  --brand-ink: #ffffff;
  --brand-soft: #fbe9f0;
  --ok: #1f7a4d;
  --ok-soft: #e4f4ec;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --info: #24589a;
  --info-soft: #e5eef9;
  --danger: #b42318;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--ui-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--brand); color: var(--brand-ink);
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.topbar .who { font-size: 13px; opacity: .9; }
.topbar button { background: rgba(255,255,255,.16); border: 0; color: inherit; padding: 8px 12px; border-radius: 10px; cursor: pointer; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1200px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 12px; }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
label.f:first-child { margin-top: 0; }
.opt { font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; cursor: pointer; min-height: 40px;
}
.chip[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 13px 18px; cursor: pointer; font-weight: 600; min-height: 48px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 6px; font-weight: 600; }
.link.danger { color: var(--danger); }

.msg { padding: 10px 12px; border-radius: 10px; margin-top: 12px; font-size: 14px; }
.msg.err { background: #fdecea; color: var(--danger); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }

.entry { border-top: 1px solid var(--line); padding: 12px 0; }
.entry:first-of-type { border-top: 0; }
.entry .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.entry .machine { font-weight: 650; }
.entry .meta { font-size: 13px; color: var(--muted); }
.entry .desc { margin: 4px 0; white-space: pre-wrap; }
.entry .actions { display: flex; gap: 4px; justify-content: flex-end; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.b-Tamamlandı { background: var(--ok-soft); color: var(--ok); }
.b-Devam { background: var(--info-soft); color: var(--info); }
.b-Parça { background: var(--warn-soft); color: var(--warn); }

.daytitle { display: flex; justify-content: space-between; align-items: baseline; }
.daytitle .total { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* PIN */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 8px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand); }
.pin-dots span.on { background: var(--brand); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.keypad button { min-height: 58px; font-size: 22px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.keypad button:active { background: var(--brand-soft); }
.brandmark { text-align: center; margin: 28px 0 8px; }
.brandmark .logo { font-size: 26px; font-weight: 800; color: var(--brand); letter-spacing: .5px; }
.brandmark .sub { color: var(--muted); font-size: 14px; }

/* Yönetici */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters label.f { margin: 0 0 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .v { font-size: 24px; font-weight: 700; }
.kpi .l { font-size: 13px; color: var(--muted); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #faf8f7; position: sticky; top: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.desc { min-width: 240px; white-space: pre-wrap; }
.bar { height: 8px; background: var(--brand-soft); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form > input { flex: 1 1 180px; }
.muted { color: var(--muted); }
.off { opacity: .5; }

@media (max-width: 600px) {
  .wrap { padding: 12px; }
  .card { padding: 14px; }
}
.appver { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.updbar { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 70; max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px 10px 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.updbar button { border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 700; padding: 9px 14px; cursor: pointer; }

/* Giriş ekranı hata gösterimi */
.loginerr { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #b91c1c; color: #fff; font-weight: 800; font-size: 16px; line-height: 1.3; }
.loginerr span { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.22); font-weight: 900; }
.pin-dots.shake { animation: shake .4s; }
.pin-dots.shake span { border-color: #ef4444; }
@keyframes shake { 0%,100% { transform: none; } 20%,60% { transform: translateX(-9px); } 40%,80% { transform: translateX(9px); } }
select.bad { border: 2px solid #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
.toast { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.toast:empty { display: none; }
.tmsg { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 14px; max-width: 360px; width: 100%; padding: 20px; border-radius: 16px; font-size: 18px; font-weight: 800; line-height: 1.35; color: #fff; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35), 0 16px 40px rgba(0,0,0,.4); }
.tmsg.err { background: #b91c1c; border: 2px solid #fca5a5; }
.tmsg .ti { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 22px; font-weight: 900; }

/* ===== Yönetici özeti (masaüstü) ===== */

/* ---------- Ambalaj Kontrol ---------- */
.wrap.wide { max-width: 1280px; }
.navtabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; max-width: 1280px; margin: 0 auto; }
.navtabs button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.navtabs button[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.navtabs .cnt { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; background: #fff; cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop b { color: var(--brand); }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.note { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.progress { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; font-weight: 600; }
.spin { width: 20px; height: 20px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview { position: relative; user-select: none; touch-action: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: crosshair; }
.preview canvas { display: block; width: 100%; height: auto; }
.preview .sel { position: absolute; border: 3px solid var(--brand); background: rgba(179,36,92,.12); pointer-events: none; }
.preview .sel span { position: absolute; left: 0; top: 0; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.fgrid label.f { margin-top: 10px; }
.ngrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ngrid label { font-size: 12px; color: var(--muted); font-weight: 600; }
.ngrid input { min-height: 40px; padding: 8px; }
.lvl { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lvl-kritik { background: #fdecea; color: var(--danger); }
.lvl-dogrula { background: var(--warn-soft); color: var(--warn); }
.lvl-yazim { background: var(--info-soft); color: var(--info); }
.lvl-ok { background: var(--ok-soft); color: var(--ok); }
.fsec h3 { font-size: 15px; margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.fsec h3:first-child { margin-top: 0; }
.finding { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.finding .t { font-weight: 650; }
.finding .d { font-size: 14px; color: var(--ink); margin-top: 2px; }
.finding .r { font-size: 12px; color: var(--muted); margin-top: 2px; }
.finding .mkt { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.finding.dismissed { opacity: .5; }
.finding.dismissed .t { text-decoration: line-through; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.counts .lvl { font-size: 14px; padding: 6px 12px; }
.cl-item { border-top: 1px solid var(--line); padding: 10px 0; }
.cl-item .q { font-size: 14px; }
.cl-item .ans { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.cl-item .ans button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.cl-item .ans button[aria-pressed=true].evet { background: var(--ok); color: #fff; border-color: var(--ok); }
.cl-item .ans button[aria-pressed=true].hayir { background: var(--danger); color: #fff; border-color: var(--danger); }
.cl-item .ans button[aria-pressed=true].yok { background: var(--muted); color: #fff; border-color: var(--muted); }
.cl-item input { margin-top: 6px; min-height: 38px; padding: 8px; font-size: 14px; }
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-taslak { background: #eee; color: #444; }
.st-onay_bekliyor { background: var(--warn-soft); color: var(--warn); }
.st-onaylandi { background: var(--ok-soft); color: var(--ok); }
.st-duzeltme { background: #fdecea; color: var(--danger); }
.rhead { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rhead img { width: 220px; max-width: 40vw; border: 1px solid var(--line); border-radius: 8px; }
.rhead .info { flex: 1; min-width: 240px; }
.rhead h2 { margin: 0 0 4px; font-size: 20px; }
.kv { font-size: 14px; color: var(--muted); }
.kv b { color: var(--ink); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #faf6f8; }
pre.txt { white-space: pre-wrap; font-size: 12px; max-height: 360px; overflow: auto; background: #faf8f7; padding: 10px; border-radius: 8px; }
.srcbadge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.srcbadge.ocr { background: var(--warn-soft); color: var(--warn); }
@media print {
  .topbar, .navtabs, .actions, .noprint, .updbar { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; border-color: #ccc; }
  .wrap { max-width: none; padding: 0; }
}
