/* ============================================================================
   Merkezi Lisans Yönetim Paneli — Giriş ekranı
   İki panelli düzen: sol marka paneli (yeşil gradient) + sağ form paneli.
   Fontlar panelle (admin.css) aynı sistem stack'ini kullanır — dış (Google)
   font bağımlılığı yok (privacy/KVKK + offline + tutarlılık).
   login.js kontratı korunur: #loginForm, #username, #password,
   .toggle-visibility (.t-show/.t-hide + [data-state]), #loginError (.alert-text),
   #loginButton (.btn-label/.btn-spinner, [data-loading]).
   ============================================================================ */

:root {
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;
  --ink: #0f172a;
  --label: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font-system);
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

@keyframes vdFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vdRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vdSpin { to { transform: rotate(360deg); } }

.auth {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ───────────────────────── SOL — MARKA PANELİ ───────────────────────── */
.brand-panel {
  position: relative;
  flex: 1.02;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 56px 48px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 16%, rgba(52,211,153,0.22), transparent 42%),
    radial-gradient(circle at 86% 88%, rgba(4,120,87,0.45), transparent 48%),
    linear-gradient(158deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
}
.bp-texture {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 26px 26px;
}
.bp-orb {
  position: absolute; top: -120px; right: -120px; width: 360px; height: 360px;
  border-radius: 50%; filter: blur(10px); pointer-events: none;
  background: radial-gradient(circle, rgba(52,211,153,0.35), transparent 70%);
}

.bp-logo { position: relative; display: flex; align-items: center; gap: 13px; }
.bp-logo-mark {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--green-400), var(--green-500));
  box-shadow: 0 10px 24px -8px rgba(16,185,129,0.7);
}
.bp-logo-text { display: flex; flex-direction: column; line-height: 1; }
.bp-logo-name { font-weight: 800; font-size: 21px; letter-spacing: -0.4px; }
.bp-logo-sub {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(209,250,229,0.75); margin-top: 5px; font-weight: 600;
}

.bp-center { position: relative; max-width: 460px; }
.bp-title {
  font-weight: 700; font-size: 38px; line-height: 1.18;
  letter-spacing: -0.8px; margin: 0 0 18px;
}
.bp-lead {
  font-size: 16px; line-height: 1.6; color: rgba(209,250,229,0.82);
  margin: 0 0 30px; max-width: 400px;
}

.bp-features { list-style: none; margin: 0 0 34px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.bp-features li { display: flex; align-items: center; gap: 12px; }
.bp-feat-text { font-size: 14.5px; color: rgba(236,253,245,0.92); font-weight: 500; }
.bp-check {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255,255,255,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m5 12.5 4.2 4.2L19 6.5' stroke='%236ee7b7' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.bp-card {
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 18px; padding: 18px 20px; max-width: 380px;
  box-shadow: 0 24px 50px -22px rgba(0,0,0,0.5);
  animation: vdRise 0.7s ease both;
}
.bp-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bp-card-id { display: flex; align-items: center; gap: 11px; }
.bp-card-icon {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14);
}
.bp-card-titles { line-height: 1.3; display: flex; flex-direction: column; }
.bp-card-title { font-size: 13.5px; font-weight: 600; }
.bp-card-sub { font-size: 11.5px; color: rgba(209,250,229,0.65); }
.bp-card-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(52,211,153,0.18); color: #6ee7b7; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.bp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-400); }
.bp-card-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: rgba(209,250,229,0.72); margin-bottom: 7px;
}
.bp-card-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.14); overflow: hidden; }
.bp-card-bar > span { display: block; width: 72%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-400), var(--green-500)); }

.bp-footer {
  position: relative; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: rgba(209,250,229,0.6);
}

/* ───────────────────────── SAĞ — FORM PANELİ ───────────────────────── */
.form-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; background: #fbfdfc;
}
.form-box { width: 100%; max-width: 392px; animation: vdRise 0.5s ease both; }

.form-brand { display: none; align-items: center; gap: 11px; margin-bottom: 26px; }
.form-brand .bp-logo-mark { width: 38px; height: 38px; }
.form-brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.4px; color: var(--ink); }

.form-head { margin-bottom: 30px; }
.form-head h2 {
  font-weight: 700; font-size: 27px;
  letter-spacing: -0.5px; margin: 0 0 8px; color: var(--ink);
}
.form-head p { font-size: 14.5px; color: var(--slate-500); margin: 0; }

/* Hata kutusu */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.4;
  margin-bottom: 20px; animation: vdFade 0.25s ease both;
}
/* hidden attribute'u .alert display:flex'i ezmesin (login.js hidden ile gizler) */
.alert[hidden] { display: none; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-icon { display: flex; flex-shrink: 0; margin-top: 1px; }
.alert-text { font-weight: 500; }

/* Form */
.login-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; }
.field > label { font-size: 13px; font-weight: 600; color: var(--label); margin-bottom: 7px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: flex; pointer-events: none;
}
.input-wrap input {
  width: 100%; padding: 13px 14px 13px 44px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: var(--font-system); color: var(--ink);
  background: #ffffff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input::placeholder { color: #b4c0cd; }
.input-wrap input:focus { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(16,185,129,0.13); }
/* göster/gizle butonu olan input'ta sağ boşluk */
.input-wrap input.has-toggle { padding-right: 70px; }

.toggle-visibility {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--slate-500);
  padding: 6px 8px; font-family: var(--font-system);
}
.toggle-visibility:hover { color: var(--ink); }
/* login.js [data-state] ile geçiş yapar; varsayılan "Göster" görünür */
.toggle-visibility .t-hide { display: none; }
.toggle-visibility[data-state="visible"] .t-show { display: none; }
.toggle-visibility[data-state="visible"] .t-hide { display: inline; }

.btn-primary {
  margin-top: 6px; width: 100%; padding: 14px;
  border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, var(--green-600), var(--green-700));
  color: #ffffff; font-family: var(--font-system); font-weight: 600; font-size: 15.5px;
  box-shadow: 0 12px 24px -10px rgba(5,150,105,0.7);
  transition: transform .12s, box-shadow .15s, opacity .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary:hover { box-shadow: 0 16px 30px -10px rgba(5,150,105,0.75); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { cursor: default; opacity: 0.8; transform: none; box-shadow: 0 12px 24px -10px rgba(5,150,105,0.5); }

.btn-spinner { display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45); border-top-color: #ffffff; animation: vdSpin .7s linear infinite; }
.btn-primary[data-loading="true"] .btn-spinner { display: inline-block; }

.form-foot {
  display: flex; align-items: center; gap: 7px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid #eef2f1;
  font-size: 12px; color: var(--slate-400); line-height: 1.5;
}
.form-foot svg { flex-shrink: 0; }

/* ───────────────────────── RESPONSIVE ───────────────────────── */
@media (max-width: 900px) {
  .brand-panel { display: none; }
  .form-panel { background: #ffffff; padding: 32px 22px; }
  .form-brand { display: flex; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  .bp-card, .form-box, .alert { animation: none; }
  .btn-spinner { animation-duration: 1.2s; }
  .btn-primary, .input-wrap input { transition: none; }
}
