/* ========================================
   QuantaQ - Workspace Stylesheet
   ======================================== */

/* Workspace */
.workspace-shell {
    position: relative;
}

.workspace-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(15, 23, 42, 0.03));
    pointer-events: none;
}

.workspace-summary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 55%, #ffffff 100%);
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.workspace-summary::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -90px;
    top: -110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
}

.workspace-stat {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
}

.workspace-panel {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.96);
}

.workspace-card {
    border-radius: 20px;
    border-width: 1px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.stage-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.workspace-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.workspace-card-active {
    border-color: rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.10);
}

.stage-rail-item.active-stage {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.75));
    border: 1px solid rgba(59, 130, 246, 0.24);
}

.ai-panel {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98)),
        #ffffff;
}

.ai-tip-card {
    border: 1px solid rgba(191, 219, 254, 0.75);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.95));
}

.sticky-stage-header {
    position: sticky;
    top: 4rem;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.workspace-scroll {
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.workspace-section {
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.workspace-microcard {
    border: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(255, 255, 255, 0.9);
}

.workspace-kicker {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #2563eb;
    font-weight: 600;
}

.ai-dock {
    position: fixed;
    top: 4rem;
    right: 0;
    bottom: 0;
    width: 400px;
    padding: 16px 16px 20px;
    z-index: 30;
}

@media (max-width: 1279px) {
    .ai-dock {
        position: static;
        width: 100%;
        padding: 0;
    }

    .ai-dock .ai-panel {
        height: auto;
    }
}

/* Language-specific adjustments */
body.lang-en .workspace-kicker,
body.lang-en .workspace-summary .text-xs,
body.lang-en #workspace-stage-extra .text-xs {
    letter-spacing: 0.08em;
    text-transform: none;
}

body.lang-en #workspace-stage-extra .rounded-xl,
body.lang-en .workspace-summary .inline-flex,
body.lang-en .workspace-microcard {
    line-height: 1.35;
}

body.lang-en #workspace-stage-extra .flex.flex-wrap.items-center.gap-3 {
    row-gap: 10px;
}
