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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #333;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f0f0f0;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card h2 {
    color: #667eea;
    margin-bottom: 25px;
}

/* Стили для переключателя загрузки/URL изображения */
.image-source-toggle {
    display: flex;
    gap: 6px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 10px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.image-source-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.image-source-toggle label {
    flex: 1;
    padding: 8px 14px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #667eea;
    background: transparent;
    user-select: none;
    font-size: 16px;
    border: 1.5px solid transparent;
}

.image-source-toggle input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
    border-color: #667eea;
}

.image-source-toggle label:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.image-source-toggle input[type="radio"]:checked + label:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
    font-size: 1.8em;
}

.section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section h3 {
    color: #764ba2;
    margin-bottom: 20px;
    font-size: 1.3em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333 !important;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #333 !important;
    background-color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-bottom: 20px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.result-message.success {
    background: #e8f5e9; /* Светло-зеленый фон */
    color: #2e7d32; /* Темно-зеленый текст */
    border: 1px solid #a5d6a7; /* Светло-зеленая рамка */
    display: block;
}

.result-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.list-container {
    margin-top: 20px;
}

.list-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.list-item h4 {
    color: #667eea;
    margin-bottom: 8px;
}

.list-item p {
    color: #666;
    font-size: 14px;
    margin: 4px 0;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state::before {
    content: "📭";
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

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

    .tabs {
        flex-direction: column;
    }

    header h1 {
        font-size: 2em;
    }

    .card {
        padding: 20px;
    }
}

/* ========== META STYLE INTERFACE ========== */

.meta-style {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e6eb;
}

.meta-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0;
}

.meta-counters {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #65676b;
}

.meta-counters span {
    font-weight: 500;
}

.meta-form-group {
    margin-bottom: 16px;
}

.meta-table-container {
    overflow-x: auto;
    margin: 24px 0;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.meta-items-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 1200px;
}

.meta-items-table thead {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.meta-items-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #1a1d29;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 11px;
}

.meta-th-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-info-icon {
    font-size: 12px;
    color: #8a8d91;
    cursor: help;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    display: inline-block;
}

/* Кастомный tooltip для информационной иконки */
.meta-info-icon {
    position: relative;
    z-index: 1000;
}

.meta-info-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.4;
}

.meta-info-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

/* Специальный tooltip для Black заголовка - с большим z-index и правильным позиционированием */
.meta-info-icon-black {
    position: relative;
    z-index: 1001;
}

.meta-info-icon-black:hover::after {
    content: attr(title);
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.4;
}

.meta-info-icon-black:hover::before {
    content: '';
    position: fixed;
    bottom: auto;
    top: calc(50% - 8px);
    left: 50%;
    transform: translate(-50%, -100%);
    margin: 0;
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1000000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

/* Альтернативный вариант - tooltip снизу для Black */
.meta-info-icon-black:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.4;
}

.meta-info-icon-black:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    border: 6px solid transparent;
    border-bottom-color: #333;
    z-index: 1000000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

/* Убираем overflow для родительских элементов, чтобы tooltip не обрезался */
.meta-th-content {
    overflow: visible !important;
}

.meta-items-table tbody tr {
    overflow: visible !important;
}

.meta-items-table tbody td {
    overflow: visible !important;
}

.bulk-product-header-row-black {
    overflow: visible !important;
}

.bulk-product-header-row-black td {
    overflow: visible !important;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.meta-items-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
}

.meta-items-table tbody tr.bulk-product-header-row {
    margin-bottom: 0;
    margin-top: 0;
    position: relative;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.meta-items-table tbody tr.bulk-product-header-row td {
    padding: 12px 16px !important;
}

.meta-items-table tbody tr.bulk-product-header-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
    border-radius: 12px 12px 0 0;
}

/* Специальные стили для плашки Black */
.meta-items-table tbody tr.bulk-product-header-row-black {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
    margin-bottom: 0;
}

.meta-items-table tbody tr.bulk-product-header-row-black::before {
    display: none;
}

