@import url('theme.css');

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

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-brand {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    margin-bottom: 40px;
    display: inline-block;
}

.auth-tagline {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.auth-subtext {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 400px;
}

.auth-features {
    list-style: none;
    font-size: 16px;
    line-height: 2;
    opacity: 0.95;
}

.auth-form-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.auth-form {
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    padding: 40px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 480px;
}

.auth-form h2 {
    font-size: 28px;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.auth-form-subtitle {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.auth-form-subtitle a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-form-subtitle a:hover {
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--color-primary);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 5px;
    line-height: 1.4;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    background: #eee;
    overflow: hidden;
}

.password-strength.weak {
    background: #e74c3c;
    width: 33%;
}

.password-strength.medium {
    background: #f39c12;
    width: 66%;
}

.password-strength.strong {
    background: #2ecc71;
    width: 100%;
}

/* Кнопка «Сгенерировать пароль» */
.btn-generate {
    margin-top: 10px;
    background: #f0f4fa;
    color: var(--color-primary);
    border: 1px dashed var(--color-primary);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    width: 100%;
    transition: background-color 0.2s, color 0.2s;
}

.btn-generate:hover {
    background: #e8f0fe;
}

.form-error {
    display: block;
    font-size: 13px;
    color: #e74c3c;
    margin-top: 5px;
    min-height: 0;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: #e74c3c;
}

.form-group.has-error input:focus,
.form-group.has-error select:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.consent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text-light);
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 8px;
}

.checkbox-label:last-of-type {
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label a {
    color: var(--color-primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: var(--font-family);
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--color-primary-hover);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.forgot-link {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 40px 30px;
    }

    .auth-tagline {
        font-size: 26px;
    }

    .auth-features {
        display: none;
    }
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}