/* ============================================================
   Auth pages styling — Arabic / RTL.
   Adapted from samples/sample_login_styles_page.html.
   ============================================================ */

:root {
  --primary: #0f5e8c;
  --primary-dark: #073b5c;
  --secondary: #14a6a6;
  --accent: #f3b33d;
  --bg: #f4f8fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #dbe7ef;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 22px 60px rgba(15, 94, 140, 0.16);
}

body.auth-body {
  min-height: 100vh;
  font-family: "Cairo", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(20, 166, 166, 0.14), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(243, 179, 61, 0.16), transparent 24%),
    linear-gradient(135deg, #eef7fb 0%, #f8fbfd 45%, #edf5f8 100%);
  color: var(--text);
  overflow-x: hidden;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  position: relative;
  font-family: "Cairo", sans-serif;
}

.auth-shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.55;
  pointer-events: none;
}

.auth-shape.one {
  width: 110px;
  height: 110px;
  background: rgba(20, 166, 166, 0.13);
  top: 80px;
  right: 90px;
}

.auth-shape.two {
  width: 170px;
  height: 170px;
  background: rgba(15, 94, 140, 0.10);
  bottom: 70px;
  left: 95px;
}

.auth-shape.three {
  width: 70px;
  height: 70px;
  background: rgba(243, 179, 61, 0.22);
  bottom: 150px;
  right: 18%;
}

.login-shell {
  width: min(940px, 100%);
  min-height: 420px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(219, 231, 239, 0.9);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
  position: relative;
}

.login-shell.single {
  grid-template-columns: 1fr;
  max-width: 480px;
}

.login-panel {
  padding: 22px 34px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid;
  place-items: center;
  color: white;
  box-shadow: 0 14px 28px rgba(15, 94, 140, 0.22);
  flex: 0 0 auto;
}

.logo svg { width: 28px; height: 28px; }

.brand-title h1 {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
}

.brand-title p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

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

.login-copy h2 {
  font-size: 25px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.login-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.form-group { margin-bottom: 12px; }

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #334155;
}

.input-wrap { position: relative; }

.input-wrap > svg.field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 21px;
  height: 21px;
  color: #7b93a7;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 49px;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 0 49px 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fbfdff;
  outline: none;
  transition: 0.22s ease;
}

.auth-input::placeholder { color: #9aabb9; }

.auth-input:focus {
  border-color: rgba(20, 166, 166, 0.9);
  box-shadow: 0 0 0 4px rgba(20, 166, 166, 0.12);
  background: #fff;
}

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #71869a;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: 0.2s ease;
}

.password-toggle:hover {
  background: #eef6fa;
  color: var(--primary);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 16px;
  font-size: 14px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  padding: 0;
  border-radius: 6px;
}

.forgot {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

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

.login-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(15, 94, 140, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 94, 140, 0.30);
}

.login-btn:disabled { opacity: 0.7; cursor: wait; }

.login-btn svg { width: 20px; height: 20px; }

.auth-error {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-error.is-locked {
  background: linear-gradient(135deg, rgba(220,38,38,0.10), rgba(243,179,61,0.10));
  border: 1px solid rgba(220, 38, 38, 0.35);
  padding: 14px 16px;
}

.auth-error.is-locked strong {
  color: #b91c1c;
  font-weight: 800;
  font-size: 14px;
}

.secure-note {
  margin-top: 12px;
  padding: 10px 13px;
  border: 1px dashed rgba(15, 94, 140, 0.24);
  border-radius: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #475569;
  background: #f7fbfd;
  font-size: 12px;
  line-height: 1.55;
}

.secure-note svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex: 0 0 auto;
  margin-top: 2px;
}

.visual-panel {
  position: relative;
  padding: 24px 32px;
  background:
    linear-gradient(140deg, rgba(7, 59, 92, 0.94), rgba(15, 94, 140, 0.93) 48%, rgba(20, 166, 166, 0.90)),
    url("data:image/svg+xml,%3Csvg width='240' height='240' viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.13'%3E%3Cpath d='M15 80 C70 20 130 135 215 55'/%3E%3Cpath d='M10 160 C85 95 140 210 230 130'/%3E%3Ccircle cx='70' cy='70' r='34'/%3E%3Ccircle cx='175' cy='150' r='48'/%3E%3C/g%3E%3C/svg%3E");
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-panel::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  top: -90px;
  left: -80px;
}

.visual-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 36px solid rgba(255, 255, 255, 0.07);
  bottom: -120px;
  right: -110px;
}

.visual-content, .stats-area, .stamp-card {
  position: relative;
  z-index: 2;
}

.badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

.badge svg { width: 18px; height: 18px; color: var(--accent); }

.visual-content h3 {
  font-size: 28px;
  line-height: 1.35;
  font-weight: 800;
  max-width: 520px;
  margin-bottom: 14px;
}

.visual-content p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  font-size: 15px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.feature {
  padding: 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  backdrop-filter: blur(10px);
}

.feature svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: 0 0 auto;
}

.feature span {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 950px) {
  .auth-page { padding: 20px; }
  .login-shell { grid-template-columns: 1fr; }
  .visual-panel { min-height: 460px; order: -1; }
  .login-panel { padding: 34px 28px; }
}

@media (max-width: 560px) {
  .visual-panel { padding: 30px 24px; min-height: auto; }
  .visual-content h3 { font-size: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .form-options { flex-direction: column; align-items: flex-start; }
}
