/* ==========================================================================
   Miniweb Modern Authentication UI/UX Styles (Clean, Attractive & Simple)
   Designed to fit 100% of standard desktop screens without scrolling,
   with smooth overflow scrolling on small screens and mobile devices.
   ========================================================================== */

:root {
  --auth-primary: #6366F1;
  --auth-primary-hover: #4F46E5;
  --auth-primary-dark: #3730A3;
  --auth-accent: #06B6D4;
  --auth-success: #10B981;
  --auth-bg-navy: #070913;
  --auth-card-bg: #FFFFFF;
  --auth-text-main: #0F172A;
  --auth-text-muted: #64748B;
  --auth-border: #E2E8F0;
  --auth-border-focus: #818CF8;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: #F8FAFC !important;
  color: var(--auth-text-main) !important;
  -webkit-font-smoothing: antialiased;
}

/* Master Layout Wrapper */
.miniweb-auth-page {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  background: #F8FAFC;
  position: relative;
  overflow: hidden;
}

/* On mobile or short screens, allow fluid scrolling */
@media (max-width: 991px), (max-height: 700px) {
  html, body {
    height: auto !important;
    overflow-y: auto !important;
  }
  .miniweb-auth-page {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: visible !important;
  }
}

/* ==========================================================================
   Left Brand Showcase Panel - Simple, High-End SaaS Aesthetics
   ========================================================================== */
.auth-brand-showcase {
  flex: 0 0 45%;
  max-width: 45%;
  height: 100vh;
  background-color: #070913;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(150deg, #070913 0%, #0D1224 50%, #131836 100%);
  background-size: 28px 28px, 100% 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  color: #FFFFFF;
  overflow: hidden;
}

/* Ambient Glow Orbs */
.auth-brand-showcase::before {
  content: '';
  position: absolute;
  top: -12%;
  left: -12%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.auth-brand-showcase::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.12) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Brand Top Header */
.auth-brand-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.auth-brand-logo-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.auth-brand-logo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.auth-brand-logo-row:hover .auth-brand-logo-icon {
  transform: scale(1.05);
}

.auth-brand-logo-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.auth-brand-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.auth-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #A5B4FC;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-live-dot {
  width: 7px;
  height: 7px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
}

/* Headings */
.auth-brand-heading {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 50%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-subhead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94A3B8;
  margin-bottom: 26px;
  max-width: 440px;
}

/* Simple, Elegant Feature List */
.auth-simple-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 26px;
}

.auth-simple-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-feature-bullet-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-top: 2px;
}

.auth-feature-bullet-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.25);
}

.auth-feature-bullet-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border-color: rgba(6, 182, 212, 0.25);
}

.auth-simple-feature-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 2px;
}

.auth-simple-feature-desc {
  font-size: 0.82rem;
  color: #94A3B8;
  margin: 0;
  line-height: 1.45;
}

/* Elegant Quote / Testimonial Card */
.auth-quote-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
}

.auth-quote-stars {
  color: #FBBF24;
  font-size: 0.88rem;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.auth-quote-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #CBD5E1;
  font-style: italic;
  margin-bottom: 10px;
}

.auth-quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-author-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFFFFF;
}

.auth-author-role {
  font-size: 0.72rem;
  color: #94A3B8;
}

/* Showcase Footer */
.auth-showcase-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-proof-text {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 500;
}

.auth-security-pill {
  font-size: 0.76rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==========================================================================
   Right Form Panel - Fits Viewport Perfectly (No Scroll on Desktop)
   ========================================================================== */
.auth-form-panel {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 28px;
  position: relative;
}

.auth-form-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 26px 30px;
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.02);
  position: relative;
}

.auth-form-card.register-card {
  max-width: 520px;
  padding: 22px 28px;
}

/* Mobile Brand Header */
.auth-mobile-header {
  display: none;
  text-align: center;
  margin-bottom: 18px;
}

.auth-mobile-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-mobile-logo img {
  max-height: 38px;
  object-fit: contain;
}

.auth-mobile-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--auth-text-main);
}

