/* ===== Central Turbo PIN Gate ===== */

.pin-gate-page {
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(17, 17, 17, .04), transparent 32%),
    linear-gradient(180deg, #faf8f4 0%, #f4efe8 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pin-gate-shell {
  width: min(100%, 380px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.pin-gate-header {
  width: 100%;
  display: flex;
  justify-content: center;
  animation: pinGateHeaderIn .42s cubic-bezier(.22, 1, .36, 1) both;
}

.pin-gate-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.pin-gate-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
  display: block;
  animation: pinGateLogoIn .54s cubic-bezier(.22, 1, .36, 1) .04s both;
}

.pin-gate-brand-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.pin-gate-company {
  margin: 0;
  color: #18181b;
  font-size: 15px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: .02em;
  font-family: inherit;
}

.pin-gate-subtitle {
  margin: 0;
  color: #57534e;
  font-size: 13px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -.01em;
  font-family: inherit;
}

.pin-gate-message {
  width: min(100%, 340px);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  font-family: inherit;
  margin-bottom: 14px;
  box-sizing: border-box;
  animation: pinGateMessageIn .22s ease both;
}

.pin-gate-message-info {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.08);
}

.pin-gate-message-error {
  color: #b42318;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.08);
}

.pin-gate-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: pinGateBoxIn .48s cubic-bezier(.22, 1, .36, 1) .08s both;
}

.pin-gate-box {
  width: min(100%, 340px);
  min-height: 74px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  border: 1px solid #ddd5ca;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 16px 42px rgba(17, 17, 17, .06);
  cursor: text;
  overflow: hidden;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    background .22s ease;
}

.pin-gate-box.is-focused {
  border-color: #b8aea2;
  background: #fff;
  box-shadow:
    0 18px 48px rgba(17, 17, 17, .08),
    0 0 0 5px rgba(17, 17, 17, .04);
  transform: translateY(-1px);
}

.pin-gate-box.is-error {
  border-color: #fecaca;
  background: #fffafa;
  animation: pinGateShake .3s ease both;
}

.pin-gate-box.is-checking {
  border-color: #111;
  background: #fff;
  box-shadow:
    0 20px 54px rgba(17, 17, 17, .10),
    0 0 0 5px rgba(17, 17, 17, .055);
}

.pin-gate-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: .01;
  color: transparent;
  background: transparent;
  caret-color: transparent;
}

.pin-gate-input:focus {
  outline: none;
}

.pin-gate-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  transition:
    opacity .28s ease,
    transform .28s cubic-bezier(.22, 1, .36, 1),
    filter .28s ease;
}

.pin-gate-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #cfd2d6;
  background: #f6f7f8;
  box-shadow: inset 0 1px 2px rgba(17, 17, 17, .04);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.pin-gate-dot.is-filled {
  background: #111;
  border-color: #111;
  transform: scale(1.05);
  box-shadow: 0 8px 18px rgba(17, 17, 17, .18);
  animation: pinGateDotPop .18s cubic-bezier(.22, 1, .36, 1) both;
}

.pin-gate-dot.is-active {
  border-color: #a1a1aa;
  animation: pinGateActiveBreath 1.15s ease-in-out infinite;
}

.pin-gate-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  transition:
    opacity .28s ease,
    transform .28s cubic-bezier(.22, 1, .36, 1);
}

.pin-gate-loader span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #111;
  opacity: .28;
  transform: translateY(0) scale(.86);
}

.pin-gate-loader span:nth-child(1) {
  animation-delay: 0s;
}

.pin-gate-loader span:nth-child(2) {
  animation-delay: .16s;
}

.pin-gate-loader span:nth-child(3) {
  animation-delay: .32s;
}

.pin-gate-box.is-checking .pin-gate-dots {
  opacity: 0;
  transform: translateY(-4px) scale(.96);
  filter: blur(2px);
}

.pin-gate-box.is-checking .pin-gate-loader {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pin-gate-box.is-checking .pin-gate-loader span {
  animation: pinGateLoaderDot 1.05s cubic-bezier(.45, 0, .2, 1) infinite;
}

.pin-gate-box.is-error .pin-gate-dot {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 8px 18px rgba(239, 68, 68, .20);
}

@keyframes pinGateHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pinGateLogoIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pinGateBoxIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pinGateMessageIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pinGateDotPop {
  0% {
    transform: scale(.84);
  }

  72% {
    transform: scale(1.16);
  }

  100% {
    transform: scale(1.05);
  }
}

@keyframes pinGateActiveBreath {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, .03);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(17, 17, 17, .055);
  }
}

