/* Giriş ekranları — Pall Mac birebir.
   Kaynaklar (~/pall-build-local):
     açılış      EfeaktifApp/LaunchSplashView.swift
     şirket kodu EfeaktifApp/ActivationGate.swift:95-180 (ActivationView)
     profil      EfeaktifApp/PAL/PALProfiles.swift:263-587 (ProfileSelectionView)
     şifre       EfeaktifApp/PAL/PALProfiles.swift:732-986 (ProfilePinGate)
     wordmark    EfeaktifApp/PALLogo.swift:6-18
   Mac penceresi gizli başlık çubuklu: içerik üstte 28 pt güvenli alanın altından başlar. */

.pg-safe { position: absolute; inset: 28px 0 0 0; display: flex; flex-direction: column; align-items: center; }

/* ------------------------------------------------------------------ açılış */
.pg-splash { position: absolute; inset: 0; display: grid; place-items: center; }
.pg-splash__logo {
  position: relative; width: 132px; height: 132px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.06));   /* .shadow(black .06, radius 12, y 6) */
}
.pg-splash__logo img { width: 132px; height: 132px; object-fit: contain; display: block; }
.pg-splash__shine {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask: url("assets/pall-snap.png") center / contain no-repeat;
  mask: url("assets/pall-snap.png") center / contain no-repeat;
}
.pg-splash__shine::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 160%; height: 160%;                          /* geo × 1.6 */
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.95) 50%, rgba(255,255,255,0) 100%);
  mix-blend-mode: screen;
  transform: translate(-171.6px, -171.6px);           /* sweep −1.3 × 132 */
  animation: pg-sweep 1s ease-in-out infinite;        /* easeInOut 1.0, tekrar, geri dönmeden */
}
@keyframes pg-sweep {
  from { transform: translate(-171.6px, -171.6px); }
  to   { transform: translate(171.6px, 171.6px); }    /* sweep +1.3 × 132 */
}

