/* css/login.css - Login Page Styles */
/* --- GLOBAL RESET & STYLING --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    overflow: auto;
}

/* --- MAIN CONTAINER --- */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --- LOGO SECTION --- */
.logo-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.logo-image {
    max-width: 350px;
    height: auto;
}

/* --- LOGIN FORM CONTAINER --- */
.login-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-title {
    text-align: center;
    font-size: 1.6em;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
}

/* --- FALLBACK OPTION - HIDDEN INITIALLY --- */
.fallback-option {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.fallback-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.fallback-link:hover {
    color: #00c6ff;
    text-decoration: underline;
}

/* --- OTP FORM - VISIBLE BY DEFAULT --- */
#otpForm {
    display: block;
}

/* --- PASSWORD FORM - HIDDEN INITIALLY --- */
#passwordForm {
    display: none;
}

/* --- BACK TO OTP OPTION --- */
.back-to-otp {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-otp-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-to-otp-link:hover {
    color: #00c6ff;
    text-decoration: underline;
}

/* --- FORM CONTROLS --- */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #cccccc;
    font-size: 0.95em;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.form-input::placeholder {
    color: #888888;
}

/* --- OTP SPECIFIC STYLING --- */
.otp-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.otp-input {
    width: 50px;
    height: 50px;
    padding: 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    transform: scale(1.05);
}

.otp-input:valid {
    border-color: #28a745;
}

.send-otp-btn {
    width: 100%;
    padding: 14px;
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    font-size: 1em;
}

.send-otp-btn:hover:not(:disabled) {
    background: rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.send-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.otp-timer {
    text-align: center;
    color: #28a745;
    font-size: 0.9em;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Verify OTP Button */
#verifyOtpBtn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#verifyOtpBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

#verifyOtpBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- FORM OPTIONS --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cccccc;
}

.remember-me input {
    accent-color: #007bff;
    width: 14px;
    height: 14px;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.forgot-password:hover {
    color: #00c6ff;
    text-decoration: underline;
}

/* --- LOGIN BUTTON --- */
.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn:active {
    transform: translateY(0);
}

/* --- ERROR MESSAGES --- */
.error-message {
    text-align: center;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    display: none;
}

.error-message.error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

.error-message.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid #28a745;
}

.error-message.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid #17a2b8;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-height: 700px) {
    .login-container {
        padding: 15px;
    }
    .logo-section {
        margin-bottom: 15px;
    }
    .logo-image {
        max-width: 200px;
    }
    .login-form-container {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    .logo-image {
        max-width: 180px;
    }
    .login-form-container {
        padding: 20px;
    }
    .form-title {
        font-size: 1.4em;
    }
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .otp-input-group {
        gap: 8px;
    }
    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
}