/* ═══════════════════════════════════════════════════════════════════════════
   Modern Authentication Pages Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --auth-primary: #071D49;
  --auth-accent: #00ADEF;
  --auth-surface: #FFFFFF;
  --auth-bg: #F8FAFB;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Container & Layout
───────────────────────────────────────────────────────────────────────────── */
.auth-container {
  display: flex;
  min-height: 100vh;
  background: var(--auth-bg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Aside (Left Side - Navy Blue)
───────────────────────────────────────────────────────────────────────────── */
.auth-aside {
  background: linear-gradient(180deg, #071D49 0%, #051533 100%);
  width: 600px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-aside-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 3rem 2rem;
  position: relative;
  z-index: 2;
}

.auth-logo-container {
  text-align: center;
  margin-bottom: 3rem;
}

.auth-logo {
  height: 60px;
  max-width: 200px;
  object-fit: contain;
}

/* App brand link (logo + Talameezy - تلاميذى) */
.app-brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-brand-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.app-brand-logo {
  height: 56px;
  max-width: 180px;
  object-fit: contain;
}

.app-brand-wordmark {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  line-height: 1.3;
}

.app-brand-en {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-brand-ar {
  font-weight: 600;
}

.app-brand-link--aside .app-brand-en,
.app-brand-link--aside .app-brand-ar {
  color: #FFFFFF;
}

.app-brand-link--aside .app-brand-sep {
  color: rgba(255, 255, 255, 0.75);
}

.app-brand-link--aside:hover .app-brand-en,
.app-brand-link--aside:hover .app-brand-ar {
  color: #FFFFFF;
}

.app-brand-link--credit {
  flex-direction: row;
  gap: 0;
}

.app-brand-link--credit .app-brand-en,
.app-brand-link--credit .app-brand-ar {
  color: var(--auth-accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.app-brand-link--credit .app-brand-sep {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.app-brand-link--credit:hover .app-brand-en,
.app-brand-link--credit:hover .app-brand-ar {
  color: #FFFFFF;
}

.app-brand-link--header {
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.app-brand-link--header .app-brand-logo {
  height: 44px;
  max-width: 120px;
}

.app-brand-link--header .app-brand-en,
.app-brand-link--header .app-brand-ar {
  color: var(--auth-primary);
  font-size: 1rem;
}

.app-brand-link--header .app-brand-sep {
  color: rgba(7, 29, 73, 0.55);
}

.app-brand-link--header:hover .app-brand-en,
.app-brand-link--header:hover .app-brand-ar {
  color: var(--auth-accent);
}

.auth-welcome {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

.auth-title {
  color: #FFFFFF;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0;
}

.auth-illustration {
  /*background-image: url('/media/illustrations/login_artwork.png');*/
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  min-height: 200px;
  height: 250px;
  margin-top: auto;
}

.auth-aside-footer {
  text-align: center;
  padding: 1.5rem 0;
  color: rgba(255, 255, 255, 0.70);
  font-size: 0.875rem;
}

.auth-aside-footer a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.auth-aside-footer a:hover {
  color: #FFFFFF;
}

/* Decorative glow */
.auth-aside::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 173, 239, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Main Content (Right Side - White)
───────────────────────────────────────────────────────────────────────────── */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--auth-bg);
}

.auth-card {
  background: var(--auth-surface);
  border-radius: 24px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(7, 29, 73, 0.12);
  border: 1px solid rgba(7, 29, 73, 0.08);
}

.auth-icon {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon img {
  height: 80px;
  max-width: 120px;
  object-fit: contain;
}

.auth-card-title {
  color: var(--auth-primary);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card-subtitle {
  color: #6C7A89;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.auth-container--centered .auth-main {
  width: 100%;
}

.auth-card-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-brand .app-brand-link {
  margin-inline: auto;
}

.app-brand-link--card .app-brand-logo {
  height: 72px;
  max-width: 200px;
}

.app-brand-link--card .app-brand-en,
.app-brand-link--card .app-brand-ar {
  color: var(--auth-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.app-brand-link--card .app-brand-sep {
  color: rgba(7, 29, 73, 0.55);
}

.app-brand-link--card:hover .app-brand-en,
.app-brand-link--card:hover .app-brand-ar {
  color: var(--auth-accent);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Form Elements
───────────────────────────────────────────────────────────────────────────── */
.auth-form {
  width: 100%;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.auth-form .form-label {
  color: var(--auth-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  display: block;
}

.auth-form .form-control {
  background: var(--auth-bg);
  border: 1px solid rgba(7, 29, 73, 0.12);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--auth-primary);
  transition: all 0.2s ease;
}

.auth-form .form-control:focus {
  background: var(--auth-surface);
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.15);
  outline: none;
}

.auth-form .form-control::placeholder {
  color: #8B9BB0;
}

.auth-form .form-control.is-invalid {
  border-color: #EF4444;
}

.auth-form .text-danger {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

/* Password Toggle */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8B9BB0;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--auth-accent);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Buttons
───────────────────────────────────────────────────────────────────────────── */
.auth-form .btn-primary {
  background: linear-gradient(135deg, var(--auth-accent) 0%, #0096D6 100%);
  border: none;
  color: #FFFFFF;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 8px 32px rgba(0, 173, 239, 0.35);
  transition: all 0.3s ease;
  width: 100%;
}

.auth-form .btn-primary:hover {
  background: linear-gradient(135deg, #0096D6 0%, #007FBD 100%);
  box-shadow: 0 12px 40px rgba(0, 173, 239, 0.45);
  transform: translateY(-2px);
}

.auth-form .btn-primary:active {
  transform: translateY(0);
}

.auth-login-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0b5ed7;
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  margin: 0 auto 1rem;
}

.auth-switch {
  margin-top: 1.5rem;
  border: 1px dashed rgba(7, 29, 73, 0.18);
  border-radius: 14px;
  background: #f7fbff;
  padding: 0.9rem 1rem;
}

.auth-switch-label {
  margin: 0 0 0.45rem;
  color: #5f6b7a;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-link:hover {
  color: #0b5ed7;
}

.auth-form .btn-light {
  background: var(--auth-bg);
  border: 1px solid rgba(7, 29, 73, 0.12);
  color: var(--auth-primary);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.auth-form .btn-light:hover {
  background: #E8EBF0;
  border-color: rgba(7, 29, 73, 0.18);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Alerts
───────────────────────────────────────────────────────────────────────────── */
.auth-alert {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
}

.auth-alert-danger {
  background: rgba(239, 68, 68, 0.10);
  color: #DC2626;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}

.auth-alert-info {
  background: rgba(0, 173, 239, 0.10);
  color: #0096D6;
}

.auth-alert i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Links
───────────────────────────────────────────────────────────────────────────── */
.auth-link {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #0096D6;
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Footer
───────────────────────────────────────────────────────────────────────────── */
.auth-main-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: #6C7A89;
  font-size: 0.875rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Success/Error Pages
───────────────────────────────────────────────────────────────────────────── */
.auth-status-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 3rem;
}

.auth-status-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}

.auth-status-icon.error {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.auth-status-icon.info {
  background: rgba(0, 173, 239, 0.12);
  color: var(--auth-accent);
}

.auth-status-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--auth-primary);
  text-align: center;
  margin-bottom: 1rem;
}

.auth-status-message {
  font-size: 1.125rem;
  color: #6C7A89;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Language Switcher
───────────────────────────────────────────────────────────────────────────── */
.auth-lang-switcher {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
}

.auth-lang-switcher .btn {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auth-lang-switcher .btn:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive Design
───────────────────────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 991px) {
  .auth-aside {
    width: 400px;
  }
  
  .auth-title {
    font-size: 2rem;
  }
  
  .auth-subtitle {
    font-size: 1.125rem;
  }
  
  .auth-card {
    padding: 2.5rem;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .auth-container {
    flex-direction: column;
  }
  
  .auth-aside {
    width: 100%;
    min-height: 400px;
    height: auto;
  }
  
  .auth-aside-content {
    padding: 2rem 1.5rem;
  }
  
  .auth-logo {
    height: 50px;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .auth-subtitle {
    font-size: 1rem;
  }
  
  .auth-illustration {
    min-height: 150px;
    height: 180px;
  }
  
  .auth-main {
    padding: 2rem 1rem;
  }
  
  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  
  .auth-card-title {
    font-size: 1.5rem;
  }
  
  .auth-icon img {
    height: 60px;
  }
}

/* Small Mobile */
@media (max-width: 575px) {
  .auth-aside {
    min-height: 350px;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .auth-form .btn {
    padding: 0.875rem 1.5rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Loading State
───────────────────────────────────────────────────────────────────────────── */
.auth-form .btn .indicator-progress {
  display: none;
}

.auth-form .btn.loading .indicator-label {
  display: none;
}

.auth-form .btn.loading .indicator-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Animations
───────────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeInUp 0.5s ease-out;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Print Styles
───────────────────────────────────────────────────────────────────────────── */
/* Public pages (registration, demo request) */
.public-page-body {
  min-height: 100vh;
  background: var(--auth-bg);
}

.public-page-header {
  padding: 1.25rem 0 0.5rem;
  text-align: center;
}

.public-page-header--logo-only {
  padding: 2rem 0 1rem;
}

.app-brand-link--logo-only .app-brand-logo {
  height: 96px;
  max-width: 280px;
}

@media (max-width: 575px) {
  .app-brand-link--logo-only .app-brand-logo {
    height: 72px;
    max-width: 220px;
  }
}

.public-page-main {
  flex: 1;
}

.app-footer-brand-link {
  color: #00ADEF;
  text-decoration: underline;
  text-decoration-color: rgba(0, 173, 239, 0.45);
  text-underline-offset: 0.15em;
  font-weight: 700;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.app-footer-brand-link:hover {
  color: #0096D6;
  text-decoration-color: #0096D6;
}

.public-page-footer .app-footer-copy {
  color: #6C7A89;
  font-weight: 500;
}

@media print {
  .auth-aside,
  .auth-lang-switcher,
  .auth-main-footer,
  .public-page-header {
    display: none !important;
  }
  
  .auth-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
