/* ============================================
   account.css — единые стили для ЛК продавца
   ============================================ */

/* ----- ОБЩАЯ СТРУКТУРА ----- */
.dashboard-container {
    display: flex;
    gap: 32px;
    margin: 32px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

/* ----- САЙДБАР (левая колонка) ----- */
.dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 90px;
    transition: all 0.3s;
}

/* Карточка магазина в сайдбаре */
.shop-card {
    padding: 24px;
    background: linear-gradient(135deg, #f8f6f2 0%, #f0ece6 100%);
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.shop-avatar {
    margin-bottom: 12px;
}
.shop-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
}

.shop-info-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.view-shop-link {
    font-size: 0.75rem;
    color: #2e6b3e;
    text-decoration: none;
}
.view-shop-link:hover {
    text-decoration: underline;
}

/* Навигация в сайдбаре */
.dashboard-nav {
    padding: 16px 0;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.nav-item:hover {
    background: #f8f6f2;
}
.nav-item.active {
    background: #f4f0ea;
    color: #2e6b3e;
    border-left: 3px solid #2e6b3e;
}
.nav-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

/* ----- ОСНОВНОЙ КОНТЕНТ ----- */
.dashboard-content {
    flex: 1;
    min-width: 0;
}

/* Заголовки страниц */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
}
.page-header p {
    color: #666;
    margin-top: 4px;
}

/* Кнопки */
.btn-add {
    background: #2e6b3e;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}
.btn-add:hover {
    background: #1e5a2e;
}

/* Фильтры и вкладки */
.filter-tabs, .status-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.filter-tab, .status-filter {
    padding: 6px 16px;
    border-radius: 30px;
    background: #f0f0f0;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.85rem;
    transition: 0.2s;
}
.filter-tab.active, .status-filter.active,
.filter-tab:hover, .status-filter:hover {
    background: #1a1a1a;
    color: white;
}

/* ----- ТАБЛИЦЫ ----- */
.table-wrapper {
    background: white;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}
.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}
.data-table th {
    background: #f8f6f2;
    font-weight: 600;
    font-size: 0.85rem;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.inactive-row {
    opacity: 0.6;
    background: #fafafa;
}

/* Бейджи статусов */
.status-badge, .type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
}
.status-badge.active, .type-badge.roll { background: #e8f5e9; color: #2e6b3e; }
.status-badge.inactive, .type-badge.inactive { background: #fee; color: #c0392b; }
.type-badge.sheet { background: #e3f2fd; color: #1565c0; }
.type-badge.unit { background: #fff3e0; color: #e65100; }

/* Кнопки действий в таблицах */
.actions-cell {
    display: flex;
    gap: 12px;
}
.action-btn {
    text-decoration: none;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.2s;
}
.action-btn.edit:hover { background: #e3f2fd; }
.action-btn.toggle:hover { background: #fff3e0; }
.action-btn.delete:hover { background: #fee; color: #c0392b; }

/* ----- СТАТИСТИКА (карточки) ----- */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: #f8f6f2;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-4px);
}
.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2e6b3e;
}
.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* ----- ГРАФИКИ ----- */
.chart-container {
    background: white;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    padding: 24px;
    margin-bottom: 32px;
}
.chart-container h2, .chart-container-small h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ----- ТОП ТОВАРОВ ----- */
.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.top-product-item {
    position: relative;
}
.top-rank {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.top-info {
    margin-left: 40px;
    margin-bottom: 6px;
}
.top-name {
    font-weight: 500;
    font-size: 0.9rem;
}
.top-stats {
    font-size: 0.7rem;
    color: #888;
    display: flex;
    gap: 12px;
}
.top-bar {
    height: 6px;
    background: #eaeaea;
    border-radius: 3px;
    overflow: hidden;
    margin-left: 40px;
}
.top-bar-fill {
    height: 100%;
    background: #2e6b3e;
    border-radius: 3px;
}

/* ----- ФОРМЫ ----- */
.form-card {
    background: #f8f6f2;
    border-radius: 24px;
    padding: 32px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #ddd;
    font-size: 0.95rem;
    transition: 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #2e6b3e;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

/* Кнопки форм */
.btn-primary {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary:hover {
    background: #333;
}
.btn-outline {
    background: transparent;
    border: 1px solid #1a1a1a;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    color: #1a1a1a;
    transition: 0.2s;
    display: inline-block;
    text-align: center;
}
.btn-outline:hover {
    background: #f0f0f0;
}

/* ----- УВЕДОМЛЕНИЯ (alert) ----- */
.alert {
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 20px;
}
.alert.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c0392b;
}
.alert.success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e6b3e;
}
.alert.info {
    background: #e3f2fd;
    border: 1px solid #bbdef5;
    color: #1565c0;
}

/* ----- ТОГГЛЕР (переключатель) ----- */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}
.toggle-switch input {
    display: none;
}
.toggle-slider {
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    position: relative;
    transition: 0.3s;
}
.toggle-slider:before {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: #2e6b3e;
}
.toggle-switch input:checked + .toggle-slider:before {
    left: 22px;
}

/* ----- ПАГИНАЦИЯ ----- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.pagination a {
    padding: 8px 14px;
    border-radius: 30px;
    text-decoration: none;
    background: #f0f0f0;
    color: #1a1a1a;
    font-size: 0.85rem;
    transition: 0.2s;
}
.pagination a:hover {
    background: #ddd;
}
.pagination a.active {
    background: #1a1a1a;
    color: white;
}

/* ----- ПУСТЫЕ СОСТОЯНИЯ ----- */
.empty-state {
    text-align: center;
    padding: 60px;
    background: #f8f6f2;
    border-radius: 24px;
}
.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.empty-state p {
    margin-bottom: 20px;
    color: #666;
}

/*----product_edit----*/

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ САЙДБАРА
   ============================================ */

/* Сайдбар — общий контейнер */
.dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 90px;
    transition: all 0.3s;
}

/* Карточка магазина в сайдбаре */
.shop-card {
    padding: 24px;
    background: linear-gradient(135deg, #f8f6f2 0%, #f0ece6 100%);
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.shop-avatar {
    margin-bottom: 12px;
}
.shop-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
}

.shop-info-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    word-break: break-word;
}
.view-shop-link {
    font-size: 0.75rem;
    color: #2e6b3e;
    text-decoration: none;
}
.view-shop-link:hover {
    text-decoration: underline;
}

/* ============================================
   ПОЛНЫЕ СТИЛИ ДЛЯ САЙДБАРА
   ============================================ */

/* Контейнер сайдбара */
.dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 90px;
}

/* Карточка магазина */
.shop-card {
    padding: 24px;
    background: linear-gradient(135deg, #f8f6f2 0%, #f0ece6 100%);
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}
.shop-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
}
.shop-info-sidebar {
    margin-top: 12px;
}
.shop-info-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
}
.shop-info-sidebar a {
    display: inline-block;
    font-size: 0.75rem;
    color: #2e6b3e;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(46, 107, 62, 0.1);
    transition: all 0.2s;
}
.shop-info-sidebar a:hover {
    background: #2e6b3e;
    color: white;
    text-decoration: none;
}

/* Навигация */
.dashboard-nav {
    padding: 16px 0;
}
.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.2s;
    font-size: 0.9rem;
    background: transparent;
    border: none;
}
.dashboard-nav a:hover {
    background: #f8f6f2;
    color: #1a1a1a;
}
.dashboard-nav a.active {
    background: #f4f0ea;
    color: #2e6b3e;
    border-left: 3px solid #2e6b3e;
}
.nav-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}
/* Стили для информации о магазине */
.shop-info {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8f6f2 0%, #f0ece6 100%);
    border-bottom: 1px solid #eaeaea;
}
.shop-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.shop-info a {
    display: inline-block;
    font-size: 0.75rem;
    color: #2e6b3e;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(46, 107, 62, 0.1);
    transition: all 0.2s;
}
.shop-info a:hover {
    background: #2e6b3e;
    color: white;
    text-decoration: none;
}
.shop-info h3,
.shop-info-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
}
/* ----- АДАПТИВНОСТЬ ----- */
@media (max-width: 1000px) {
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        position: static;
    }
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .stats-cards {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}