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

:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --emerald-50:  #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;

  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 4px 16px rgba(15, 23, 42, 0.06), 0 20px 40px rgba(15, 23, 42, 0.08);
  --shadow-cta: 0 4px 16px rgba(37, 99, 235, 0.28), 0 12px 40px rgba(37, 99, 235, 0.22);
  --cta-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --r-md: 0.75rem;
  --r-lg: 1rem;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--slate-700);
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 55%, #f0fdf4 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  top: -8rem; left: -6rem;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  filter: blur(64px);
  pointer-events: none;
}

.auth-page::after {
  content: "";
  position: absolute;
  bottom: -10rem; right: -4rem;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  filter: blur(64px);
  pointer-events: none;
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--slate-900);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--cta-gradient);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.brand-mark i {
  font-size: 1.2rem;
  line-height: 1;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.auth-card .title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.auth-card .subtitle {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #fff;
  color: var(--slate-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--slate-400);
}

.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
  font-size: 0.78rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: block;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert ul {
  margin: 0;
  padding: 0 1.25rem 0 0;
}

.alert li {
  margin-bottom: 0.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--cta-gradient);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
  box-shadow: 0 10px 36px rgba(37, 99, 235, 0.38);
}

.btn-block {
  width: 100%;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--slate-500);
}

.auth-footer a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.auth-back-home:hover {
  color: var(--blue-600);
  border-color: var(--blue-100);
  background: var(--blue-50);
  transform: translateY(-1px);
}

.auth-back-home i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.auth-back-home:hover i {
  transform: translateX(-3px);
}
