/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

/* Main Container */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1400px;
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.6s ease-out;
}

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

/* Left Side - Branding */
.login-left {
  background: linear-gradient(135deg, #05305c 0%, #0a4a8a 50%, #05305c 100%);
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login-left::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(239, 146, 39, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.login-left::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(250, 188, 46, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.branding-content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.logo-link {
  display: inline-block;
  margin-bottom: 20px;
}

.brand-logo {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.welcome-title {
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 50px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.features-showcase {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 450px;
  margin: 0 auto 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 20px 25px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ef9227 0%, #fabc2e 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.feature-text {
  text-align: left;
}

.feature-text h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Right Side - Login Form */
.login-right {
  padding: 60px 50px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #ffffff;
}

.login-form-container {
  width: 100%;
  max-width: 480px;
}

.form-header {
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.form-header h2 {
  color: #05305c;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.form-header p {
  color: #666666;
  font-size: 16px;
}

/* Form Styles */
.login-form {
  animation: fadeIn 0.8s ease-out 0.5s both;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  color: #333333;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

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

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  fill: #999999;
  pointer-events: none;
  z-index: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  color: #333333;
  background: #f8f9fa;
  transition: all 0.3s ease;
  outline: none;
}

.input-wrapper input:focus {
  border-color: #ef9227;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(239, 146, 39, 0.1);
}

.input-wrapper input::placeholder {
  color: #999999;
}

.toggle-password {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.toggle-password:hover {
  opacity: 0.7;
}

.eye-icon {
  width: 22px;
  height: 22px;
  fill: #999999;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.form-options {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* ========== TWO-FACTOR AUTHENTICATION STYLES ========== */

/* 2FA Group Container */
.twofa-group {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0 !important;
  padding-top: 24px;
  border-top: 2px solid #e8ecf4;
}

.twofa-group.show {
  opacity: 1;
  transform: translateY(0);
}

/* 2FA Info Banner */
.twofa-info-banner {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #e3f2fd 0%, #e8f4f8 100%);
  border: 2px solid #90caf9;
  border-radius: 12px;
  margin-bottom: 24px;
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.twofa-banner-icon {
  width: 28px;
  height: 28px;
  fill: #1976d2;
  flex-shrink: 0;
  margin-top: 2px;
}

.twofa-banner-content h4 {
  color: #0d47a1;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.twofa-banner-content p {
  color: #1565c0;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* 2FA Input Styling */
.twofa-group .input-wrapper input {
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5em;
  text-align: center;
  padding: 16px 20px;
  border: 2px solid #90caf9;
  background: #f8fbff;
  transition: all 0.3s ease;
}

.twofa-group .input-wrapper input:focus {
  border-color: #1976d2;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
}

.twofa-group .input-wrapper input::placeholder {
  letter-spacing: 0.4em;
  opacity: 0.4;
}

/* 2FA Helper Text */
.twofa-helper-text {
  display: flex;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px 16px;
  background: #f5f9fc;
  border-left: 3px solid #64b5f6;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #546e7a;
}

.twofa-helper-text svg {
  margin-top: 2px;
  margin-right: 8px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* 2FA Input Focus Animation */
.twofa-group .input-wrapper {
  position: relative;
}

.twofa-group .input-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transform: translateX(-50%);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.twofa-group .input-wrapper input:focus + .input-wrapper::after,
.twofa-group .input-wrapper:focus-within::after {
  width: 100%;
}

/* 2FA Label Styling */
.twofa-group label {
  font-weight: 600;
  color: #1976d2;
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.twofa-group label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #1976d2;
  border-radius: 50%;
  display: inline-block;
}

/* Responsive 2FA Styles */
@media (max-width: 768px) {
  .twofa-info-banner {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .twofa-banner-icon {
    width: 24px;
    height: 24px;
  }

  .twofa-banner-content h4 {
    font-size: 14px;
  }

  .twofa-banner-content p {
    font-size: 12px;
  }

  .twofa-group .input-wrapper input {
    font-size: 18px;
    letter-spacing: 0.4em;
    padding: 14px 16px;
  }

  .twofa-helper-text {
    font-size: 12px;
    padding: 10px 12px;
  }
}

.remember-me {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.remember-me input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #d0d0d0;
  border-radius: 6px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.remember-me input:checked ~ .checkmark {
  background: linear-gradient(135deg, #ef9227 0%, #fabc2e 100%);
  border-color: #ef9227;
}

.checkmark::after {
  content: "";
  display: none;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark::after {
  display: block;
}

.label-text {
  color: #666666;
  font-size: 14px;
  user-select: none;
}

.forgot-password {
  color: #ef9227;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #fabc2e;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #ef9227 0%, #fabc2e 100%);
  color: #05305c;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(239, 146, 39, 0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.login-btn:hover {
  box-shadow: 0 12px 36px rgba(239, 146, 39, 0.4);
}

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

.btn-icon {
  width: 20px;
  height: 20px;
  fill: #05305c;
}

/* Form Divider */
.form-divider {
  display: flex;
  align-items: center;
  margin: 35px 0 25px;
  color: #999999;
  font-size: 14px;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.form-divider span {
  padding: 0 15px;
}

/* Social Login */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #ffffff;
  color: #333333;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-btn:hover {
  border-color: #ef9227;
  background: #fff8f0;
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

/* Signup Prompt */
.signup-prompt {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
}

.signup-prompt p {
  color: #666666;
  font-size: 15px;
}

.signup-prompt a {
  color: #ef9227;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.signup-prompt a:hover {
  color: #fabc2e;
}

/* Back Home Link */
.back-home {
  text-align: center;
  margin-top: 20px;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666666;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-home a:hover {
  color: #ef9227;
  transform: translateX(-3px);
}

.back-home svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .login-left {
    padding: 50px 40px;
  }

  .welcome-title {
    font-size: 36px;
  }

  .features-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .login-container {
    border-radius: 16px;
  }

  .login-left {
    padding: 40px 30px;
  }

  .login-right {
    padding: 40px 30px;
  }

  .brand-logo {
    max-width: 220px;
  }

  .welcome-title {
    font-size: 32px;
  }

  .welcome-subtitle {
    font-size: 16px;
  }

  .form-header h2 {
    font-size: 28px;
  }

  .features-showcase {
    gap: 15px;
  }

  .feature-item {
    padding: 16px 20px;
  }

  .feature-icon {
    width: 45px;
    height: 45px;
  }

  .social-login {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .login-left {
    padding: 30px 20px;
  }

  .login-right {
    padding: 30px 20px;
  }

  .brand-logo {
    max-width: 180px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 15px;
    margin-bottom: 35px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .form-header p {
    font-size: 14px;
  }

  .feature-item {
    padding: 14px 18px;
  }

  .feature-text h4 {
    font-size: 15px;
  }

  .feature-text p {
    font-size: 13px;
  }

  .input-wrapper input {
    padding: 12px 14px 12px 44px;
    font-size: 14px;
  }

  .login-btn {
    padding: 14px 28px;
    font-size: 15px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
