/* ============================================
   Wingi Software Technologies - Auth (Login)
   Bootstrap 5 RTL + custom brand styles
   ============================================ */

:root {
  --navy: #0B192C;
  --navy-800: #0F172A;
  --navy-700: #1E293B;
  --ice-50: #F8FAFC;
  --ice-100: #F1F5F9;
  --ice-200: #E2E8F0;
  --cyan: #00B4D8;
  --cyan-600: #06B6D4;
  --amber: #F59E0B;
  --amber-600: #F77F00;
}

* { box-sizing: border-box; }

body.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ice-50);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 180, 216, 0.12), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.12), transparent 45%);
  font-family: 'Cairo', 'Readex Pro', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  padding: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Brand ---------- */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 180, 216, 0.35);
}

.auth-logo svg.lucide { width: 26px; height: 26px; }

.auth-brand-text { line-height: 1; }

.auth-brand-name {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}

.auth-brand-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 4px;
}

/* ---------- Card ---------- */
.auth-card {
  background: #fff;
  border: 1px solid var(--ice-200);
  border-radius: 26px;
  padding: 2rem;
  box-shadow: 0 22px 55px rgba(11, 25, 44, 0.10);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.5rem;
}

/* ---------- Alerts ---------- */
.auth-alert {
  border: none;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
}

.auth-alert svg.lucide { width: 16px; height: 16px; }

.alert-success.auth-alert {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.alert-danger.auth-alert {
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
}

/* ---------- Fields ---------- */
.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.input-icon { position: relative; }

.field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.9rem;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.field-icon.lucide { width: 18px; height: 18px; }

.form-control {
  border: 2px solid var(--ice-200);
  background: var(--ice-50);
  border-radius: 14px;
  padding: 0.7rem 2.75rem;
  font-size: 0.92rem;
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control::placeholder { color: #a6b0bd; }

.form-control:focus {
  border-color: var(--cyan);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.12);
  color: var(--navy);
}

.form-control.is-invalid {
  border-color: #ef4444;
  background-image: none;
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.invalid-feedback {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

/* ---------- Password toggle ---------- */
.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 0.6rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover {
  color: var(--navy);
  background: var(--ice-100);
}

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

/* ---------- Remember me ---------- */
.form-check-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-700);
  cursor: pointer;
}

.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  border: 2px solid var(--ice-200);
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--cyan);
  border-color: var(--cyan);
}

.form-check-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.12);
}

/* ---------- Submit button ---------- */
.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(to left, var(--cyan), var(--cyan-600));
  box-shadow: 0 12px 26px rgba(0, 180, 216, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 180, 216, 0.38);
}

.btn-brand svg.lucide { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.auth-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
}

.auth-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy-700);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer a:hover { color: var(--cyan); }

.auth-footer a svg.lucide { width: 15px; height: 15px; }
