/* ════════════════════════════════════════════════════════════
   Shiftex Kiosk — Tablet/Telefon Full-screen Turnike UI
   ════════════════════════════════════════════════════════════ */

html, body.kiosk-body {
  overflow: hidden;
  height: 100vh;
  background: #0A0A0C;
  color: #F4F4F5;
  -webkit-user-select: none;
  user-select: none;
}

/* PIN auth ekranı */
.kiosk-auth {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, #1B1B21 0%, #0A0A0C 70%);
}
.kiosk-auth-card {
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 40px 36px;
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.kiosk-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 800;
  letter-spacing: -.02em;
  color: #F4F4F5;
  margin-bottom: 8px;
}
.kiosk-auth-card h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -.03em;
}
.kiosk-auth-card p {
  color: #A1A1A7; font-size: 14px; margin-bottom: 8px;
}
.kiosk-back-link {
  text-align: center;
  color: #6B6B72;
  font-size: 12px;
  margin-top: 12px;
}
.kiosk-back-link:hover { color: #A1A1A7; }

/* ════════ Ana ekran ════════ */
.kiosk-main {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: 80px 1fr;
  background: #0A0A0C;
}

.kiosk-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  background: rgba(19,19,24,.6);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.kh-left { display: flex; align-items: center; gap: 16px; }
.kh-right { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.kiosk-brand-mini {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800;
  color: #7B7FE0;
}
.kiosk-brand-mini svg { width: 24px; height: 24px; }
.kh-device {
  font-size: 12px;
  color: #A1A1A7;
  padding: 4px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
}
.kh-center { text-align: center; }
.kh-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700;
  letter-spacing: -.02em;
  color: #F4F4F5;
  font-variant-numeric: tabular-nums;
}
.kh-date {
  font-size: 12px; color: #A1A1A7;
  text-transform: capitalize;
  margin-top: -2px;
}
.kh-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: #A1A1A7;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.status-active { background: #34D399; box-shadow: 0 0 12px rgba(52,211,153,.6); animation: pulse 2s ease-in-out infinite; }
.status-busy   { background: #FBBF24; box-shadow: 0 0 12px rgba(251,191,36,.6); animation: pulse 1s ease-in-out infinite; }
.status-error  { background: #F87171; box-shadow: 0 0 12px rgba(248,113,113,.6); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ════════ Sahne (kamera + bilgi) ════════ */
.kiosk-stage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  padding: 24px;
  min-height: 0;
}

.kiosk-camera-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.kiosk-camera-wrap video,
.kiosk-camera-wrap canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.kiosk-camera-wrap video {
  transform: scaleX(-1); /* aynalama */
}
.kiosk-camera-wrap canvas {
  pointer-events: none;
}
.kiosk-camera-frame {
  position: absolute; inset: 24px;
  border-radius: 16px;
  border: 2px solid rgba(34,211,238,.3);
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0,0,0,.4);
}
.kiosk-scan-line {
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #22D3EE 50%, transparent 100%);
  box-shadow: 0 0 12px rgba(34,211,238,.8);
  animation: scanLine 3s linear infinite;
  pointer-events: none;
  opacity: .7;
}
@keyframes scanLine {
  0%   { top: 24px; }
  100% { top: calc(100% - 24px); }
}

/* ════════ Sağ bilgi paneli ════════ */
.kiosk-info {
  display: flex; flex-direction: column;
  gap: 20px;
  min-height: 0;
}
.kiosk-prompt {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  transition: all .25s ease;
}
.kp-icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  color: #6B6B72;
}
.kp-icon svg { width: 100%; height: 100%; }
.kp-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -.02em;
  color: #F4F4F5;
}
.kp-sub {
  font-size: 14px; color: #A1A1A7;
  margin-top: 6px;
}
.kiosk-prompt-scanning .kp-icon { color: #22D3EE; animation: pulse 1s ease-in-out infinite; }
.kiosk-prompt-scanning { border-color: rgba(34,211,238,.3); }
.kiosk-prompt-unknown .kp-icon { color: #F87171; }
.kiosk-prompt-unknown  { border-color: rgba(248,113,113,.3); }

/* Son işlemler */
.kiosk-recent {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 20px;
  flex: 1;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.kr-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: #A1A1A7;
}
.kr-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.kr-empty {
  text-align: center; color: #6B6B72; font-size: 13px; padding: 20px;
}
.kr-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  font-size: 13px;
  animation: itemIn .35s ease;
}
@keyframes itemIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}
.kri-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #25252D; display: flex; align-items: center; justify-content: center; }
.kri-av img { width: 100%; height: 100%; object-fit: cover; }
.kri-av .kr-init { font-weight: 700; color: #F4F4F5; }
.kri-name { font-weight: 600; color: #F4F4F5; }
.kri-action { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.kr-item-in  .kri-action { background: rgba(52,211,153,.15); color: #34D399; }
.kr-item-out .kri-action { background: rgba(251,191,36,.15); color: #FBBF24; }
.kri-time { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #A1A1A7; }

/* ════════ Sonuç ekranı (fullscreen overlay) ════════ */
.kiosk-result {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.85) 0%, rgba(0,0,0,.95) 100%);
  backdrop-filter: blur(8px);
  animation: overlayIn .25s ease;
}
.kr-card {
  background: rgba(19,19,24,.9);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 32px;
  padding: 56px 64px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  animation: kioskResultPop .5s cubic-bezier(.16,1,.3,1);
}
@keyframes kioskResultPop {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
.kr-check {
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.kr-check svg { width: 100%; height: 100%; }
.kr-check.kr-check-in    { color: #34D399; }
.kr-check.kr-check-out   { color: #FBBF24; }
.kr-check.kr-check-error { color: #F87171; }
.kr-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle .6s ease forwards;
}
.kr-tick {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawTick .4s ease .4s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawTick   { to { stroke-dashoffset: 0; } }

.kr-greeting {
  font-size: 36px; font-weight: 800;
  letter-spacing: -.025em;
  color: #F4F4F5;
}
.kr-user {
  font-size: 18px; color: #A1A1A7; font-weight: 500;
}
.kr-action {
  margin-top: 4px;
  font-size: 14px;
  padding: 6px 16px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  color: #F4F4F5;
}
.kr-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 700;
  margin-top: 8px;
  color: #6B6B72;
  font-variant-numeric: tabular-nums;
}

/* ════════ Mobil / Tablet portrait ════════ */
@media (max-width: 900px) {
  .kiosk-header { padding: 0 16px; grid-template-columns: auto 1fr auto; }
  .kh-left .kh-device { display: none; }
  .kh-time { font-size: 22px; }
  .kh-date { font-size: 11px; }
  .kiosk-stage { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .kiosk-camera-wrap { aspect-ratio: 4/3; min-height: 320px; }
  .kiosk-info { gap: 12px; }
  .kr-card { padding: 40px 28px; }
  .kr-greeting { font-size: 28px; }
}
