* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    width: 100%;
    background: #ffffff;
}

.header-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.container {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.login-box {
    width: 400px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px 30px 45px 30px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.logo-area {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.logo {
    max-width: 160px;
    width: 100%;
    height: auto;
}

.title-area {
    margin-bottom: 30px;
}

.title-area h1 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.title-area p {
    font-size: 13px;
    color: #666666;
    font-weight: 500;
}

.sms-icon {
    font-size: 48px;
    color: #0067b1;
    margin-bottom: 15px;
}

.form-section {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.password-group {
    position: relative;
}

.input-field {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    border: 1.5px solid #e0e0e0;
    background-color: #f8f9fa;
    outline: none;
    border-radius: 12px;
    transition: all 0.2s;
}

.input-field:focus {
    border-color: #0067b1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 103, 177, 0.1);
}

.input-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: transparent;
    padding: 0 4px;
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
    top: 0px;
    transform: translateY(-50%);
    font-size: 11px;
    color: #0067b1;
    background-color: white;
    font-weight: 700;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888888;
    font-size: 16px;
    transition: color 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    color: #0067b1;
}

.btn-primary {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #0067b1 0%, #004d87 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 5px;
    text-transform: uppercase;
}

.btn-primary i {
    font-size: 16px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #004d87 0%, #003a66 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 103, 177, 0.3);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #bbbbbb 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text {
    display: inline-block;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.otp-attempts {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.otp-attempts i {
    font-size: 10px;
    color: #cccccc;
    transition: all 0.3s;
}

.otp-attempts i.active {
    color: #0067b1;
}

.otp-attempts i.wrong {
    color: #ff4444;
}

.error-message {
    background-color: #ffeeee;
    color: #ff4444;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resend-code {
    margin-top: 15px;
}

.resend-code a {
    font-size: 12px;
    color: #0067b1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.resend-code a:hover {
    color: #004d87;
    text-decoration: underline;
}

.footer-text {
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

.footer-text p {
    font-size: 12px;
    color: #0067b1;
    font-weight: 700;
    margin-bottom: 5px;
}

.footer-text p i {
    margin-right: 5px;
}

.footer-text .small {
    font-size: 10px;
    color: #999999;
    font-weight: 400;
}

.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.loading-icon i {
    font-size: 50px;
    color: #0067b1;
    margin-bottom: 20px;
}

.loading-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.loading-content p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0067b1, #00a8ff);
    border-radius: 4px;
    animation: loading 300s linear forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-small {
    font-size: 11px;
    color: #999999;
}

.success-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    animation: slideDown 0.3s ease;
}

.success-content {
    background-color: #4caf50;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.success-check i {
    font-size: 20px;
}

.success-content p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 95%;
        padding: 30px 20px 35px 20px;
    }
    .title-area h1 {
        font-size: 18px;
    }
    .logo {
        max-width: 130px;
    }
    .input-field {
        height: 48px;
        font-size: 13px;
    }
    .btn-primary {
        height: 48px;
        font-size: 13px;
    }
    .btn-primary i {
        font-size: 14px;
    }
    .header-image {
        max-height: 120px;
    }
    .sms-icon {
        font-size: 40px;
    }
}