/* ===== AUTH LAYOUT ===== */
.auth-body {
  min-height: 100vh;
  background: var(--gray-50);
}

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

/* ===== LEFT PANEL ===== */
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--white);
}

.auth-panel-inner {
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: flex;
  justify-content: flex-start;
  margin-left: -38px;
  margin-bottom: -80px;
}
.auth-logo .logo-img {
  height: 260px;
}

/* ===== AUTH CARD ===== */
.auth-card {
  background: var(--white);
}

.auth-card-header {
  margin-bottom: 32px;
}
.auth-card-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-800);
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.auth-card-header p {
  font-size: 15px;
  color: var(--gray-400);
}

/* ===== FORM ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.label-link {
  font-size: 13px;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.label-link:hover { opacity: .75; }

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  display: flex;
  pointer-events: none;
}
.input-icon svg { width: 17px; height: 17px; }

.input-wrapper input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: var(--transition);
  outline: none;
}
.input-wrapper input::placeholder { color: var(--gray-400); }
.input-wrapper input:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(27,58,122,.08);
}

/* Error state */
.form-group.has-error .input-wrapper input {
  border-color: #EF4444;
  background: #FFF5F5;
}
.form-group.has-error .input-wrapper input:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.08);
}

.form-error {
  font-size: 12px;
  color: #EF4444;
  font-weight: 500;
  display: none;
}
.form-group.has-error .form-error { display: block; }

/* Toggle password visibility */
.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  padding: 4px;
  transition: color var(--transition);
}
.toggle-password:hover { color: var(--navy); }
.toggle-password svg { width: 17px; height: 17px; }

/* ===== REMEMBER ME / CHECKBOX ===== */
.form-row {
  margin-top: -4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  display: none;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: 4px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--grad);
  border-color: transparent;
}
.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* ===== SUBMIT BUTTON ===== */
.btn-auth {
  padding: 14px;
  font-size: 16px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  position: relative;
  justify-content: center;
}

.btn-spinner svg {
  width: 18px;
  height: 18px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ALERT ===== */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #DC2626;
  font-weight: 500;
}
.auth-alert svg { width: 16px; height: 16px; flex-shrink: 0; color: #DC2626; }

.auth-alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #16A34A; }
.auth-alert-success svg { color: #16A34A; }

/* ===== DIVIDER ===== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--gray-400);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ===== SOCIAL AUTH ===== */
.social-auth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
.social-btn:disabled {
  cursor: wait;
  opacity: .78;
}
.social-btn:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

/* ===== FOOTER TEXT ===== */
.auth-footer-text {
  text-align: center;
  font-size: 14px;
  color: var(--gray-600);
}
.auth-link {
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-link:hover { opacity: .75; }

/* ===== RIGHT BRAND PANEL ===== */
.auth-brand {
  width: 480px;
  flex-shrink: 0;
  background: var(--grad-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -180px;
  right: -180px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -100px;
  left: -80px;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Quote */
.brand-quote {
  color: var(--white);
}
.brand-stars {
  color: #FCD34D;
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.brand-quote blockquote {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
  margin-bottom: 20px;
  font-style: italic;
}
.brand-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-author .author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.2);
}
.brand-author strong {
  display: block;
  font-size: 14px;
  color: var(--white);
}
.brand-author span {
  font-size: 12px;
  color: rgba(255,255,255,.6);
}

/* Stats */
.brand-stats {
  display: flex;
  gap: 0;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-stat {
  flex: 1;
  text-align: center;
}
.brand-stat-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.brand-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

/* Features */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}
.brand-feature-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--white);
  flex-shrink: 0;
}

/* ===== DARK THEME ===== */
[data-theme="dark"] .auth-body {
  background: #0F172A;
}

[data-theme="dark"] .auth-panel {
  background: #0F172A;
}

[data-theme="dark"] .auth-card {
  background: #0F172A;
}

[data-theme="dark"] .auth-card-header h1 {
  color: #F1F5F9;
}

[data-theme="dark"] .auth-card-header p {
  color: #64748B;
}

[data-theme="dark"] .form-group label {
  color: #F1F5F9;
}

[data-theme="dark"] .input-wrapper input {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

[data-theme="dark"] .input-wrapper input:focus {
  background: #1E293B;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,200,.12);
}

[data-theme="dark"] .checkbox-label {
  color: #94A3B8;
}

[data-theme="dark"] .checkbox-custom {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .auth-divider {
  color: #475569;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
  background: #334155;
}

[data-theme="dark"] .social-btn {
  background: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

[data-theme="dark"] .social-btn:hover {
  background: #273549;
  border-color: #64748B;
}

[data-theme="dark"] .auth-footer-text {
  color: #64748B;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .auth-brand { display: none; }
  .auth-panel { align-items: flex-start; padding-top: 20px; }
}

@media (max-width: 480px) {
  .auth-panel { padding: 20px 20px 32px; }
  .social-auth { grid-template-columns: 1fr; }
}
