/* ===== VARIABLES ===== */
:root {
  --bg:          #0e0e10;
  --surface:     #1a1a1e;
  --surface2:    #26262c;
  --border:      rgba(255,255,255,0.08);
  --purple:      #c084fc;
  --purple-dark: #a855f7;
  --purple-glow: rgba(192,132,252,0.18);
  --green:       #4ade80;
  --yellow:      #fbbf24;
  --red:         #f87171;
  --text:        #f4f4f5;
  --text2:       rgba(244,244,245,0.5);
  --radius:      16px;
  --radius-sm:   12px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ===== LOGIN ===== */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(32px + var(--safe-top)) 24px calc(32px + var(--safe-bottom));
  background: radial-gradient(ellipse at 50% -10%, rgba(168,85,247,0.2) 0%, transparent 55%);
  overflow-y: auto;
}

.login-logo {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  margin-bottom: 20px;
  box-shadow: 0 12px 40px rgba(168,85,247,0.35);
}

.login-app-name {
  font-size: 30px; font-weight: 800;
  letter-spacing: -1px; margin-bottom: 4px;
}

.login-app-name span { color: var(--purple); }

.login-sub {
  color: var(--text2); font-size: 14px;
  margin-bottom: 8px;
}
.login-version {
  color: var(--text2); font-size: 11px; font-weight: 600;
  opacity: 0.5; margin-bottom: 40px;
}

.login-form { width: 100%; max-width: 380px; }

/* ===== FIELDS ===== */
.field { margin-bottom: 14px; }

.field label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text2); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--purple); }

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c084fc' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.field select option { background: #1a1a1e; }

.field textarea { resize: none; line-height: 1.5; }

/* ===== BUTTONS ===== */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%;
  padding: 16px; border: none;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
}

.btn:active { transform: scale(0.96); opacity: 0.8; }
.btn:disabled { opacity: 0.38; cursor: default; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(168,85,247,0.32);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239,68,68,0.28);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(34,197,94,0.28);
}

/* ===== SHELL ===== */
.shell {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  padding-top: var(--safe-top);
}

.shell-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.shell-user {
  display: flex; align-items: center; gap: 10px;
}

.shell-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.shell-name {
  font-size: 14px; font-weight: 600; color: var(--text);
}

.shell-logout {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text2);
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 12px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.shell-logout:active { color: var(--red); border-color: var(--red); }

.shell-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
}

.nav-btn {
  position: relative;
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 12px;
  border: none; background: none;
  color: var(--text2);
  font-size: 10px; font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.15s;
  gap: 5px;
}

.nav-btn.active { color: var(--purple); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(192,132,252,0.6)); }

.nav-btn svg { width: 24px; height: 24px; stroke-width: 1.5; }

.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; border-radius: 8px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; pointer-events: none;
}

/* ===== VIEW ===== */
.view {
  padding: 20px 16px;
  padding-bottom: 32px;
}

.view-title {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 24px;
}

/* ===== GÖREV ===== */
.view-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.view-header-row .view-title { margin-bottom: 0; }

.btn-icon-primary {
  background: var(--purple-dark); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.btn-back {
  background: none; border: none; color: var(--text2);
  font-size: 14px; font-family: inherit; cursor: pointer; padding: 0;
}

.gorev-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--surface2); border-radius: 10px; padding: 3px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.gorev-tabs::-webkit-scrollbar { display: none; }
.gtab {
  flex-shrink: 0; background: none; border: none;
  color: var(--text2); font-size: 12px; font-weight: 600;
  font-family: inherit; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.gtab.active { background: var(--purple-dark); color: #fff; }

.gorev-list { display: flex; flex-direction: column; gap: 10px; }

.sube-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text2); padding: 4px 2px;
}

