/* ============================================================
   PhotoStudio — Auth Pages (Login & Register)
   Matches .auth-page, .auth-visual, .auth-form-side
   ============================================================ */

/* Prevent body scroll on auth pages (layout locks to viewport) */
body:has(.auth-page) {
  overflow: hidden;
}

/* ── Page shell ─────────────────────────────────────────────── */
.auth-page {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
    height: 100vh; /* lock to viewport — navbar is hidden */
    padding: 30px;
}

/* ── Left visual panel ──────────────────────────────────────── */
.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, #06101e 0%, #0d1f35 40%, #0b2a3a 100%);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Subtle animated background texture */
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(74,159,212,0.06) 0%, transparent 50%);
}

/* Grid overlay for depth */
.auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Large faint camera icon as decoration */
.auth-visual .auth-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.auth-visual .auth-overlay::before {
  content: '\f030'; /* fa-camera */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 28rem;
  color: rgba(201, 168, 76, 0.04);
  line-height: 1;
  pointer-events: none;
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 2.5rem;
}

/* Logo */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f0ece4;
  text-decoration: none;
  transition: opacity 0.2s;
}
.auth-logo:hover { opacity: 0.85; color: #f0ece4; }
.auth-logo i {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #8a6f34, #c9a84c);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #0d1b2a;
}
.auth-logo strong { color: #c9a84c; }

/* Feature highlights in the middle */
.auth-visual-content .auth-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: auto 0;
  padding: 2rem 0;
}
.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.auth-feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex; align-items: center; justify-content: center;
  color: #c9a84c; font-size: 0.95rem; flex-shrink: 0;
}
.auth-feature-item h4 { font-size: 0.9rem; color: #f0ece4; margin-bottom: 0.15rem; font-family: 'DM Sans', sans-serif; font-weight: 600; }
.auth-feature-item p  { font-size: 0.78rem; color: #8a9bb0; line-height: 1.5; margin: 0; }

/* Quote block at bottom */
.auth-quote {
  border-left: 3px solid rgba(201, 168, 76, 0.5);
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border-radius: 0 8px 8px 0;
}
.auth-quote blockquote {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: #c8c0b0;
  margin: 0 0 0.4rem;
  line-height: 1.5;
}
.auth-quote cite {
  font-size: 0.78rem;
  color: #8a9bb0;
  font-style: normal;
  letter-spacing: 0.04em;
}

/* ── Right form panel ───────────────────────────────────────── */
.auth-form-side {
  background: #0d1b2a;
  display: flex;
  align-items: flex-start;       /* don't center — prevents cut-off on tall forms */
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;              /* form scrolls independently within the panel */
  height: 100%;
}

.auth-form-container {
  width: 100%;
  max-width: 440px;
}

/* Header */
.auth-header { margin-bottom: 2rem; }
.auth-header h1 {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.auth-header p {
  font-size: 0.9rem;
  color: #8a9bb0;
  line-height: 1.5;
  margin: 0;
}

/* Error alert */
.alert-error {
  background: rgba(224, 92, 92, 0.1);
  border: 1px solid rgba(224, 92, 92, 0.3);
  border-left: 3px solid #e05c5c;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  color: #e05c5c;
  font-size: 0.875rem;
}
.alert-error p { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.alert-error p + p { margin-top: 0.25rem; }

/* ── Form elements ──────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #8a9bb0;
  margin-bottom: 0.45rem;
}

.form-group .form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #f0ece4;
  padding: 0.7rem 0.95rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-group .form-control:focus {
  border-color: #c9a84c;
  background: rgba(201,168,76,0.05);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
  color: #ffffff;
}
.form-group .form-control::placeholder { color: rgba(138,155,176,0.6); }
.form-group select.form-control { cursor: pointer; }
.form-group select.form-control option { background: #162336; color: #f0ece4; }

/* Label row (label + forgot link side by side) */
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.label-row label { margin-bottom: 0; }
.forgot-link { font-size: 0.78rem; color: #c9a84c; text-decoration: none; transition: color 0.2s; }
.forgot-link:hover { color: #e0c068; }

/* Password input with toggle */
.input-password {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password .form-control { padding-right: 2.8rem; }
.pwd-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #8a9bb0;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: color 0.2s;
  display: flex; align-items: center;
}
.pwd-toggle:hover { color: #c9a84c; }

/* Password strength bar */
.password-strength {
  height: 3px;
  border-radius: 2px;
  margin-top: 0.4rem;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  font-size: 0.72rem;
  color: transparent;
  display: flex;
  align-items: center;
}
.password-strength::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}
.password-strength.strength-weak::after   { width: 25%; background: #e05c5c; }
.password-strength.strength-fair::after   { width: 50%; background: #e09a3c; }
.password-strength.strength-good::after   { width: 75%; background: #4a9fd4; }
.password-strength.strength-strong::after { width: 100%; background: #4caf7d; }
/* Strength label */
.password-strength { line-height: 1.8; }
.password-strength.strength-weak   { color: #e05c5c; background: none; font-size: 0.72rem; height: auto; }
.password-strength.strength-fair   { color: #e09a3c; background: none; font-size: 0.72rem; height: auto; }
.password-strength.strength-good   { color: #4a9fd4; background: none; font-size: 0.72rem; height: auto; }
.password-strength.strength-strong { color: #4caf7d; background: none; font-size: 0.72rem; height: auto; }

/* Validation error */
.field-error {
  font-size: 0.75rem;
  color: #e05c5c;
  margin-top: 0.3rem;
  display: block;
  min-height: 1em;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
}
.form-check-input {
  width: 16px; height: 16px;
  margin-top: 1px;
  accent-color: #c9a84c;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}
.form-check-label {
  font-size: 0.82rem;
  color: #8a9bb0;
  line-height: 1.5;
  cursor: pointer;
}
.form-check-label a { color: #c9a84c; text-decoration: none; }
.form-check-label a:hover { color: #e0c068; text-decoration: underline; }

/* ── Submit button ───────────────────────────────────────────── */
.btn-full { width: 100%; justify-content: center; }
.btn.btn-primary.btn-full {
  background: linear-gradient(135deg, #c9a84c, #e0c068);
  color: #0d1b2a;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(201,168,76,0.25);
  margin-bottom: 1.25rem;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}
.btn.btn-primary.btn-full:hover {
  background: linear-gradient(135deg, #d9b85c, #f0d078);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(201,168,76,0.4);
  color: #0d1b2a;
}
.btn.btn-primary.btn-full:active { transform: translateY(0); }

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: #8a9bb0;
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* ── Footer link ─────────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #8a9bb0;
}
.auth-footer a { color: #c9a84c; font-weight: 600; text-decoration: none; }
.auth-footer a:hover { color: #e0c068; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side {
    min-height: 100vh;
    background: linear-gradient(160deg, #0a1525 0%, #0d1b2a 100%);
    padding: 2rem 1.25rem;
  }
  .auth-form-container { max-width: 420px; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-header h1 { font-size: 1.65rem; }
}
