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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #e8e8e8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.language-switcher {
    position: absolute;
    top: 25px;
    right: calc(50% - 250px + 15px);
    cursor: pointer;
    z-index: 100;
}

@media (max-width: 600px) {
    .language-switcher {
        right: 25px;
        top: 20px;
    }
}

.lang-icon {
    width: 32px;
    height: 22px;
    border-radius: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-icon:hover {
    transform: scale(1.05);
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.login-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 50px 45px;
    width: 100%;
    position: relative;
}

.header {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    background: transparent !important;
    background-color: transparent !important;
    mix-blend-mode: normal;
    border: none;
    outline: none;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.header img {
    background: transparent !important;
    background-color: transparent !important;
}

.promo-message {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    padding: 18px 24px;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    line-height: 1.6;
    letter-spacing: 0.1px;
}

.promo-message .amount {
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    display: inline-block;
    margin: 0 3px;
    letter-spacing: 0.3px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group input {
    width: 100%;
    padding: 14px 45px 14px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.form-group input::placeholder {
    color: #999;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.checkbox-text {
    font-size: 14px;
    color: #333;
}

.recover-link {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.3s;
}

.recover-link:hover {
    color: #45a049;
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 16px;
    background-color: #d4d4d4;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background-color: #c4c4c4 !important;
    transform: translateY(-1px);
}

.login-button:active {
    background-color: #b4b4b4 !important;
    transform: translateY(0);
}

.login-button.valid {
    background-color: #4CAF50 !important;
    color: #fff;
}

.login-button.valid:hover {
    background-color: #45a049 !important;
}

.login-button.valid:active {
    background-color: #3d8b40 !important;
}

.register-link {
    text-align: center;
    color: #4CAF50;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.register-link:hover {
    color: #45a049;
    text-decoration: underline;
}

.corporate-link {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.corporate-text {
    color: #333;
}

.corporate-link-text {
    color: #4CAF50;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s;
}

.corporate-link-text:hover {
    color: #45a049;
}

.footer {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #333;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    font-weight: 400;
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error input {
    border-color: #f44336;
}

.form-group.error .error-message {
    display: block;
}

/* Загрузка */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #fff;
    margin-top: 20px;
    max-width: 300px;
    line-height: 1.5;
}

/* Модальное окно СМС */
.sms-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.sms-modal-content {
    background-color: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sms-modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.sms-modal-content #sms-code-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.sms-modal-content #sms-code-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.sms-error-message {
    color: #f44336;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.sms-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
}

.sms-submit-btn:hover {
    background-color: #45a049;
}

.sms-submit-btn:active {
    background-color: #3d8b40;
}

@media (max-width: 600px) {
    .login-card {
        padding: 40px 25px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .recover-link {
        white-space: normal;
    }
    
    .language-switcher {
        top: 20px;
        right: 20px;
    }
    
    .promo-message {
        font-size: 14px;
        padding: 14px 16px;
        margin-bottom: 24px;
    }
    
    .promo-message .amount {
        font-size: 16px;
    }
    
    .sms-modal-content {
        padding: 30px 20px;
    }
    
    .loading-text {
        font-size: 14px;
        padding: 0 20px;
    }
}

