/* ============================================================
   LOGIN PAGE - CLEAN MINIMAL DESIGN
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --login-blue: #1f293b;
  --login-blue-hover: #0f172a;
  --bg-page: #f0f3f8;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --input-bg: #f8fafc;
  --input-border: #e2e8f0;
  --input-focus-border: rgba(31, 41, 59, 0.45);
  --input-focus-shadow: rgba(31, 41, 59, 0.10);
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #b91c1c;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #047857;
}

/* ---------- DARK THEME ---------- */
[data-theme="dark"] {
  --login-blue: #475569;
  --login-blue-hover: #64748b;
  --bg-page: #111827;
  --bg-card: #1f2937;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.08);
  --input-focus-border: rgba(31, 41, 59, 0.45);
  --input-focus-shadow: rgba(71, 85, 105, 0.18);
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.2);
  --error-text: #fca5a5;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.2);
  --success-text: #6ee7b7;
}

body {
  font-family: 'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
}

.particles { position: fixed; inset: 0; z-index: 0; }

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 48px 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  animation: cardAppear 0.4s ease-out;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* LOGO */
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-icon {
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg, .logo-icon img { max-width: 220px; max-height: 60px; width: auto; height: auto; object-fit: contain; }

.login-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ALERTS */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 24px;
}

.alert svg { width: 16px; height: 16px; flex-shrink: 0; }

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

/* FORM */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 11px 16px 11px 42px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--input-focus-border);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.input-wrapper input::placeholder { color: var(--text-muted); }

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s;
}

.password-toggle:hover { color: var(--login-blue); }
.password-toggle svg { width: 16px; height: 16px; display: block; }

/* LOGIN BUTTON */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--login-blue);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.btn-login:hover {
  background: var(--login-blue-hover);
  box-shadow: 0 2px 8px rgba(31, 41, 59, 0.22);
}

.btn-login:active { transform: translateY(0); }

.btn-login svg { width: 16px; height: 16px; position: relative; z-index: 1; }
.btn-login span { position: relative; z-index: 1; }

/* FOOTER */
.login-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  /* iOS auto-zoom önleme: input font 16px+ olmalı */
  .input-wrapper input { font-size: 16px; }
  .btn-login { min-height: 44px; }
}

@media (max-width: 480px) {
  .login-card { padding: 32px 24px; }
}
