/**
 * ============================================================================
 * SULTAN SERA — GİRİŞ YAP SAYFASI STİLLERİ
 * ============================================================================
 * variables.css tema değişkenleriyle tam uyumlu split-screen login tasarımı
 * ============================================================================
 */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&display=swap");

/* ============================================================================
 * RESET & BASE
 * ============================================================================ */

.login-page {
  margin: 0;
  padding: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  font-family: "DM Sans", var(--font-family-primary), sans-serif;
  background-color: var(--surface-white);
  overflow: hidden;
}

/* ============================================================================
 * SOL PANEL — MARKA ALANI (TAM YENİDEN TASARIM)
 * ============================================================================ */

.login-brand-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #0d2208;
}

/* ── Arka plan: çok katmanlı derinlik ── */
.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 110% 10%,
      rgba(90, 175, 50, 0.18) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 80% at -20% 90%,
      rgba(34, 100, 15, 0.25) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 100% 100% at 50% 50%,
      rgba(20, 55, 10, 0.9) 0%,
      transparent 100%
    ),
    linear-gradient(160deg, #0d2208 0%, #1a3d0d 40%, #0f2a09 100%);
  z-index: 0;
}

/* ── Geometrik süs: büyük daire ── */
.login-brand-panel::after {
  content: "";
  position: absolute;
  width: 70vmin;
  height: 70vmin;
  border-radius: 50%;
  border: 1px solid rgba(140, 210, 80, 0.08);
  top: -15vmin;
  right: -20vmin;
  z-index: 1;
  pointer-events: none;
}

/* İç içe dekoratif halkalar */
.login-brand-rings {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.login-brand-rings::before {
  content: "";
  position: absolute;
  width: 50vmin;
  height: 50vmin;
  border-radius: 50%;
  border: 1px solid rgba(140, 210, 80, 0.06);
  top: -5vmin;
  right: -10vmin;
}

.login-brand-rings::after {
  content: "";
  position: absolute;
  width: 30vmin;
  height: 30vmin;
  border-radius: 50%;
  border: 1px solid rgba(140, 210, 80, 0.1);
  top: 8vmin;
  right: 4vmin;
}

/* Izgara doku — ince seracılık kafesi efekti */
.login-brand-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 200, 60, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 200, 60, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 30%,
    transparent 100%
  );
}

/* Alt köşe: organik leke */
.login-brand-blob {
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 340px;
  height: 340px;
  border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
  background: radial-gradient(
    circle,
    rgba(58, 130, 28, 0.2) 0%,
    transparent 70%
  );
  z-index: 1;
  pointer-events: none;
  animation: blobPulse 8s ease-in-out infinite;
}

@keyframes blobPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(6deg);
  }
}

/* ── İçerik sarmalayıcı ── */
.login-brand-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

/* ── Üst başlık satırı ── */
.login-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: auto;
}

.login-brand-logo {
  width: clamp(32px, 4vw, 44px);
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  flex-shrink: 0;
}

.login-brand-header-text {
  display: flex;
  flex-direction: column;
}

.login-brand-header-name {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.login-brand-header-sub {
  font-size: clamp(0.6rem, 0.8vw, 0.72rem);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
  margin-top: 2px;
  line-height: 1;
}

/* ── Orta: Büyük hero metin ── */
.login-brand-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  padding: 0;
}

.login-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(12px, 1.8vh, 20px);
}

.login-brand-eyebrow-line {
  width: 28px;
  height: 1.5px;
  background: rgba(140, 210, 80, 0.7);
}

.login-brand-eyebrow-text {
  font-size: clamp(0.62rem, 0.85vw, 0.75rem);
  font-weight: 500;
  color: rgba(140, 210, 80, 0.85);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, min(3.2vw, 4.5vh), 3rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(10px, 1.5vh, 18px) 0;
}

.login-brand-title em {
  font-style: italic;
  color: rgba(140, 210, 80, 0.9);
}