.gorev-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.gorev-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  margin-bottom: 6px;
}
.gorev-title { font-size: 14px; font-weight: 700; flex: 1; }
.gorev-desc  { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.gorev-meta  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gorev-deadline { font-size: 11px; color: var(--text2); }
.gorev-by { font-size: 11px; color: var(--text2); }
.gorev-assignees { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }

.badge-gorev-status { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 100px; white-space: nowrap; }
.badge-status-bek { background: rgba(251,191,36,0.12); color: var(--yellow); }
.badge-status-dev { background: rgba(192,132,252,0.12); color: var(--purple); }
.badge-status-tam { background: rgba(74,222,128,0.12);  color: var(--green); }

.asgn-badge { font-size: 10px; padding: 2px 7px; border-radius: 100px; }
.asgn-bek   { background: rgba(251,191,36,0.1);  color: var(--yellow); }
.asgn-dev   { background: rgba(192,132,252,0.1); color: var(--purple); }
.asgn-tam   { background: rgba(74,222,128,0.1);  color: var(--green); }

.gorev-status-row { display: flex; gap: 8px; margin-top: 8px; }
.gorev-st-btn {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text2); padding: 8px 0;
  font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.gorev-st-btn.active { background: rgba(192,132,252,0.15); color: var(--purple); border-color: var(--purple); }
.gorev-st-btn.active.tam { background: rgba(74,222,128,0.15); color: var(--green); border-color: var(--green); }

.form-card { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none;
  -webkit-appearance: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--purple); }

.checkbox-list { display: flex; flex-direction: column; gap: 6px; }
.checkbox-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer;
}
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--purple); flex-shrink: 0; }
.checkbox-info { display: flex; flex-direction: column; gap: 2px; }
.checkbox-name { font-size: 14px; font-weight: 600; }
.checkbox-sub  { font-size: 11px; color: var(--text2); }

/* ===== PERSON PICKER ===== */
.person-list { display: flex; flex-direction: column; gap: 6px; }
.person-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.person-row.selected {
  border-color: var(--purple); background: rgba(192,132,252,0.07);
}
.person-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex-shrink: 0; color: var(--text2);
  transition: background 0.15s, color 0.15s;
}
.person-row.selected .person-avatar {
  background: var(--purple-dark); color: #fff; border-color: transparent;
}
.person-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-name { font-size: 14px; font-weight: 600; }
.person-sub  { font-size: 11px; color: var(--text2); }
.person-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent; font-weight: 800;
  transition: all 0.15s;
}
.person-row.selected .person-check {
  background: var(--purple-dark); border-color: transparent; color: #fff;
}
.sel-count-badge {
  font-size: 11px; font-weight: 700; color: var(--purple);
  background: rgba(192,132,252,0.12); border-radius: 20px;
  padding: 2px 8px; min-height: 20px;
}

/* ===== SCORE SLIDER ===== */
.score-range {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px;
  background: var(--border); outline: none; cursor: pointer;
}
.score-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px;
  border-radius: 50%; background: var(--purple-dark); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.score-range::-moz-range-thumb {
  width: 22px; height: 22px; border: none;
  border-radius: 50%; background: var(--purple-dark); cursor: pointer;
}
.score-badge {
  min-width: 30px; height: 26px; border-radius: 8px;
  background: var(--purple-dark); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; transition: background 0.2s;
  padding: 0 6px;
}
.score-ticks {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text2); margin-top: 2px; padding: 0 2px;
}

.loading-row { display: flex; justify-content: center; padding: 24px; }
.empty-state { text-align: center; color: var(--text2); font-size: 14px; padding: 32px; }

/* ===== USER SEARCH ===== */
.user-search-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  outline: none; margin-bottom: 8px;
  -webkit-appearance: none;
}
.user-search-input:focus { border-color: var(--purple); }

/* ===== TALEP TRACKING ===== */
.talep-refresh-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.talep-refresh-count { font-size: 12px; color: var(--text2); font-weight: 600; }
.talep-refresh-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text2);
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}

