/*
 * Authentication Scoped Stylesheet - RTO Agent Management System
 * STRICTLY SCOPED TO body.rto-auth-page TO PREVENT ANY DASHBOARD OR PUBLIC CSS LEAKS
 */

/* Guarantee No WordPress Admin Bar Gap on Custom SaaS Auth Pages */
#wpadminbar {
  display: none !important;
}
html {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.rto-auth-page {
  background-color: #f8fafc;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--font-main, 'Inter', sans-serif);
  color: #0f172a;
  min-height: 100vh;
}

.rto-auth-page .auth-split-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Brand & Product Showcase Panel (52% Desktop Ratio) */
.rto-auth-page .auth-brand-panel {
  width: 52%;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 2.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.rto-auth-page .auth-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rto-auth-page .auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
}

.rto-auth-page .auth-brand-logo span {
  color: #3b82f6;
}

.rto-auth-page .back-site-link {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.rto-auth-page .back-site-link:hover {
  color: #ffffff;
}

/* Brand Main Content */
.rto-auth-page .auth-brand-body {
  margin: auto 0;
  padding: 2rem 0;
}

.rto-auth-page .auth-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.rto-auth-page .auth-hero-title .accent-text {
  color: #60a5fa;
}

.rto-auth-page .auth-hero-sub {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 520px;
}

/* Benefits Checklist */
.rto-auth-page .auth-benefits-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.rto-auth-page .benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.rto-auth-page .benefit-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.rto-auth-page .benefit-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.rto-auth-page .benefit-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0.15rem 0 0 0;
}

/* Mini Dashboard Mockup Preview Card */
.rto-auth-page .mini-preview-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  max-width: 500px;
}

.rto-auth-page .mini-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rto-auth-page .preview-stat-label {
  font-size: 0.675rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.rto-auth-page .preview-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  margin-top: 0.2rem;
}

.rto-auth-page .preview-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.4rem 0;
  color: #cbd5e1;
}

.rto-auth-page .preview-feed-item:last-child {
  padding-bottom: 0;
}

/* Right Authentication Panel (48% Desktop Ratio) */
.rto-auth-page .auth-form-panel {
  width: 48%;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.rto-auth-page .auth-card-container {
  width: 100%;
  max-width: 440px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
}

.rto-auth-page .auth-card-header {
  margin-bottom: 1.75rem;
  text-align: left;
}

.rto-auth-page .auth-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.rto-auth-page .auth-card-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Form Controls & Inputs */
.rto-auth-page .form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.rto-auth-page .form-label .req {
  color: #dc2626;
  margin-left: 0.15rem;
}

.rto-auth-page .form-control {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-main, 'Inter', sans-serif);
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.rto-auth-page .form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.rto-auth-page .password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.rto-auth-page .password-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.rto-auth-page .phone-prefix-group {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background-color: #ffffff;
}

.rto-auth-page .phone-prefix-group:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.rto-auth-page .phone-prefix {
  padding: 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
  background-color: #f8fafc;
  border-right: 1px solid #e2e8f0;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.rto-auth-page .phone-prefix-group .form-control {
  border: none;
  box-shadow: none;
}

/* Google Sign-In Button Component */
.rto-auth-page .auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
}

.rto-auth-page .auth-divider::before,
.rto-auth-page .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.rto-auth-page .auth-divider span {
  padding: 0 0.75rem;
}

.rto-auth-page .auth-btn-google {
  width: 100%;
  min-height: 48px;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rto-auth-page .auth-btn-google:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

/* 6-Box OTP Input Screen Components */
.rto-auth-page .otp-screen-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.rto-auth-page .otp-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem auto;
}

.rto-auth-page .otp-boxes-wrapper {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.rto-auth-page .otp-box-digit {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #0f172a;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.rto-auth-page .otp-box-digit:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background-color: #eff6ff;
}

.rto-auth-page .otp-resend-bar {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 1rem;
}

.rto-auth-page .btn-resend-otp {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
}

.rto-auth-page .btn-resend-otp:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

/* Submit Button */
.rto-auth-page .auth-btn-primary {
  width: 100%;
  min-height: 50px;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.rto-auth-page .auth-btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.rto-auth-page .auth-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Inline Alerts */
.rto-auth-page .auth-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

/* Footer Trust & Links */
.rto-auth-page .auth-trust-strip {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.775rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.rto-auth-page .auth-switch-link {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.rto-auth-page .auth-switch-link a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

/* Responsive Mobile Layout (Fluid Mobile-First) */
.rto-auth-page input[type="text"],
.rto-auth-page input[type="email"],
.rto-auth-page input[type="tel"],
.rto-auth-page input[type="password"] {
  font-size: 16px; /* Prevents iOS auto-zoom */
}

@media (max-width: 991px) {
  .rto-auth-page .auth-split-wrapper {
    flex-direction: column;
    min-height: auto;
  }
  .rto-auth-page .auth-brand-panel {
    width: 100%;
    padding: 1.75rem 1.25rem 1.25rem;
    min-height: auto;
  }
  .rto-auth-page .auth-hero-title {
    font-size: clamp(1.4rem, 5vw, 1.85rem);
    margin-bottom: 0.5rem;
  }
  .rto-auth-page .auth-hero-sub {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
  .rto-auth-page .auth-benefits-grid,
  .rto-auth-page .mini-preview-card {
    display: none;
  }
  .rto-auth-page .auth-form-panel {
    width: 100%;
    padding: 1.5rem 1rem;
  }
  .rto-auth-page .auth-card-container {
    padding: 1.5rem 1rem;
    border: none;
    box-shadow: none;
    background: transparent;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }
  .rto-auth-page .otp-inputs-flex {
    gap: clamp(4px, 1.5vw, 8px);
    justify-content: center;
  }
  .rto-auth-page .otp-box-digit {
    width: clamp(34px, 12vw, 44px);
    height: 48px;
    font-size: 1.25rem;
  }
}
