body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-gray);
    font-family: 'Inter', sans-serif;
} 

/* ---=== Форма входа ===--- */
.login-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    text-align: center;
}

.login-header img { width: 80px; margin-bottom: 15px; }

.login-header h1 {
    font-family: 'Rubik', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.login-form-group {
    position: relative;
    margin-bottom: 15px;
    text-align: left;
}

.login-form-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
    transition: color 0.3s;
}

.login-input {
    width: 100% !important;
    padding: 15px 20px 15px 50px !important;
    border: 2px solid #e1e1e1 !important;
    border-radius: 15px !important;
    background: #f9f9f9 !important;
    color: var(--text-dark) !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease;
}

.login-input.input-error {
    border-color: #ef4444 !important;
    background-color: #fff1f2 !important;
}

.login-input.input-error + i { color: #ef4444; }

.login-input:focus {
    border-color: var(--primary-blue) !important;
    background: #fff !important;
    outline: none !important;
}

/* .inline-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fecaca;
    font-weight: 500;
    display: none;
} */

.btn-login {
    width: 100%;
    margin-top: 10px;
    font-family: 'Rubik', sans-serif;
    padding: 15px !important;
    font-weight: 700;
    outline: none !important;
    border-color: #322eff !important; 
}

.apply-shake { animation: shake 0.4s ease-in-out }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

/* #login-error-msg { display: none !important; } */

input[name="username"], 
input[type="password"],
.login-input {
    font-weight: 700 !important;
    font-family: inherit;
    letter-spacing: 0.5px;
}

input::placeholder {
    font-weight: 700 !important;
    color: #888;
}

input::-webkit-input-placeholder { font-weight: 700; }
input::-moz-placeholder { font-weight: 700; }
/* ---=== Конец формы входа ===--- */

/* ---=== Модальное окно ===---*/
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 25px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.modal-content h2 {
    margin-top: 0;
    font-family: 'Rubik', sans-serif;
}

.modal-content .main-btn {
    margin-top: 20px;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box; 
    height: auto;
    padding: 14px 20px;
    display: block;
    border-radius: 15px;
    font-size: 16px;
}

.error-icon { color: #ef4444; font-size: 40px; margin-bottom: 15px; }

/* ---=== Конец модального окна ===--- */

/* #submitBtn {
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 46, 255, 0.3);
}

#submitBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(50, 46, 255, 0.4);
}

#submitBtn:active { transform: translateY(0); } */

/* ---=== Тост ===---*/
.toast-container {
    position: fixed !important;
    top: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    width: auto;
    min-width: 300px;
    pointer-events: none;
}

.toast-message {
    background: #ffffff;
    color: #d93025;
    padding: 16px 24px;
    border-radius: 12px;
    border-left: 6px solid #d93025;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: center;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ---=== Конец тост ===--- */

/* ---=== Модальное окно 2FA ===---*/
.twofa-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 20px !important;
    max-width: 400px;
}

.max-logo-container {
    text-align: center;
    margin-bottom: 20px;
}
.max-logo-img {
    width: 60px;
    height: auto;
}

.modal-title-2fa {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle-2fa {
    font-size: 13px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.code-input-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0 10px;
}

#otp-inputs {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px !important;
    padding: 0 10px;
}

.otp-cell {
    height: 54px !important;
    width: 100% !important;
    background: #f4f4f4 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #333 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none;
}

.otp-cell:focus {
    border-color: #322eff !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(50, 46, 255, 0.15) !important;
}

#otp-modal .secondary-btn-link, 
#otp-modal button[onclick="closeModal()"] {
    display: block !important;
    width: 100%;
    margin-top: 20px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #1a1a1a !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}

#otp-modal .secondary-btn-link:hover {
    color: #322eff !important;
}

.twofa-btn {
    width: 100% !important;
    height: 56px !important;
    background: #322eff !important;
    color: white !important;
    border: none !important;
    border-radius: 30px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(50, 46, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
}

.twofa-btn:disabled {
    background: #e0e0e0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.twofa-btn:not(:disabled) {
    background: #322eff !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

#confirm-otp-btn {
    background-color: #cbd5e1;
    transition: background-color 0.3s ease;
}

#confirm-otp-btn.active, 
#confirm-otp-btn:not(:disabled) {
    background-color: #2563eb;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
/* ---=== Конец модального окна 2FA ===--- */