/* Professional Banking Login Page Styles */

:root {
  --primary-color: #003d82;
  --primary-dark: #002855;
  --primary-light: #0056b3;
  --secondary-color: #00a859;
  --accent-color: #ff6b00;
  --background: #f5f7fa;
  --card-background: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* stack main and footer vertically */
  align-items: center;
  justify-content: center; /* center the login card vertically */
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

/* Main Login Container */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-background);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 600px;
  /* Ensure the card stays centered on all viewports */
  margin: 0 auto;
}

/* Left Side - Brand Section */
.login-brand {
  background: var(--primary-color);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: transparent;
  pointer-events: none;
}

.login-brand-content {
  position: relative;
  z-index: 1;
}

.login-logo {
  margin-bottom: 40px;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
}

.login-logo img {
  height: 70px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none;
}

.login-brand h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.login-brand p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.brand-features {
  list-style: none;
  margin-top: 40px;
}

.brand-features li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
}

.brand-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.brand-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Right Side - Login Form */
.login-form-section {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  margin-bottom: 40px;
}

.login-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 14px 45px 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff;
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

.form-input::placeholder {
  color: #adb5bd;
}

.form-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
  pointer-events: none;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 0.9rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-wrapper label {
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-login:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.signup-link {
  text-align: center;
  margin-top: 30px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.signup-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-left: 5px;
}

.signup-link a:hover {
  text-decoration: underline;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.alert i {
  font-size: 1.1rem;
}

.alert-danger {
  background: #fff2f2;
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

@keyframes shake {
  10%, 90% {
    transform: translateX(-1px);
  }
  20%, 80% {
    transform: translateX(2px);
  }
  30%, 50%, 70% {
    transform: translateX(-3px);
  }
  40%, 60% {
    transform: translateX(3px);
  }
}

/* Footer */
.footer-copyright-area {
  position: relative; /* prevent floating to the right as a flex row item */
  width: 100%;
  text-align: center;
  padding: 16px 20px;
  color: #6c757d;
  font-size: 0.9rem;
  z-index: 1;
  margin-top: 16px; /* space from card */
}

.footer-copy-right {
  background: transparent;
}

.footer-copy-right p {
  margin: 0;
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 968px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    /* Avoid oversized min-height on small screens */
    min-height: unset;
    width: 100%;
  }
  
  .login-brand {
    display: none;
  }
  
  .login-form-section {
    padding: 50px 40px;
  }
}

@media (max-width: 576px) {
  body {
    padding: 15px;
  }
  
  .login-form-section {
    padding: 32px 20px;
  }
  
  .login-header h2 {
    font-size: 1.6rem;
  }
  
  .login-header p {
    font-size: 0.9rem;
  }
  
  .brand-features {
    display: none;
  }
  
  .footer-copyright-area {
    margin-top: 24px;
  }
}

/* Very small devices */
@media (max-width: 380px) {
  .login-container {
    max-width: 100%;
  }
  .login-wrapper {
    border-radius: 16px;
  }
  .form-input {
    padding: 12px 42px 12px 14px;
    font-size: 0.95rem;
  }
  .btn-login {
    padding: 14px;
    font-size: 1rem;
  }
}

/* Loading State */
.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-form-section {
  animation: fadeIn 0.6s ease-out;
}

.login-brand {
  animation: fadeIn 0.6s ease-out 0.1s both;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