.login-brand-subtitle {
  font-size: clamp(0.78rem, min(1.1vw, 1.5vh), 0.95rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  max-width: 34ch;
  margin: 0 0 clamp(20px, 3vh, 32px) 0;
}

/* ── Stat kutucukları ── */
.login-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  margin-bottom: clamp(20px, 3vh, 32px);
}

.login-brand-stat {
  padding: clamp(10px, 1.4vh, 16px) clamp(10px, 1.2vw, 16px);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease;
}

.login-brand-stat:last-child {
  border-right: none;
}

.login-brand-stat:hover {
  background: rgba(140, 210, 80, 0.06);
}

.stat-number {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.1rem, min(1.8vw, 2.5vh), 1.6rem);
  font-weight: 700;
  color: rgba(140, 210, 80, 0.9);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: clamp(0.55rem, 0.75vw, 0.68rem);
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.3;
}

/* ── Slider ── */
.login-brand-slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(140, 210, 80, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Üst şerit — label */
.login-brand-slider-container::before {
  content: "CANLI ÜRETİM";
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 20;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Canlı göstergesi */
.login-brand-slider-container::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 14px;
  z-index: 20;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: liveBlip 2s ease-out infinite;
}

@keyframes liveBlip {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

/* Alt gradient örtüsü */
.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(10, 25, 6, 0.7) 100%
  );
  z-index: 5;
  pointer-events: none;
}

.login-brand-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slider-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition:
    opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1.4s ease;
  transform: scale(1.05);
}

.slider-item.active {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.dot.active {
  background: #a3e635;
  width: 18px;
  border-radius: 10px;
}

/* ── Alt bilgi çubuğu ── */
.login-brand-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(14px, 2vh, 22px);
  padding-top: clamp(10px, 1.4vh, 16px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.login-brand-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-brand-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(140, 210, 80, 0.6);
}

.login-brand-footer-text {
  font-size: clamp(0.58rem, 0.78vw, 0.7rem);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.login-brand-footer-badge {
  font-size: clamp(0.55rem, 0.72vw, 0.65rem);
  color: rgba(140, 210, 80, 0.6);
  border: 1px solid rgba(140, 210, 80, 0.2);
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================================
 * SAĞ PANEL — GİRİŞ FORMU (AYNI KALIYOR)
 * ============================================================================ */

.login-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: min(40px, 5vh) min(40px, 6vw);
  background-color: #fafafa;
  position: relative;
}

.login-form-container {
  width: 100%;
  max-width: clamp(280px, 30vw, 400px);
}

.login-form-logo {
  width: 64px;
  height: 64px;
  margin-bottom: var(--spacing-4);
  object-fit: contain;
  display: none;
}

.login-form-heading {
  font-size: clamp(1.1rem, min(2.5vw, 3vh), 1.6rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0 0 min(4px, 0.5vh) 0;
  line-height: var(--line-height-tight);
}

.login-form-description {
  font-size: clamp(0.75rem, min(1.1vw, 1.5vh), 0.9rem);
  color: var(--text-secondary);
  margin: 0 0 min(20px, 2.5vh) 0;
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-regular);
}

/* ============================================================================
 * FORM ELEMENTS
 * ============================================================================ */

.login-form-group {
  margin-bottom: min(12px, 1.5vh);
}

.login-form-label {
  display: block;
  font-size: clamp(0.75rem, min(1.1vw, 1.5vh), 0.88rem);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: min(6px, 0.7vh);
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color var(--transition-base);
}

.login-input {
  width: 100%;
  padding: min(12px, 1.6vh) min(12px, 1.6vh) min(12px, 1.6vh) 44px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-primary);
  background-color: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-input::placeholder {
  color: var(--surface-dark-gray);
  font-weight: var(--font-weight-light);
}

.login-input:hover {
  border-color: #d1d5db;
}

.login-input:focus {
  border-color: var(--brand-green-primary);
  box-shadow: 0 0 0 4px rgba(78, 142, 51, 0.1);
}

.login-input.login-input-no-icon {
  padding-left: min(11px, 1.4vh);
}

.login-password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition-base);
}

.login-password-toggle:hover {
  color: var(--brand-green-primary);
}

