/* =====================================================
   AlQarawiyyeen — Auth Pages Shared Styles
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-page {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
}

/* ── Left branding panel ── */
.auth-left {
  flex: 1;
  background: #245d51;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-left-calligraphy {
  position: absolute;
  font-size: 320px;
  color: rgba(255,255,255,0.05);
  right: -60px;
  bottom: -60px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.auth-left-logo {
  height: 64px;
  width: auto;
  margin-bottom: 40px;
  object-fit: contain;
}

.auth-left h2 {
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.auth-left h2 span {
  color: #cb8461;
}

.auth-left p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 400px;
}

.auth-left-quote {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.auth-left-quote p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

.auth-badges {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}

.auth-badge {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* ── Right form panel ── */
.auth-right {
  flex: 0 0 480px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}
.auth-back:hover { color: #245d51; }

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  color: #131309;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 28px;
}

/* ── Alerts ── */
.auth-error,
.auth-success {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.auth-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

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

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #131309;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-link {
  font-size: 12px;
  font-weight: 500;
  color: #245d51;
  text-decoration: none;
}
.label-link:hover { text-decoration: underline; }

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0dbd2;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #131309;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.form-group input::placeholder { color: #b0a99a; }

.form-group input:focus {
  border-color: #245d51;
  box-shadow: 0 0 0 3px rgba(36,93,81,0.1);
}

.form-group input.input-error {
  border-color: #ef4444;
}

.input-with-toggle {
  position: relative;
}

.input-with-toggle input {
  padding-right: 44px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #9ca3af;
  padding: 0;
  line-height: 1;
}

.form-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #245d51;
  cursor: pointer;
}

.form-check label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
  cursor: pointer;
}

.form-check label a {
  color: #245d51;
  text-decoration: none;
}
.form-check label a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn-auth {
  width: 100%;
  padding: 13px;
  background: #cb8461;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  margin-top: 4px;
}

.btn-auth:hover { background: #b5734f; }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-auth.loading::after {
  content: " …";
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #d1cec9;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0dbd2;
}

.auth-divider span { color: #9ca3af; }

/* ── Google button ── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid #e0dbd2;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  color: #131309;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ── Switch link ── */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-top: 24px;
}

.auth-switch a {
  color: #245d51;
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .auth-left { display: none; }
  .auth-right { flex: 1; padding: 32px 24px; }
  .auth-card { max-width: 100%; }
}