.talep-track-card {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 14px; border-left: 4px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.talep-bek { border-left-color: var(--yellow); }
.talep-dev { border-left-color: var(--purple); }
.talep-tam { border-left-color: var(--green); }

.talep-track-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.talep-type-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text2);
  background: var(--surface2); border-radius: 6px; padding: 3px 8px;
}
.talep-track-date { font-size: 11px; color: var(--text2); }
.talep-track-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.talep-track-desc  { font-size: 12px; color: var(--text2); margin-bottom: 12px; }

/* Progress dots */
.tp-progress {
  display: flex; align-items: center; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.tp-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.tp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); transition: background 0.2s;
}
.tp-dot.tp-done    { background: var(--text2); }
.tp-dot.tp-current { background: var(--purple); box-shadow: 0 0 0 3px rgba(192,132,252,0.2); }
.talep-tam .tp-dot.tp-done { background: var(--green); }
.tp-step-lbl { font-size: 9px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.tp-line {
  flex: 1; height: 2px; background: var(--border); margin: 0 4px;
  margin-bottom: 14px; /* align with dots not labels */
  transition: background 0.2s;
}
.tp-line.tp-done { background: var(--text2); }
.talep-tam .tp-line.tp-done { background: var(--green); }

/* ===== QR SCANNER ===== */
.qr-view {
  height: 100%; position: relative;
  display: flex; flex-direction: column;
  background: #000;
}

.qr-video-wrapper {
  flex: 1; position: relative; overflow: hidden;
}

#qr-video {
  width: 100%; height: 100%;
  object-fit: cover;
}

#qr-canvas { display: none; }

/* Dark mask with cutout */
.scan-mask {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.scan-window {
  width: min(260px, 68vw);
  aspect-ratio: 1;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.52);
  position: relative;
}

.corner {
  position: absolute; width: 24px; height: 24px;
  border-color: var(--purple); border-style: solid;
}
.corner.tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.corner.tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scan-line {
  position: absolute; left: 6px; right: 6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple) 30%, var(--purple) 70%, transparent);
  border-radius: 2px;
  animation: scanline 2.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(192,132,252,0.8);
}

@keyframes scanline {
  0%, 100% { top: 6px; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: calc(100% - 6px); }
}

.scan-hint {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; font-size: 13px;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.scan-status {
  position: absolute; top: calc(16px + var(--safe-top));
  left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px; color: rgba(255,255,255,0.7);
  white-space: nowrap;
  pointer-events: none;
}

/* ===== MANUAL BARCODE ENTRY ===== */
.manual-entry {
  display: flex; gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.manual-entry input {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  outline: none;
}
.manual-entry input::placeholder { color: var(--text2); }
.manual-entry input:focus { border-color: var(--purple); }
.manual-entry button {
  background: var(--purple-dark); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s;
}
.manual-entry button:active { opacity: 0.8; }

/* ===== RESULT SHEET ===== */
.result-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1);
  border-top: 1px solid var(--border);
  z-index: 10;
  max-height: 82vh;
  overflow-y: auto;
}

.result-sheet.show { transform: translateY(0); }

.sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  margin: 8px auto 20px;
}

.result-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 100px;
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.5px; margin-bottom: 10px;
}

.badge-taze   { background: rgba(74,222,128,0.14);  color: var(--green); }
.badge-riskli { background: rgba(251,191,36,0.14);  color: var(--yellow); }
.badge-iade   { background: rgba(248,113,113,0.14); color: var(--red); }
.badge-hata   { background: rgba(156,163,175,0.12); color: #9ca3af; }

.result-product { font-size: 20px; font-weight: 800; margin-bottom: 4px; }

.result-meta {
  color: var(--text2); font-size: 13px; line-height: 1.6;
  margin-bottom: 6px;
}

.result-barcode {
  font-family: 'Courier New', monospace; font-size: 12px;
  color: var(--text2); margin-bottom: 12px;
}

.result-warning {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.22);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px; color: var(--red);
  margin: 12px 0; line-height: 1.5;
}