/* ------------------------------------------------------------------ şirket kodu */
.pg-gate { padding: 24px; gap: 28px; }
.pg-spacer { flex: 1 1 0; min-height: 0; }
.pg-gate__snap { height: 84px; width: auto; display: block; }
.pg-gate__titles { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pg-gate__title { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--pal-text); margin: 0; }
.pg-gate__sub { font-size: 11px; line-height: 14px; color: var(--pal-text2); margin: 0; }
.pg-gate__form { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.pg-gate__field {
  width: 100%; max-width: 320px;
  padding: 14px 18px; border-radius: 999px; border: 0; outline: none;
  font: 400 13px/16px var(--font-mono); text-align: center; color: var(--pal-text);
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.9), inset 0 1px 1.5px rgba(255,255,255,.8),
              0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05);
  transition: box-shadow .2s ease-in-out;
}
.pg-gate__field::placeholder { color: var(--pal-text3); opacity: 1; }
.pg-gate__field:hover { background: rgba(255,255,255,.72); }
.pg-gate__field.is-failed { box-shadow: inset 0 0 0 1px rgba(255,59,48,.55), 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05); }
.pg-gate__err { margin: 0; font-size: 10px; line-height: 13px; color: var(--pal-red); animation: pg-fade .2s ease-in-out; }
.pg-gate__btn {
  width: 100%; max-width: 324px;
  padding: 6px 12px; min-height: 34px; border-radius: 999px;
  font: 600 13px/16px var(--font); color: #fff;
  background: var(--pal-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 .5px rgba(255,255,255,.12), 0 2px 8px rgba(20,23,31,.18);
  transition: opacity .2s ease-in-out, transform .12s ease-out, filter .12s ease-out;
}
.pg-gate__btn:not(:disabled):hover { filter: brightness(1.18); }
.pg-gate__btn:not(:disabled):active { transform: scale(.97); filter: brightness(1.3); }
.pg-gate__btn.is-empty { opacity: .5; }
.pg-gate__foot { margin: 0 0 18px; font-size: 10px; line-height: 13px; color: var(--pal-text3); }

/* ------------------------------------------------------------------ profil seçimi */
.pg-picker { padding: 29px 0 27px; gap: 24px; }   /* 28/28; +1 px: SF satır kutusu farkı (ölçüldü) */
.pg-picker .pg-spacer { min-height: 8px; }
.pg-title { margin: 0; font-size: 22px; line-height: 26px; font-weight: 600; color: var(--pal-text); }

.pg-strip { width: 100%; height: 320px; flex: none; position: relative; outline: none; }
.pg-scroller {
  width: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  /* contentMargins(.horizontal, max(20, (W − 176) / 2)) */
  padding-inline: max(20px, calc(50% - 88px));
  scroll-padding-inline: max(20px, calc(50% - 88px));
}
.pg-scroller::-webkit-scrollbar { display: none; }
.pg-row { display: flex; gap: 20px; padding: 40px 0; width: max-content; align-items: flex-start; }
.pg-row::after { content: ""; flex: none; width: 1px; margin-left: -21px; } /* sağ kenar boşluğu korunur */

.pg-tile {
  flex: none; width: 176px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  scroll-snap-align: center;
  transform-origin: 50% 50%;
  transform: translateY(28px) scale(.62); opacity: .45;
  transition: transform .32s cubic-bezier(.25,.8,.25,1), opacity .32s cubic-bezier(.25,.8,.25,1);
  -webkit-tap-highlight-color: transparent;
}
.pg-tile.is-center { transform: translateY(-18px) scale(1); opacity: 1; }
.pg-tile:focus { outline: none; }
.pg-tile:focus-visible .pg-disc { box-shadow: 0 0 0 3px rgba(0,122,255,.45); }
.pg-disc {
  position: relative; width: 150px; height: 150px; border-radius: 50%;
  flex: none; overflow: hidden;
  /* Liquid Glass daire (etkileşimli) — açık zeminde neredeyse beyaz disk + yumuşak gölge */
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.95), inset 0 1.5px 2px rgba(255,255,255,.85),
              0 2px 6px rgba(0,0,0,.035), 0 10px 26px rgba(0,0,0,.055);
  transition: background .2s ease-out, transform .2s ease-out;
}
.pg-tile:hover .pg-disc { background: rgba(255,255,255,.62); }
.pg-tile:active .pg-disc { transform: scale(.97); }
.pg-name {
  max-width: 176px; font-size: 15px; line-height: 19px; font-weight: 600; color: var(--pal-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-empty { margin: 0; align-self: center; font-size: 13px; color: var(--pal-text2); }

/* "Profilleri Yönet" düğmesinin YERİ: web'de düğme gösterilmez (profil ekleme/düzenleme
   uygulamada kalır) ama Mac'teki dikey ortalama birebir kalsın diye boşluğu durur. */
.pg-manage-slot { height: 33px; flex: none; visibility: hidden; }

/* Avatar: katmanlar üst üste, daireye kırpılmış (PALAvatar.swift:220-228, :311) */
.pm-avatar { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.pm-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }

/* ------------------------------------------------------------------ şifre sayfası */
.pg-sheet-host { position: absolute; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-start; }
.pg-sheet-host.is-open { animation: pg-fade .25s ease-out; }
.pg-sheet {
  margin-top: 44px;
  width: 360px; min-height: 380px;
  background: var(--pal-bg); border-radius: 24px;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.14), 0 24px 70px rgba(0,0,0,.22), 0 6px 18px rgba(0,0,0,.08);
  padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  animation: pg-sheet-in .34s cubic-bezier(.2,.9,.3,1);
}
.pg-sheet.is-leaving { animation: pg-sheet-out .24s ease-in forwards; }
@keyframes pg-sheet-in { from { transform: translateY(-14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pg-sheet-out { to { transform: translateY(-10px) scale(.985); opacity: 0; } }
@keyframes pg-fade { from { opacity: 0; } to { opacity: 1; } }
.pg-sheet__head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.pg-close {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.95), inset 0 1px 1.5px rgba(255,255,255,.8), 0 1px 3px rgba(0,0,0,.08);
}
.pg-close:active { transform: scale(.94); }
.pg-close svg { width: 12px; height: 12px; display: block; }
.pg-sheet__gap { height: 4px; flex: none; }
.pg-sheet__avatar {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden; flex: none;
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.95), 0 2px 5px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.05);
  transition: transform .34s cubic-bezier(.34,1.56,.64,1);   /* spring(response .34, damping .6) */
}
.pg-sheet__avatar.is-ok { transform: scale(1.12); }
.pg-sheet__title { margin: 0; font-size: 15px; line-height: 19px; font-weight: 600; color: var(--pal-text); text-align: center; }
.pg-sheet__sub { margin: 0; font-size: 11px; line-height: 14px; color: var(--pal-text2); text-align: center; transition: color .22s ease-in-out; }
.pg-sheet__sub.is-wrong { color: var(--pal-ink); }
.pg-xfade { animation: pg-fade .22s ease-in-out; }
.pg-dots { display: flex; gap: 16px; padding-top: 2px; }
.pg-dots.is-shake { animation: pg-shake .33s linear; }
@keyframes pg-shake {  /* x 8 px, easeInOut .055, 6 kez ileri-geri; .34 sn'de 0'a */
  0% { transform: translateX(0); }
  8.3% { transform: translateX(8px); } 25% { transform: translateX(-8px); }
  41.6% { transform: translateX(8px); } 58.3% { transform: translateX(-8px); }
  75% { transform: translateX(8px); } 91.6% { transform: translateX(-8px); }
  100% { transform: translateX(0); }
}
.pg-dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--pal-card-tint-em); transform: scale(.78);
  transition: transform .26s cubic-bezier(.34,1.7,.64,1), background-color .18s ease-out;   /* spring(.26, .55) */
}
.pg-dot.is-on { background: var(--pal-ink); transform: scale(1); }
.pg-pin-input { position: absolute; width: 1px; height: 1px; opacity: .02; border: 0; padding: 0; left: 50%; top: 50%; caret-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .pg-splash__shine::before, .pg-sheet, .pg-sheet.is-leaving, .pg-dots.is-shake { animation: none; }
  .pg-tile, .pg-dot, .pg-sheet__avatar { transition: none; }
}
