/* =========================================================
   FILE        :: /public/assets/css/modules/workspace.css
   DOMAIN      :: Workspace
   LAYER       :: Presentation Asset
   PURPOSE     :: Enterprise workspace dashboard grid system
   OWNER       :: Workspace Domain Authority
   VERSION     :: 4.0.0
   ========================================================= */

:root {
    --workspace-gap: 1.5rem;

    --widget-radius: 14px;

    --widget-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 24px 70px rgba(0, 0, 0, 0.34),
        0 0 40px rgba(34, 211, 238, 0.06);

    --widget-shadow-hover:
        0 18px 48px rgba(0, 0, 0, 0.38),
        0 0 42px rgba(34, 211, 238, 0.12);

    --widget-border:
        1px solid rgba(34, 211, 238, 0.18);

    --widget-header-height: 58px;

    --widget-background: rgba(255, 255, 255, 0.86);

    --widget-header-background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(235, 253, 255, 0.84) 100%
        );

    --workspace-background: transparent;

    --workspace-text: #102033;

    --workspace-muted: #5f7488;

    --workspace-primary: #22d3ee;
}

/*
|--------------------------------------------------------------------------
| MSP OPERATIONS CENTER
|--------------------------------------------------------------------------
*/

.msp-ops-center {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr) 20rem;
    gap: 1rem;
    min-height: 100vh;
    padding: 1rem;
    background: #eef3f7;
    color: #172033;
}

.msp-main {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-width: 0;
}

.msp-topbar,
.msp-section,
.msp-side {
    border: 1px solid #d6e0ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(31, 42, 55, 0.08);
}