.meta-items-table tbody tr.bulk-product-header-row-black td:first-child {
    padding-left: 0 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.meta-items-table tbody tr.bulk-product-header-row-black + tr.bulk-product-row {
    border: none !important;
    background: #ffffff;
    border-radius: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.meta-items-table tbody tr.bulk-product-header-row-black + tr.bulk-product-row + tr.bulk-product-row-white {
    border: none !important;
    border-radius: 0;
    margin-top: 0;
}

.meta-items-table tbody tr.bulk-product-header-row + tr.bulk-product-row {
    margin-top: 0;
    margin-bottom: 0;
}

.meta-items-table tbody tr.bulk-product-row {
    border-radius: 0;
    position: relative;
    overflow: visible;
    margin-bottom: 0;
    margin-top: 0;
    border: none;
}

.meta-items-table tbody tr.bulk-product-header-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
    border-radius: 12px 12px 0 0;
}

.meta-items-table tbody tr.bulk-product-row-white {
    border-radius: 0;
    margin-bottom: 0;
    margin-top: 0;
    position: relative;
    border: none;
    box-shadow: none;
}

/* Визуальное разделение между продуктами - большой отступ после завершения продукта (White) */
.meta-items-table tbody tr.bulk-product-row-white + tr.bulk-product-header-row-black {
    margin-top: 32px;
    border: none !important;
    position: relative;
}

/* Добавляем визуальный разделитель перед следующим продуктом для четкого разделения */
.meta-items-table tbody tr.bulk-product-row-white + tr.bulk-product-header-row-black::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.2) 20%, rgba(102, 126, 234, 0.2) 80%, transparent 100%);
    z-index: 1;
}

.meta-items-table tbody tr.bulk-product-row td {
    padding: 12px 16px;
    border-bottom: none;
}

.meta-items-table tbody tr.bulk-product-row td:first-child {
    padding-left: 16px;
}

.meta-items-table tbody tr.bulk-product-row-white td {
    padding: 12px 16px;
    border-bottom: none;
}

.meta-items-table tbody tr.bulk-product-row-white td:first-child {
    padding-left: 16px;
}

.meta-items-table tbody tr.bulk-product-row + tr.bulk-product-row-white {
    margin-top: 0;
}

.meta-items-table tbody tr.bulk-product-row-white + tr.bulk-product-row {
    margin-top: 20px;
}

.meta-items-table tbody tr:hover {
    background: #f8f9fa;
}

.meta-items-table tbody tr.bulk-product-row:hover {
    background: #ffffff;
    border-color: rgba(102, 126, 234, 0.25);
    z-index: 2;
}

.meta-items-table tbody tr.bulk-product-row-white:hover {
    background: #f8f9fa;
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.15) !important;
    z-index: 2;
}

.meta-items-table tbody tr.bulk-product-row:hover + tr.bulk-product-row-white {
    border-color: rgba(102, 126, 234, 0.25);
    border-top-color: rgba(102, 126, 234, 0.15);
}

.meta-items-table tbody tr:last-child td {
    border-bottom: none;
}

.meta-th-image {
    width: 120px;
}

.meta-th-title {
    width: 200px;
}

.meta-th-description {
    width: 300px;
}

.meta-th-website {
    width: 200px;
}

.meta-th-price {
    width: 120px;
}

.meta-th-currency {
    width: 120px;
}

.meta-th-actions {
    width: 80px;
}

.meta-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1d29 !important;
    background-color: #ffffff;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.meta-input:hover {
    border-color: #667eea;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
}

.meta-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 2px 8px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.meta-input::placeholder {
    color: #999 !important;
    opacity: 1;
}

select.meta-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.meta-input:hover {
    border-color: #667eea;
}

select.meta-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 2px 8px rgba(102, 126, 234, 0.2);
}

.meta-input-wrapper {
    position: relative;
}

.meta-char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #8a8d91;
    pointer-events: none;
}

.meta-image-upload-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-image-upload-cell .image-source-toggle {
    display: flex;
    gap: 4px;
    background: #f2f3f5;
    border-radius: 4px;
    padding: 2px;
}

.meta-image-upload-cell .image-source-toggle label {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0;
}

.meta-image-upload-btn {
    width: 44px;
    height: 44px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.meta-image-upload-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.meta-image-upload-btn span {
    font-size: 24px;
    color: #667eea;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.meta-image-upload-btn:hover span {
    transform: scale(1.1);
}

.meta-image-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e1e8ed;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.meta-image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.meta-actions {
    margin: 16px 0;
}

.btn-new-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.3px;
}

