/*
 * Workspace Social — Phase 2 visual theme
 * Loaded after the vendor/application styles so it can be removed cleanly.
 * Background asset expected at: public/tool-background-1.png
 */

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) {
    --ws-page-bg: #020817;
    --ws-panel: rgba(6, 15, 37, 0.92);
    --ws-panel-strong: rgba(4, 11, 29, 0.97);
    --ws-panel-soft: rgba(10, 23, 53, 0.78);
    --ws-panel-hover: rgba(15, 34, 73, 0.92);
    --ws-line: rgba(74, 190, 255, 0.22);
    --ws-line-strong: rgba(74, 190, 255, 0.48);
    --ws-text: #f5f8ff;
    --ws-muted: #9eabc5;
    --ws-cyan: #49caff;
    --ws-blue: #6e8eff;
    --ws-purple: #b365ff;
    --ws-pink: #e15be8;
    --ws-green: #4ee7bd;
    --ws-warning: #f7c75e;
    --ws-danger: #ff6785;
    --ws-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --ws-shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.24);
    --ws-gradient: linear-gradient(135deg, var(--ws-cyan), var(--ws-blue) 55%, var(--ws-purple));
    --ws-radius: 18px;

    --bs-body-color: var(--ws-text);
    --bs-body-bg: var(--ws-page-bg);
    --bs-primary: var(--ws-cyan);
    --bs-primary-rgb: 73, 202, 255;
    --bs-secondary-color: var(--ws-muted);
    --bs-border-color: var(--ws-line);
    --bs-link-color: var(--ws-cyan);
    --bs-link-hover-color: #8edfff;

    min-height: 100vh;
    color: var(--ws-text);
    color-scheme: dark;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        linear-gradient(rgba(2, 7, 20, 0.84), rgba(2, 7, 20, 0.9)),
        radial-gradient(circle at 84% 4%, rgba(179, 101, 255, 0.18), transparent 35%),
        radial-gradient(circle at 8% 76%, rgba(73, 202, 255, 0.14), transparent 38%),
        url('/tool-background-1.png') center / cover fixed,
        var(--ws-page-bg) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *::before,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *::after {
    border-color: var(--ws-line);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) ::selection {
    color: #03101e;
    background: var(--ws-cyan);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) ::-webkit-scrollbar-track {
    background: rgba(2, 8, 23, 0.45);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) ::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--ws-cyan), var(--ws-purple));
    border: 2px solid rgba(2, 8, 23, 0.7);
    border-radius: 999px;
}