@keyframes pinGateLoaderDot {
  0%, 100% {
    opacity: .28;
    transform: translateY(0) scale(.86);
  }

  35% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }

  70% {
    opacity: .45;
    transform: translateY(0) scale(.92);
  }
}

@keyframes pinGateShake {
  0%, 100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }

  75% {
    transform: translateX(-2px);
  }
}

@media (max-width: 560px) {
  .pin-gate-page {
    padding: 18px;
  }

  .pin-gate-shell {
    width: 100%;
    gap: 15px;
  }

.pin-gate-brand {
  gap: 8px;
}

.pin-gate-logo {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.pin-gate-company {
  font-size: 14px;
}

.pin-gate-subtitle {
  font-size: 12px;
}

  .pin-gate-box {
    width: min(100%, 320px);
    min-height: 70px;
    border-radius: 26px;
  }

  .pin-gate-dots {
    gap: 11px;
  }

  .pin-gate-dot {
    width: 15px;
    height: 15px;
  }

  .pin-gate-loader {
    gap: 6px;
  }

  .pin-gate-loader span {
    width: 6px;
    height: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-gate-header,
  .pin-gate-logo,
  .pin-gate-form,
  .pin-gate-message,
  .pin-gate-box,
  .pin-gate-dot,
  .pin-gate-dots,
  .pin-gate-loader,
  .pin-gate-loader span {
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }
}

/* Custom numeric keypad sekelas Apple iOS Lock Screen - ONLY shown on mobile/tablet */
.pin-gate-keypad {
  display: none;
}

@media (max-width: 768px) {
  .pin-gate-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    justify-items: center;
    margin-top: 36px;
    width: 100%;
    max-width: 280px;
    animation: pinGateBoxIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }
}

.keypad-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.04);
  border: 1px solid rgba(24, 24, 27, 0.02);
  color: #18181b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s, transform 0.1s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1.1;
  padding-top: 3px;
  box-sizing: border-box;
}

.keypad-btn .num {
  font-size: 27px;
  font-weight: 500;
  color: #18181b;
}

.keypad-btn .letters {
  font-size: 9px;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: 0.5px;
  margin-top: -2px;
}

.keypad-btn:active {
  background-color: rgba(24, 24, 27, 0.12);
  transform: scale(0.92);
  transition: transform 0.05s, background-color 0.05s;
}

.keypad-btn-empty {
  width: 72px;
  height: 72px;
}

.keypad-btn-backspace {
  background: transparent;
  border: none;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
}

.keypad-btn-backspace:active {
  background-color: transparent;
  color: #18181b;
  transform: scale(0.92);
}

@media (max-width: 560px) {
  .pin-gate-keypad {
    gap: 12px;
    margin-top: 28px;
    max-width: 260px;
  }
  
  .keypad-btn {
    width: 66px;
    height: 66px;
    padding-top: 2px;
  }
  
  .keypad-btn .num {
    font-size: 24px;
  }
  
  .keypad-btn .letters {
    font-size: 8px;
    letter-spacing: 0.4px;
    margin-top: -1px;
  }

  .keypad-btn-empty {
    width: 66px;
    height: 66px;
  }
}

/* ==========================================================================
   Apple Sequoia System Initializer Splash Screen Overlay (Option 1)
   ========================================================================== */
.apple-splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(2, 132, 199, 0.08), transparent 60%),
    linear-gradient(180deg, #faf8f4 0%, #f4efe8 100%);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  user-select: none;
}

.apple-splash-overlay.is-dissolving {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
  pointer-events: none;
}

.splash-content-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  width: 90%;
  animation: splashContentEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.splash-logo-container {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.splash-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(2, 132, 199, 0.35);
  animation: splashPulseRing 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.splash-logo-badge {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: #ffffff;
  border: 1.5px solid rgba(2, 132, 199, 0.2);
  box-shadow: 0 16px 36px -6px rgba(2, 132, 199, 0.25), 0 4px 12px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.splash-logo-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.splash-brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
}

.splash-brand-subtitle {
  margin: 2px 0 24px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  font-family: inherit;
}

.splash-progress-track {
  width: 180px;
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #6366f1 100%);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}

.splash-status-text {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

@keyframes splashPulseRing {
  0% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.92);
    opacity: 0.8;
  }
}

@keyframes splashContentEntrance {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}