.result-urgent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 13px; font-weight: 800;
  text-align: center; margin: 10px 0;
  letter-spacing: 0.2px;
}

/* ===== ALERT STRIP ===== */
.alert-strip {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  flex-shrink: 0;
}
.alert-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.alert-strip-msg {
  font-size: 12px; font-weight: 700; color: #fff; flex: 1;
  line-height: 1.35;
}
.alert-strip-cta {
  font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.85);
  white-space: nowrap; margin-left: 10px;
  background: rgba(0,0,0,0.15); border-radius: 6px;
  padding: 3px 8px;
}

/* ===== UYARILAR ===== */
.uyari-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 800; margin-bottom: 8px;
}
.uyari-hdr-riskli { background: rgba(245,158,11,0.12); color: #b45309; }
.uyari-hdr-iade   { background: rgba(239,68,68,0.10);  color: #dc2626; }
.uyari-hdr-count  {
  min-width: 22px; height: 22px; border-radius: 11px;
  background: rgba(0,0,0,0.1); display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 900;
}

.uyari-card {
  border-left: 4px solid; border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.uyari-riskli { border-left-color: #f59e0b; background: rgba(245,158,11,0.04); }
.uyari-iade   { border-left-color: #ef4444; background: rgba(239,68,68,0.04);  }

.uyari-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.uyari-product { font-size: 14px; font-weight: 700; }
.uyari-time    { font-size: 11px; color: var(--text2); }
.uyari-barcode { font-size: 11px; font-family: monospace; color: var(--text2); margin-bottom: 6px; }
.uyari-meta    { display: flex; gap: 10px; font-size: 11px; color: var(--text2); flex-wrap: wrap; }

.result-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 18px;
  position: sticky; bottom: 0;
  background: var(--surface);
  padding-bottom: calc(8px + var(--safe-bottom, 0px));
  padding-top: 10px;
}

/* ===== PHOTO CAPTURE ===== */
.photo-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 50;
}

.photo-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.photo-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1;
}
.photo-controls > :last-child { visibility: hidden; }

.capture-ring {
  width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}

.capture-ring::after {
  content: ''; width: 58px; height: 58px;
  border-radius: 50%; background: #fff;
  transition: transform 0.1s;
}

.capture-ring:active::after { transform: scale(0.88); }

.photo-cancel-btn {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm); color: #fff;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: opacity 0.15s;
}

.photo-cancel-btn:active { opacity: 0.7; }

.photo-preview {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  gap: 16px; background: #000;
}

.photo-preview img {
  max-width: 100%; max-height: 58vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.photo-preview-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* ===== FILE UPLOAD ===== */
.file-upload-box {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 22px 16px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.15s;
  text-align: center; min-height: 90px;
}

.file-upload-box.has-file {
  border-color: var(--purple);
  background: var(--purple-glow);
}

.file-upload-box input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}

.upload-icon { font-size: 26px; }
.upload-label { font-size: 13px; color: var(--text2); }
.file-upload-box.has-file .upload-label { color: var(--purple); font-weight: 600; }
.upload-sub { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; z-index: 999;
  top: calc(20px + var(--safe-top));
  left: 16px; right: 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  transform: translateY(calc(-100% - var(--safe-top) - 40px));
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}

.toast.show { transform: translateY(0); }
.toast-ok   { border-left: 3px solid var(--green); }
.toast-err  { border-left: 3px solid var(--red); }

/* ===== SPINNER ===== */
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: rot 0.65s linear infinite;
  display: inline-block; flex-shrink: 0;
}

@keyframes rot { to { transform: rotate(360deg); } }

/* ===== CAMERA PERMISSION DENIED ===== */
.no-cam {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 14px; padding: 40px;
  text-align: center;
}

.no-cam .icon { font-size: 52px; }
.no-cam .title { font-size: 17px; font-weight: 700; }
.no-cam .sub { font-size: 13px; color: var(--text2); line-height: 1.6; }
