:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 10px;
    --box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    /* background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); */
    
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--dark-color);

    flex: 1;
    background: url("/static/imgs/bg-img.jpg") no-repeat center center/cover;
   
}

.login-container {
    display: flex;
    max-width: 1120px;
    width: 100%;
    height: 50vh;
    min-height: 600px;
    max-height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: white;
    overflow: auto;
    
    zoom: 0.9;
}

/* Left Panel */
.login-left {
    flex: 0.9;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -80px;
    right: -80px;
}

.login-left::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -60px;
    left: -60px;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.logo-img {
    width: 186px;
    height: 50px;
    margin-right: 12px;
    background-color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo-img img {
    max-width: 174px;
    max-height: 35px;
}

.logo-text h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 3px;
}

.logo-text span {
    font-size: 0.8rem;
    opacity: 0.9;
}

.left-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.left-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.left-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    margin-top: 20px;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.features-list i {
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.copyright {
    font-size: 0.75rem;
    opacity: 0.8;
    position: relative;
    z-index: 2;
    margin-top: 10px;
}

/* Right Panel */
.login-right {
    flex: 1.1;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
    overflow-y: auto;
}

.login-header {
    margin-bottom: 20px;
}

.login-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.alert {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.1);
    color: #0c5460;
    border-left: 3px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(247, 37, 133, 0.1);
    color: #721c24;
    border-left: 3px solid var(--danger-color);
}

.alert i {
    margin-right: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

.d-none {
    display: none !important;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 1rem;
    z-index: 1;
}

.form-control {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1.5px solid var(--light-gray);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.form-control::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

/* User Information Display */
.user-info-display {
    background-color: rgb(255 249 230 / 14%);
    border-radius: 5px;
    padding: 12px 12px;
    margin-bottom: 25px;
    display: flex;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    border: 1px solid rgb(248 150 30 / 42%);
    box-shadow: 0 2px 4px rgb(252 211 161 / 25%);
  justify-content: space-around;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    color: #b36b00;;
    font-weight: 600;
    margin-bottom: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.85rem;
    color: var(--dark-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.info-value i {
    margin-right: 5px;
    font-size: 0.8rem;
    color: #f8961e;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    /* align-items: center; */
    /* justify-content: center; */
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-online {
    background-color: green;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
    animation: pulse-online 2s infinite;
}

.status-offline {
    background-color: #dd2020;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

@keyframes pulse-online {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.caution-box {
    background-color: #fff9e6;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.caution-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.caution-icon {
    font-size: 1.2rem;
    color: var(--warning-color);
    margin-right: 10px;
    flex-shrink: 0;
}

.caution-header h4 {
    color: #b36b00;
    font-weight: 600;
    font-size: 0.95rem;
}

.caution-list {
    list-style: none;
    padding-left: 8px;
}

.caution-list li {
    margin-bottom: 6px;
    color: #996600;
    display: flex;
    align-items: flex-start;
    font-size: 0.85rem;
}

.caution-list i {
    color: var(--warning-color);
    margin-right: 8px;
    margin-top: 2px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.btn-login {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.25);
    margin-top: 5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    margin-right: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        min-height: 500px;
        overflow: auto;
        
    }
    
    .login-left {
        flex: none;
        padding: 20px;
        min-height: 200px;
    }
    
    .left-content h1 {
        font-size: 1.4rem;
    }
    
    .features-list {
        display: none;
    }
    
    .login-right {
        flex: none;
        padding: 20px;
        overflow-y: visible;
    }
    
    .login-header h2 {
        font-size: 1.4rem;
    }
    
    .user-info-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        display: grid;
    }
    
    .btn-login {
        padding: 10px 15px;
    }
}

@media (max-height: 600px) {
    .login-container {
        height: auto;
        min-height: 350px;
        max-height: 90vh;
        overflow: auto;
    }
    
    .login-left, .login-right {
        padding: 15px 20px;
    }
    
    .caution-box {
        margin: 10px 0;
        padding: 12px;
    }
    
    .caution-list li {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .user-info-display {
        padding: 8px 10px;
        margin-bottom: 10px;
        display: grid;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 15px;
    }
    
    .login-right {
        padding: 15px;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .logo-text h2 {
        font-size: 1.2rem;
    }
    
    .left-content h1 {
        font-size: 1.2rem;
    }
    
    .login-header h2 {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 10px 10px 10px 35px;
        font-size: 0.9rem;
    }
    
    .input-icon {
        left: 10px;
        font-size: 0.9rem;
    }
    
    .user-info-display {
        grid-template-columns: 1fr;
        display: grid;
    }
}

/* Alert Overlay */
.alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Hide by default */
.hidden {
    display: none;
}

/* Alert Box */
.alert-box {
    background: #ffffff;
    width: 360px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: popIn 0.25s ease-out;
}

.alert-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.alert-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.alert-message {
    font-size: 14px;
    color: #4b5563;
    margin: 12px 0 20px;
}

.alert-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.alert-btn:hover {
    background: #1d4ed8;
}

/* Animation */
@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

::-webkit-scrollbar {
  width: 5px;
    height: 4px;
}
::-webkit-scrollbar-thumb {
 background: linear-gradient(-225deg, #5f76e8f7 0%, #5f76e830 100%);
 border-radius: 10px;
}

::-webkit-input-placeholder {
color: #999;
}

#userName {
    font-size: 16px;
}

.change-pass:hover{
text-decoration: underline;
}