.msp-topbar {
    display: grid;
    grid-template-columns: minmax(13rem, 0.9fr) minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.msp-topbar p,
.msp-topbar h1,
.msp-topbar span,
.msp-section h2,
.msp-side h2,
.msp-side p,
.msp-ai-header span,
.msp-ai-header strong {
    margin: 0;
}

.msp-topbar p {
    color: #607086;
    font-size: 0.82rem;
    font-weight: 800;
}

.msp-topbar h1 {
    color: #101828;
    font-size: 1.55rem;
    line-height: 1.08;
}

.msp-topbar span {
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 900;
}

.msp-search input {
    width: 100%;
    min-height: 2.65rem;
    padding: 0 0.9rem;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #f8fafc;
    color: #172033;
    font-weight: 750;
}

.msp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.msp-quick-actions a,
.msp-side-section a {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
}

.msp-quick-actions a {
    padding: 0 0.72rem;
    background: #0f766e;
    color: #ffffff;
}

.msp-quick-actions a:nth-child(2n) {
    background: #1d4ed8;
}

.msp-section {
    padding: 0.85rem;
}

.msp-section header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.msp-section h2,
.msp-side h2 {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.msp-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.6rem;
}

.msp-metric {
    display: grid;
    gap: 0.3rem;
    min-height: 6.1rem;
    padding: 0.78rem;
    border: 1px solid #dde6ef;
    border-radius: 7px;
    background: #fbfdff;
    color: #172033;
    text-decoration: none;
}

.msp-metric:hover,
.msp-side-section a:hover {
    border-color: #0f766e;
    box-shadow: 0 8px 22px rgba(15, 118, 110, 0.14);
}

.msp-metric span {
    color: #526174;
    font-size: 0.75rem;
    font-weight: 850;
}

.msp-metric strong {
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1.05;
}

.msp-metric em {
    color: #64748b;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
}

.msp-side {
    position: sticky;
    top: 1rem;
    display: grid;
    align-content: start;
    gap: 0.8rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 0.85rem;
}

.msp-side-brand,
.msp-ai-header {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
    border-radius: 7px;
    background: #172033;
    color: #ffffff;
}

.msp-side-brand span,
.msp-ai-header span {
    color: #b7c7d9;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.msp-side-brand strong,
.msp-ai-header strong {
    font-size: 1rem;
}

.msp-side-section {
    display: grid;
    gap: 0.38rem;
}

.msp-side-section a {
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #dde6ef;
    background: #fbfdff;
    color: #172033;
}

.msp-side-section p {
    padding: 0.45rem 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 750;
}

.msp-ai-section a strong {
    display: inline-grid;
    place-items: center;
    min-width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
}

.business-search-page {
    display: grid;
    gap: 1rem;
    min-height: 100vh;
    padding: 1rem;
    background: #eef3f7;
}

.business-search-header,
.business-search-results {
    border: 1px solid #d6e0ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(31, 42, 55, 0.08);
}

.business-search-header {
    display: grid;
    grid-template-columns: minmax(12rem, 0.5fr) minmax(16rem, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.business-search-header span {
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.business-search-header h1 {
    margin: 0.1rem 0 0;
    color: #101828;
    font-size: 1.45rem;
}

.business-search-header form {
    display: flex;
    gap: 0.5rem;
}

.business-search-header input {
    flex: 1;
    min-height: 2.6rem;
    padding: 0 0.9rem;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #f8fafc;
    font-weight: 750;
}

.business-search-header button {
    min-height: 2.6rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 6px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 900;
}

.business-search-results {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 1rem;
}

.business-search-results a {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem;
    border: 1px solid #dde6ef;
    border-radius: 7px;
    color: #172033;
    text-decoration: none;
}

.business-search-results span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.business-search-results strong {
    font-size: 1rem;
}

/*
|--------------------------------------------------------------------------
| DASHBOARD
|--------------------------------------------------------------------------
*/

.workspace-dashboard {
    position: relative;

    padding: 1.75rem;

    background:
        linear-gradient(rgba(34, 211, 238, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), transparent 32%),
        linear-gradient(245deg, rgba(168, 85, 247, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.58), rgba(255,255,255,0.18));
    background-size:
        36px 36px,
        36px 36px,
        auto,
        auto,
        auto;

    min-height: 100vh;

    border-radius: 18px;

    overflow: visible;
}

.workspace-command-deck {
    position: relative;

    z-index: 1;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;

    gap: 1rem;

    margin-bottom: 1.35rem;

    padding: 1rem 1.15rem;

    border-radius: 18px 18px 8px 18px;

    background:
        linear-gradient(135deg, rgba(255,255,255,0.9), rgba(234,254,255,0.76)),
        linear-gradient(90deg, rgba(34,211,238,0.12), rgba(168,85,247,0.08));

    border: 1px solid rgba(34, 211, 238, 0.2);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.78),
        0 18px 44px rgba(15, 23, 42, 0.08);

    overflow: hidden;
}

.workspace-command-deck::before {
    content: '';

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent) top left / 100% 1px no-repeat,
        repeating-linear-gradient(
            90deg,
            transparent 0 1rem,
            rgba(34,211,238,0.08) 1rem 1.08rem,
            transparent 1.08rem 2.2rem
        );

    opacity: 0.68;

    animation: commandDeckTelemetry 9s linear infinite;
}

@keyframes commandDeckTelemetry {

    from {
        background-position:
            0 0,
            0 0;
    }

    to {
        background-position:
            0 0,
            8rem 0;
    }
}

.workspace-command-mark {
    position: relative;

    display: grid;
    grid-template-columns: 3.7rem 1.25rem;
    grid-template-rows: repeat(3, 0.7rem);

    gap: 0.34rem;

    width: 5.3rem;

    flex: 0 0 auto;
}

.workspace-command-mark span {
    display: block;

    border-radius: 999px;

    background: linear-gradient(90deg, #22d3ee, #a855f7);

    box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}

.workspace-command-mark span:nth-child(1) {
    grid-column: 1 / 3;
}

.workspace-command-mark span:nth-child(2) {
    grid-column: 1;
    background: linear-gradient(90deg, #14b8a6, #22d3ee);
}

.workspace-command-mark span:nth-child(3) {
    grid-column: 1 / 2;
    width: 68%;
    background: linear-gradient(90deg, #a855f7, #38bdf8);
}

.workspace-command-copy {
    position: relative;

    min-width: 0;
}

.workspace-command-kicker {
    color: #075985;

    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.workspace-command-title {
    color: #102033;

    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
}

.workspace-command-subtitle {
    color: #5f7488;

    margin-top: 0.16rem;

    font-size: 0.86rem;
    font-weight: 700;
}

.workspace-product-owner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.workspace-product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workspace-product-header span,
.workspace-product-panel h3 {
    color: #075985;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-product-header h2 {
    margin: 0.1rem 0;
    color: #102033;
    font-size: 1.25rem;
    font-weight: 900;
}

.workspace-product-header p {
    margin: 0;
    color: #5f7488;
    font-size: 0.88rem;
    font-weight: 700;
}

.workspace-product-header a,
.workspace-product-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 6px;
    background: #ffffff;
    color: #075985;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.workspace-product-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.workspace-product-kpi,
.workspace-product-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
}

.workspace-product-kpi {
    display: grid;
    gap: 0.3rem;
    min-height: 5.4rem;
    padding: 0.75rem;
    color: #102033;
    text-decoration: none;
}

.workspace-product-kpi span,
.workspace-workflow-row span {
    color: #5f7488;
    font-size: 0.76rem;
    font-weight: 800;
}

.workspace-product-kpi strong {
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1;
}

.workspace-product-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
    gap: 0.75rem;
}

.workspace-product-panel {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.85rem;
}

.workspace-attention-row,
.workspace-workflow-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.1rem 0.6rem;
    padding: 0.7rem;
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 6px;
    background: #ffffff;
    color: #102033;
    text-decoration: none;
}

.workspace-attention-row strong,
.workspace-workflow-row strong {
    grid-row: span 2;
    min-width: 2.1rem;
    color: #0f766e;
    font-size: 1.05rem;
}

.workspace-attention-row span {
    font-weight: 900;
}

.workspace-attention-row em,
.workspace-workflow-row em,
.workspace-product-empty,
.workspace-ai-list {
    color: #5f7488;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.workspace-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.workspace-ai-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.05rem;
}

.workspace-command-status {
    position: relative;

    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 0.5rem;
}

.workspace-command-status span {
    display: inline-flex;
    align-items: center;

    min-height: 2rem;

    padding: 0 0.78rem;

    border-radius: 999px;

    color: #075985;

    background: rgba(255,255,255,0.74);

    border: 1px solid rgba(34, 211, 238, 0.22);

    font-size: 0.78rem;
    font-weight: 800;
}

.workspace-dashboard::before,
.workspace-dashboard::after {
    content: '';

    position: absolute;

    pointer-events: none;
}

.workspace-dashboard::before {
    inset: -30%;

    background:
        repeating-linear-gradient(
            115deg,
            transparent 0,
            transparent 54px,
            rgba(34, 211, 238, 0.08) 56px,
            transparent 58px
        );

    animation: workspaceDataDrift 18s linear infinite;
}

.workspace-dashboard::after {
    top: 0;
    left: -25%;

    width: 38%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(34, 211, 238, 0.13),
            transparent
        );

    transform: skewX(-18deg);

    animation: workspaceScanSweep 7s ease-in-out infinite;
}

@keyframes workspaceDataDrift {

    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(96px, 64px, 0);
    }
}

@keyframes workspaceScanSweep {

    0%,
    42% {
        transform: translateX(0) skewX(-18deg);
        opacity: 0;
    }

    52% {
        opacity: 1;
    }

    100% {
        transform: translateX(360%) skewX(-18deg);
        opacity: 0;
    }
}

/*
|--------------------------------------------------------------------------
| GRID
|--------------------------------------------------------------------------
*/

.workspace-grid {
    position: relative;

    z-index: 1;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(560px, 1fr)
        );

    gap: var(--workspace-gap);

    align-items: start;
}

/*
|--------------------------------------------------------------------------
| WIDGET
|--------------------------------------------------------------------------
*/

.workspace-widget {
    background: var(--widget-background);

    border-radius: var(--widget-radius);

    border: var(--widget-border);

    box-shadow: var(--widget-shadow);

    overflow: visible;

    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 420px;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;

    backdrop-filter: blur(18px);
}

.workspace-widget::before {
    content: '';

    position: absolute;

    inset: 0;

    border-radius: inherit;

    pointer-events: none;

    background:
        linear-gradient(135deg, rgba(255,255,255,0.72), transparent 34%),
        linear-gradient(180deg, rgba(34,211,238,0.08), transparent 42%),
        linear-gradient(90deg, rgba(168,85,247,0.07), transparent 48%);

    opacity: 0.72;
}

.workspace-widget::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.24), transparent) top left / 100% 1px no-repeat,
        linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.16), transparent) top left / 1px 100% no-repeat;

    animation: widgetEdgePulse 4.5s ease-in-out infinite;
}

