* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background-image: url(/dist/img/auth-bg.svg);
    background-size: 100% 100%;
    overflow-x: hidden;
}

.page-container {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 40px 20px;
    position: relative;
    flex-direction: column;
}

.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -5%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 70%;
    right: -5%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 10%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 24px 10% 0 10%;
}

.language-btn {
    background: #1C518B;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    border: none !important;
}

.language-btn:hover {
    background: #1C518BCC;
    color: white;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 25px 50px rgba(28,81,139, 0.15);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 5;
    backdrop-filter: blur(8px);
    margin: auto;
}

.logo {
    text-align: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.welcome-text {
    text-align: left;
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 18px;
    color: #333B52;
    font-weight: 400;
}

.user-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-details h6 {
    margin: 0;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.user-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.switch-account {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: inline-block;
}

.switch-account:hover {
    color: #764ba2;
    text-decoration: underline;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 500;
    color: #000;
    margin-bottom: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.required {
    color: #dc3545;
}

.help-link {
    color: #2577CF;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.help-link:hover {
    color: #2577CF;
    text-decoration: underline;
}

.help-link:visited {
    color: #2577CF;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.custom-tooltip {
    width: 400px;
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 280px;
    white-space: normal;
    line-height: 1.4;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
}

.tooltip-container:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
}

.form-control {
    border: 1px solid #b9c0d4;
    border-radius: 4px;
    padding: 16px;
    font-size: 16px;
    color: #000;
    font-weight: 400;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    color: #000 !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #718096;
    font-size: 16px;
    font-weight: 500;
}

.input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    border-bottom-right-radius: 4px !important;
    border-top-right-radius: 4px !important;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    z-index: 3;
    padding: 4px;
}

.input-group:not(.has-validation) > .form-control:not(:last-child){
    border-bottom-right-radius: 4px !important;
    border-top-right-radius: 4px !important;
}

.password-toggle:hover {
    color: #667eea;
}

.keep-logged {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
}

.keep-logged label{
    margin: 0 !important;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox.checked {
    background: #667eea;
    border-color: #667eea;
}

.custom-checkbox .fa-check {
    color: white;
    font-size: 12px;
    display: none;
}

.custom-checkbox.checked .fa-check {
    display: block;
}

.login-btn {
    width: 100%;
    background: #000 !important;
    color: white !important;
    border: none;
    border-radius: 32px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.login-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 26, 26, 0.3);
    cursor: pointer !important;
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.forgot-password {
    text-align: center;
}

.forgot-password a {
    color: #1a1a1a;
    text-decoration: underline;
    font-size: 16px;
    font-weight: 500;
}

.forgot-password a:hover {
    color: #667eea;
}

.footer-links {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
}

.footer-links a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin: 0 8px;
}

.footer-links a:hover {
    color: #667eea;
    text-decoration: underline;
}

.footer-links .separator {
    color: #9ca3af;
    margin: 0 8px;
}

.copyright {
    text-align: center;
    margin-top: 12px;
    color: #000;
    font-size: 14px;
    font-weight: 500;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid ##DCDFEA;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 220px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 8px;
    color: #000 !important;
    font-weight: 600;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option.active {
    background: #E8F0F8;
}

.language-option .fa-check {
    margin-left: auto;
    display: none;
}

.language-option.active .fa-check {
    display: inline;
}

/* Error Message Styles */
.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.error-message i {
    font-size: 16px;
    flex-shrink: 0;
}

.error-message.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.error-message.info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Success Message Styles */
.success-message {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

.success-message i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Loading State */
.login-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    transform: scale(0.98);
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success pulse animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.code-input.success {
    animation: successPulse 0.3s ease-in-out;
}

/* Back link styling */
.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    color: #667eea;
    text-decoration: none;
}

.back-link i {
    font-size: 12px;
}

/* Step content styling */
.step-content {
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-content.slide-out-left {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
}

.step-content.slide-out-right {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

.step-content.slide-in-left {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
}

.step-content.slide-in-right {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

/* Code input grid */
.code-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

/* Step transition effects */
.step-content:not(#step1) {
    display: none;
}

/* Smooth button hover effects */
.login-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link a {
    transition: all 0.2s ease;
}

/* Form input focus effects */
.form-control {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button[disabled]{
    background-color: rgba(0, 0, 0, 0.1) !important;
    cursor: unset !important;
}

/* Code input animation */
.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    border: 1px solid #B9C0D4;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.code-input.error{
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.code-input.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.code-input:hover {
    border-color: #b8c5f2;
}

#resendCode{
    border: 1px solid #EFF1F5;
    background-color: #EFF1F5;
    cursor: unset;
    float:right;
    min-width: 50%;
    border-radius: 32px;
    padding: 16px;
    margin: 0 !important;
}

#resendCode span{
    font-size: 16px;
    color: #7d89af;
    font-weight: 600;
}

#resendCode.login-btn span{
    color: #fff !important;
}

.resend-code-available span{
    color: #000 !important;
}

.digits{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 40px 24px;
        border-radius: 16px;
    }

    .welcome-title {
        font-size: 24px;
    }

    .header-top {
        top: 15px;
        right: 15px;
    }
}