/**
 * Kurs Takip — tek ekran, boşluksuz eser kolajı
 */

html.login-pending,
body.login-pending {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.login-pending #page-wrapper {
  visibility: hidden;
  pointer-events: none;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #fff;
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}

.login-gate.hidden {
  display: none;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 44%) minmax(0, 56%);
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  max-height: 100dvh;
  padding: clamp(16px, 3vw, 40px);
  background: #fff;
  overflow: hidden;
}

.login-panel-inner {
  width: min(400px, 100%);
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}

.login-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b4fe8 0%, #7c6cf0 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.login-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.login-logo-text {
  font-family: Montserrat, "PT Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a1f36;
}

.login-heading {
  margin: 0 0 8px;
  font-family: Montserrat, "PT Sans", sans-serif;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  color: #111827;
}

.login-lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}

.login-form[hidden] {
  display: none !important;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.login-label em {
  color: #ef4444;
  font-style: normal;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field input::placeholder {
  color: #9ca3af;
}

.login-field input:focus {
  outline: none;
  border-color: #5b4fe8;
  box-shadow: 0 0 0 3px rgba(91, 79, 232, 0.12);
}

.login-password-wrap {
  position: relative;
  display: block;
}

.login-password-wrap input {
  padding-right: 44px;
}

.login-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 8px;
}

.login-password-toggle:hover {
  color: #5b4fe8;
  background: #f3f4f6;
}

.login-submit {
  margin-top: 2px;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b4fe8 0%, #6d5ef7 100%);
  color: #fff;
  font-family: Montserrat, "PT Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(91, 79, 232, 0.28);
  transition: transform 0.12s, box-shadow 0.12s;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(91, 79, 232, 0.34);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.login-err {
  margin: 12px 0 0;
  font-size: 13px;
  color: #dc2626;
}

.login-err.hidden {
  display: none;
}

.login-foot {
  margin: 14px 0 0;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.45;
}

/* Sağ: boşluksuz mozaik — sütunlar tam yüksekliği doldurur */
.login-artworks {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #0f172a;
}

.login-artworks-bg {
  display: none;
}

#login-artworks-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.login-artworks-mosaic {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.login-art-cell {
  position: absolute;
  overflow: hidden;
  margin: 0;
  padding: 0;
  line-height: 0;
  z-index: 1;
  transform-origin: center center;
  will-change: left, top, width, height, transform, filter;
  transition:
    left 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.55s ease,
    box-shadow 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-art-cell.no-transition {
  transition: none !important;
}

.login-art-cell.is-moving {
  z-index: 6;
  filter: brightness(1.06) saturate(1.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.login-art-cell.is-swapping {
  z-index: 8;
}

.login-art-cell.is-reflow {
  z-index: 4;
}

.login-art-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  transform: scale(1.02);
  transition:
    transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.55s ease;
}

.login-art-cell.is-moving img {
  transform: scale(1.08);
  filter: contrast(1.04);
}

.login-art-cell.is-swapping img {
  transform: scale(1.1);
}

.login-art-cell.is-reflow img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .login-art-cell {
    transition: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  .login-art-cell img {
    transition: none;
    transform: none !important;
    filter: none !important;
  }
}

.login-artworks-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #312e81 100%);
}

.login-artworks-fallback.hidden {
  display: none;
}

.login-fallback-shape {
  position: absolute;
  opacity: 0.85;
}

.login-fallback-shape--1 {
  width: 28%;
  height: 32%;
  top: 0;
  left: 0;
  background: #5b4fe8;
}

.login-fallback-shape--2 {
  width: 22%;
  height: 28%;
  top: 0;
  left: 28%;
  background: #14b8a6;
}

.login-fallback-shape--3 {
  width: 50%;
  height: 28%;
  top: 0;
  right: 0;
  background: #f59e0b;
}

.login-fallback-shape--4 {
  width: 35%;
  height: 36%;
  bottom: 0;
  left: 0;
  background: #ec4899;
}

.login-fallback-shape--5 {
  width: 65%;
  height: 36%;
  bottom: 0;
  right: 0;
  background: #6366f1;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 38dvh minmax(0, 62dvh);
  }

  .login-artworks {
    height: 38dvh;
    max-height: 38dvh;
    order: -1;
  }

  .login-panel {
    height: auto;
    max-height: 62dvh;
    align-items: flex-start;
    padding-top: 20px;
  }

  .login-panel-inner {
    overflow-y: auto;
  }
}

@media (max-width: 520px) {
  .login-shell {
    grid-template-rows: 32dvh minmax(0, 68dvh);
  }

  .login-artworks {
    height: 32dvh;
    max-height: 32dvh;
  }
}

.header-logout-btn {
  margin-left: 8px;
  padding: 8px 12px;
}

.auth-credentials-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-credentials-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
