/* ================================================================
   Etiket Studio · Login — v2 "Aydınlık"
   Beyaz kart + indigo vurgu; yumuşak indigo orb'lu açık zemin.
   Tek tema (dark yok — 2026-07-06 kararı). Sınıf sözleşmesi eski
   dosya ile aynı; şablonlar/JS değişmedi.
   ================================================================ */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f2f3f9;
  --border: #e4e6f0;
  --border-strong: #c9cede;
  --text: #191c2e;
  --text-muted: #6c7288;
  --text-soft: #3e4459;
  --brand: #0284c7;
  --brand-2: #38bdf8;
  --brand-soft: #e0f2fe;
  --brand-border: #bae6fd;
  --brand-grad: linear-gradient(135deg, #0284c7, #38bdf8);
  --danger: #dc2626;
  --success: #0e9f6e;
  --shadow-lg: 0 24px 60px -20px rgba(25, 28, 46, 0.18), 0 8px 24px -12px rgba(2, 132, 199, 0.12);
  --shadow-brand: 0 6px 16px -6px rgba(2, 132, 199, 0.45);
  --focus-ring: 0 0 0 4px rgba(2, 132, 199, 0.16);
  --radius-lg: 20px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --transition: 200ms cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  color-scheme: light;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(2, 132, 199, 0.10), transparent 60%),
    radial-gradient(800px 440px at 108% 12%, rgba(56, 189, 248, 0.10), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}

/* ============ Layout shell ============ */
.auth-shell {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  padding-top: max(env(safe-area-inset-top), 24px);
  padding-bottom: max(env(safe-area-inset-bottom), 24px);
  isolation: isolate;
}

/* ============ Dekoratif arka plan ============ */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  z-index: -1;
  animation: float 16s ease-in-out infinite;
  will-change: transform;
}
.bg-orb--a { width: 360px; height: 360px; left: -80px;  top: -60px;
  background: radial-gradient(circle at 30% 30%, #0284c7, transparent 62%); }
.bg-orb--b { width: 320px; height: 320px; right: -80px; top: 30%;
  background: radial-gradient(circle at 70% 30%, #38bdf8, transparent 62%);
  animation-delay: -4s; }
.bg-orb--c { width: 280px; height: 280px; left: 30%; bottom: -120px;
  background: radial-gradient(circle at 50% 50%, #7dd3fc, transparent 62%);
  animation-delay: -8s; }

.bg-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(25, 28, 46, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 28, 46, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: 0.5;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, -28px, 0) scale(1.04); }
}

/* ============ Kart ============ */
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(22px, 5vw, 36px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: rise 600ms cubic-bezier(.2, .8, .2, 1) both;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ Başlık / Marka ============ */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  box-shadow: var(--shadow-brand);
}
.brand-mark svg { width: 40px; height: 40px; }

.auth-title {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ============ Status (hata/başarı) ============ */
.status {
  margin: 0 0 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slide-in 280ms ease both;
}
.status[data-type="error"]   { color: #b42323; background: #fdecec; border-color: #f3c5c5; }
.status[data-type="success"] { color: #0b7d57; background: #e6f7f0; border-color: #bfe8d7; }
.status[data-type="info"]    { color: #0369a1; background: var(--brand-soft); border-color: var(--brand-border); }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ Form ============ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.input-wrap:focus-within {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.input-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 52px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 12px 0 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;          /* iOS auto-zoom önlemek için >= 16px */
  font-family: inherit;
  letter-spacing: 0.01em;
}

.input-wrap input::placeholder { color: var(--text-muted); opacity: 0.7; }

/* Chrome autofill — açık zeminde beyaz kalsın */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus,
.input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: var(--text);
  transition: background-color 99999s ease-in-out 0s;
}

.toggle-eye {
  width: 44px;
  height: 52px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: color var(--transition), background-color var(--transition);
}
.toggle-eye:hover, .toggle-eye:focus-visible {
  color: var(--text);
  background: var(--brand-soft);
  outline: none;
}
.eye-icon__slash {
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.18s ease;
}
.toggle-eye.is-revealed .eye-icon__slash {
  opacity: 1;
}

/* ============ Beni hatırla + linkler ============ */
.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  user-select: none;
  cursor: pointer;
  margin-top: -2px;
}
.remember input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all var(--transition);
}
.remember input:checked {
  background: var(--brand-grad);
  border-color: transparent;
}
.remember input:checked::after {
  content: '';
  width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
}

.link-muted {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color var(--transition);
}
.link-muted:hover { color: var(--brand); }

.link-strong {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.link-strong:hover { color: #0369a1; text-decoration: underline; }

/* ============ Şifre gücü çubuğu ============ */
.strength-bar {
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.strength-bar__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 240ms ease, background-color 240ms ease;
}
.strength-bar__fill[data-level="2"] { background: #f59e0b; }
.strength-bar__fill[data-level="3"] { background: #eab308; }
.strength-bar__fill[data-level="4"] { background: var(--success); }

/* ============ Ana buton ============ */
.btn-primary {
  position: relative;
  margin-top: 8px;
  height: 54px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: white;
  background: var(--brand-grad);
  box-shadow: var(--shadow-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  transition: transform var(--transition), filter var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
  pointer-events: none;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-brand);
}
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-arrow { transition: transform var(--transition); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  display: none;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary[data-loading="true"] .btn-label,
.btn-primary[data-loading="true"] .btn-arrow { display: none; }
.btn-primary[data-loading="true"] .btn-spinner { display: inline-block; }

/* ============ Footer / İpucu ============ */
.signup-hint {
  margin: 4px 0 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-footer .dot { opacity: 0.5; }

/* ============ Responsive ============ */
@media (min-width: 480px) {
  .auth-card { padding: 36px; }
  .auth-header { gap: 18px; margin-bottom: 26px; }
  .brand-mark { width: 72px; height: 72px; }
  .brand-mark svg { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .auth-card { padding: 20px; border-radius: 18px; }
  .input-wrap input { font-size: 15.5px; }
}

/* ============ Erişilebilirlik ============ */
@media (prefers-reduced-motion: reduce) {
  .bg-orb { animation: none; }
  .auth-card { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
