

.social-header-section {
    margin-bottom: 1.5rem;
}

.social-header-section:not(:first-child) {
    margin-top: 3rem;
}

.social-header-section h3 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.social-header-section p {
    font-size: 0.95em;
    color: #7f8c8d;
    line-height: 1.5;
}

.social-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.social-card {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    corner-shape: continuous;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}
.social-card:hover {
    transform: translateY(-2px);
}

.social-card.total {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-dark));
    color: white;
}
.social-card.total .social-card__title {
    color: rgba(255,255,255, 0.9);
    font-size: 0.9em;
}
.social-card.total .social-card__value {
    color: white;
    font-size: 2.5em;
}

.social-card__icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background-color: #f8f9fa;
}

.social-card__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.social-card.instagram .social-card__icon { color: #E1306C; background-color: #fdedf2; }
.social-card.telegram .social-card__icon { color: #0088cc; background-color: #e0f2fa; }
.social-card.youtube .social-card__icon { color: #FF0000; background-color: #ffe5e5; }
.social-card.whatsapp .social-card__icon { color: #25D366; background-color: #e3fcef; }

.social-card__info {
    display: flex;
    flex-direction: column;
}

.social-card__title {
    font-size: 0.9em;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.social-card__value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1;
}

/* --- СВЕТЛАЯ ПАНЕЛЬ ВВОДА ДАННЫХ --- */
.social-entry-panel {
    background-color: #CED3DC;
    border: 1px solid #E0E7FF;
    border-radius: var(--border-radius);
    padding: 40px;
    margin-top: 2rem;
    color: var(--text-color);
    box-shadow: 0 10px 40px rgba(74, 108, 253, 0.06);
}

.social-entry-panel .social-header-section h3 {
    color: var(--heading-color);
}

.social-entry-panel .social-header-section p {
    color: #7f8c8d;
}

/* Стилизация компактных фильтров */
.sales-filters-compact {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.sales-filter-item {
    position: relative;
}

.sales-filter-trigger {
    background: #ffffff;
    border: 1px solid #E0E7FF;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    corner-shape: continuous;
}

.sales-filter-trigger:hover {
    background: #ffffff;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.sales-filter-trigger.active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 25px rgba(74, 108, 253, 0.35);
}

.sales-filter-trigger .arrow-icon {
    width: 10px;
    height: 10px;
    transition: transform 0.3s;
    opacity: 0.7;
    stroke: currentColor;
}

.sales-filter-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid #E0E7FF;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(74, 108, 253, 0.15);
    padding: 10px;
    min-width: 200px;
    display: none;
    z-index: 100;
    animation: popoverReveal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    corner-shape: continuous;
    max-height: 300px;
    overflow-y: auto;
}

.sales-filter-popover.show {
    display: block;
}

.sales-filter-option {
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sales-filter-option:hover {
    background: #eef2ff;
    color: var(--accent-color);
}

.sales-filter-option.selected {
    background: var(--accent-color);
    color: #ffffff;
}

.sales-count-badge {
    background-color: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.8em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.sales-filter-option:hover .sales-count-badge {
    background-color: var(--accent-color);
    color: white;
}

.sales-filter-option.selected .sales-count-badge {
    background-color: rgba(255,255,255,0.2);
}

/* --- НОВЫЙ ДИЗАЙН КАРТОЧЕК ВВОДА --- */
#socialListContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 0 auto;
}

.social-item {
    background-color: #FCF7F8;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    corner-shape: continuous;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    border: 1px solid #BCC1CA;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    min-height: 120px;
}

.social-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 108, 253, 0.05);
}

.social-item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 2px;
    line-height: 1.2;
    word-break: break-word;
}

.social-item-data {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.social-item-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--heading-color);
    line-height: 1;
}

.social-controls {
    margin-top: auto;
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #494947;
    border-radius: 12px;
    border: 1px solid #5a5a58;
    overflow: hidden;
    corner-shape: continuous;
    box-shadow: none;
}

.social-btn {
    width: 36px;
    height: 36px;
    color: var(--accent-color);
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s;
    flex-shrink: 0;
}

.social-btn img {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity .2s;
    filter: invert(1);
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.social-btn:hover img {
    opacity: 1;
}

.social-input {
    flex-grow: 1;
    min-width: 0;
    height: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-left: 1px solid #5a5a58;
    border-right: 1px solid #5a5a58;
    background-color: transparent;
    color: #ffffff;
    padding: 0 4px;
    -moz-appearance: textfield;
}

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

.social-input:focus {
    outline: none;
}

/* --- POPUP УВЕДОМЛЕНИЕ О СОХРАНЕНИИ --- */
.sales-toast-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 18px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    corner-shape: continuous;
}

.sales-toast-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sales-toast-popup.saving { background-color: #e67e22; }
.sales-toast-popup.success { background-color: var(--success-color); }
.sales-toast-popup.error { background-color: #e74c3c; }


@media (max-width: 900px) {
    .social-entry-panel {
        padding: 25px;
    }
    #socialListContainer {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