@keyframes widgetEdgePulse {

    0%,
    100% {
        opacity: 0.42;
    }

    50% {
        opacity: 1;
    }
}

.workspace-widget > * {
    position: relative;
    z-index: 1;
}

.workspace-widget:hover {
    transform: translateY(-2px);

    box-shadow: var(--widget-shadow-hover);
}

/*
|--------------------------------------------------------------------------
| FULL WIDTH
|--------------------------------------------------------------------------
*/

.workspace-widget--full {
    grid-column: 1 / -1;
}

/*
|--------------------------------------------------------------------------
| SUMMARY STRIP
|--------------------------------------------------------------------------
*/

.workspace-widget--summary {
    position: relative;

    min-height: auto !important;

    overflow: visible;

    z-index: 120000;
}

.workspace-widget--summary .workspace-widget-body {
    overflow: visible;

    min-height: auto !important;

    padding-top: 1rem;
    padding-bottom: 1rem;
}

/*
|--------------------------------------------------------------------------
| REMOVE FORCED HEIGHTS
|--------------------------------------------------------------------------
*/

.workspace-widget--summary,
.workspace-widget--summary *,
.workspace-widget--summary .service-orders-container,
.workspace-widget--summary .service-orders-desktop,
.workspace-widget--summary .service-orders-links {
    height: auto !important;

    max-height: none !important;
}

