/* ==========================================================================
 * Shuddhoshikha Auth — Dark Theme CSS
 * Ported from the React/Tailwind reference design
 *
 * Color Tokens:
 *   --sh-bg:      #0d0d0d   (page background)
 *   --sh-surface: #1c1c1c   (input/card surfaces)
 *   --sh-surface2:#1a1a1a   (option buttons)
 *   --sh-surface3:#2a2a2a   (OTP boxes)
 *   --sh-border:  #2e2e2e   (default borders)
 *   --sh-border2: #3e3e3e   (OTP borders)
 *   --sh-cta:     #15803d   (green-700 CTA)
 *   --sh-cta-h:   #16a34a   (green-600 hover)
 *   --sh-white:   #ffffff
 *   --sh-gray300: #d1d5db
 *   --sh-gray400: #9ca3af
 *   --sh-gray500: #6b7280
 *   --sh-red500:  #ef4444
 *   --sh-green500:#22c55e
 * ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sh-bg: #0d0d0d;
  --sh-surface: #1c1c1c;
  --sh-surface2: #1a1a1a;
  --sh-surface3: #2a2a2a;
  --sh-border: #2e2e2e;
  --sh-border2: #3e3e3e;
  --sh-cta: #15803d;
  --sh-cta-h: #16a34a;
  --sh-white: #ffffff;
  --sh-gray300: #d1d5db;
  --sh-gray400: #9ca3af;
  --sh-gray500: #6b7280;
  --sh-red500: #ef4444;
  --sh-green500: #22c55e;
  --sh-green800: #166534;
  --sh-green300: #86efac;
  --sh-font-bn: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
  --sh-font-en: 'Inter', 'Noto Sans Bengali', sans-serif;
}

/* ---------- Reset for auth page ---------- */
.sh-auth-page,
.sh-auth-page * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.sh-auth-page {
  font-family: var(--sh-font-en);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--sh-bg);
  color: var(--sh-white);
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* ---------- Container ---------- */
.sh-auth-wrapper {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  position: relative;
}

/* ---------- Steps (panels) ---------- */
.sh-step {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: shFadeIn 0.3s ease-out;
}
.sh-step.active {
  display: flex;
}
@keyframes shFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Back button ---------- */
.sh-back-btn {
  background: none;
  border: none;
  color: var(--sh-white);
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.sh-back-btn:hover {
  background: var(--sh-surface);
}
.sh-back-btn svg {
  width: 24px;
  height: 24px;
}

/* ---------- Logo ---------- */
.sh-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
  margin-bottom: 32px;
}
.sh-logo-box {
  background: var(--sh-surface2);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.sh-logo-box span {
  color: var(--sh-white);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  font-family: serif;
}
.sh-logo-box .sh-logo-emoji {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1.25rem;
}
.sh-logo-subtitle {
  color: var(--sh-gray300);
  font-size: 0.875rem;
  margin-top: 12px;
  font-family: var(--sh-font-bn);
}

/* ---------- Mascot Bubble ---------- */
.sh-mascot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.sh-speech-bubble {
  background: var(--sh-white);
  color: #000;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 260px;
  text-align: center;
  font-family: var(--sh-font-bn);
  position: relative;
  margin-bottom: 2px;
}
.sh-speech-arrow {
  display: flex;
  justify-content: center;
}
.sh-speech-arrow::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--sh-white);
}
.sh-mascot-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.sh-mascot-shadow {
  width: 64px;
  height: 8px;
  background: #374151;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(4px);
  margin-top: 4px;
}

/* ---------- Centered mascot intro ---------- */
.sh-mascot-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sh-mascot-center .sh-mascot-img {
  width: 112px;
  height: 112px;
}

/* ---------- Form elements ---------- */
.sh-label {
  display: block;
  color: var(--sh-gray400);
  font-size: 0.875rem;
  margin-bottom: 8px;
  font-family: var(--sh-font-bn);
}
.sh-label-en {
  display: block;
  color: var(--sh-gray300);
  font-size: 0.875rem;
  margin-bottom: 8px;
  font-weight: 500;
}
.sh-input {
  width: 100%;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--sh-white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--sh-font-bn);
}
.sh-input:focus {
  border-color: var(--sh-cta-h);
}
.sh-input::placeholder {
  color: var(--sh-gray500);
}
.sh-input-mb {
  margin-bottom: 12px;
}