/* Form Titles & Badges */
.auth-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EEF2FF;
  color: #4F46E5;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--auth-text-main);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-card-subtitle {
  font-size: 0.85rem;
  color: var(--auth-text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

/* Field Groups */
.auth-field-group {
  margin-bottom: 13px;
}

.auth-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.auth-field-label .required::after {
  content: ' *';
  color: #EF4444;
}

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

.auth-input-icon {
  position: absolute;
  left: 13px;
  color: #94A3B8;
  font-size: 1.15rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  z-index: 2;
}

.auth-input-control {
  width: 100% !important;
  height: 44px !important;
  padding-top: 8px !important;
  padding-right: 12px !important;
  padding-bottom: 8px !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  color: #1E293B !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

/* Room for the field icon. Not the phone field: intl-tel-input sets its own padding-left
   (inline) to clear the country-code box, and an !important value here would hide it */
.auth-input-control:not(#phoneNumber) {
  padding-left: 40px !important;
}

.auth-input-control:focus {
  background-color: #FFFFFF !important;
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.auth-input-control:focus + .auth-input-icon {
  color: var(--auth-primary);
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  z-index: 3;
}

.auth-password-toggle:hover {
  color: var(--auth-primary);
}

/* 2-Column Responsive Grid */
.auth-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 576px) {
  .auth-grid-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* International Telephone Input Styling */
.iti {
  width: 100% !important;
  display: block !important;
}

.iti input.auth-input-control,
.iti input#phoneNumber {
  width: 100% !important;
  height: 44px !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  color: #1E293B !important;
  background-color: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.iti input.auth-input-control:focus,
.iti input#phoneNumber:focus {
  background-color: #FFFFFF !important;
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.iti__selected-flag {
  background: transparent !important;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  padding: 0 8px 0 10px !important;
}

.iti__country-list {
  border-radius: 10px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14) !important;
  border: 1px solid #E2E8F0 !important;
  max-height: 220px !important;
  z-index: 1050 !important;
  font-family: inherit !important;
}

/* Terms and Policy Checkbox Box */
.auth-terms-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-terms-box input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  accent-color: var(--auth-primary);
  border-radius: 4px;
  cursor: pointer;
}

.auth-terms-text {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.auth-terms-text a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-terms-text a:hover {
  text-decoration: underline;
}

/* Remember Me & Forgot Password */
.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  cursor: pointer;
  user-select: none;
  margin: 0;
  font-weight: 500;
}

.auth-checkbox-input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #CBD5E1;
  accent-color: var(--auth-primary);
  cursor: pointer;
}

.auth-forgot-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.auth-forgot-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* Primary Action Button */
.auth-btn-submit {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.auth-btn-submit:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45) !important;
}

.auth-btn-submit:active {
  transform: translateY(0);
}

/* Social Buttons */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: #94A3B8;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.auth-divider span {
  padding: 0 10px;
}

.auth-social-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-social-btn {
  flex: 1;
  height: 40px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-social-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Bottom Switch Prompt */
.auth-switch-prompt {
  text-align: center;
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--auth-text-muted);
}

.auth-switch-link {
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}

.auth-switch-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* Footer Copyright */
.auth-footer-bar {
  text-align: center;
  margin-top: 14px;
  font-size: 0.74rem;
  color: #94A3B8;
}

.auth-footer-bar a {
  color: #64748B;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-bar a:hover {
  color: var(--auth-primary);
}

/* Language Picker Top-Right Position */
.auth-lang-picker {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 100;
}

.auth-lang-btn {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 9999px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s ease !important;
}

.auth-lang-btn:hover {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E293B !important;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .auth-brand-showcase {
    display: none;
  }
  
  .auth-mobile-header {
    display: block;
  }

  .auth-form-panel {
    padding: 48px 16px 28px;
    height: auto;
    min-height: 100vh;
  }

  .auth-form-card {
    padding: 26px 20px;
    border-radius: 16px;
  }

  .auth-lang-picker {
    top: 12px;
    right: 14px;
  }
}

@media (max-width: 575px) {
  .auth-form-card {
    padding: 20px 14px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  
  .auth-card-title {
    font-size: 1.45rem;
  }
}

/* ==========================================================================
   Left showcase: balanced layout + illustrative Miniweb preview
   ========================================================================== */
/* Logo bar stays at the top, footer at the bottom, everything else centred between them */
.auth-brand-content {
  flex: 1;
  min-height: 0;
}

.auth-brand-top-bar {
  margin-bottom: auto !important;
  padding-bottom: 28px;
}

.auth-brand-content > :last-child {
  margin-bottom: auto;
}

.auth-showcase-footer {
  margin-top: 28px;
}

.auth-preview {
  max-width: 440px;
}

.auth-preview-caption {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 10px;
}

.auth-preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.auth-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-preview-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F6863380, #F68633);
  color: #FFFFFF;
  font-size: 1.25rem;
}

.auth-preview-id {
  flex: 1;
  min-width: 0;
}

.auth-preview-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #F8FAFC;
}

.auth-preview-link {
  font-size: 0.78rem;
  color: #A5B4FC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-preview-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.auth-preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.auth-preview-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.auth-preview-actions span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.68rem;
  color: #CBD5E1;
  text-align: center;
}

.auth-preview-actions i {
  font-size: 1.1rem;
  color: #A5B4FC;
}

.auth-preview-actions .wa i {
  color: #25D366;
}

.auth-preview-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.auth-preview-item .thumb {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(246, 134, 51, 0.5), rgba(62, 64, 150, 0.6));
}

.auth-preview-item .thumb.alt {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.45));
}

.auth-preview-item .lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-preview-item .lines i {
  display: block;
  height: 7px;
  width: 70%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-preview-item .lines i.short {
  width: 40%;
  background: rgba(255, 255, 255, 0.08);
}

.auth-preview-item .btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #F68633;
}

/* Shorter desktop screens: the full card needs ~880px of height, so trim it before it can
   reach the footer (product rows go first, then the whole preview) */
@media (max-height: 880px) {
  .auth-preview-items {
    display: none;
  }
}

@media (max-height: 740px) {
  .auth-preview {
    display: none;
  }
}