/* Type and Bootstrap utilities */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(h1, h2, h3, h4, h5, h6),
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.h1, .h2, .h3, .h4, .h5, .h6) {
    color: var(--ws-text);
    font-weight: 750;
    letter-spacing: -0.025em;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(p, label, dt, dd, li) {
    border-color: var(--ws-line);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) a {
    color: var(--ws-cyan);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) a:hover {
    color: #99e3ff;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.text-dark, .text-body, .text-black) {
    color: var(--ws-text) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.text-secondary, .text-muted, .form-text) {
    color: var(--ws-muted) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .text-primary {
    color: var(--ws-cyan) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .text-info {
    color: #72d9ff !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.text-success, .link-success) {
    color: var(--ws-green) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .text-warning {
    color: var(--ws-warning) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .text-danger {
    color: var(--ws-danger) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.bg-white, .bg-light, .bg-body, .bg-light-activity) {
    background-color: transparent !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.border, .border-top, .border-end, .border-bottom, .border-start) {
    border-color: var(--ws-line) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) hr,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .dropdown-divider {
    border-color: var(--ws-line);
    opacity: 1;
}

/* Panels, cards, popovers and lists */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(
    .card,
    .activity-card,
    .settings-card,
    .modal-content,
    .offcanvas,
    .dropdown-menu,
    .popover,
    .list-group-item,
    .accordion-item,
    .toast,
    .login-form-wrapper
) {
    color: var(--ws-text);
    background: linear-gradient(145deg, rgba(10, 23, 53, 0.94), rgba(4, 11, 29, 0.95)) !important;
    border: 1px solid var(--ws-line) !important;
    box-shadow: var(--ws-shadow-soft);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.card, .activity-card, .settings-card) {
    border-radius: var(--ws-radius) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .card:hover {
    border-color: rgba(73, 202, 255, 0.34) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.card-header, .card-footer, .modal-header, .modal-footer, .offcanvas-header, .accordion-header) {
    color: var(--ws-text);
    background: rgba(8, 19, 44, 0.72) !important;
    border-color: var(--ws-line) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.card-body, .modal-body, .offcanvas-body) {
    color: var(--ws-text);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .list-group-item-action:hover,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .list-group-item-action:focus {
    color: var(--ws-text);
    background: var(--ws-panel-hover) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .accordion-button {
    color: var(--ws-text);
    background: rgba(8, 19, 44, 0.78);
    box-shadow: none;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .accordion-button:not(.collapsed) {
    color: var(--ws-cyan);
    background: rgba(73, 202, 255, 0.1);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .accordion-button::after,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .btn-close {
    filter: invert(1) brightness(1.8);
}

/* Form controls */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(
    .form-control,
    .form-select,
    .input-group-text,
    .mockup-select,
    .mockup-search
) {
    color: var(--ws-text) !important;
    background-color: rgba(2, 10, 28, 0.86) !important;
    border: 1px solid var(--ws-line-strong) !important;
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.form-control, .form-select)::placeholder {
    color: #71809f !important;
    opacity: 1;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.form-control, .form-select):focus {
    color: var(--ws-text) !important;
    background-color: rgba(3, 12, 33, 0.98) !important;
    border-color: var(--ws-cyan) !important;
    box-shadow: 0 0 0 3px rgba(73, 202, 255, 0.14), 0 0 30px rgba(73, 202, 255, 0.08) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-label {
    color: #c6d1e8 !important;
    font-weight: 600;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-select option {
    color: var(--ws-text);
    background: #07132e;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-control[type='file']::file-selector-button {
    color: var(--ws-text);
    background: rgba(73, 202, 255, 0.12);
    border-color: var(--ws-line);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-check-input {
    background-color: #06122d;
    border-color: rgba(158, 171, 197, 0.55) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-check-input:checked {
    background-color: var(--ws-cyan) !important;
    border-color: var(--ws-cyan) !important;
    box-shadow: 0 0 16px rgba(73, 202, 255, 0.35);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .form-switch .form-check-input:checked {
    background-color: var(--ws-cyan) !important;
}

/* Buttons and navigation controls */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(
    .btn-primary,
    .btn-premium-dark
) {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 28px rgba(73, 202, 255, 0.18) !important;
    font-weight: 750;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.btn-primary, .btn-premium-dark):hover,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.btn-primary, .btn-premium-dark):focus {
    color: #020817 !important;
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(73, 202, 255, 0.25) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(
    .btn-light,
    .btn-secondary,
    .btn-outline-secondary,
    .btn-premium-white,
    .table-action-icon,
    .header-icon-btn
) {
    color: var(--ws-text) !important;
    background: rgba(8, 21, 48, 0.88) !important;
    border: 1px solid var(--ws-line-strong) !important;
    box-shadow: none !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(
    .btn-light,
    .btn-secondary,
    .btn-outline-secondary,
    .btn-premium-white,
    .table-action-icon,
    .header-icon-btn
):hover {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.11) !important;
    border-color: var(--ws-cyan) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .btn-outline-primary {
    color: var(--ws-cyan) !important;
    background: rgba(4, 13, 32, 0.65) !important;
    border-color: rgba(73, 202, 255, 0.55) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .btn-outline-primary:hover,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .btn-check:checked + .btn-outline-primary {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
    border-color: transparent !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.btn-danger, .btn-premium-danger) {
    color: #fff !important;
    background: linear-gradient(135deg, #ff6785, #d62e67) !important;
    border-color: transparent !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.page-link, .pagination-premium .page-link) {
    color: var(--ws-muted);
    background: rgba(7, 18, 42, 0.9);
    border-color: var(--ws-line);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .page-item.active .page-link,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .pagination-premium .page-item.active .page-link {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
    border-color: transparent !important;
}

/* Dropdowns, menus and overlays */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .dropdown-menu {
    padding: 0.55rem;
    border-radius: 14px;
    backdrop-filter: blur(22px);
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.dropdown-item, .dropdown-item-premium) {
    color: #c9d4ea !important;
    border-radius: 9px;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.dropdown-item, .dropdown-item-premium):hover,
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.dropdown-item, .dropdown-item-premium):focus {
    color: var(--ws-text) !important;
    background: rgba(73, 202, 255, 0.11) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .dropdown-header {
    color: var(--ws-text);
    background: transparent !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .modal-backdrop.show {
    opacity: 0.78;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .modal-content {
    border-radius: 20px;
    backdrop-filter: blur(26px);
}

/* Alerts keep their meaning while joining the palette. */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .alert {
    border: 1px solid currentColor !important;
    background: rgba(8, 20, 46, 0.9) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .alert-success {
    color: var(--ws-green) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .alert-info {
    color: #72d9ff !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .alert-warning {
    color: var(--ws-warning) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .alert-danger {
    color: var(--ws-danger) !important;
}

/* Tables */
:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) .table {
    --bs-table-color: #cbd6eb;
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--ws-line);
    --bs-table-striped-color: var(--ws-text);
    --bs-table-striped-bg: rgba(73, 202, 255, 0.035);
    --bs-table-hover-color: var(--ws-text);
    --bs-table-hover-bg: rgba(73, 202, 255, 0.075);
    color: #cbd6eb;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.table, .mockup-table) thead th {
    color: #8ea3c8 !important;
    background: rgba(4, 14, 35, 0.76) !important;
    border-color: var(--ws-line) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.table, .mockup-table) tbody td {
    color: #cbd6eb !important;
    border-color: var(--ws-line) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) :is(.table, .mockup-table) tbody tr:hover {
    background: rgba(73, 202, 255, 0.06) !important;
}

/* Shared site chrome */
:is(body.workspace-social-user, body.workspace-social-admin) > #app > .navbar,
:is(body.workspace-social-user, body.workspace-social-admin) header.navbar {
    color: var(--ws-text);
    background: rgba(2, 9, 25, 0.9) !important;
    border-bottom: 1px solid var(--ws-line-strong) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(20px);
}

:is(body.workspace-social-user, body.workspace-social-admin) .navbar-brand img {
    filter: drop-shadow(0 0 12px rgba(73, 202, 255, 0.2));
}

:is(body.workspace-social-user, body.workspace-social-admin) .navbar .nav-link {
    color: var(--ws-muted) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin) .navbar .nav-link:hover,
:is(body.workspace-social-user, body.workspace-social-admin) .navbar .nav-link.text-primary {
    color: var(--ws-cyan) !important;
}

:is(body.workspace-social-user, body.workspace-social-admin) .navbar .border-primary {
    border-color: var(--ws-cyan) !important;
}

/* Member application */
body.workspace-social-user .social-layout,
body.workspace-social-user .social-container,
body.workspace-social-user .feed-column {
    background: transparent !important;
}

body.workspace-social-user .social-container {
    position: relative;
}

body.workspace-social-user .search-bar {
    color: var(--ws-text);
    background: rgba(5, 16, 39, 0.88) !important;
    border-color: var(--ws-line-strong) !important;
}

body.workspace-social-user .search-bar:focus-within {
    background: rgba(4, 15, 38, 0.98) !important;
    border-color: var(--ws-cyan) !important;
    box-shadow: 0 0 0 3px rgba(73, 202, 255, 0.12);
}

body.workspace-social-user .search-input-container.mobile-active {
    background: rgba(2, 8, 23, 0.98) !important;
    backdrop-filter: blur(20px);
}

body.workspace-social-user #search-results-dropdown {
    color: var(--ws-text);
    background: var(--ws-panel-strong) !important;
    border-color: var(--ws-line-strong) !important;
}

body.workspace-social-user .sidebar {
    color: var(--ws-text);
    background: transparent !important;
}

body.workspace-social-user .sidebar :is(.nav-link, a) {
    color: var(--ws-muted);
}

body.workspace-social-user .sidebar :is(.nav-link, a):hover,
body.workspace-social-user .sidebar :is(.nav-link, a).active {
    color: var(--ws-cyan) !important;
    background: linear-gradient(90deg, rgba(73, 202, 255, 0.13), rgba(179, 101, 255, 0.06)) !important;
}

body.workspace-social-user .sidebar :is(.nav-link, a).active {
    box-shadow: inset 3px 0 0 var(--ws-cyan);
}

body.workspace-social-user :is(.right-sidebar, .settings-sidebar) {
    color: var(--ws-text);
}

body.workspace-social-user .settings-sidebar .nav-link {
    color: var(--ws-muted);
}

body.workspace-social-user .settings-sidebar .nav-link:hover {
    color: var(--ws-text);
    background: rgba(73, 202, 255, 0.09);
}

body.workspace-social-user .settings-sidebar .nav-link.active {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
    box-shadow: 0 10px 28px rgba(73, 202, 255, 0.16);
}

body.workspace-social-user :is(.post-card, .feed-story-card, .story-card, .create-post-card) {
    color: var(--ws-text);
    background: linear-gradient(145deg, rgba(9, 22, 51, 0.94), rgba(4, 12, 30, 0.96)) !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-user :is(.post-actions, .post-footer, .post-comments, .comment-item, .comment-form) {
    border-color: var(--ws-line) !important;
}

body.workspace-social-user :is(.post-action-btn, .post-action, .like-btn, .comment-btn, .share-btn) {
    color: var(--ws-muted) !important;
}

body.workspace-social-user :is(.post-action-btn, .post-action, .like-btn, .comment-btn, .share-btn):hover {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.08) !important;
}

body.workspace-social-user :is(.reaction-box, .share-menu) {
    color: var(--ws-text);
    background: var(--ws-panel-strong) !important;
    border: 1px solid var(--ws-line-strong) !important;
    box-shadow: var(--ws-shadow-soft) !important;
}

body.workspace-social-user :is(.skeleton, .placeholder, .placeholder-wave) {
    background-color: rgba(107, 128, 169, 0.18) !important;
}

body.workspace-social-user :is(.offcanvas, #mobileSidebar) {
    background: rgba(3, 11, 29, 0.98) !important;
    backdrop-filter: blur(22px);
}

body.workspace-social-user :is(.mobile-bottom-nav, .bottom-nav) {
    color: var(--ws-muted);
    background: rgba(2, 9, 25, 0.95) !important;
    border-top: 1px solid var(--ws-line-strong) !important;
    backdrop-filter: blur(18px);
}

body.workspace-social-user .plyr {
    --plyr-color-main: var(--ws-cyan);
    --plyr-video-background: #01050e;
}

body.workspace-social-user .lightbox-overlay,
body.workspace-social-user .chat-lightbox {
    background: rgba(1, 5, 15, 0.93) !important;
}

/* Messenger */
body.workspace-social-user :is(.messenger-container, .messenger-sidebar, .messenger-chat, .messenger-info-panel) {
    color: var(--ws-text);
    background: rgba(4, 13, 32, 0.92) !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-user :is(.chat-header, .chat-input-area, .info-panel-header, .info-section) {
    color: var(--ws-text);
    background: rgba(7, 19, 44, 0.88) !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-user :is(.conv-item, .search-user-item) {
    color: var(--ws-muted);
    border-color: var(--ws-line) !important;
}

body.workspace-social-user :is(.conv-item, .search-user-item):hover,
body.workspace-social-user .conv-item.active {
    color: var(--ws-text);
    background: rgba(73, 202, 255, 0.09) !important;
}

body.workspace-social-user .conv-item.active {
    box-shadow: inset 3px 0 0 var(--ws-cyan);
}

body.workspace-social-user :is(.conv-name, .search-user-item .user-name) {
    color: var(--ws-text) !important;
}

body.workspace-social-user :is(.conv-preview, .conv-time, .msg-time) {
    color: var(--ws-muted) !important;
}

body.workspace-social-user .chat-messages {
    background:
        linear-gradient(rgba(3, 10, 28, 0.8), rgba(3, 10, 28, 0.8)),
        url('/tool-background-1.png') center / cover fixed !important;
}

body.workspace-social-user .msg-row.theirs .msg-bubble {
    color: var(--ws-text);
    background: rgba(13, 30, 65, 0.96) !important;
    border: 1px solid var(--ws-line) !important;
}

body.workspace-social-user .msg-row.mine .msg-bubble {
    color: #03101e;
    background: linear-gradient(135deg, #54d1ff, #7f9bff) !important;
}

body.workspace-social-user :is(.chat-input-wrapper, .chat-popup, .chat-popup-messages, .chat-popup-input, .chat-emoji-picker, .messenger-search-results) {
    color: var(--ws-text);
    background: var(--ws-panel-strong) !important;
    border-color: var(--ws-line-strong) !important;
}

body.workspace-social-user :is(.chat-input-control, .chat-popup-input textarea) {
    color: var(--ws-text) !important;
    background: transparent !important;
}

body.workspace-social-user :is(.chat-popup-header, .btn-send) {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
}

body.workspace-social-user :is(.emoji-tab.active, .emoji-tab:hover, .emoji-item:hover, .popup-emoji-item:hover) {
    background: rgba(73, 202, 255, 0.11) !important;
}

/* Admin application */
body.workspace-social-admin #app,
body.workspace-social-admin .main-content,
body.workspace-social-admin .bg-light-activity {
    background: transparent !important;
}

body.workspace-social-admin #sidebarMenu,
body.workspace-social-admin .sidebar {
    color: var(--ws-text);
    background:
        linear-gradient(rgba(3, 11, 29, 0.96), rgba(3, 11, 29, 0.98)),
        url('/tool-background-1.png') center / cover !important;
    border-right: 1px solid var(--ws-line-strong) !important;
    box-shadow: 12px 0 34px rgba(0, 0, 0, 0.2) !important;
}

body.workspace-social-admin :is(.sidebar-mobile-header, .sidebar-footer) {
    color: var(--ws-text);
    background: rgba(3, 12, 31, 0.86) !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-admin .sidebar-heading {
    color: #7189b5 !important;
    letter-spacing: 0.09em;
}

body.workspace-social-admin .sidebar .nav-link {
    color: var(--ws-muted) !important;
    border: 1px solid transparent !important;
    border-radius: 10px;
}

body.workspace-social-admin .sidebar .nav-link:hover {
    color: var(--ws-text) !important;
    background: rgba(73, 202, 255, 0.08) !important;
    border-color: rgba(73, 202, 255, 0.16) !important;
}

body.workspace-social-admin .sidebar .nav-link.active {
    color: var(--ws-cyan) !important;
    background: linear-gradient(90deg, rgba(73, 202, 255, 0.16), rgba(179, 101, 255, 0.08)) !important;
    border-color: rgba(73, 202, 255, 0.22) !important;
    border-right-color: rgba(73, 202, 255, 0.22) !important;
    box-shadow: inset 3px 0 0 var(--ws-cyan), 0 8px 22px rgba(0, 0, 0, 0.14);
}

body.workspace-social-admin .sidebar .nav-link.active i,
body.workspace-social-admin .sidebar .nav-link:hover i {
    color: var(--ws-cyan) !important;
}

body.workspace-social-admin .sub-menu {
    border-left-color: var(--ws-line) !important;
}

body.workspace-social-admin .sub-menu .nav-item::before {
    background: var(--ws-line-strong) !important;
}

body.workspace-social-admin .sub-menu .nav-link {
    color: #8597ba !important;
}

body.workspace-social-admin .sub-menu .nav-link::before {
    background: #597097 !important;
}

body.workspace-social-admin .sub-menu .nav-link.active::before,
body.workspace-social-admin .sub-menu .nav-link:hover::before {
    background: var(--ws-cyan) !important;
    box-shadow: 0 0 10px rgba(73, 202, 255, 0.45);
}

body.workspace-social-admin .profile-trigger .profile-avatar,
body.workspace-social-admin .dropdown-avatar {
    color: #03101e;
    background: var(--ws-gradient) !important;
    box-shadow: 0 0 20px rgba(73, 202, 255, 0.18);
}

body.workspace-social-admin :is(.metric-icon-box, .causer-avatar-sm, .dropdown-icon-circle) {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.1) !important;
    border: 1px solid rgba(73, 202, 255, 0.2);
}

body.workspace-social-admin :is(.bg-soft-primary-act, .bg-primary-light, .bg-soft-primary) {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.1) !important;
}

body.workspace-social-admin :is(.bg-soft-success-act, .bg-success-light) {
    color: var(--ws-green) !important;
    background: rgba(78, 231, 189, 0.1) !important;
}

body.workspace-social-admin :is(.bg-soft-warning-act, .bg-warning-light) {
    color: var(--ws-warning) !important;
    background: rgba(247, 199, 94, 0.1) !important;
}

body.workspace-social-admin :is(.bg-soft-danger-act, .bg-danger-light) {
    color: var(--ws-danger) !important;
    background: rgba(255, 103, 133, 0.1) !important;
}

body.workspace-social-admin :is(.bg-soft-info-act, .bg-info-light) {
    color: #72d9ff !important;
    background: rgba(114, 217, 255, 0.1) !important;
}

body.workspace-social-admin .footer,
body.workspace-social-admin footer {
    color: var(--ws-muted);
    background: rgba(2, 9, 25, 0.86) !important;
    border-top: 1px solid var(--ws-line) !important;
}

body.workspace-social-admin .sidebar-backdrop.show {
    background: rgba(1, 5, 15, 0.78);
    backdrop-filter: blur(3px);
}

body.workspace-social-admin :is(.chart-container, .apexcharts-canvas, canvas) {
    color: var(--ws-muted);
}

/* User and admin authentication */
body.workspace-social-auth {
    overflow-x: hidden;
}

body.workspace-social-auth .login-container {
    min-height: 100vh;
    background: transparent !important;
}

body.workspace-social-auth .login-left {
    color: var(--ws-text) !important;
    background:
        linear-gradient(145deg, rgba(6, 17, 43, 0.9), rgba(21, 14, 58, 0.83)),
        url('/tool-background-1.png') center / cover !important;
    border-right: 1px solid var(--ws-line-strong);
}

body.workspace-social-auth .login-right {
    color: var(--ws-text) !important;
    background: rgba(2, 8, 23, 0.68) !important;
    backdrop-filter: blur(14px);
}

body.workspace-social-auth .login-form-wrapper {
    max-width: 500px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 22px;
    backdrop-filter: blur(24px);
}

body.workspace-social-auth .login-left h1,
body.workspace-social-auth .login-right h2 {
    color: var(--ws-text) !important;
    text-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
}

body.workspace-social-auth .login-left .logo,
body.workspace-social-auth .login-left .logo a {
    color: var(--ws-text) !important;
    text-decoration: none;
}

body.workspace-social-auth .login-left .logo img {
    filter: drop-shadow(0 0 14px rgba(73, 202, 255, 0.2));
}

body.workspace-social-auth .login-illustration {
    opacity: 0.7;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.28));
}

body.workspace-social-auth .circle-decoration {
    border-color: rgba(73, 202, 255, 0.13) !important;
    box-shadow: 0 0 70px rgba(179, 101, 255, 0.08);
}

body.workspace-social-auth .forgot-link {
    color: var(--ws-cyan) !important;
}

body.workspace-social-auth .form-check-label,
body.workspace-social-auth .login-right p {
    color: var(--ws-muted) !important;
}

/* Responsive refinements */
@media (max-width: 991.98px) {
    :is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) {
        background-attachment: scroll !important;
    }

    body.workspace-social-auth .login-right {
        padding: 1rem !important;
    }

    body.workspace-social-auth .login-form-wrapper {
        margin: 1rem auto;
    }
}

@media (max-width: 767.98px) {
    body.workspace-social-admin #sidebarMenu,
    body.workspace-social-admin .sidebar {
        background:
            linear-gradient(rgba(3, 11, 29, 0.97), rgba(3, 11, 29, 0.99)),
            url('/tool-background-1.png') center / cover !important;
    }

    body.workspace-social-user .card,
    body.workspace-social-admin .card {
        border-radius: 14px !important;
    }

    body.workspace-social-user .social-container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *,
    :is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *::before,
    :is(body.workspace-social-user, body.workspace-social-admin, body.workspace-social-auth) *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Workspace Social authentication branding */
body.workspace-social-auth .login-left {
    align-items: center;
    text-align: center;
    padding: 3.5rem clamp(2rem, 5vw, 5rem);
}

body.workspace-social-auth .login-branding {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

body.workspace-social-auth .login-left .logo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.workspace-social-auth .login-left .logo img {
    width: min(390px, 82%);
    max-width: 390px;
    max-height: none !important;
    height: auto;
    margin: 0 auto;
}

body.workspace-social-auth .login-left h1 {
    width: 100%;
    max-width: 650px;
    margin: 1.75rem auto 0;
    text-align: center;
    font-size: clamp(2.8rem, 3.8vw, 4.3rem);
    line-height: 1.08;
}

body.workspace-social-auth .login-visual {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
}

body.workspace-social-auth .login-illustration {
    display: block;
    width: min(620px, 94%);
    max-width: 620px;
    max-height: 48vh;
    height: auto;
    margin: auto;
    object-fit: contain;
    opacity: 1;
}

/* =========================================================
   WORKSPACE SOCIAL ADMIN DASHBOARD
   Targets the custom sales_dashboard.css components
   ========================================================= */

body.workspace-social-admin .dashboard-container {
    color: var(--ws-text);
    background: transparent !important;
}

/* Dashboard cards */
body.workspace-social-admin .dashboard-container :is(
    .card-project,
    .card-employee,
    .card-task,
    .card-earning,
    .card-secondary,
    .products-card,
    .activity-card
) {
    color: var(--ws-text) !important;
    background:
        linear-gradient(
            145deg,
            rgba(10, 23, 53, 0.96),
            rgba(4, 11, 29, 0.97)
        ) !important;
    border: 1px solid var(--ws-line) !important;
    border-radius: var(--ws-radius) !important;
    box-shadow: var(--ws-shadow-soft) !important;
}

/* Override the individually colored white card backgrounds */
body.workspace-social-admin .dashboard-container :is(
    .card-secondary.purchase,
    .card-secondary.purchases,
    .card-secondary.orders,
    .card-secondary.sales,
    .card-secondary.balance
) {
    background:
        linear-gradient(
            145deg,
            rgba(10, 23, 53, 0.96),
            rgba(4, 11, 29, 0.97)
        ) !important;
}

/* Dashboard typography */
body.workspace-social-admin .dashboard-container :is(
    .stat-label,
    .stat-value,
    .activity-user-name,
    h3,
    h4,
    h5,
    h6
) {
    color: var(--ws-text) !important;
}

body.workspace-social-admin .dashboard-container :is(
    .stat-desc,
    .activity-desc,
    .time-stamp
) {
    color: var(--ws-muted) !important;
}

/* Icon tiles */
body.workspace-social-admin .dashboard-container .icon-box {
    border: 1px solid currentColor !important;
    box-shadow: 0 0 20px rgba(73, 202, 255, 0.08);
}

/* Dashboard chart controls */
body.workspace-social-admin .dashboard-container .btn-group-custom .btn {
    color: var(--ws-muted) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}

body.workspace-social-admin .dashboard-container .btn-group-custom .btn:hover {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.08) !important;
}

body.workspace-social-admin .dashboard-container .btn-group-custom .btn.active {
    color: #03101e !important;
    background: var(--ws-gradient) !important;
    border-color: transparent !important;
}

/* Dashboard tables */
body.workspace-social-admin .dashboard-container .table-custom thead th {
    color: #8ea3c8 !important;
    background: rgba(4, 14, 35, 0.82) !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-admin .dashboard-container .table-custom tbody td {
    color: #cbd6eb !important;
    background: transparent !important;
    border-color: var(--ws-line) !important;
}

body.workspace-social-admin .dashboard-container .product-icon-box {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.1) !important;
    border: 1px solid var(--ws-line);
}

body.workspace-social-admin .dashboard-container .progress {
    background: rgba(158, 171, 197, 0.14) !important;
}

body.workspace-social-admin .dashboard-container .percentage-badges {
    color: var(--ws-cyan) !important;
    background: rgba(73, 202, 255, 0.1) !important;
}

/* Activity list */
body.workspace-social-admin .dashboard-container .activity-item-row {
    border-color: var(--ws-line) !important;
}

/* ApexCharts dark-theme corrections */
body.workspace-social-admin .dashboard-container .apexcharts-text {
    fill: var(--ws-muted) !important;
}

body.workspace-social-admin .dashboard-container .apexcharts-legend-text {
    color: #cbd6eb !important;
}

body.workspace-social-admin .dashboard-container :is(
    .apexcharts-gridline,
    .apexcharts-xaxis line,
    .apexcharts-yaxis line
) {
    stroke: rgba(74, 190, 255, 0.14) !important;
}

body.workspace-social-admin .dashboard-container .apexcharts-tooltip,
body.workspace-social-admin .dashboard-container .apexcharts-xaxistooltip {
    color: var(--ws-text) !important;
    background: var(--ws-panel-strong) !important;
    border: 1px solid var(--ws-line-strong) !important;
    box-shadow: var(--ws-shadow-soft) !important;
}

body.workspace-social-admin .dashboard-container .apexcharts-tooltip-title {
    color: var(--ws-text) !important;
    background: rgba(73, 202, 255, 0.08) !important;
    border-color: var(--ws-line) !important;
}

/* Enlarge and center the admin sidebar logo */
body.workspace-social-admin #sidebarMenu .navbar-brand {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem !important;
}

body.workspace-social-admin #sidebarMenu .navbar-brand img {
    width: min(210px, 92%);
    max-width: 210px;
    max-height: none !important;
    height: auto;
    margin: 0 !important;
}
