/* ============================================================
   StarBooks — Login Page Styles
   ============================================================ */

html, body { height: 100%; overflow: hidden; }

.login-page {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ---- Left panel (brand) ---- */
.login-left {
  flex: 0 0 420px;
  background: var(--sb-navy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 48px 40px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(11,138,0,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245,166,35,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Dot grid overlay */
.login-left .dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-left-top { position: relative; z-index: 1; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 64px;
}

.login-logo-icon {
  width: 42px;
  height: 42px;
  background: var(--sb-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-logo-icon svg { width: 22px; height: 22px; color: white; }

.login-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: white;
  letter-spacing: -0.5px;
}

.login-brand-tagline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 20px;
}

.login-brand-tagline span { color: var(--sb-gold); }

.login-brand-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 320px;
}

.login-left-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}

.login-feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(11,138,0,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-feature-icon svg { width: 16px; height: 16px; color: var(--sb-green-light); }

.login-left-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

/* ---- Right panel (form) ---- */
.login-right {
  flex: 1;
  background: var(--sb-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.login-card {
  background: white;
  border-radius: var(--sb-radius-lg);
  box-shadow: var(--sb-shadow-lg);
  padding: 48px 48px;
  width: 100%;
  max-width: 440px;
}

.login-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--sb-navy);
  margin-bottom: 8px;
}

.login-card-sub {
  font-size: 14px;
  color: var(--sb-gray-600);
  margin-bottom: 36px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sb-gray-700);
  margin-bottom: 6px;
}

.form-input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid var(--sb-gray-200);
  border-radius: var(--sb-radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--sb-gray-800);
  background: white;
  transition: border-color var(--sb-transition), box-shadow var(--sb-transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--sb-green);
  box-shadow: 0 0 0 3px rgba(11,138,0,0.08);
}

.form-input.error {
  border-color: var(--crm-danger);
  box-shadow: 0 0 0 3px rgba(220,53,69,0.08);
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sb-gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.input-icon svg { width: 18px; height: 18px; }
.input-icon:hover { color: var(--sb-gray-600); }

.form-row-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--sb-gray-600);
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sb-green);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: var(--sb-green);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover { text-decoration: underline; }

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--sb-green);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--sb-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.login-btn:hover:not(:disabled) { background: var(--sb-green-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(11,138,0,0.3); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error message */
.login-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: var(--crm-danger);
  border-radius: var(--sb-radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 8px;
}

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

.login-back {
  text-align: center;
  font-size: 13px;
  color: var(--sb-gray-600);
}

.login-back a {
  color: var(--sb-green);
  text-decoration: none;
  font-weight: 500;
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  html, body { overflow: auto; }

  .login-page { flex-direction: column; height: auto; min-height: 100vh; }

  .login-left {
    flex: none;
    padding: 24px 24px 28px;
  }

  .login-left-features { display: none; }

  .login-logo { margin-bottom: 16px; }

  .login-brand-tagline { font-size: 22px; margin-bottom: 8px; }

  .login-brand-sub { font-size: 13px; }

  .login-left-footer { display: none; }

  .login-right { padding: 32px 16px; }

  .login-card { padding: 32px 24px; box-shadow: none; border: 1px solid var(--sb-gray-200); }
}
