/* ==========================================
   BQ24 AUTHENTICATION & LOGIN SECTION (css/auth.css)
   Phase 41 — Modern BQ24 Production Design
========================================== */
#auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 80px);
  min-height: calc(100dvh - 80px);
  box-sizing: border-box;
}

#auth.hidden {
  display: none !important;
}

.auth-container {
  max-width: 460px;
  width: min(100% - 32px, 460px);
  margin: 0 auto;
  padding: 32px 0 48px;
  box-sizing: border-box;
}

.auth-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-indigo, #6366f1), var(--brand-cyan, #38bdf8), #a855f7);
}

/* BQ24 Top Branding in Login */
.auth-brand-header {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.auth-logo-img {
  max-width: 180px;
  width: min(180px, 55vw);
  height: auto;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease;
}

@media (min-width: 1024px) {
  .auth-logo-img {
    max-width: 200px;
    width: 180px;
  }
}

.auth-logo-img:hover {
  transform: scale(1.02);
}

.auth-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.18));
  border: 1.5px solid rgba(99, 102, 241, 0.35);
  margin-bottom: 12px;
}

.auth-badge-text {
  font-family: 'Rubik', 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-main-title {
  font-family: 'Rubik', 'Inter', -apple-system, sans-serif;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.15;
}

.auth-main-subtitle {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
}

/* Internal form header */
.auth-form-header {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
}

.auth-card h1,
.auth-card h2 {
  font-family: 'Rubik', 'Inter', -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 4px;
  color: var(--ink);
}

.auth-card .auth-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.auth-toggle a,
.auth-toggle button,
.auth-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--brand-indigo, #818cf8);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.2s;
  display: inline;
}

.auth-toggle a:hover,
.auth-toggle button:hover,
.auth-toggle-btn:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--subtle);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.auth-qr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 18px;
  border: 1.5px solid var(--card-border);
  background: var(--card-bg-subtle);
  transition: all 0.2s ease;
}

.auth-qr-btn:hover {
  border-color: var(--brand-indigo);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}

/* Mobile Responsiveness for Auth */
@media (max-width: 768px) {
  .auth-container {
    width: min(100% - 24px, 460px);
    max-width: 100%;
    padding: 16px 0 32px;
    box-sizing: border-box;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: var(--radius-lg, 16px);
    max-width: 100%;
    box-sizing: border-box;
  }

  .auth-logo-img {
    max-width: 160px;
    width: min(160px, 50vw);
    height: auto;
    margin-bottom: 10px;
  }

  .auth-main-title {
    font-size: 26px;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .auth-main-subtitle {
    font-size: 13px;
    word-break: break-word;
  }

  .auth-card h2 {
    font-size: 19px;
  }

  .auth-card .field {
    margin: 12px 0;
  }

  .auth-card .field input,
  .auth-card .field select {
    padding: 12px 14px;
    font-size: 14.5px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .auth-card .btn {
    padding: 12px 16px;
    font-size: 14px;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ==========================================
   BQ24 MAINTENANCE MODE SECTION
   Modern, minimalist, dark/light responsive
========================================== */
.maintenance-container {
  max-width: 520px;
  width: 100%;
  margin: 48px auto 60px;
  padding: 0 16px;
  box-sizing: border-box;
}

.maintenance-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  padding: 42px 36px 36px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
}

.maintenance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #6366f1, #38bdf8);
}

.maintenance-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.maintenance-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
  animation: maintPulse 2.4s infinite ease-in-out;
}

@keyframes maintPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.maintenance-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
}

.maintenance-logo {
  height: 52px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}


.maintenance-title {
  font-family: 'Rubik', 'Inter', -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.25;
}

.maintenance-message {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}

.maintenance-subnote {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0.85;
  margin: 0 0 26px;
  font-style: italic;
}

.maintenance-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0 0 24px;
  width: 100%;
}

.maintenance-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.maintenance-teacher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.maintenance-logout-btn {
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  transition: color 0.15s ease;
}

.maintenance-logout-btn:hover {
  color: #ef4444;
}

@media (max-width: 480px) {
  .maintenance-container {
    margin: 20px auto 40px;
    padding: 0 12px;
  }

  .maintenance-card {
    padding: 30px 18px 24px;
    border-radius: 16px;
  }

  .maintenance-logo {
    height: 42px;
  }

  .maintenance-title {
    font-size: 22px;
  }

  .maintenance-message {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .maintenance-subnote {
    font-size: 12px;
    margin-bottom: 20px;
  }
}

/* ========================================================
   BQ24 «ПАЙДАЛЫ НҰСҚАУЛЫҚТАР» & ONBOARDING MODAL STYLES
   Pixel-perfect match to visual concept in Light & Dark modes
   ======================================================== */

/* Trigger button on Login Card */
.auth-guide-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-bg-subtle, rgba(255, 255, 255, 0.03));
  border: 1.5px solid var(--card-border, #334155);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
}

[data-theme="light"] .auth-guide-trigger-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.auth-guide-trigger-btn:hover {
  border-color: var(--brand-blue, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.auth-guide-trigger-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-guide-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--brand-blue, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-guide-icon-badge i,
.auth-guide-icon-badge svg {
  width: 18px;
  height: 18px;
}

.auth-guide-trigger-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink, #f8fafc);
  letter-spacing: -0.2px;
}

[data-theme="light"] .auth-guide-trigger-title {
  color: #0f172a;
}

.auth-guide-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted, #94a3b8);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.auth-guide-trigger-btn:hover .auth-guide-chevron {
  color: var(--brand-blue, #3b82f6);
  transform: translateX(3px);
}

.auth-guide-trigger-btn:focus-visible {
  outline: 2px solid var(--brand-blue, #2563eb);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .auth-guide-trigger-btn { min-height: 48px; }
}
