/*
 * SureSuccess - Login Page Stylesheet
 * Optimized styles specifically for the login page
 */

/* ======================================
   BASE STYLES & VARIABLES
   ====================================== */
:root {
  /* Color Palette */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-lighter: #93c5fd;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --secondary-lighter: #334155;
  
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  --background: #ffffff;
  --background-alt: #f8fafc;
  --background-dark: #f1f5f9;
  
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-headings: 'Poppins', var(--font-primary);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Borders */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --border-radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s ease;
}

/* ======================================
   RESET & BASE STYLES
   ====================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background);
  overflow-x: hidden;
  position: relative;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--secondary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

section {
  padding: 5rem 0;
  position: relative;
}

/* ======================================
   ACCESSIBILITY
   ====================================== */
.skip-to-content {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: var(--primary);
  color: var(--text-white);
  padding: var(--spacing-md) var(--spacing-lg);
  z-index: 9999;
  opacity: 0;
  transition: var(--transition-fast);
}

.skip-to-content:focus {
  top: 20px;
  left: 20px;
  opacity: 1;
}

/* ======================================
   NAVIGATION
   ====================================== */
.navbar {
  background-color: var(--background);
  box-shadow: var(--shadow);
  padding: 0.75rem 0;
  transition: var(--transition);
  z-index: 100;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.brand-logo {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary);
}

.brand-highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-nav {
  margin-left: 1.5rem;
}

.nav-item {
  margin: 0 0.5rem;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.625rem 0.5rem;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--primary-gradient);
  margin-top: 4px;
  border-radius: var(--border-radius-full);
}

.nav-buttons {
  display: flex;
  align-items: center;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
  }

  .nav-buttons {
    margin-top: 1rem;
    flex-direction: column;
    width: 100%;
  }

  .nav-buttons .btn {
    margin: 0.25rem 0;
    width: 100%;
  }
}

/* ======================================
   BUTTONS
   ====================================== */
.btn {
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  outline: none !important;
  font-size: 0.95rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover, 
.btn-primary:focus {
  background: var(--primary-dark);
  color: var(--text-white);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover, 
.btn-outline:focus {
  background: var(--primary);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-outline:active {
  transform: translateY(0);
}

.btn-light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border: none;
}

.btn-light:hover, 
.btn-light:focus {
  background: var(--background);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-link {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.btn-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ======================================
   LOGIN PAGE SPECIFIC STYLES
   ====================================== */
.login-page {
  background-color: var(--background-alt);
  min-height: 100vh;
  padding-top: 6rem;
}

/* Login Visual Section */
.login-visual-section {
  background: var(--primary-gradient);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

.login-visual-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.login-visual-section p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
}

.login-visual-section img {
  max-width: 85%;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.login-visual-section img:hover {
  transform: scale(1.02);
}

/* Login Form Container */
.login-form-container {
  background-color: var(--background);
  border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
  box-shadow: var(--shadow-md);
  margin: 0;
  height: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.login-header p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Form styling */
.form-floating {
  margin-bottom: 1.5rem;
}

.form-floating .form-control {
  height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.form-floating .form-control:focus {
  border-color: var(--primary-lighter);
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-floating label {
  padding: 1rem 0.75rem;
  color: var(--text-muted);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--primary);
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:-webkit-autofill ~ label {
  color: var(--primary);
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Password toggle */
.password-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--primary);
}

/* Password Strength Meter */
.password-strength-meter {
  height: 5px;
  background-color: #e9ecef;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: var(--transition);
}

.strength-bar.strength-weak {
  background-color: var(--danger);
  width: 25%;
}

.strength-bar.strength-medium {
  background-color: var(--warning);
  width: 50%;
}

.strength-bar.strength-strong {
  background-color: var(--info);
  width: 75%;
}

.strength-bar.strength-very-strong {
  background-color: var(--success);
  width: 100%;
}

/* Form check */
.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0.25em;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
}

.divider::before, .divider::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background-color: #dee2e6;
  margin: 0 1rem;
}

/* Login Button */
.login-btn {
  padding: 0.8rem 0;
  font-size: 1.1rem;
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
  transition: var(--transition);
  font-weight: 500;
}

.login-btn:hover, 
.login-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* Social Login Buttons */
.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  height: 44px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
}

.social-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Quick Access Stats */
.quick-access-section {
  background-color: var(--background-alt);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
}

.quick-access-section h6 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.quick-access-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.quick-access-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.quick-access-icon i {
  color: var(--primary);
  font-size: 1.5rem;
}

.quick-access-item:hover .quick-access-icon {
  transform: translateY(-5px);
  background-color: rgba(37, 99, 235, 0.2);
}

.quick-access-label span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.quick-access-label small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal Styles */
.modal-header-custom {
  background: var(--primary-gradient);
  color: white;
  border-bottom: none;
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background-color: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-size: 2rem;
}

.btn-close-white {
  filter: brightness(0) invert(1);
}

/* Alert Styles */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

/* Footer */
.site-footer {
  background-color: var(--secondary);
  color: var(--text-white);
  padding-top: 5rem;
}

.footer-brand {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--secondary-lighter);
  border-radius: var(--border-radius-full);
  color: var(--text-white);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary);
  color: var(--text-white);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-white);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-lighter);
  padding-left: 5px;
}