/* ============================================================================
 * FORM OPTIONS ROW
 * ============================================================================ */

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: min(14px, 1.8vh);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: min(16px, 2vh);
  height: min(16px, 2vh);
  accent-color: var(--brand-green-primary);
  cursor: pointer;
}

.login-remember-text {
  font-size: clamp(0.7rem, min(1vw, 1.3vh), 0.85rem);
  color: var(--text-secondary);
  font-weight: var(--font-weight-regular);
  user-select: none;
}

.login-forgot {
  font-size: clamp(0.7rem, min(1vw, 1.3vh), 0.85rem);
  color: var(--brand-green-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-base);
}

.login-forgot:hover {
  color: #3a7228;
  text-decoration: underline;
}

/* ============================================================================
 * SUBMIT BUTTON
 * ============================================================================ */

.login-btn {
  width: 100%;
  padding: min(14px, 1.8vh);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #2d5a1f;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(45, 90, 31, 0.2);
  letter-spacing: 0.3px;
}

.login-btn:hover {
  background: #3a7228;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 90, 31, 0.3);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(78, 142, 51, 0.3);
}

/* ============================================================================
 * DIVIDER & FOOTER
 * ============================================================================ */

.login-divider {
  display: flex;
  align-items: center;
  margin: min(12px, 1.5vh) 0;
  gap: var(--spacing-2);
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--surface-medium-gray);
}

.login-divider-text {
  font-size: clamp(0.6rem, min(0.9vw, 1.2vh), 0.75rem);
  color: var(--text-secondary);
  white-space: nowrap;
}

.login-form-footer {
  text-align: center;
  margin-top: min(10px, 1.2vh);
  font-size: clamp(0.6rem, min(0.9vw, 1.2vh), 0.75rem);
  color: var(--text-secondary);
  font-weight: var(--font-weight-light);
}

.login-form-footer a {
  color: var(--brand-green-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.login-form-footer a:hover {
  text-decoration: underline;
}

/* ============================================================================
 * ERROR STATE
 * ============================================================================ */

.login-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--border-radius-md);
  padding: min(8px, 1vh) min(12px, 1.5vh);
  margin-bottom: min(10px, 1.2vh);
  display: none;
  align-items: center;
  gap: var(--spacing-1);
  font-size: clamp(0.7rem, min(1vw, 1.3vh), 0.85rem);
  color: #dc2626;
}

.login-error.show {
  display: flex;
}

/* ============================================================================
 * RESPONSIVE
 * ============================================================================ */

@media (max-width: 1200px) {
  .login-brand-title {
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  }
  .login-brand-stats {
    gap: 0;
  }
}

@media (max-width: 768px) {
  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    flex: 1;
    justify-content: center;
    padding: min(24px, 4vh) min(24px, 5vw);
    overflow: hidden;
    background: linear-gradient(
      180deg,
      rgba(78, 142, 51, 0.03) 0%,
      var(--surface-white) 40%
    );
  }

  .login-form-logo {
    display: block;
    width: min(56px, 8vh);
    height: auto;
    margin-bottom: min(12px, 1.5vh);
  }

  .login-form-container {
    max-width: 360px;
  }

  .login-form-heading {
    text-align: center;
  }

  .login-form-description {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .login-form-panel {
    padding: min(16px, 3vh) min(16px, 4vw);
  }
  .login-form-heading {
    font-size: 1.1rem;
  }
  .login-input {
    padding: 8px 8px 8px 32px;
    border-radius: 6px;
  }
  .login-input.login-input-no-icon {
    padding-left: 8px;
  }
  .login-btn {
    padding: 8px;
    border-radius: 6px;
  }
}

@media (max-height: 600px) {
  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    padding: 12px 20px;
    overflow: hidden;
  }

  .login-form-logo {
    display: block;
    width: 40px;
    margin-bottom: 6px;
  }
  .login-form-heading {
    font-size: 1rem;
  }
  .login-form-group {
    margin-bottom: 6px;
  }
  .login-input {
    padding: 7px 8px 7px 30px;
  }
  .login-btn {
    padding: 7px;
  }
}