/* ---------- CTA Button ---------- */
.sh-btn-cta {
  width: 100%;
  background: var(--sh-cta);
  color: var(--sh-white);
  font-weight: 600;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--sh-font-bn);
  margin-top: 4px;
}
.sh-btn-cta:hover {
  background: var(--sh-cta-h);
}
.sh-btn-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sh-btn-cta.loading {
  position: relative;
  pointer-events: none;
}
.sh-btn-cta.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: var(--sh-white);
  border-radius: 50%;
  animation: shSpin 0.6s linear infinite;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
@keyframes shSpin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ---------- Bottom actions area ---------- */
.sh-bottom-actions {
  margin-top: auto;
  padding-bottom: 32px;
}

/* ---------- Divider ---------- */
.sh-divider {
  text-align: center;
  color: var(--sh-gray400);
  font-size: 0.875rem;
  margin: 24px 0 16px;
  font-family: var(--sh-font-bn);
}

/* ---------- Social buttons ---------- */
.sh-social-row {
  display: flex;
  gap: 12px;
}
.sh-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--sh-white);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: var(--sh-font-en);
}
.sh-social-btn:hover {
  border-color: var(--sh-gray400);
}
.sh-social-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Option button (category, group, gender, batch) ---------- */
.sh-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sh-surface2);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--sh-white);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
  font-family: var(--sh-font-bn);
  margin-bottom: 12px;
}
.sh-option-btn:last-child {
  margin-bottom: 0;
}
.sh-option-btn:hover {
  background: #222;
  border-color: var(--sh-cta);
}
.sh-option-btn .sh-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.sh-option-btn .sh-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  flex-shrink: 0;
}

/* ---------- Options list ---------- */
.sh-options-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ---------- Error message ---------- */
.sh-error {
  color: var(--sh-red500);
  font-size: 0.875rem;
  margin-bottom: 12px;
  font-family: var(--sh-font-bn);
}

/* ---------- Inline message ---------- */
.sh-message {
  padding: 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid transparent;
  display: none;
  font-family: var(--sh-font-bn);
}
.sh-message.success {
  display: block;
  background: rgba(34,197,94,0.1);
  color: var(--sh-green500);
  border-color: rgba(34,197,94,0.2);
}
.sh-message.error {
  display: block;
  background: rgba(239,68,68,0.1);
  color: var(--sh-red500);
  border-color: rgba(239,68,68,0.2);
}

/* ---------- OTP Input ---------- */
.sh-otp-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.sh-otp-input {
  width: 44px;
  height: 44px;
  text-align: center;
  color: var(--sh-white);
  font-size: 1.125rem;
  font-weight: 600;
  background: var(--sh-surface3);
  border: 1px solid var(--sh-border2);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--sh-font-en);
}
.sh-otp-input:focus {
  border-color: var(--sh-cta-h);
}

.sh-otp-icon {
  width: 80px;
  height: 80px;
  background: var(--sh-green800);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.sh-otp-icon svg {
  width: 40px;
  height: 40px;
  color: var(--sh-green300);
}

.sh-otp-title {
  color: var(--sh-white);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: var(--sh-font-bn);
}
.sh-otp-subtitle {
  color: var(--sh-gray400);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 24px;
  max-width: 280px;
  font-family: var(--sh-font-bn);
}
.sh-otp-subtitle .sh-phone-highlight {
  color: var(--sh-white);
  text-decoration: underline;
}
.sh-otp-resend {
  color: var(--sh-gray400);
  font-size: 0.75rem;
  text-align: center;
  margin-bottom: 8px;
  font-family: var(--sh-font-bn);
}
.sh-otp-resend .sh-timer {
  color: var(--sh-green500);
}
.sh-otp-resend .sh-resend-link {
  color: var(--sh-green500);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sh-font-bn);
  font-size: 0.75rem;
  margin-left: 4px;
}
.sh-otp-status {
  color: var(--sh-green500);
  font-size: 0.75rem;
  text-align: center;
  margin-bottom: 16px;
  font-family: var(--sh-font-bn);
}