.btn-new-item:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-new-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-new-item span {
    font-size: 18px;
    font-weight: 300;
}

.meta-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e4e6eb;
}

.btn-cancel {
    background: #e4e6eb;
    color: #1c1e21;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #d0d2d6;
}

.btn-upload {
    background: #42b72a;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover:not(:disabled) {
    background: #36a420;
}

.btn-upload:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #42b72a;
}

.btn-upload-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.btn-upload-spinner svg {
    width: 16px;
    height: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-upload-spinner svg {
    animation: spin 1s linear infinite;
}

.meta-single-item-form {
    margin: 24px 0;
}

.meta-form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meta-form-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-form-cell label {
    font-size: 13px;
    font-weight: 600;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-image-cell {
    width: 100%;
    max-width: 200px;
}

.meta-price-row {
    flex-direction: row;
    gap: 12px;
}

.meta-price-group,
.meta-currency-group {
    flex: 1;
}

.meta-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-action-btn {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #667eea;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.meta-action-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.meta-action-btn:active {
    transform: translateY(0);
}

.meta-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Иконки для действий */
.meta-icon-trash::before {
    content: "🗑️";
    font-size: 16px;
}

.meta-icon-duplicate::before {
    content: "📋";
    font-size: 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .meta-table-container {
        overflow-x: scroll;
    }
    
    .meta-price-row {
        flex-direction: column;
    }
    
    .meta-footer-actions {
        flex-direction: column;
    }
    
/* ========== СТИЛИ АВТОРИЗАЦИИ ========== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.auth-card h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    transition: all 0.3s;
}

.auth-tab-button:hover {
    color: #667eea;
}

.auth-tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.auth-form {
    margin-top: 20px;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 0.9em;
}

    .btn-cancel,
    .btn-upload {
        width: 100%;
    }
}

/* Стили для групп доступа */
.group-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.group-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.group-info {
    flex: 1;
}

.group-info h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.group-description {
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.group-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #999;
}

.group-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Компактный вид списка аккаунтов */
.account-item-compact {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.account-item-compact:hover {
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.account-header-compact {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.account-info-compact {
    margin-bottom: 10px;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.9em;
}

.account-label {
    color: #666;
    font-weight: 500;
    min-width: 100px;
}

.account-value {
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 10px;
    word-break: break-all;
}

.account-actions-compact {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    align-items: stretch;
    flex-wrap: wrap;
}

.btn-compact {
    flex: 1 1 0;
    padding: 8px 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 36px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
}

.btn-compact.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-compact.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-compact.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
}

.btn-compact.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

.btn-compact.btn-danger-compact {
    background: #e74c3c !important;
    color: white !important;
    border: none !important;
}

.btn-compact.btn-danger-compact:hover {
    background: #c0392b !important;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3) !important;
}

/* Select с поиском внутри */
.searchable-select-wrap {
    position: relative;
    width: 100%;
}
.searchable-select-wrap select.searchable-select-native {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.searchable-select-trigger {
    width: 100%;
    padding: 12px 36px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.searchable-select-trigger:hover {
    border-color: #667eea;
}
.searchable-select-trigger:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.searchable-select-trigger.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #f5f5f5;
}
.searchable-select-trigger.placeholder {
    color: #999;
}
.searchable-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 320px;
    overflow: hidden;
}
.searchable-select-dropdown.open {
    display: block;
}
.searchable-select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    box-sizing: border-box;
}
.searchable-select-search:focus {
    outline: none;
}
.searchable-select-search::placeholder {
    color: #999;
}
.searchable-select-options {
    max-height: 260px;
    overflow-y: auto;
}
.searchable-select-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.searchable-select-option:hover {
    background: #f0f0f0;
}
.searchable-select-option.hidden {
    display: none;
}
.searchable-select-option:last-child {
    border-bottom: none;
}
.searchable-select-no-results {
    padding: 12px;
    color: #999;
    font-size: 14px;
    text-align: center;
    display: none;
}
.searchable-select-no-results.visible {
    display: block;
}