/*
|--------------------------------------------------------------------------
| SERVICE ORDER OVERLAYS
|--------------------------------------------------------------------------
*/

.workspace-widget--summary .category-item {
    position: relative;

    z-index: 110100;
}

.workspace-widget--summary .details-popup {
    position: absolute;

    top: calc(100% + 12px);

    left: 50%;

    transform:
        translateX(-50%)
        translateY(8px);

    min-width: 320px;

    max-width: 420px;

    max-height: 480px;

    overflow-y: auto;

    padding: 1rem;

    border-radius: 16px;

    background: #ffffff;

    border:
        1px solid rgba(15, 23, 42, 0.08);

    box-shadow:
        0 20px 50px rgba(0,0,0,0.12),
        0 8px 20px rgba(0,0,0,0.08);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    z-index: 110200;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

/*
|--------------------------------------------------------------------------
| SHOW POPUP
|--------------------------------------------------------------------------
*/

.workspace-widget--summary .category-item:hover .details-popup,
.workspace-widget--summary .category-item:focus-within .details-popup {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}

/*
|--------------------------------------------------------------------------
| SEARCH HUB
|--------------------------------------------------------------------------
*/

[data-widget-id="search.searchhub"] {
    position: relative;

    width: 100%;

    z-index: 100;
}

/*
|--------------------------------------------------------------------------
| LARGE WIDGETS
|--------------------------------------------------------------------------
*/

.workspace-widget--large {
    min-height: 560px;
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.workspace-widget-header {
    height: var(--widget-header-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 1.25rem;

    background: var(--widget-header-background);

    border-bottom:
        1px solid rgba(34, 211, 238, 0.16);

    flex-shrink: 0;

    overflow: hidden;
}

.workspace-widget-header::after {
    content: '';

    width: 5.25rem;
    height: 0.55rem;

    margin-left: auto;

    border-radius: 999px;

    background:
        linear-gradient(90deg, #22d3ee 0 28%, transparent 28% 38%, #14b8a6 38% 58%, transparent 58% 68%, #a855f7 68% 100%);

    opacity: 0.82;

    animation: widgetHeaderData 2.8s steps(4, end) infinite;
}

@keyframes widgetHeaderData {

    0% {
        clip-path: inset(0 72% 0 0);
    }

    50% {
        clip-path: inset(0 26% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

/*
|--------------------------------------------------------------------------
| TITLE
|--------------------------------------------------------------------------
*/

.workspace-widget-title {
    font-size: 1rem;

    font-weight: 800;

    color: var(--workspace-text);

    display: flex;
    align-items: center;

    gap: 0.65rem;
}

.workspace-widget-title::before {
    content: none;
}

.workspace-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 2rem;
    height: 2rem;

    border-radius: 10px;

    color: #075985;

    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.14));

    border: 1px solid rgba(34, 211, 238, 0.28);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.64),
        0 0 18px rgba(34, 211, 238, 0.24);

    flex: 0 0 auto;

    animation: workspaceIconFloat 3.8s ease-in-out infinite;
}

@keyframes workspaceIconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .workspace-dashboard::before,
    .workspace-dashboard::after,
    .workspace-command-deck::before,
    .workspace-widget-header::after,
    .workspace-widget::after,
    .workspace-widget-icon {
        animation: none;
    }
}

/*
|--------------------------------------------------------------------------
| BODY
|--------------------------------------------------------------------------
*/

.workspace-widget-body {
    padding: 1.25rem;

    display: flex;
    flex-direction: column;

    gap: 1rem;

    flex: 1;

    overflow: visible;
}

.workspace-home-dashboard-card {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
    padding: 1rem;
}

.workspace-dashboard-actions {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.workspace-dashboard-actions button,
.workspace-kpi-tools button,
.workspace-widget-controls button,
.workspace-kpi-toggle,
.workspace-dashboard-hidden button {
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 6px;
    background: #ffffff;
    color: #102033;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.42rem 0.58rem;
    cursor: pointer;
}

.workspace-kpi-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.workspace-kpi-card {
    position: relative;
    min-height: 106px;
    border: 1px solid rgba(36, 84, 166, 0.18);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.88));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.workspace-kpi-card[data-card-size="wide"] {
    grid-column: span 2;
}

.workspace-kpi-card a {
    display: grid;
    gap: 0.22rem;
    min-height: 100%;
    padding: 0.82rem;
    color: #102033;
    text-decoration: none;
}

.workspace-kpi-card span {
    color: #64748b;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.workspace-kpi-card strong {
    color: #0f172a;
    font-size: 1.55rem;
    line-height: 1;
}

.workspace-kpi-card em {
    color: #334155;
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 800;
}

.workspace-kpi-toggle {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 3;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    line-height: 1;
}

.workspace-kpi-tools,
.workspace-widget-controls {
    display: none;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 0.65rem 0.65rem;
}

.workspace-widget-controls {
    justify-content: flex-end;
    padding-top: 0.65rem;
}

.workspace-dashboard.is-customizing .workspace-kpi-tools,
.workspace-dashboard.is-customizing .workspace-widget-controls {
    display: flex;
}

.workspace-dashboard:not(.is-customizing) .workspace-kpi-toggle {
    display: none;
}

.workspace-dashboard.is-customizing [data-dashboard-card] {
    outline: 2px dashed rgba(36, 84, 166, 0.32);
    outline-offset: 3px;
    cursor: grab;
}

.workspace-dashboard.is-customizing [data-dashboard-card].is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.workspace-dashboard [data-dashboard-card].is-hidden {
    display: none;
}

.workspace-dashboard-hidden {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px dashed rgba(36, 84, 166, 0.34);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.workspace-dashboard-hidden h2 {
    margin: 0 0 0.5rem;
    color: #102033;
    font-size: 0.92rem;
}

.workspace-dashboard-hidden [data-dashboard-hidden-list] {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workspace-module-launcher {
    color: var(--workspace-text);
}

.workspace-control-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 18px 0 8px;
}

.workspace-search {
    min-height: 46px;
    border: 1px solid rgba(95, 116, 136, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    box-shadow: 0 12px 28px rgba(16, 32, 51, .07);
}

.workspace-search i {
    color: #0f6f8e;
}

.workspace-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--workspace-text);
    font-weight: 650;
}

.workspace-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.workspace-quick-actions a {
    min-height: 38px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.workspace-module-section {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.workspace-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.workspace-module-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
    min-height: 132px;
    padding: 18px;
    border: 1px solid rgba(95, 116, 136, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: var(--workspace-text);
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(16, 32, 51, .08);
}

.workspace-module-card:hover,
.workspace-module-card:focus {
    border-color: rgba(34, 211, 238, .55);
    color: var(--workspace-text);
    transform: translateY(-1px);
}

.workspace-module-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eef7fb;
    color: #0f6f8e;
    font-size: 20px;
}

.workspace-module-content {
    display: grid;
    gap: 6px;
}

.workspace-module-content strong {
    font-size: 18px;
}

.workspace-module-content span {
    color: var(--workspace-muted);
    font-size: 14px;
    line-height: 1.4;
}

.workspace-module-content .workspace-instance-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.workspace-module-content .workspace-instance-list em {
    border: 1px solid rgba(15, 111, 142, .18);
    border-radius: 999px;
    background: rgba(15, 111, 142, .08);
    color: #0f6f8e;
    padding: 2px 8px;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.workspace-module-meta {
    color: var(--workspace-muted);
    font-size: 12px;
    font-weight: 800;
}

.workspace-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.workspace-panel {
    min-height: 154px;
    border: 1px solid rgba(95, 116, 136, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    box-shadow: 0 16px 34px rgba(16, 32, 51, .08);
}

.workspace-panel header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--workspace-text);
}

.workspace-panel header i {
    color: #0f6f8e;
}

.workspace-panel a,
.workspace-panel span {
    color: var(--workspace-muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

/*
|--------------------------------------------------------------------------
| FOOTER
|--------------------------------------------------------------------------
*/

.workspace-widget-footer {
    padding: 1rem 1.25rem;

    border-top:
        1px solid rgba(15, 23, 42, 0.06);

    background: #fafcff;

    flex-shrink: 0;
}

/*
|--------------------------------------------------------------------------
| GLOBAL OVERLAY FIXES
|--------------------------------------------------------------------------
*/

.workspace-widget *,
.searchhub *,
.searchhub-card * {
    overflow-anchor: none;
}

.workspace-widget .dropdown-menu,
.workspace-widget .popover,
.workspace-widget .tooltip {
    z-index: 5000;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 1200px) {

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .workspace-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-control-strip,
    .workspace-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .workspace-quick-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {

    .workspace-dashboard {
        padding: 1rem;
    }

    .workspace-command-deck {
        grid-template-columns: 1fr;
    }

    .workspace-command-status {
        justify-content: flex-start;
    }

    .workspace-grid {
        gap: 1rem;
    }

    .workspace-module-grid {
        grid-template-columns: 1fr;
    }

    .workspace-widget {
        min-height: auto;
    }

    .workspace-widget-header {
        height: auto;

        min-height: 58px;

        padding:
            0.85rem 1rem;
    }

    .workspace-widget-body {
        padding: 1rem;
    }

    .workspace-widget--summary .details-popup {
        left: 0;

        right: 0;

        transform: translateY(8px);

        min-width: auto;

        max-width: none;
    }

    .workspace-widget--summary .category-item:hover .details-popup,
    .workspace-widget--summary .category-item:focus-within .details-popup {
        transform: translateY(0);
    }
}

/* BusinessOS desktop application shell additions */

body.workspace-dashboard {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: var(--bos-footer-height, 48px) !important;
}

body.workspace-dashboard #app-main {
    flex: 1 1 auto !important;
    height: auto;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0;
    overflow: visible;
    padding: 0 !important;
    width: 100%;
}

.workspace-dashboard {
    background: #f3f6fa;
    color: #101828;
    display: grid;
    gap: 0.5rem;
    grid-template-rows: auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 0.45rem;
}

.workspace-home-dashboard-card {
    display: grid;
    gap: 0.5rem;
    grid-template-rows: auto;
    min-height: 0;
    overflow: visible;
}

.workspace-command-deck,
.workspace-kpi-card,
.workspace-widget,
.workspace-product-owner,
.workspace-dashboard-hidden {
    background: #ffffff;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.05);
}

.workspace-command-deck {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    min-height: 0;
    padding: 0.55rem 0.75rem;
}

.workspace-command-kicker,
.workspace-kpi-card span,
.workspace-widget-header,
.workspace-product-header span {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.workspace-command-title {
    color: #101828;
    font-size: 1.2rem;
    font-weight: 950;
    line-height: 1.05;
    margin: 0.1rem 0;
}

.workspace-command-subtitle {
    color: #667085;
    font-size: 0.82rem;
    margin: 0;
}

.workspace-dashboard-actions {
    display: flex;
    gap: 0.35rem;
}

.workspace-dashboard-actions button,
.workspace-kpi-tools button,
.workspace-widget-controls button,
.workspace-kpi-toggle {
    background: #f8fafc;
    border: 1px solid #d6dde8;
    border-radius: 6px;
    color: #344054;
    font-size: 0.72rem;
    font-weight: 850;
    min-height: 1.85rem;
    padding: 0.22rem 0.45rem;
}

.workspace-kpi-strip {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    min-height: 0;
    overflow: visible;
}

.workspace-kpi-card {
    display: grid;
    min-height: 7rem;
    padding: 0.55rem;
    position: relative;
    overflow: visible;
}

.workspace-kpi-card a {
    color: #101828;
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    text-decoration: none;
}

.workspace-kpi-card strong {
    color: #101828;
    font-size: 1.25rem;
    font-weight: 950;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.workspace-kpi-card em {
    color: #667085;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.workspace-kpi-toggle {
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
}

.workspace-kpi-tools,
.workspace-widget-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.workspace-product-owner {
    display: grid;
    gap: 0.5rem;
    grid-template-rows: auto;
    min-height: 0;
    overflow: visible;
    padding: 0.5rem;
}

.workspace-product-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 2.4rem;
}

.workspace-product-header h2 {
    color: #101828;
    font-size: 1.05rem;
    font-weight: 950;
    margin: 0;
}

.workspace-product-header p {
    color: #667085;
    font-size: 0.8rem;
    margin: 0;
}

.workspace-product-header a {
    background: #111827;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    padding: 0.35rem 0.55rem;
    text-decoration: none;
}

.workspace-product-owner .bos-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    min-height: 0;
}

.workspace-product-owner .bos-card {
    box-shadow: none;
    min-height: 4.8rem;
    padding: 0.55rem;
}

.workspace-product-owner .bos-card__value {
    font-size: 1.15rem;
}

.workspace-product-owner .bos-card p,
.workspace-product-owner .bos-card__link {
    display: none;
}

.workspace-product-owner .bos-layout--focus {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(17rem, 0.8fr);
    min-height: 0;
    overflow: visible;
}

.workspace-product-owner .bos-panel {
    box-shadow: none;
    grid-template-rows: auto;
    min-height: 0;
    overflow: visible;
    padding: 0.55rem;
}

.workspace-product-owner .bos-action-list,
.workspace-product-owner .bos-timeline,
.workspace-product-owner .bos-quick-grid,
.workspace-product-owner .bos-insight-grid {
    min-height: 0;
    overflow: visible;
}

.workspace-product-owner .bos-insight-card p {
    display: none;
}

.workspace-dashboard-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    min-height: 0;
    overflow: visible;
}

.workspace-widget {
    display: grid;
    grid-template-rows: auto;
    min-height: 12rem;
    overflow: visible;
}

.workspace-widget-body,
.workspace-widget > :last-child {
    min-height: 0;
    overflow: visible;
}

.msp-ops-center {
    background: #f3f6fa;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 16rem minmax(0, 1fr) 18rem;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 0.45rem;
}

.msp-side,
.msp-main,
.msp-section {
    background: #ffffff;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    min-height: 0;
    overflow: visible;
}

.msp-side,
.msp-main {
    display: grid;
    gap: 0.5rem;
}

.msp-side {
    align-content: start;
    overflow: auto;
    padding: 0.5rem;
}

.msp-main {
    grid-template-rows: auto;
    align-content: start;
    overflow: visible;
    padding: 0.5rem;
}

.msp-topbar {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr) minmax(12rem, auto);
}

.msp-section {
    display: grid;
    grid-template-rows: auto;
    padding: 0.5rem;
}

.msp-metric-grid {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    min-height: 0;
    overflow: visible;
}

.msp-metric {
    min-height: 7rem;
    overflow: visible;
}

.msp-metric span,
.msp-metric strong,
.msp-metric em {
    overflow-wrap: anywhere;
}

/*
|--------------------------------------------------------------------------
| MSP dashboard metric layout integrity
|--------------------------------------------------------------------------
| Keep metric cards and section grids in normal document flow. The dashboard
| shell may use independently scrolling columns, but sections must size from
| their metric content so following sections cannot cover card bodies.
*/

body.workspace-dashboard #app-main {
    padding-bottom: calc(var(--bos-footer-height, 48px) + 1rem) !important;
}

.msp-ops-center {
    box-sizing: border-box;
    align-items: start;
    min-height: calc(100vh - var(--bos-navbar-height, 56px) - var(--bos-footer-height, 48px) - 1.5rem);
    padding-bottom: calc(1rem + var(--bos-footer-height, 48px));
}

.msp-main {
    grid-auto-rows: auto;
    align-content: start;
    row-gap: 0.75rem;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-bottom: calc(var(--bos-footer-height, 48px) + 1rem);
}

.msp-section {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-rows: auto;
    align-content: start;
    row-gap: 0.65rem;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
}

.msp-section header {
    margin-bottom: 0;
}

.msp-metric-grid {
    grid-auto-flow: row;
    grid-auto-rows: auto;
    align-items: stretch;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
}

.msp-metric {
    display: grid;
    grid-template-rows: auto auto minmax(1.25rem, auto);
    align-content: start;
    height: auto;
    max-height: none;
    min-height: 7.5rem;
    min-width: 0;
    overflow: visible;
}

.msp-metric span,
.msp-metric strong,
.msp-metric em {
    display: block;
}

.msp-side {
    padding-bottom: calc(0.5rem + var(--bos-footer-height, 48px));
}

@media (max-width: 1200px) {
    body.workspace-dashboard {
        overflow: auto;
        padding-bottom: var(--bos-footer-mobile-height, 78px) !important;
    }

    body.workspace-dashboard #app-main {
        overflow: visible;
    }

    .workspace-dashboard,
    .workspace-home-dashboard-card,
    .msp-ops-center {
        height: auto;
        overflow: visible;
    }

    .msp-ops-center,
    .workspace-product-owner .bos-layout--focus {
        grid-template-columns: 1fr;
    }

    .msp-ops-center,
    .msp-main,
    .msp-side {
        max-height: none;
        padding-bottom: 1rem;
    }
}
