/* ═══════════════════════════════════════════════════════
   Saflio Kiosk — Auth screen styles (PIN pad / provision / checking)
   Dedicated global stylesheet so runtime-injected auth HTML is always styled
   (Astro scoped <style> blocks do NOT apply to innerHTML-injected elements).
   Light theme — matches the register's white canvas + orange accent.
   ═══════════════════════════════════════════════════════ */

.kiosk-auth-shell {
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(249,115,22,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(249,115,22,0.08), transparent 55%),
    linear-gradient(160deg, #fffaf5 0%, #ffffff 55%, #fdf1e6 100%);
  position: relative;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ka-bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ka-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem;
}

.ka-card {
  background: #ffffff;
  border: 1px solid #f3e6d9;
  border-radius: 28px;
  padding: 2.4rem 2.2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(120,60,20,0.10), 0 2px 8px rgba(120,60,20,0.05);
}
.ka-card-compact {
  padding: 2.2rem 1.8rem 1.6rem;
}

.ka-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f97316;
}
.ka-brand .ka-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: #fff;
}

.ka-icon {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.ka-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: #1c1917;
}

.ka-desc {
  font-size: 0.9rem;
  color: #78716c;
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.ka-device-id-box {
  background: #faf7f4;
  border: 1px solid #f0e6db;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.ka-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a8a29e;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ka-device-id {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: #f97316;
  word-break: break-all;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  user-select: all;
}

.ka-copy-btn {
  background: rgba(249,115,22,0.10);
  color: #f97316;
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 8px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ka-copy-btn:hover {
  background: rgba(249,115,22,0.18);
}

.ka-steps {
  text-align: left;
  margin-bottom: 1.25rem;
}

.ka-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: #57534e;
  line-height: 1.4;
}
.ka-step strong {
  color: #1c1917;
  font-weight: 600;
}
.ka-step:not(:last-child) {
  border-bottom: 1px solid #f5f0ea;
}

.ka-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(249,115,22,0.12);
  color: #f97316;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ka-refresh-btn,
.ka-unlock-btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 6px 18px rgba(249,115,22,0.28);
}
.ka-refresh-btn:hover,
.ka-unlock-btn:hover {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 8px 22px rgba(249,115,22,0.34);
}
.ka-unlock-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── PIN Entry ── */

.ka-pin-row {
  margin-bottom: 0.9rem;
}

.ka-pin-input {
  width: 100%;
  max-width: 220px;
  padding: 0.85rem 1rem;
  background: #faf7f4;
  border: 2px solid #ece2d6;
  border-radius: 14px;
  color: #1c1917;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.35em;
  font-family: 'SF Mono', 'Fira Code', monospace;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ka-pin-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249,115,22,0.12);
  background: #ffffff;
}
.ka-pin-input::placeholder {
  color: #d6d0c9;
  letter-spacing: 0.05em;
  font-size: 1rem;
}

.ka-pin-error {
  font-size: 0.82rem;
  color: #dc2626;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #fef2f2;
  border-radius: 10px;
}

.ka-pin-locked {
  font-size: 0.88rem;
  color: #dc2626;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

/* ── Numpad ── */

.ka-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  max-width: 280px;
  width: 100%;
}

.ka-num-btn {
  height: 64px;
  border: 1px solid #ece2d6;
  border-radius: 18px;
  background: #ffffff;
  color: #1c1917;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 2px 6px rgba(120,60,20,0.06);
}
.ka-num-btn:hover {
  background: #faf7f4;
  border-color: #f3d9c4;
}
.ka-num-btn:active {
  transform: scale(0.95);
  background: rgba(249,115,22,0.12);
  border-color: #f97316;
}

.ka-num-back {
  font-size: 1.2rem;
  color: #a8a29e;
}

.ka-num-empty {
  height: 64px;
}

.ka-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #f3e6d9;
  border-top-color: #f97316;
  border-radius: 50%;
  animation: ka-spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

.ka-loading-text {
  color: #a8a29e;
  font-size: 0.88rem;
}

@keyframes ka-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .ka-card {
    padding: 1.6rem 1.25rem;
    border-radius: 22px;
  }
  .ka-card-compact {
    padding: 1.6rem 1rem 1.1rem;
  }
  .ka-icon { font-size: 2.2rem; }
  .ka-title { font-size: 1.3rem; }
  .ka-pin-input { max-width: 190px; font-size: 1.4rem; }
  .ka-num-btn { height: 58px; font-size: 1.25rem; border-radius: 15px; }
  .ka-numpad { max-width: 250px; gap: 0.45rem; }
}

@media (max-height: 700px) {
  .ka-card { padding: 1.3rem 1rem; }
  .ka-icon { font-size: 1.9rem; margin-bottom: 0.35rem; }
  .ka-desc { margin-bottom: 0.8rem; }
  .ka-numpad { gap: 0.4rem; }
  .ka-num-btn { height: 50px; font-size: 1.1rem; border-radius: 12px; }
  .ka-pin-input { padding: 0.6rem 0.75rem; font-size: 1.3rem; }
}
