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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Container */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Login Section */
.login-section {
    flex: 1;
    background: linear-gradient(135deg, #004e92 0%, #0066b3 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 5% 6%;
    width: 55%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90%;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 12px;
}

.logo {
    max-width: 200px;
    height: auto;
}

/* Login Title */
.login-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}

/* Form Styles */
.login-form {
    width: 100%;
}

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

.form-input {
    width: 100%;
    padding: 3% 2%;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #0066b3;
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

.form-input::placeholder {
    color: #999;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 3.5%;
    background: linear-gradient(135deg, #ff5722 0%, #ff6f3d 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 4%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #e64a19 0%, #ff5722 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.3);
}

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

.registerlink {
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 2%;
    transition: color 0.3s ease;
}

/* Forgot Password */
.forgot-password {
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 5%;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0066b3;
}

/* Social Login */
.social-login {
    border-top: 1px solid #eee;
    padding-top: 5%;
}

.btn-social {
    width: 100%;
    padding: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5%;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: #f8f9fa;
    border-color: #aaa;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn-social:last-child {
    margin-bottom: 0;
}

.social-icon {
    height: 24px;
}

.btn-google {
    color: #333;
}

.btn-zoho {
    color: #333;
}

/* Illustration Section */
.illustration-section {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.illustration {
    max-width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .illustration-section {
        padding: 30px;
    }
    
    .login-card {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .login-section {
        min-height: 100vh;
        padding: 30px 20px;
    }
    
    .illustration-section {
        display: none;
    }
    
    .login-card {
        max-width: 100%;
        padding: 40px 25px;
    }
    
    .login-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 10%;
        border-radius: 15px;
        width: 90%;
    }
    
    .logo {
        max-width: 160px;
    }
    
    .login-title {
        font-size: 22px;
        margin-bottom: 5%;
    }
    
    .form-input {
        padding: 3.5% 15px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 3.5%;
        font-size: 16px;
    }
    
    .btn-social {
        padding: 2%;
        font-size: 14px;
    }
}

/* Loading State */
.btn-login.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.form-input.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

.loading-spinner{
    height: 18px;
}

/* ==========================
   Forgot Password Modal
   ========================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 30px 40px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: scaleIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  border: none;
  background: none;
  color: #555;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #000;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.modal-description {
  font-size: 15px;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
}

.forgot-password-form .form-group {
  margin-bottom: 20px;
}

.forgot-password-form .btn-login {
  width: 100%;
}

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

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
