@import url("../../fonts/TH_Sarabun/thsarabunnew.css");

body {
    font-family: THSarabunNew;
    margin: 0;
    padding: 0;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Navbar ===== */
.login-navbar {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 24px;
}

.login-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.login-navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.login-navbar-logo {
    height: 70px;
    width: auto;
}

.login-navbar-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e87040;
    letter-spacing: 0.02em;
}




/* ===== Split Layout ===== */
.login-split-layout {
    display: flex;
    flex: 1; /* Take up remaining height between nav and footer */
}

/* Left Side: Poster */
.login-split-left {
    flex: 1.2;
    background-color: #eaf1f7; /* Light blue from screenshot */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-poster {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* Right Side: Login Card */
.login-split-right {
    flex: 1;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-card-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    width: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.login-card-logo img {
    height: 70px;
    width: auto;
    margin-bottom: 12px;
}

.login-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 4px 0;
}

.login-card-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 28px 0;
}

/* ===== Form ===== */
.login-form {
    text-align: left;
}

.login-field-group {
    margin-bottom: 18px;
}

.login-field-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #3f51b5; /* Blueish tone from screenshot for label */
    margin-bottom: 8px;
}

.login-field-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.login-forgot-link {
    font-size: 0.85rem;
    color: #f06a4a;
    text-decoration: none;
    font-weight: 500;
}

.login-forgot-link:hover {
    text-decoration: underline;
    color: #d4603a;
}

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

.login-input-icon {
    position: absolute;
    left: 14px;
    color: #999;
    font-size: 20px;
    pointer-events: none;
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 12px 44px 12px 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
    color: #bbb;
}

.login-input:focus {
    border-color: #3f51b5; /* Blue */
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

/* Error State (Red) */
.login-input.input-validation-error,
.login-input.is-invalid {
    border-color: #dc3545;
}
.login-input.input-validation-error:focus,
.login-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Success/Valid State (Green) */
.login-input.valid,
.login-input.is-valid {
    border-color: #198754;
}
.login-input.valid:focus,
.login-input.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.login-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.login-toggle-password .material-icons {
    font-size: 20px;
    color: #999;
}

.login-toggle-password:hover .material-icons {
    color: #666;
}

.login-field-error {
    font-size: 0.82rem;
    margin-top: 4px;
    display: block;
}

/* ===== Submit Button ===== */
.login-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background-color: #f06a4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-submit-btn:hover {
    background-color: #d4603a;
    transform: translateY(-1px);
}

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

/* ===== Extra Links ===== */
.login-extra-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px dashed #e0e0e0;
}

.login-link-contact {
    color: #e87040;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.login-link-contact:hover {
    opacity: 0.8;
}

.login-link-register {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.login-link-register:hover {
    color: #333;
}


/* ===== Footer ===== */
.login-footer {
    text-align: center;
    padding: 24px 16px;
    border-top: 1px solid #eee;
    background-color: #fff;
    margin-top: auto; /* Push to bottom if content is short */
}

.login-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.login-footer-links a {
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.login-footer-links a:hover {
    color: #e87040;
}

.login-footer-copyright {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .login-split-layout {
        flex-direction: column;
    }
    
    .login-split-left {
        padding: 24px;
    }
    
    .login-poster {
        max-height: 50vh;
    }
    
    .login-split-right {
        padding: 40px 24px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 32px 20px;
        border: none;
        box-shadow: none;
    }
    
    .login-split-right {
        padding: 24px 16px;
    }
}

/* ===== Preserved styles for other pages ===== */
.container-fluid {
    overflow-x: hidden;
}

.login {
    min-height: 90vh;
}

.bg-image {
    background-image: url('https://source.unsplash.com/WEQbe2jBg40/600x1200');
    background-size: cover;
    background-position: center;
}

.login-heading {
    font-weight: 300;
    margin-bottom: 1.7rem !important;
}

.btn-login {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
    padding: 0.75rem 1rem;
    background-color: #f96f65;
    border-color: #f96055;
}

    .btn-login:hover {
        color: #fff;
        background-color: #f88179;
        border-color: #f87b72;
    }

footer {
    background-color: #fff;
    color: #333;
}

.copyrights {
    font-size: 0.8rem;
}

    .copyrights a {
        color: #e87040;
        text-decoration: none;
    }

    .copyrights p {
        margin-bottom: 0px;
    }

    .copyrights.border-top {
        border-top: 2px solid #53575c !important;
    }

.modal-header, .modal-footer {
    display: block;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: bold;
}

.modal-body {
    padding: 40px 10px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 2;
}

.btn-close {
    float: right;
    margin-top: -8px;
    font-size: 0.6rem;
    opacity: 0.2;
}

.carousel-indicators .rounded-circle {
    border: 2px solid white;
    background-color: transparent;
}

.carousel-indicators [data-bs-target] {
    width: 15px;
    height: 15px;
    opacity: 1;
    margin-right: 10px;
    margin-left: 10px;
    background-clip: unset;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: #fff !important;
}

.carousel-dark .carousel-indicators [data-bs-target] {
    background-color: transparent;
}

.carousel-dark .carousel-control-next-icon, .carousel-dark .carousel-control-prev-icon {
    filter: invert(0) grayscale(100);
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
    }
}
