/* Стили для страниц аутентификации и профиля */

/* Общие стили для страниц авторизации */
.auth-page {
    padding: 60px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.auth-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.auth-card {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    max-width: 500px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #313131;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header p {
    color: #666;
    font-size: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-link:hover {
    color: #d5e300;
}

/* Вкладки */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.auth-tab.active {
    color: #313131;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #d5e300;
}

/* Формы */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d5e300;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 18px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: #d5e300;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* Разделитель */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #777;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #eee;
}

.divider span {
    padding: 0 15px;
    font-size: 14px;
}

/* Социальная авторизация */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    padding: 14px;
    border: 2px solid #e0e0e0;
    background: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.social-btn.vk {
    color: #4c75a3;
    border-color: #4c75a3;
}

.social-btn.google {
    color: #db4437;
    border-color: #db4437;
}

.social-btn.yandex {
    color: #f00;
    border-color: #f00;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Сила пароля */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background-color: #ff6b6b;
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    font-size: 12px;
    color: #777;
}

/* Требования к паролю */
.password-requirements {
    list-style: none;
    margin-top: 10px;
    padding: 0;
}

.requirement {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.requirement::before {
    content: '✗';
    font-size: 10px;
}

.requirement.valid {
    color: #27ae60;
}

.requirement.valid::before {
    content: '✓';
}

/* Преимущества аккаунта */
.auth-benefits {
    flex: 1;
    max-width: 500px;
}

.auth-benefits h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #313131;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background-color: #f0f7d5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #313131;
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #313131;
}

/* Страница профиля */
.profile-page {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.profile-container {
    display: grid;
    gap: 40px;
    align-items: flex-start;
}

.profile-sidebar {
    flex: 0 0 280px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.user-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.user-avatar--interactive {
    cursor: pointer;
}

.user-avatar--interactive:focus-visible {
    outline: 2px solid #d5e300;
    outline-offset: 3px;
    border-radius: 50%;
}

.user-avatar i {
    font-size: 100px;
    color: #d5e300;
}

.avatar-change {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    font-size: 9px;
    background-color: #313131;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-change i {
    font-size: inherit;
}

.avatar-edit-hint {
    position: absolute;
    left: 50%;
    bottom: -18px;
    transform: translateX(-50%);
    font-size: 11px;
    line-height: 1;
    color: #666;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 2px 8px;
    pointer-events: auto;
    cursor: pointer;
}

.user-name {
    font-size: 22px;
    margin-bottom: 5px;
    color: #313131;
}

.user-email {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.user-level {
    --level-color: #95a5a6;
    background: linear-gradient(135deg, color-mix(in srgb, var(--level-color) 14%, transparent) 0%, color-mix(in srgb, var(--level-color) 6%, #fafafa) 100%);
    padding: 16px 18px;
    border-radius: 12px;
    border-left: 4px solid var(--level-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.user-level:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.level-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--level-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.level-progress {
    height: 10px;
    background: rgba(0,0,0,0.06);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--level-color), color-mix(in srgb, var(--level-color) 75%, white));
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .level-fill {
        background: var(--level-color);
    }
}

.level-text {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.profile-nav ul {
    list-style: none;
}

.profile-nav li {
    margin-bottom: 5px;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.profile-nav a:hover,
.profile-nav a.active {
    background-color: #f0f7d5;
    color: #313131;
}

.badge {
    background-color: #d5e300;
    color: #313131;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.profile-stats {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
}

.profile-stats h3 {
    font-size: 18px;
    margin-bottom: 0;
    color: #313131;
    width: 100%;
}

.profile-stats .stat-item {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.profile-stats .stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #313131;
}

.profile-stats .stat-label {
    font-size: 12px;
    color: #777;
}

.profile-content {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 24px;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-info {
    margin-bottom: 40px;
}

.info-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #444;
}

.info-value {
    flex: 1;
    color: #555;
}

/* Настройки профиля */
.settings-page {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.settings-container {

    align-items: flex-start;
}

.settings-sidebar {
    flex: 0 0 250px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.settings-sidebar h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-nav ul {
    list-style: none;
}

.settings-nav li {
    margin-bottom: 5px;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.settings-nav a:hover,
.settings-nav a.active {
    background-color: #f0f7d5;
    color: #313131;
}

.settings-content {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-form {
    max-width: 600px;
}

.form-hint {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #d5e300;
    color: #313131;
}

.btn-warning {
    background-color: #ffc107;
    color: #313131;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

/* Переключатели */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #d5e300;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Адаптивность */
@media (max-width: 992px) {
    .auth-container,
    .profile-container,
    .settings-container {
        flex-direction: column;
    }
    
    .auth-card,
    .auth-benefits,
    .profile-sidebar,
    .settings-sidebar,
    .profile-content,
    .settings-content {
        max-width: 100%;
        flex: none;
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .auth-card,
    .profile-sidebar,
    .settings-sidebar,
    .profile-content,
    .settings-content {
        padding: 25px;
    }
    
    .auth-header h1 {
        font-size: 26px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label {
        flex: none;
    }
}

/* Стили для новых разделов профиля */

/* Адреса доставки */
.addresses-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.address-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #fafafa;
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.address-header h3 {
    margin: 0;
    font-size: 18px;
    color: #313131;
}

.address-actions {
    display: flex;
    gap: 10px;
}

.address-details {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

.address-details p {
    margin: 5px 0;
}

.address-default {
    margin-top: 10px;
}

/* Способы оплаты */
.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #fafafa;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-icon {
    font-size: 32px;
    color: #555;
}

.payment-info {
    flex: 1;
}

.payment-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #313131;
}

.payment-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.payment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Настройки */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.setting-info {
    flex: 1;
}

.setting-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #313131;
}

.setting-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.setting-control {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

/* Безопасность */
.security-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.security-info {
    flex: 1;
}

.security-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* Модалки безопасности: таблицы и состояние */
.security-modal-loading,
.security-modal-empty {
    padding: 24px;
    text-align: center;
    color: #777;
}
.security-table-wrap {
    overflow-x: auto;
    margin-bottom: 12px;
}
.security-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.security-table th,
.security-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.security-table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
}
.security-table td {
    color: #555;
}
.security-table .device-ua {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.security-table .current-badge,
.current-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: #d5e300;
    color: #333;
    border-radius: 4px;
    font-size: 12px;
}
.security-sessions-actions {
    margin: 12px 0 0;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Уведомления */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.notification-info {
    flex: 1;
}

.notification-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #313131;
}

.notification-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* Переключатель */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #d5e300;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

/* Конфиденциальность */
.privacy-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.privacy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.privacy-info {
    flex: 1;
}

.privacy-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #313131;
}

.privacy-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* Подписки */
.subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subscription-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    background-color: #fafafa;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.subscription-header h3 {
    margin: 0;
    font-size: 18px;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-premium {
    background-color: #ffc107;
    color: #313131;
}

.subscription-details {
    margin-bottom: 20px;
}

.subscription-details ul {
    margin: 10px 0;
    padding-left: 20px;
}

.subscription-details li {
    margin: 5px 0;
    color: #555;
}

.subscription-price {
    font-size: 20px;
    font-weight: 700;
    color: #313131;
    margin: 15px 0 5px 0;
}

.subscription-date {
    color: #777;
    font-size: 14px;
    margin: 5px 0;
}

.subscription-actions {
    display: flex;
    gap: 10px;
}

/* Опасная зона */
.danger-zone-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid #ffc107;
    border-radius: 8px;
    background-color: #fffbf0;
}

.danger-info {
    flex: 1;
}

.danger-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #d32f2f;
    display: flex;
    align-items: center;
    gap: 10px;
}

.danger-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-icon {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background-color: #f0f0f0;
    color: #313131;
}
