/* Админ-панель стили */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #313131;
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-logo {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo i {
    font-size: 24px;
    color: #d5e300;
}

.admin-nav {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.admin-nav-search-wrap {
    flex-shrink: 0;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-nav-search:focus-within {
    border-color: rgba(213, 227, 0, 0.45);
    box-shadow: 0 0 0 2px rgba(213, 227, 0, 0.12);
    background: rgba(0, 0, 0, 0.28);
}

.admin-nav-search > i {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.38);
    flex-shrink: 0;
}

.admin-nav-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.admin-nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.admin-nav-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.admin-nav-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(213, 227, 0, 0.35) transparent;
}

.admin-nav-scroll::-webkit-scrollbar {
    width: 6px;
}

.admin-nav-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.admin-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(213, 227, 0, 0.28);
    border-radius: 6px;
}

.admin-nav-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(213, 227, 0, 0.45);
}

.admin-nav-group {
    margin-bottom: 18px;
}

.admin-nav-group:last-child {
    margin-bottom: 4px;
}

.admin-nav-group-title {
    margin: 0 0 8px 8px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.admin-nav-group.admin-nav-group-empty {
    display: none;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 10px 12px 10px 12px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    border-left: none;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 0;
    max-height: 28px;
    border-radius: 2px;
    background: #d5e300;
    transition: transform 0.2s ease, height 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-item:focus-visible {
    outline: 2px solid rgba(213, 227, 0, 0.7);
    outline-offset: 2px;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(213, 227, 0, 0.14) 0%, rgba(213, 227, 0, 0.04) 100%);
    color: #eef0a8;
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    height: 60%;
}

.nav-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-item-icon i {
    font-size: 15px;
    width: auto;
    text-align: center;
}

.nav-item:hover .nav-item-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.nav-item.active .nav-item-icon {
    background: rgba(213, 227, 0, 0.2);
    color: #d5e300;
}

.nav-item-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.nav-item.nav-search-hidden {
    display: none !important;
}

.admin-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.back-to-site {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.back-to-site:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,0,0,0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.logout-btn:hover {
    background: rgba(255,0,0,0.2);
    border-color: #ff6b6b;
}

.admin-main {
    margin-left: 260px;
    min-height: 100vh;
    background: #f5f5f5;
}

.admin-header {
    background: white;
    padding: 22px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e9ecef;
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #313131;
    letter-spacing: -0.2px;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.admin-user-info i {
    font-size: 24px;
    color: #d5e300;
}

.admin-content {
    padding: 32px 40px 48px;
    background: linear-gradient(180deg, #fafbfc 0%, #f0f2f5 100%);
    min-height: calc(100vh - 70px);
}

.admin-section {
    display: none;
    animation: fadeIn 0.35s ease-out;
}

.admin-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Статистика на дашборде */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 26px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 22px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.stat-icon.users {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.products {
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.orders {
    background: linear-gradient(145deg, #4facfe 0%, #00f2fe 100%);
}

.stat-icon.revenue {
    background: linear-gradient(145deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info h3 {
    margin: 0;
    font-size: 28px;
    color: #313131;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #888;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}

.dashboard-card h3 {
    margin: 0 0 22px 0;
    color: #313131;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #d5e300, #b8c900);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Заголовки секций */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.section-header h2 {
    margin: 0;
    color: #313131;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #d5e300;
    opacity: 0.9;
}

.coupon-tabs {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 12px;
}
.coupon-tabs .btn-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.coupon-tabs .btn-tab:hover {
    background: #f5f5f5;
    border-color: #ccc;
}
.coupon-tabs .btn-tab.active {
    background: #d5e300;
    border-color: #d5e300;
    color: #313131;
}

.section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Превью товара в таблице товаров */
.admin-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-product-thumb i {
    color: #9ca3af;
    font-size: 18px;
}

.search-input:focus {
    outline: none;
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.12);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #d5e300;
    outline: none;
}

/* Таблицы */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
    padding: 16px 18px;
    text-align: left;
    font-weight: 600;
    color: #313131;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

.table-container td {
    padding: 16px 18px;
    border-bottom: 1px solid #f0f2f5;
    color: #444;
    transition: background 0.2s ease;
}

.table-container tbody tr {
    transition: background 0.2s ease;
}

.table-container tbody tr:hover {
    background: #f8fafc;
}

.table-container tbody tr:last-child td {
    border-bottom: none;
}

.table-container .loading {
    padding: 40px;
    text-align: center;
    color: #888;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(145deg, #d5e300 0%, #c4d100 100%);
    color: #313131;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(213, 227, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(145deg, #c4d100 0%, #b3c000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(213, 227, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #555;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #313131;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Статусы */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.2px;
}

.status-pending {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    color: #856404;
}

.status-processing {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 100%);
    color: #084298;
}

.status-delivered {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #0f5132;
}

.status-cancelled {
    background: linear-gradient(145deg, #ffebee 0%, #ffcdd2 100%);
    color: #842029;
}

.status-approved {
    background: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background: #f8d7da;
    color: #842029;
}

.status-pending-review {
    background: #fff3cd;
    color: #856404;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #e0e3e7;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination button:hover:not(:disabled) {
    background: #d5e300;
    border-color: #d5e300;
    color: #313131;
    transform: translateY(-1px);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: linear-gradient(145deg, #d5e300, #c4d100);
    border-color: #d5e300;
    color: #313131;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(213, 227, 0, 0.3);
}

/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 960px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.06);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #313131;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #313131;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer .btn-secondary.modal-close {
    min-width: 100px;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: rgba(0,0,0,0.03);
}

.detail-modal-content .detail-dl { margin: 0; padding: 0; }
.detail-modal-content .detail-dl dt { font-weight: 600; color: #555; margin-top: 12px; margin-bottom: 4px; }
.detail-modal-content .detail-dl dd { margin: 0 0 4px 0; }

.modal-footer .btn-primary {
    min-width: 120px;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #313131;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213,227,0,0.1);
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.form-group .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-group label:has(input[type="checkbox"]),
.form-group label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Статистика */
.stats-page-header.section-header {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.stats-page-heading {
    max-width: 720px;
}

.stats-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    font-weight: 400;
}

.stats-toolbar {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 18px 20px 20px;
    margin-bottom: 20px;
}

.stats-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.stats-toolbar-primary {
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 16px;
}

.stats-toolbar-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 24px;
    align-items: end;
}

.stats-toolbar-secondary.stats-toolbar-secondary--no-sales {
    grid-template-columns: 1fr;
    justify-items: end;
}

.stats-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
    background: #f0f2f5;
    border-radius: 12px;
}

.stats-type-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.stats-type-tab i {
    font-size: 15px;
    opacity: 0.85;
}

.stats-type-tab:hover {
    background: rgba(255, 255, 255, 0.75);
    color: #313131;
}

.stats-type-tab.active {
    background: #fff;
    color: #313131;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stats-type-tab:focus-visible {
    outline: 2px solid #d5e300;
    outline-offset: 2px;
}

.stats-type-tab:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.stats-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.stats-refresh-btn i {
    transition: transform 0.35s ease;
}

.stats-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

@keyframes stats-spin {
    to { transform: rotate(360deg); }
}

.stats-filters-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
}

.stats-filters-panel.stats-filters-hidden {
    display: none;
}

.stats-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.stats-filter-label,
.stats-export-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #868e96;
}

.stats-date-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.stats-date-label {
    font-size: 13px;
    color: #495057;
    cursor: pointer;
}

.stats-date-sep {
    color: #adb5bd;
    font-size: 13px;
}

.stats-date-input {
    padding: 9px 12px;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #313131;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stats-date-input:focus {
    outline: none;
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.2);
}

.stats-select {
    min-width: 160px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e0e3e7;
    font-size: 14px;
    background: #fff;
    color: #313131;
    cursor: pointer;
}

.stats-select:focus {
    outline: none;
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.2);
}

.stats-select-compact {
    min-width: 100px;
}

.stats-period-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
    color: #868e96;
    line-height: 1.4;
}

.stats-export-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fafdf0 0%, #f5f7fa 100%);
    border: 1px solid rgba(213, 227, 0, 0.25);
    border-radius: 12px;
    min-width: min(100%, 280px);
}

.stats-download-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-content {
    background: white;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.stats-loading-state {
    padding: 12px 0 8px;
    text-align: center;
}

.stats-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stats-skeleton-card {
    height: 88px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

@keyframes stats-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.stats-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.stats-error-state {
    text-align: center;
    padding: 48px 24px;
    color: #c92a2a;
    font-size: 15px;
}

.stats-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.stats-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px;
    background: linear-gradient(145deg, #fff 0%, #f8f9fb 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.stat-card-mini strong {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.02em;
}

.stat-card-mini > div > span {
    font-size: 12px;
    color: #868e96;
    font-weight: 500;
}

.stat-card-mini .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 19px;
    border-radius: 12px;
    flex-shrink: 0;
}

.stats-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 22px;
}

.stats-block {
    margin-bottom: 0;
    padding: 20px 20px 8px;
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid #eef0f3;
}

.stats-block h4 {
    margin: 0 0 4px 0;
    color: #212529;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stats-block-caption {
    margin: 0 0 14px 0;
    font-size: 12px;
    color: #868e96;
    line-height: 1.4;
}

.stats-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px 8px;
    -webkit-overflow-scrolling: touch;
}

.stats-table {
    width: 100%;
    margin-top: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th,
.stats-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.stats-table th {
    background: #fff;
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-table tbody tr.clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.stats-table tbody tr.clickable-row:hover {
    background: rgba(213, 227, 0, 0.08);
}

.stats-table td.stats-table-empty {
    text-align: center;
    color: #868e96;
    font-size: 14px;
    padding: 28px 16px;
    cursor: default;
}

.stats-table tbody tr.stats-table-empty-row:hover {
    background: transparent;
}

/* Настройки */
.settings-page-header.section-header {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.settings-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    max-width: 720px;
}

.settings-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-loading-state {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.settings-skeleton-block {
    height: 120px;
    max-width: 560px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.settings-skeleton-short {
    height: 72px;
    max-width: 400px;
}

.settings-loading-text {
    margin: 8px 0 0;
    font-size: 14px;
    color: #868e96;
}

.settings-error-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    color: #c92a2a;
    font-size: 15px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.settings-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 20px;
    align-items: start;
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(213, 227, 0, 0.18);
    color: #5c6300;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.settings-card-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.02em;
}

.settings-card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #868e96;
}

.settings-card-body {
    padding: 20px 22px 22px;
}

.settings-form-row {
    margin-bottom: 0;
}

.settings-form-row .form-group {
    margin-bottom: 16px;
}

.settings-card-body > .form-group:last-child {
    margin-bottom: 0;
}

.settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    background: #fafbfc;
    transition: border-color 0.2s, background 0.2s;
}

.settings-toggle:hover {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.settings-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-ui {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #ced4da;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: background 0.2s;
}

.settings-toggle-ui::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.settings-toggle input:checked + .settings-toggle-ui {
    background: #d5e300;
}

.settings-toggle input:checked + .settings-toggle-ui::after {
    transform: translateX(20px);
}

.settings-toggle input:focus-visible + .settings-toggle-ui {
    outline: 2px solid #d5e300;
    outline-offset: 2px;
}

.settings-toggle-text {
    font-size: 14px;
    color: #343a40;
    line-height: 1.4;
}

.settings-toggle-text small {
    display: block;
    font-size: 12px;
    color: #868e96;
    font-weight: 400;
    margin-top: 2px;
}

.settings-toggles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.settings-footer-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-weight: 600;
}

/* Совместимость: старые блоки .settings-content / .settings-section */
.settings-content {
    background: white;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    margin: 0 0 20px 0;
    color: #313131;
}

/* Категории (админ) */
.categories-page-header {
    align-items: flex-start;
}

.categories-page-header.section-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.categories-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    max-width: 720px;
}

.categories-toolbar-actions {
    flex-shrink: 0;
    align-items: center;
}

.categories-refresh-btn i {
    transition: transform 0.35s ease;
}

.categories-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.categories-table-wrap {
    min-height: 120px;
}

.categories-loading-state {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.categories-skeleton-table {
    height: 200px;
    max-width: 100%;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.categories-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.categories-empty-state,
.categories-error-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.categories-empty-state {
    color: #868e96;
}

.categories-empty-state i {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
    color: #ced4da;
}

.categories-empty-state p {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.categories-empty-state span {
    font-size: 14px;
    line-height: 1.45;
}

.categories-error-state {
    color: #c92a2a;
    font-size: 15px;
}

.categories-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.categories-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.categories-data-table th,
.categories-data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

.categories-data-table th {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #495057;
}

.categories-data-table tbody tr:hover {
    background: #fafbfc;
}

.category-id-cell {
    width: 1%;
    white-space: nowrap;
}

.category-id-badge {
    display: inline-block;
    min-width: 2rem;
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f3f5;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.category-name-cell {
    min-width: 200px;
    padding-left: calc(12px + var(--cat-depth, 0) * 20px) !important;
}

.category-tree-glyph {
    color: #adb5bd;
    margin-right: 6px;
    font-weight: 600;
}

.category-name-text {
    font-weight: 500;
    color: #212529;
}

.category-row-root .category-name-text {
    font-weight: 600;
}

.category-slug-code {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
}

.category-parent-cell {
    color: #6c757d;
    max-width: 180px;
}

.category-num-cell {
    text-align: center;
    width: 1%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.category-active-cell {
    width: 1%;
    white-space: nowrap;
}

.cat-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

.cat-status--on {
    background: #e8f5e9;
    color: #2e7d32;
}

.cat-status--off {
    background: #f1f3f5;
    color: #868e96;
}

.category-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.category-actions-cell .btn {
    margin-right: 6px;
}

.category-actions-cell .btn:last-child {
    margin-right: 0;
}

@media (max-width: 768px) {
    .categories-page-header.section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .categories-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .category-actions-cell {
        white-space: normal;
    }

    .category-actions-cell .btn {
        display: block;
        width: 100%;
        margin: 0 0 8px 0;
    }
}

/* Заявки на печать (админ) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.print-requests-page-header {
    align-items: flex-start;
}

.print-requests-page-header.section-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.print-requests-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    max-width: 720px;
}

.print-requests-toolbar-actions {
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.print-requests-refresh-btn i {
    transition: transform 0.35s ease;
}

.print-requests-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.print-requests-meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
}

.print-requests-meta[hidden] {
    display: none !important;
}

.print-requests-table-wrap {
    min-height: 120px;
}

.print-requests-loading-state {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.print-requests-skeleton-table {
    height: 200px;
    max-width: 100%;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.print-requests-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.print-requests-empty-state,
.print-requests-error-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.print-requests-empty-state {
    color: #868e96;
}

.print-requests-empty-state i {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
    color: #ced4da;
}

.print-requests-empty-state p {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.print-requests-empty-state span {
    font-size: 14px;
    line-height: 1.45;
}

.print-requests-error-state {
    color: #c92a2a;
    font-size: 15px;
}

.print-requests-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.print-requests-table-panel.table-container {
    margin-top: 0;
}

.print-requests-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.print-requests-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.print-requests-data-table th,
.print-requests-data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

.print-requests-data-table th {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #495057;
}

.print-requests-data-table tbody tr:hover {
    background: #fafbfc;
}

.print-request-id-cell {
    width: 1%;
    white-space: nowrap;
}

.print-request-id-badge {
    display: inline-block;
    min-width: 2rem;
    padding: 4px 8px;
    border-radius: 8px;
    background: #f1f3f5;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.print-request-file-cell {
    max-width: 220px;
}

.print-request-file-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #212529;
}

/* Статусы заявок на печать (custom_print_requests) */
.status-new {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 100%);
    color: #084298;
}

.status-review {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    color: #856404;
}

.status-quote {
    background: linear-gradient(145deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.status-accepted {
    background: linear-gradient(145deg, #e8eaf6 0%, #c5cae9 100%);
    color: #283593;
}

.status-printing {
    background: linear-gradient(145deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #006064;
}

.status-done {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #0f5132;
}

.status-unknown {
    background: #f1f3f5;
    color: #495057;
}

@media (max-width: 768px) {
    .print-requests-page-header.section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .print-requests-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Заказы (админ) */
.orders-page-header {
    align-items: flex-start;
}

.orders-page-header.section-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 16px;
}

.orders-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    max-width: 720px;
}

.orders-toolbar-actions {
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.orders-meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
}

.orders-meta[hidden] {
    display: none !important;
}

.orders-refresh-btn i {
    transition: transform 0.35s ease;
}

.orders-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.orders-table-wrap {
    min-height: 120px;
}

.orders-loading-state {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.orders-skeleton-table {
    height: 200px;
    max-width: 100%;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.orders-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.orders-empty-state,
.orders-error-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.orders-empty-state {
    color: #868e96;
}

.orders-empty-state i {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
    color: #ced4da;
}

.orders-empty-state p {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.orders-empty-state span {
    font-size: 14px;
    line-height: 1.45;
}

.orders-error-state {
    color: #c92a2a;
    font-size: 15px;
}

.orders-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.orders-table-panel.table-container {
    margin-top: 0;
}

.orders-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orders-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.orders-data-table th,
.orders-data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

.orders-data-table th {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #495057;
}

.orders-data-table tbody tr:hover {
    background: #fafbfc;
}

.orders-order-num {
    font-weight: 600;
    color: #212529;
}

.orders-customer-cell {
    max-width: 200px;
}

.orders-customer-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.orders-num-cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #495057;
}

/* Статус доставки заказа (отдельно от оплаты — оба могут быть «ожидает») */
.order-state--pending {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    color: #856404;
}

.order-state--processing {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 100%);
    color: #084298;
}

.order-state--printed {
    background: linear-gradient(145deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #006064;
}

.order-state--shipped {
    background: linear-gradient(145deg, #e8eaf6 0%, #c5cae9 100%);
    color: #283593;
}

.order-state--delivered {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #0f5132;
}

.order-state--cancelled {
    background: linear-gradient(145deg, #ffebee 0%, #ffcdd2 100%);
    color: #842029;
}

.order-state--refunded {
    background: #f1f3f5;
    color: #495057;
}

.order-state--unknown {
    background: #f1f3f5;
    color: #495057;
}

/* Статус оплаты */
.pay-state--pending {
    background: linear-gradient(145deg, #f3e5f5 0%, #e1bee7 100%);
    color: #6a1b9a;
}

.pay-state--paid {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #0f5132;
}

.pay-state--failed {
    background: linear-gradient(145deg, #ffebee 0%, #ffcdd2 100%);
    color: #842029;
}

.pay-state--refunded {
    background: #f1f3f5;
    color: #495057;
}

.pay-state--unknown {
    background: #f1f3f5;
    color: #495057;
}

@media (max-width: 768px) {
    .orders-page-header.section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Кнопка бургера — только на мобильных */
.admin-burger {
    display: none;
}

/* Оверлей сайдбара — скрыт по умолчанию */
.admin-sidebar-overlay {
    display: none;
}

/* Адаптивность под смартфоны */
@media (max-width: 768px) {
    .admin-burger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 22px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        margin-right: 16px;
        flex-shrink: 0;
    }
    .admin-burger span {
        display: block;
        width: 100%;
        height: 3px;
        background: #313131;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .admin-burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .admin-burger.active span:nth-child(2) {
        opacity: 0;
    }
    .admin-burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .admin-sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .admin-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-sidebar {
        width: min(280px, 85vw);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    body.admin-sidebar-open {
        overflow: hidden;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .admin-header h1 {
        font-size: 20px;
        flex: 1;
        min-width: 0;
    }
    .admin-user-info {
        font-size: 14px;
    }
    .admin-user-info span {
        display: none;
    }

    .admin-content {
        padding: 20px 16px 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    .stat-card {
        padding: 16px;
        gap: 14px;
    }
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .stat-info h3 {
        font-size: 22px;
    }
    .stat-info p {
        font-size: 12px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .dashboard-card {
        padding: 20px;
    }
    .dashboard-card h3 {
        font-size: 16px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .section-header h2 {
        font-size: 18px;
    }
    .section-actions {
        flex-direction: column;
    }
    .search-input {
        min-width: 0;
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        border-radius: 0;
    }
    .table-container table {
        min-width: 600px;
    }
    .table-container th,
    .table-container td {
        padding: 12px 14px;
        font-size: 13px;
    }
    .admin-product-thumb {
        width: 36px;
        height: 36px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 98%;
        max-height: 95vh;
        margin: 12px;
    }
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .coupon-tabs {
        flex-wrap: wrap;
    }

    .emails-nav-tabs {
        flex-wrap: wrap;
    }
    .emails-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .emails-search {
        max-width: 100%;
    }

    .stats-toolbar-secondary {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .stats-toolbar-secondary.stats-toolbar-secondary--no-sales {
        justify-items: stretch;
    }

    .stats-export-card {
        min-width: 0;
    }

    .stats-toolbar-primary {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-type-tabs {
        width: 100%;
    }

    .stats-type-tab {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 10px 12px;
        font-size: 13px;
    }

    .stats-toolbar-actions {
        justify-content: flex-end;
    }

    .stats-overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-tables-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card {
        flex-direction: row;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .stats-overview-cards {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Логи — страница */
.logs-page-header.section-header {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.logs-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    font-weight: 400;
    max-width: 720px;
}

.logs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.logs-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
    flex: 1;
    min-width: min(100%, 280px);
}

.logs-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.logs-filter-field-grow {
    flex: 1;
    min-width: min(100%, 220px);
}

.logs-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #868e96;
}

.logs-select {
    min-width: 200px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e0e3e7;
    font-size: 14px;
    background: #fff;
}

.logs-select:focus {
    outline: none;
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.2);
}

.logs-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid #e0e3e7;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.logs-search-wrap:focus-within {
    border-color: #d5e300;
    box-shadow: 0 0 0 3px rgba(213, 227, 0, 0.2);
}

.logs-search-wrap > i {
    color: #adb5bd;
    font-size: 14px;
    flex-shrink: 0;
}

.logs-search-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
}

.logs-search-input:focus {
    outline: none;
}

.logs-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logs-meta {
    font-size: 13px;
    color: #6c757d;
    margin-right: 8px;
    min-height: 1.2em;
}

.logs-clear-btn i,
.logs-refresh-btn i {
    transition: transform 0.35s ease;
}

.logs-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.logs-content-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.logs-table-area {
    padding: 20px 20px 8px;
    min-height: 120px;
}

.logs-content-card .table-container.logs-table-area {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.logs-pagination-wrap {
    padding: 8px 20px 20px;
    border-top: 1px solid #eef0f3;
}

.logs-pagination {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.logs-loading-state {
    text-align: center;
    padding: 16px 0 24px;
}

.logs-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.logs-skeleton-item {
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.logs-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.logs-empty-state {
    text-align: center;
    padding: 48px 24px 40px;
    color: #868e96;
}

.logs-empty-state i {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
    color: #ced4da;
}

.logs-empty-state p {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.logs-empty-state span {
    font-size: 14px;
    line-height: 1.45;
}

.logs-error-state {
    text-align: center;
    padding: 40px 20px;
    color: #c92a2a;
    font-size: 15px;
}

.logs-error-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.9;
}

/* Стили для логов */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.log-item {
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.log-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    border-color: #e0e3e7;
}

button.log-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px 18px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s;
}

button.log-header:hover {
    background-color: #f1f3f5;
}

button.log-header:focus-visible {
    outline: 2px solid #d5e300;
    outline-offset: -2px;
}

.log-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.log-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.log-action {
    font-size: 16px;
    font-weight: 600;
}

.log-target {
    font-size: 13px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
}

.log-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #777;
}

.log-meta-row span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-meta-row i {
    font-size: 12px;
}

.log-summary {
    font-size: 13px;
    color: #555;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-summary-rich {
    align-items: flex-start;
    line-height: 1.45;
    white-space: normal;
}

.log-summary-rich > i {
    margin-top: 2px;
    flex-shrink: 0;
}

.log-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    transition: all 0.3s;
    flex-shrink: 0;
}

.log-toggle i {
    transition: transform 0.3s;
}

.log-details {
    border-top: 1px solid #e9ecef;
    background: #fafafa;
}

.log-details-content {
    padding: 20px;
}

.log-section {
    margin-bottom: 25px;
}

.log-section:last-child {
    margin-bottom: 0;
}

.log-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #313131;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-section h4 i {
    color: #d5e300;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.info-label {
    font-size: 12px;
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #313131;
    font-weight: 600;
}

.changes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.change-block {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.change-block.old-values {
    border-left: 3px solid #ff9800;
}

.change-block.new-values {
    border-left: 3px solid #4CAF50;
}

.change-header {
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.change-block.old-values .change-header {
    color: #ff9800;
    background: #fff3e0;
}

.change-block.new-values .change-header {
    color: #4CAF50;
    background: #e8f5e9;
}

.json-view {
    margin: 0;
    padding: 15px;
    font-size: 12px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
    color: #333;
    background: white;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-view::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.json-view::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.json-view::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.json-view::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .changes-container {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .log-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .log-action-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .logs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .logs-toolbar-actions {
        justify-content: space-between;
    }

    .logs-meta {
        flex-basis: 100%;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .logs-select {
        min-width: 0;
        width: 100%;
    }
}

/* Стили для кнопки генерации slug */
#generateSlugBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#generateSlugBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

#generateSlugBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Круг «Мультицвет»: 3 сектора — красный, синий, зелёный */
.color-multicolor-circle {
    box-sizing: border-box;
    background: conic-gradient(#f00 0deg 120deg, #00f 120deg 240deg, #0f0 240deg 360deg) !important;
}

/* --- Вкладка Письма --- */
.emails-nav-tabs {
    display: flex;
    gap: 0;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.emails-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emails-nav-tab:hover {
    color: #313131;
    background: rgba(255,255,255,0.5);
}

.emails-nav-tab.active {
    background: white;
    color: #313131;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-weight: 600;
}

.emails-panel {
    display: none;
}

.emails-panel.active {
    display: block;
}

.emails-card {
    overflow: visible;
}

.emails-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.emails-tabs {
    display: flex;
    gap: 0;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 4px;
}

.emails-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emails-tab:hover {
    color: #313131;
    background: rgba(255,255,255,0.5);
}

.emails-tab.active {
    background: white;
    color: #313131;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-weight: 600;
}

.emails-tab i {
    font-size: 14px;
}

.emails-search {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.emails-search .search-input {
    flex: 1;
    min-width: 0;
}

.emails-list {
    min-height: 200px;
    position: relative;
}

.emails-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #666;
    font-size: 15px;
}

.emails-loading i {
    font-size: 20px;
    color: #d5e300;
}

.emails-empty,
.emails-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

.emails-error {
    color: #c62828;
}

.emails-empty i,
.emails-error i {
    font-size: 36px;
    opacity: 0.5;
}

.emails-table .email-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.emails-table .email-row:hover {
    background: #f0f7ff !important;
}

.emails-table .subject-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emails-table .subject-cell span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emails-table .subject-cell .fa-paperclip {
    color: #888;
    margin-left: 4px;
}

.emails-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-top: 16px;
    border-top: 1px solid #e9ecef;
}

.emails-pagination-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.emails-page-info,
.emails-count {
    font-size: 14px;
    color: #666;
}

body.modal-open {
    overflow: hidden;
}

.email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.email-modal.active {
    display: flex !important;
}

.email-modal-content {
    margin: auto;
    background: white;
    border-radius: 16px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 900px;
    flex-shrink: 0;
}

.email-modal-content--reply {
    max-width: 700px;
}

/* ==== Поддержка / Чат (admin) ==== */
.support-page-header {
    align-items: flex-start;
}

.support-page-header.section-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 14px;
}

.support-page-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5c6370;
    max-width: 720px;
}

.support-toolbar-actions {
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.support-tickets-meta {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
}

.support-tickets-meta[hidden] {
    display: none !important;
}

.support-tickets-refresh-btn i {
    transition: transform 0.35s ease;
}

.support-tickets-refresh-btn.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.support-loading-state,
.support-ratings-loading-state {
    text-align: center;
    padding: 28px 16px;
}

.support-skeleton-list {
    height: 160px;
    max-width: 100%;
    margin: 0 auto 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.support-skeleton-ratings {
    height: 72px;
    max-width: 420px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f3f5 0%, #e9ecef 50%, #f1f3f5 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1.2s ease-in-out infinite;
}

.support-loading-text {
    margin: 0;
    font-size: 14px;
    color: #868e96;
}

.support-tickets-empty-state,
.support-tickets-error-state {
    text-align: center;
    padding: 36px 16px;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.support-tickets-empty-state {
    color: #868e96;
}

.support-tickets-empty-state i {
    display: block;
    font-size: 38px;
    margin-bottom: 12px;
    color: #ced4da;
}

.support-tickets-empty-state p {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.support-tickets-empty-state span {
    font-size: 13px;
    line-height: 1.45;
}

.support-tickets-error-state {
    color: #c92a2a;
    font-size: 14px;
}

.support-tickets-error-state i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.support-admin-chat-header-row--full {
    width: 100%;
}

.support-admin-rating-comment-wrap {
    flex: 1 1 100%;
}

.support-rating-score-muted {
    color: rgba(0, 0, 0, 0.6);
    font-weight: 800;
}

.support-admin-chat-placeholder {
    text-align: center;
    padding: 48px 20px;
    color: #868e96;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.support-admin-chat-placeholder i {
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    color: #ced4da;
}

.support-admin-messages-empty {
    text-align: center;
    padding: 32px 16px;
    color: #868e96;
    font-size: 14px;
    border-radius: 12px;
    background: #fafbfc;
}

.support-admin-messages-loading {
    text-align: center;
    padding: 36px 16px;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.support-admin-messages-loading-bar {
    height: 6px;
    max-width: 200px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e9ecef 0%, #d5e300 50%, #e9ecef 100%);
    background-size: 200% 100%;
    animation: stats-shimmer 1s ease-in-out infinite;
}

.support-admin-messages-loading-text {
    margin: 0;
    font-size: 13px;
    color: #868e96;
}

.support-admin-ticket-activity {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #868e96;
}

.support-admin-send-actions .btn-primary.is-busy i {
    animation: stats-spin 0.7s linear infinite;
}

.support-admin-attach-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.support-attach-names {
    font-size: 13px;
    color: #6c757d;
}

.support-ratings-heading {
    margin: 0 0 8px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #313131;
}

.support-ratings-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
}

.support-ratings-empty-state,
.support-ratings-error-state {
    text-align: center;
    padding: 28px 16px;
    width: 100%;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.support-ratings-empty-state {
    color: #868e96;
    font-size: 14px;
}

.support-ratings-error-state {
    color: #c92a2a;
    font-size: 14px;
}

@media (max-width: 768px) {
    .support-page-header.section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .support-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.support-admin-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 10px;
}

.support-admin-list {
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    max-height: 520px;
    overflow-y: auto;
}

.support-admin-ticket-item {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.05s ease, border-color 0.2s ease, background 0.2s ease;
}

.support-admin-ticket-item:hover {
    border-color: rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.support-admin-ticket-item.active {
    background: rgba(213,227,0,0.08);
    border-color: rgba(213,227,0,0.55);
}

.support-admin-ticket-top {
    margin-bottom: 8px;
}

.support-admin-ticket-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.support-admin-ticket-issue {
    font-weight: 700;
}

.support-admin-ticket-id {
    display: inline-block;
    margin-right: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #868e96;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.support-admin-chat-placeholder p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #495057;
}

.support-admin-chat-placeholder span {
    font-size: 13px;
    color: #868e96;
}

.support-admin-ticket-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.support-admin-ticket-status.open {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.support-admin-ticket-status.closed {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

.support-admin-ticket-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: rgba(0,0,0,0.65);
}

.support-admin-chat {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 12px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.support-admin-chat-header {
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
    padding-bottom: 10px;
}

.support-admin-chat-header-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.support-admin-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 12px;
    max-height: 420px; /* фиксируем высоту, чтобы появлялся скролл */
}

.support-admin-message-row {
    display: flex;
}

.support-admin-message-row.user {
    justify-content: flex-start;
}

.support-admin-message-row.admin {
    justify-content: flex-end;
}

.support-admin-message-bubble {
    max-width: 82%;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 10px 12px;
}

.support-admin-message-row.admin .support-admin-message-bubble {
    background: rgba(213,227,0,0.12);
    border-color: rgba(213,227,0,0.3);
}

.support-admin-message-meta {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: rgba(0,0,0,0.55);
}

.support-admin-send-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.support-admin-send-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.support-admin-send-form textarea {
    width: 100%;
    resize: vertical;
}

.support-admin-ratings-block {
    margin-top: 16px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 12px;
}

.support-admin-ratings-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.support-admin-rating-item {
    flex: 0 0 auto;
    min-width: 220px;
    border-radius: 12px;
    padding: 12px;
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.06);
}

.support-admin-rating-name {
    font-weight: 800;
    margin-bottom: 6px;
}

.support-admin-rating-score {
    font-weight: 800;
}

.support-admin-rating-count {
    color: rgba(0,0,0,0.6);
    font-weight: 600;
    font-size: 12px;
}

.support-admin-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.support-admin-actions-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.support-admin-transfer {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.support-admin-transfer-label {
    font-weight: 800;
    color: rgba(0,0,0,0.75);
}

@media (max-width: 900px) {
    .support-admin-layout {
        grid-template-columns: 1fr;
    }
    .support-admin-chat {
        min-height: 420px;
    }
    .support-admin-messages {
        max-height: 320px;
    }
}

/* Вкладка «Ракурсы GLB» */
.glb-tab-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

.glb-tab-preview-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.glb-tab-preview-item img {
    width: 100%;
    min-height: 180px;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
    background: #f5f5f5;
}

.glb-tab-preview-caption {
    padding: 8px 10px;
    font-size: 12px;
    color: #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    background: #fff;
}

.glb-tab-preview-caption span {
    font-weight: 600;
}

/* Модалка товара: фотографии */
.product-images-hint {
    margin-bottom: 10px;
}

.product-images-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.product-images-block {
    position: relative;
}

.product-images-dropzone {
    border: 2px dashed #c5c5c5;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.product-images-dropzone:hover,
.product-images-dropzone.is-dragover {
    border-color: #d5e300;
    background: #f8f9e8;
}

.product-images-dropzone-icon {
    font-size: 2rem;
    color: #888;
    margin-bottom: 8px;
}

.product-images-dropzone-title {
    margin: 0 0 4px;
    font-weight: 600;
    color: #313131;
}

.product-images-dropzone-sub {
    margin: 0 0 12px;
    font-size: 13px;
    color: #666;
}

.product-images-addmore {
    cursor: pointer;
}

.product-images-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 8px;
}

.product-images-count {
    font-size: 13px;
    color: #444;
}

.product-images-clear-btn {
    color: #c62828;
    border-color: rgba(198, 40, 40, 0.45);
}

.product-images-clear-btn:hover {
    background: rgba(198, 40, 40, 0.08);
}

.product-images-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 4px;
    min-height: 0;
}

.product-images-preview-grid.has-items {
    margin-bottom: 8px;
}

.product-images-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.product-images-card.is-dragging {
    opacity: 0.65;
}

.product-images-card.drag-over {
    outline: 2px solid #d5e300;
    outline-offset: 2px;
}

.product-images-card-drag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: #f0f0f0;
    color: #888;
    cursor: grab;
    font-size: 14px;
}

.product-images-card-drag:active {
    cursor: grabbing;
}

.product-images-card-img-wrap {
    position: relative;
    height: 112px;
    background: #f5f5f5;
}

.product-images-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-images-card-img-wrap .product-images-make-main {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    padding: 2px 8px;
    max-width: calc(100% - 8px);
}

.product-img-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: #d5e300;
    color: #313131;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
}

.product-img-badge--main {
    z-index: 1;
}

.product-img-num {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-images-card-meta {
    padding: 8px;
    font-size: 11px;
    color: #555;
    line-height: 1.3;
}

.product-images-card-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-images-card-size {
    color: #888;
}

.product-images-card-remove {
    position: absolute;
    top: 28px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.95);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.product-images-card-remove:hover {
    background: #e53935;
}

.product-images-url-details {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-images-url-summary {
    cursor: pointer;
    font-size: 13px;
    color: #555;
    user-select: none;
}

.product-existing-wrap {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8e8e8;
}

.product-existing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.product-existing-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.product-existing-delete-all {
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.45);
    background: #fff;
}

.product-existing-delete-all:hover {
    background: #fff5f5;
}

.product-existing-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-existing-card {
    position: relative;
    width: 112px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.product-existing-card-visual {
    position: relative;
    height: 96px;
    background: #eee;
}

.product-existing-card img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}

.product-existing-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 6px 4px;
    background: #fff;
    border-top: 1px solid #eee;
}

.product-existing-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
}

.product-existing-delete {
    background: #fff5f5;
    color: #c62828;
    border: 1px solid rgba(198, 40, 40, 0.35);
}

.product-existing-delete:hover {
    background: #ffebee;
}
