/* RydNxt Login Page Stylesheet */

body.login-page,
body:has(.login-wrapper) {
  padding-top: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  height: 100vh;
  min-height: 100vh;
  background: var(--bg-main);
  background-image: none !important;
}

.login-wrapper {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-main);
  overflow: hidden;
}

/* Left Visual Panel */
.login-visual-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.75rem 3.25rem;
  background: var(--brand-navy-deep);
  color: white;
  height: 100vh;
}

.visual-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: saturate(1.15);
  transform: scale(1.05);
  transition: transform 10s ease;
}

.login-visual-panel:hover .visual-bg-img {
  transform: scale(1.08);
}

.visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(6, 15, 36, 0.94) 0%,
    rgba(11, 27, 61, 0.82) 50%,
    rgba(255, 165, 0, 0.15) 100%
  );
  z-index: 1;
}

.visual-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-brand-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 18px;
  border-radius: 14px;
  width: fit-content;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: transform 0.25s ease;
}

.visual-brand-badge:hover {
  transform: translateY(-2px);
}

.visual-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.visual-hero-quote {
  margin: 3rem 0;
  max-width: 520px;
}

.visual-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  background: rgba(255, 165, 0, 0.2);
  border: 1px solid rgba(255, 165, 0, 0.4);
  color: var(--brand-yellow);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.visual-hero-quote h2 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.visual-hero-quote p {
  font-size: 1.05rem;
  color: #CBD5E1;
  line-height: 1.65;
}

.visual-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 1.25rem;
  border-radius: 14px;
}

.feature-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.feature-item strong {
  display: block;
  font-size: 0.95rem;
  color: white;
  margin-bottom: 0.2rem;
}

.feature-item p {
  font-size: 0.8rem;
  color: #94A3B8;
  margin: 0;
}

.visual-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748B;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
}

/* Right Interactive Form Panel */
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem 3.5rem;
  background: var(--bg-white);
  overflow-y: auto;
  height: 100vh;
}

.login-panel-header {
  margin-bottom: 0.75rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--brand-navy);
}

.back-link .arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.back-link:hover .arrow {
  transform: translateX(-3px);
}

.login-card {
  max-width: 440px;
  width: 100%;
  margin: auto 0;
  align-self: center;
}

.login-logo-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Hide duplicate logo in form card on desktop since left panel already displays prominent official logo */
.login-card-logo {
  display: none;
}

.login-logo-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.login-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Role Selector Tabs */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-main);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.customer-auth-selector {
  grid-template-columns: 1fr 1fr;
}

.role-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.role-tab .role-icon {
  font-size: 1.15rem;
}

.role-tab .role-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.role-tab:hover {
  background: rgba(255, 255, 255, 0.6);
}

.role-tab.active {
  background: white;
  box-shadow: 0 2px 8px rgba(11, 27, 61, 0.08);
  border: 1px solid rgba(255, 165, 0, 0.35);
}

.role-tab.active .role-label {
  color: var(--brand-navy);
  font-weight: 800;
}

/* Form Styles */
.phone-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-main);
  overflow: hidden;
  transition: all 0.2s;
}

.phone-input-group:focus-within {
  border-color: var(--brand-yellow);
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.18);
}

.phone-prefix {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
  background: #F1F5F9;
  border-right: 1.5px solid var(--border);
  user-select: none;
}

.phone-field {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Quick Profiles */
.quick-profiles-wrapper {
  margin: 1.25rem 0 1.75rem 0;
}

.quick-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-chip {
  background: #FFFBEB;
  border: 1px solid rgba(255, 165, 0, 0.4);
  color: #B45309;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-chip:hover {
  background: #FEF3C7;
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

.submit-btn {
  width: 100%;
  padding: 0.95rem;
  font-size: 1rem;
  border-radius: 12px;
}

/* OTP Step */
.otp-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
}

.otp-banner-icon {
  font-size: 1.5rem;
}

.otp-sent-to {
  font-size: 0.85rem;
  color: var(--text-heading);
}

.change-phone-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  margin-top: 0.2rem;
  text-decoration: underline;
}

.otp-inputs-row {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  margin: 1rem 0;
}

.otp-box {
  width: 60px;
  height: 64px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-navy);
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg-main);
  outline: none;
  transition: all 0.2s;
}

.otp-box:focus {
  border-color: var(--brand-yellow);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2);
}

.demo-otp-helper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.helper-text {
  color: var(--text-muted);
}

.demo-chip-btn {
  background: #FFFBEB;
  border: 1px dashed var(--brand-yellow);
  color: #B45309;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-chip-btn:hover {
  background: #FEF3C7;
  transform: scale(1.03);
}

.resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.resend-row button {
  background: none;
  border: none;
  color: var(--brand-navy);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* Success Panel */
.success-panel {
  text-align: center;
  padding: 1rem 0;
  animation: fadeIn 0.4s ease;
}

.success-icon-badge {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.success-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 0.25rem;
}

.success-subtitle {
  font-size: 0.88rem;
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.user-session-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.session-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-yellow);
}

.session-info {
  flex-grow: 1;
}

.session-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-navy);
}

.session-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.status-pill.active {
  background: #DCFCE7;
  color: #166534;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  width: 100%;
  padding: 0.85rem;
}

.signout-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 0.75rem;
  text-decoration: underline;
}

.signout-link:hover {
  color: var(--rose);
}

/* Alert Toast */
.alert-box {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.3s ease;
}

.alert-box.error {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #B91C1C;
}

.alert-box.success {
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #15803D;
}

.terms-notice {
  font-size: 0.76rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.5;
  margin-top: 2rem;
}

.terms-notice a {
  color: var(--text-muted);
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
  body.login-page,
  body:has(.login-wrapper) {
    overflow-y: auto !important;
    height: auto !important;
  }
  .login-wrapper {
    height: auto !important;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .login-visual-panel {
    display: none;
  }
  .login-form-panel {
    padding: 2.5rem 1.5rem;
    height: auto !important;
    min-height: 100vh;
  }
  .login-card-logo {
    display: block;
    height: 54px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 1.25rem auto;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1.25rem;
  }

  .login-logo-header h1 {
    font-size: 1.6rem;
  }

  .otp-inputs-row {
    gap: 0.5rem;
  }

  .otp-box {
    width: 48px;
    height: 52px;
    font-size: 1.25rem;
  }
}

/* Google Auth Button & Dividers */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
}

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

.auth-divider span {
  padding: 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: white;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-google-auth:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.google-svg {
  flex-shrink: 0;
}

/* Google Account Chooser Modal */
.google-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.google-modal-dialog {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(226, 232, 240, 0.8);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.google-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.google-modal-logo {
  margin-bottom: 0.5rem;
}

.google-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.25rem;
}

.google-modal-header p {
  font-size: 0.82rem;
  color: #64748B;
}

.google-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.google-account-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.google-account-item:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

.google-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3B82F6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.google-account-info strong {
  display: block;
  font-size: 0.92rem;
  color: #0F172A;
}

.google-account-info span {
  display: block;
  font-size: 0.78rem;
  color: #64748B;
}

.google-custom-account-box {
  padding: 1rem;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px dashed #CBD5E1;
  margin-bottom: 1.25rem;
}