/* ---------- Success step ---------- */
.sh-success-icon {
  width: 96px;
  height: 96px;
  background: var(--sh-green800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.sh-success-icon svg {
  width: 48px;
  height: 48px;
  color: var(--sh-green300);
}
.sh-success-title {
  color: var(--sh-white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--sh-font-bn);
}
.sh-success-subtitle {
  color: var(--sh-gray400);
  margin-bottom: 32px;
  font-family: var(--sh-font-bn);
}

/* ---------- Link style ---------- */
.sh-link {
  color: var(--sh-green500);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sh-font-bn);
  font-size: 0.875rem;
}

/* ---------- Forgot password link ---------- */
.sh-forgot-link {
  text-align: right;
  margin-bottom: 12px;
}

/* ---------- Toggle switch for login/register ---------- */
.sh-toggle-text {
  text-align: center;
  color: var(--sh-gray400);
  font-size: 0.875rem;
  margin-top: 16px;
  font-family: var(--sh-font-bn);
}

/* ---------- Password visibility toggle ---------- */
.sh-password-wrapper {
  position: relative;
}
.sh-password-wrapper .sh-input {
  padding-right: 48px;
}
.sh-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--sh-gray400);
  cursor: pointer;
  padding: 4px;
}
.sh-password-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .sh-auth-wrapper {
    min-height: auto;
    padding: 48px 16px;
  }
  .sh-mascot-wrapper {
    display: none;
  }
  .sh-options-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .sh-option-btn {
    margin-bottom: 0;
  }
}

/* ---------- Dialog modal override ---------- */
dialog.sh-auth-dialog {
  background: transparent;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
}
dialog.sh-auth-dialog::backdrop {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

/* ---------- Hidden utility ---------- */
.sh-hidden {
  display: none !important;
}

/* ---------- Join as Instructor Footer Banner ---------- */
.sh-instructor-footer-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(20, 184, 166, 0.1) 50%, rgba(6, 182, 212, 0.15) 100%);
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  border-bottom: 1px solid rgba(6, 182, 212, 0.25);
  padding: 24px 16px;
  color: var(--sh-white);
  font-family: var(--sh-font-bn);
  margin-top: 48px;
}
.sh-inst-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.sh-inst-banner-icon {
  width: 54px;
  height: 54px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
}
.sh-inst-banner-icon svg {
  width: 28px;
  height: 28px;
}
.sh-inst-banner-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(to right, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sh-inst-banner-text p {
  font-size: 14px;
  color: var(--sh-gray400);
  line-height: 1.5;
  max-width: 600px;
}
.sh-inst-banner-action {
  width: 100%;
}
.sh-inst-banner-btn {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--sh-white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
  transition: all 0.2s ease-in-out;
}
.sh-inst-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.35);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}
.sh-inst-banner-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}
.sh-inst-banner-btn:hover svg {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .sh-instructor-footer-banner {
    padding: 32px 24px;
  }
  .sh-inst-banner-container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    gap: 24px;
  }
  .sh-inst-banner-action {
    width: auto;
  }
}

/* ---------- Textarea & custom inputs ---------- */
textarea.sh-input {
  min-height: 80px;
  font-family: inherit;
  resize: none;
  padding: 12px;
  line-height: 1.5;
}

/* ---------- Status screen helpers ---------- */
.sh-status-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.sh-status-icon.pending {
  background: rgba(234, 179, 8, 0.1);
  border: 2px solid rgba(234, 179, 8, 0.2);
}
.sh-status-icon.rejected {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.2);
}
.sh-status-icon.blocked {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.3);
}
.sh-btn-secondary {
  background: var(--sh-surface2) !important;
  border: 1px solid var(--sh-border) !important;
}
.sh-btn-secondary:hover {
  background: var(--sh-surface3) !important;
  border-color: var(--sh-border2) !important;
}
.sh-btn-danger {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.sh-btn-danger:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Remove mascot image, shadow, and speech arrow from the login section */
.sh-mascot-img,
.sh-mascot-shadow,
.sh-speech-arrow {
  display: none !important;
}
.sh-mascot-wrapper {
  margin-top: 12px;
  margin-bottom: 20px;
}
.sh-speech-bubble {
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sh-white);
  backdrop-filter: blur(8px);
}