.newsletter-form {
  margin-top: 1.5rem;
}

.newsletter-form .form-control {
  background-color: var(--secondary-lighter);
  border: none;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form .form-control::placeholder {
  color: var(--text-light);
}

.newsletter-form .btn {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-bottom {
  background-color: var(--secondary-dark);
  padding: 1.5rem 0;
  margin-top: 4rem;
}

.copyright {
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 0;
}

/* Back to top button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary-gradient);
  color: var(--text-white);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 99;
}

.back-to-top-btn.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Spinner */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border .75s linear infinite;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .login-form-container {
    max-width: 500px;
    margin: 2rem auto;
    border-radius: var(--border-radius-lg);
  }
  
  .login-visual-section {
    min-height: 40vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }
  
  .login-visual-section img {
    max-width: 70%;
  }
  
  .login-visual-section h1 {
    font-size: 2.75rem;
  }
}

@media (max-width: 767.98px) {
  .login-page {
    padding-top: 5rem;
  }
  
  .login-form-container {
    padding: 2rem 1.5rem !important;
  }
  
  .login-visual-section {
    padding: 3rem 2rem;
    min-height: auto;
  }
  
  .login-visual-section h1 {
    font-size: 2.5rem;
  }
  
  .quick-access-icon {
    width: 45px;
    height: 45px;
  }
  
  .quick-access-icon i {
    font-size: 1.25rem;
  }
  
  .quick-access-label span {
    font-size: 1.25rem;
  }
  
  .modal-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
  
  .site-footer {
    padding-top: 3rem;
  }
  
  .footer-title {
    margin-bottom: 1rem;
    font-size: 1rem;
  }
  
  .footer-links li {
    margin-bottom: 0.5rem;
  }
  
  .social-links {
    margin-bottom: 2rem;
  }
  
  .footer-bottom {
    margin-top: 2rem;
  }
  
  .back-to-top-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

@media (max-width: 576px) {
  .login-header h1 {
    font-size: 1.5rem;
  }
  
  .login-header p {
    font-size: 0.95rem;
  }
  
  .form-floating .form-control {
    height: calc(3.25rem + 2px);
  }
  
  .login-btn {
    padding: 0.7rem 0;
    font-size: 1rem;
  }
  
  .quick-access-section {
    padding: 1.25rem;
  }
  
  .quick-access-section h6 {
    font-size: 0.9rem;
  }
  
  .quick-access-icon {
    width: 40px;
    height: 40px;
  }
  
  .quick-access-label span {
    font-size: 1.1rem;
  }
  
  .quick-access-label small {
    font-size: 0.75rem;
  }
}