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

html, body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Контейнер ошибок в верху страницы (алерты в стиле ЛК — классы .alert из app.css) */
.top-error-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.top-error-container .alert {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    display: none;
    -webkit-appearance: none;
    margin: 0;
}

.none {
    display: none;
}

/* Auth wrapper */
.modern-auth-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

.modern-auth-container {
    background: #ffffff;
    padding: 40px 50px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.modern-auth-container .form_group.checkbox {
    text-align: left;
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 25px 0 30px;
}

.modern-auth-container .form_group.checkbox label {
    margin: 0 0 0 10px;
    order: 2;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

.modern-auth-title {
    font-size: 28px;
    font-weight: 400;
    color: #333;
    margin-bottom: 25px;
    letter-spacing: 0;
}

.modern-auth-avatar {
    margin: 0 auto 35px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    border-radius: 50%;
    overflow: hidden;
}

.modern-auth-avatar svg {
    width: 100%;
    height: 100%;
}

.modern-auth-error {
    background: #fee;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.modern-auth-success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #15803d;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.modern-auth-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.modern-auth-form {
    margin-bottom: 25px;
}

.modern-form-group {
    margin-bottom: 18px;
    text-align: left;
}

.modern-form-group-with-icon {
    position: relative;
}

.modern-form-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    z-index: 1;
}

.modern-form-group-with-icon .modern-form-input {
    padding-left: 30px;
}

.modern-form-group-with-icon .modern-form-input:focus ~ .modern-form-icon,
.modern-form-group-with-icon:focus-within .modern-form-icon {
    color: #666;
}

.modern-form-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #333;
    outline: none;
}

.modern-form-input:focus {
    border-color: #777;
    background: #ffffff;
}

.modern-form-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Поля с ошибками */
.modern-form-input.has-error,
.modern-form-group.has-error .modern-form-input {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.modern-form-input.has-error:focus,
.modern-form-group.has-error .modern-form-input:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.modern-form-group.has-error .modern-form-icon svg {
    stroke: #dc3545;
}

.modern-form-group.has-error .modern-form-icon {
    color: #dc3545;
}

/* Чекбокс с ошибкой */
.form_group.checkbox.has-error > .checkbox_wrapper {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

/* Убираем цвета автозаполнения браузера */
.modern-form-input:-webkit-autofill,
.modern-form-input:-webkit-autofill:hover,
.modern-form-input:-webkit-autofill:focus,
.modern-form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.modern-form-input:-moz-autofill,
.modern-form-input:-moz-autofill-preview {
    background-color: white !important;
    color: #333 !important;
}

.modern-auth-button {
    width: 100%;
    padding: 12px 20px;
    background: #ff6c37;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-auth-button:hover {
    background: #ff861a;
}

.modern-auth-button:active {
    background: #ff861a;
    transform: scale(0.98);
}

.modern-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-top: 20px;
}

.modern-auth-link {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modern-auth-link:hover {
    color: #333;
    text-decoration: underline;
}

.modern-auth-link strong {
    color: #333;
    font-weight: 600;
}

.modern-auth-home {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s;
}
.modern-auth-home:hover {
    color: #333;
}

.modern-auth-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: #999;
    letter-spacing: 3px;
}
.modern-auth-footer > a{
    color: #444;
}
.modern-auth-footer > a:hover{
    color: #fc5808;
}

/* Чекбокс */
.form_group.checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.form_group.checkbox > input[type=checkbox] {
    display: none;
}

.form_group.checkbox > input[type=checkbox]:checked ~ .checkbox_wrapper {
    background: transparent;
    border: #222 solid 1px;
}

.form_group.checkbox > input[type=checkbox]:not(:checked) ~ .checkbox_wrapper {
    background: #FFF;
    border: #CCC solid 1px;
    transition: background 0.25s ease-in-out, border 0.25s ease-in-out;
}

.form_group.checkbox > .checkbox_wrapper {
    width: 15px;
    height: 15px;
    order: 1;
    display: inline-block;
    border: #CCC solid 1px;
    overflow: hidden;
    border-radius: 0;
    margin: 2px 0 0 0;
    box-sizing: content-box;
}

.form_group.checkbox > .checkbox_wrapper .cover {
    width: 0;
    height: 14px;
    overflow: hidden;
    line-height: 13px;
    text-align: left;
    transition: width 0.15s ease-in-out;
    margin-left: 1px;
}

.form_group.checkbox > .checkbox_wrapper .cover img {
    vertical-align: middle;
    margin-left: 1px;
}

.form_group.checkbox > input[type=checkbox]:checked ~ .checkbox_wrapper .cover {
    width: 14px;
}

.form_group.checkbox > label {
    display: inline-block;
    order: 2;
    margin: 0 0 0 5px;
    font-weight: 400;
    font-size: 14px;
}

.form_group.checkbox > label:hover + .checkbox_wrapper {
    border: #888 solid 1px;
}

.form_group.checkbox label a {
    color: #888;
    text-decoration: none;
}

.form_group.checkbox label a:hover {
    color: #333;
    text-decoration: underline;
}

/* Стили для ошибок форм Symfony */
.modern-form-group .invalid-feedback,
.modern-form-group ul {
    color: #c33;
    font-size: 13px;
    margin-top: 5px;
    list-style: none;
}

.modern-form-group .invalid-feedback li,
.modern-form-group ul li {
    margin-top: 3px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .modern-auth-container {
        padding: 40px 30px;
    }

    .modern-auth-title {
        font-size: 28px;
    }

    .modern-form-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .modern-auth-button {
        padding: 12px 18px;
        font-size: 15px;
    }

    .modern-auth-footer {
        bottom: 15px;
        font-size: 10px;
    }
}

/* Email confirmation page */
.confirm-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.confirm-text {
    text-align: center;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-text--secondary {
    color: #888;
    font-size: 14px;
}

.confirm-text--error {
    color: #991b1b;
}

.confirm-notification {
    background: #fff3e0;
    border-left: 4px solid #f5a623;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

