@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
}

.login-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- Left Side Design --- */
.login-left {
    flex: 1;
    background-color: #1A2238;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    color: white;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 500;
    color: #F89b42;
}

.logo-icon {
    width: 45px;
    height: 45px;
    stroke: #F89b42; 
    stroke-width: 2.5; 
    fill: none; 
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visual-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid #F89b42;
    border-radius: 50%;
    opacity: 0.8;
}

.circle-inner {
    position: absolute;
    width: 75%;
    height: 75%;
    border: 2px dashed #F89b42;
    border-radius: 50%;
    opacity: 0.6;
}

.energy-icon {
    font-size: 80px;
    color: #F89b42;
    z-index: 2;
}

.left-content {
    margin-bottom: 40px;
    z-index: 2;
}

.left-content h2 {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 500;
}

.left-content .highlight {
    color: #F89b42;
    margin-bottom: 15px;
    display: block;
}

.left-content p {
    color: #8fa1b8;
    font-weight: 300;
    max-width: 400px;
    font-size: 0.95rem;
}

/* --- Right Side --- */
.login-right {
    flex: 1;
    background-color: #F2F2F2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
}

.form-wrapper h1 {
    font-size: 2.5rem;
    color: #1a1a1a;
    font-weight: 500;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 0.95rem;
}

form label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.input-group input:focus {
    border-color: #F89b42;
    background-color: #fff;
}

.forgot-link {
    text-align: right;
    margin-top: -15px;
    margin-bottom: 20px;
}

.forgot-link a {
    color: #F89b42;
    font-size: 0.85rem;
    text-decoration: none;
}

.otp-section {
    margin-bottom: 30px;
}

.otp-input {
    width: 140px;
    margin-bottom: 5px;
}

.sms-link {
    font-size: 0.85rem;
    color: #F89b42;
}

.sms-link a {
    color: #666;
    text-decoration: none;
}
.sms-link .highlight-text {
    color: #F89b42;
    font-weight: 500;
}

/* otp */
.forgot-modal {
    display: none;
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.forgot-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease-in-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.forgot-modal-content {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
}

.forgot-modal-content h3 {
    color: #1a1a1a;
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.forgot-modal-content input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
    margin-bottom: 15px;
    font-family: 'Kanit', sans-serif;
}

.forgot-modal-content input:focus {
    border-color: #F89b42;
    background-color: #fff;
}

.forgot-modal-content button {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Kanit', sans-serif;
}

.forgot-modal-content .btn-send-otp {
    background: #1A2238;
    color: white;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 400;
    display: block;
    margin-left: auto;
    margin-top: -5px;
    margin-bottom: 20px;
}

.forgot-modal-content .btn-send-otp:hover {
    background: #2a3655;
}

.forgot-modal-content .btn-reset-pass {
    width: 100%;
    background: #F89b42;
    color: white;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 10px;
}

.forgot-modal-content .btn-reset-pass:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(248, 155, 66, 0.4);
}

.forgot-modal-content .modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: #888;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.forgot-modal-content .modal-close-btn:hover {
    color: #F89b42;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
    box-shadow: none;
}
/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px;
    background: #F89b42;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 25px;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(248, 155, 66, 0.4);
}

.signup-links {
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.signup-links p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.signup-links a {
    color: #F89b42; 
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.signup-links a:hover {
    opacity: 0.8;
}

.role-admin {
    color: #1A2238; 
    font-weight: 700;
}

/* Error Messages */
input.input-error {
    border: 1px solid #ff3333 !important;
    background-color: #fff0f0 !important;
    color: #cc0000;
    animation: shake 0.3s ease-in-out;
}

.error-message {
    color: #ff3333;
    font-size: 0.85em;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
    text-align: left;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.input-group:has(.input-error) .input-icon {
    color: #ff3333;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.8rem;
    color: #888;
    text-decoration: none;
    z-index: 100;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #F89b42;
    background-color: rgba(0,0,0,0.05);
    transform: rotate(90deg);
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    color: #1A2238; 
    font-size: 1.4rem;
    font-weight: 500;
    z-index: 100;
}

.logo-icon-mobile {
    width: 35px;
    height: 35px;
    stroke: #F89b42;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 900px) {
    
    body {
        overflow-y: auto; 
        height: auto;
        min-height: 100vh;
    }

    .login-container {
        flex-direction: column;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 80px 20px 30px;
        min-height: 100vh;
        align-items: center; 
        position: relative;
    }

    .mobile-logo {
        display: flex;
        position: absolute;
        top: 25px;
        left: 25px;
    }

    .close-btn {
        top: 25px;
        right: 25px;
    }

    .form-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .form-wrapper h1 {
        font-size: 2rem;
        text-align: center;
        margin-top: 20px;
    }

    .subtitle {
        text-align: center;
    }
}