/* NEXA Forge — Auth & Team Setup (Apple tarzı) */

#auth-screen {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg-primary);
  z-index: 50;
}

/* Kenarlardaki kaçan teknik ikonlar */
.auth-flee-icon {
  position: absolute;
  font-family: 'Material Symbols Rounded';
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 48;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}

#auth-container,
.auth-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 12px 0;
}

/* Marka bloğu — kartın üstünde, büyük */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-bottom: 38px;
}

.auth-logo-mark {
  width: 108px; height: 108px;
  border-radius: 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 44px;
  box-shadow: var(--card-glow);
}
.auth-logo-mark.sm { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }

.auth-logo-mark-img {
  width: 108px; height: 108px;
  object-fit: contain;
}
.auth-logo-mark-img.sm { width: 56px; height: 56px; }

.auth-wordmark {
  font-family: var(--font-display);
  font-weight: 600; font-size: 62px;
  color: var(--text-primary);
  letter-spacing: -1.2px;
  line-height: 1;
}
.auth-wordmark span { font-weight: 500; color: var(--text-secondary); }
.auth-wordmark.sm { font-size: 28px; letter-spacing: -0.5px; }

/* Kart */
.auth-card {
  width: 400px;
  max-width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--card-glow);
  flex-shrink: 0;
}

/* Takım / Yönetim segmenti */
.auth-mode-seg {
  display: flex;
  background: rgba(0,0,0,0.045);
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 24px;
}
[data-theme="dark"] .auth-mode-seg { background: rgba(255,255,255,0.06); }

.auth-seg-btn {
  flex: 1;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--t-base);
}
.auth-seg-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .auth-seg-btn.active { background: var(--bg-tertiary); }

/* Alanlar */
.auth-field { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-alt);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.auth-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.auth-input::placeholder { color: var(--text-muted); }

.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent-primary);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  margin-top: 6px;
  transition: filter var(--t-base), transform var(--t-fast);
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }

.auth-btn-outline {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--accent-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--t-base);
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn-outline:hover { background: var(--accent-soft); }

.auth-foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 20px;
}
.auth-link { color: var(--accent-primary); font-weight: 600; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }

/* Hata kutuları */
#auth-error, #admin-error, #team-setup-error, #reset-password-error {
  display: none;
  background: rgba(255,55,95,0.09);
  color: var(--c-red);
  border: 1px solid rgba(255,55,95,0.22);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.45;
}

/* Giriş yapılırken ikonların ortada toplanma animasyonu auth.js'de yönetilir */
#auth-screen.auth-exiting .auth-card,
#auth-screen.auth-exiting .auth-brand,
#auth-screen.auth-exiting #demo-mode-btn,
#auth-screen.auth-exiting #goto-help {
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: scale(0.94);
  opacity: 0;
}

/* ─── TEAM SETUP ──────────────────────────── */
#team-setup-screen {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: var(--bg-primary);
  z-index: 50;
}

#team-setup-box {
  width: 460px;
  max-width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--card-glow);
  margin: auto;
}

#team-setup-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}

.setup-headline { text-align: center; margin-bottom: 24px; }
.setup-headline h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.setup-headline p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }

.setup-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 22px 0 6px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.setup-logout { text-align: center; margin-top: 22px; }
.setup-logout-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all var(--t-base);
}
.setup-logout-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

@media (max-width: 560px) {
  .auth-wordmark { font-size: 40px; }
  .auth-logo-mark { width: 76px; height: 76px; border-radius: 20px; font-size: 30px; }
  .auth-logo-mark-img { width: 76px; height: 76px; }
  .auth-card { padding: 28px 22px; }
}

.auth-wordmark-img {
  height: auto;
  width: 100%;
  max-width: 420px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.auth-wordmark-img.sm {
  height: 40px;
}
@media (max-width: 560px) {
  .auth-wordmark-img { height: 60px; }
}

[data-theme="dark"] .auth-wordmark-img {
  filter: invert(1) brightness(1.8);
}

.auth-password-wrap {
  position: relative;
}
.auth-password-wrap .auth-input {
  padding-right: 42px;
}
.auth-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-password-toggle:hover {
  color: var(--text-primary);
}
.auth-password-toggle .msr {
  font-size: 19px;
}

.auth-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.4;
}
