/* ==========================================================
   DevSecOps AI Platform
   Enterprise Application Framework
   UI-2 — Shared Application Foundation
   ========================================================== */

/* ----------------------------------------------------------
   Enterprise Application Variables
   ---------------------------------------------------------- */

:root {

    --enterprise-app-gap: 20px;

    --enterprise-app-header-radius: 12px;
    --enterprise-app-panel-radius: 12px;

    --enterprise-app-workspace-gap: 20px;

    --enterprise-app-navigation-width: 260px;
    --enterprise-app-context-width: 320px;

    --enterprise-app-transition:
        180ms ease;
}

/* ----------------------------------------------------------
   Safe Box Sizing
   ---------------------------------------------------------- */

.enterprise-application,
.enterprise-application *,
.enterprise-application *::before,
.enterprise-application *::after {

    box-sizing: border-box;

}

/* ----------------------------------------------------------
   Root Application
   ---------------------------------------------------------- */

.enterprise-application {

    display: flex;

    flex-direction: column;

    gap: var(--enterprise-app-gap);

    width: 100%;

    min-width: 0;

}

/* ----------------------------------------------------------
   Shared Header
   ---------------------------------------------------------- */

.enterprise-application-header {

    display: flex;

    flex-direction: column;

    gap: 18px;

    padding: clamp(20px, 2vw, 28px);

    background: #1e293b;

    border-radius:
        var(--enterprise-app-header-radius);

    border: 1px solid rgba(
        148,
        163,
        184,
        .10
    );

    box-shadow:
        0 8px 20px rgba(
            0,
            0,
            0,
            .18
        );

}

.enterprise-application-title {

    margin: 0;

    color: #38bdf8;

    font-size: clamp(
        1.5rem,
        2vw,
        2rem
    );

    font-weight: 700;

}

.enterprise-application-subtitle {

    color: #94a3b8;

    line-height: 1.6;

    max-width: 900px;

}

/* ----------------------------------------------------------
   Workspace Shell
   ---------------------------------------------------------- */

.enterprise-application-main {

    display: grid;

    grid-template-columns:

        minmax(
            230px,
            var(--enterprise-app-navigation-width)
        )

        minmax(
            0,
            1fr
        )

        minmax(
            260px,
            var(--enterprise-app-context-width)
        );

    gap:
        var(--enterprise-app-workspace-gap);

    align-items: start;

}

/* ----------------------------------------------------------
   Shared Navigation
   ---------------------------------------------------------- */

.enterprise-application-navigation {

    display: flex;

    flex-direction: column;

    gap: 12px;

    min-width: 0;

}

/* ----------------------------------------------------------
   Shared Workspace
   ---------------------------------------------------------- */

.enterprise-application-workspace {

    display: flex;

    flex-direction: column;

    gap: 20px;

    min-width: 0;

}

/* ----------------------------------------------------------
   Shared Context
   ---------------------------------------------------------- */

.enterprise-application-context {

    display: flex;

    flex-direction: column;

    gap: 18px;

    min-width: 0;

}

/* ==========================================================
   Shared Workspace Panels
   ========================================================== */

.enterprise-application-panel {

    display: flex;

    flex-direction: column;

    gap: 16px;

    background: #1e293b;

    border-radius:
        var(--enterprise-app-panel-radius);

    border:
        1px solid rgba(
            148,
            163,
            184,
            0.10
        );

    padding: 20px;

    box-shadow:
        0 2px 10px rgba(
            0,
            0,
            0,
            0.22
        );

    transition:
        transform var(--enterprise-app-transition),
        box-shadow var(--enterprise-app-transition),
        border-color var(--enterprise-app-transition);

}

.enterprise-application-panel:hover {

    transform: translateY(-2px);

    border-color:
        rgba(
            56,
            189,
            248,
            .35
        );

    box-shadow:
        0 10px 24px rgba(
            0,
            0,
            0,
            .28
        );

}

/* ==========================================================
   Shared Section Headers
   ========================================================== */

.enterprise-application-section-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

}

.enterprise-application-section-title {

    margin: 0;

    color: #38bdf8;

    font-size: 18px;

    font-weight: 700;

}

.enterprise-application-section-subtitle {

    color: #94a3b8;

    font-size: 13px;

    line-height: 1.5;

}

/* ==========================================================
   Shared Content Area
   ========================================================== */

.enterprise-application-content {

    display: flex;

    flex-direction: column;

    gap: 20px;

    min-width: 0;

}

.enterprise-application-scroll {

    overflow-x: auto;

    overflow-y: auto;

    min-width: 0;

}

/* ==========================================================
   Shared Status Bar
   ========================================================== */

.enterprise-application-status {

    display: flex;

    align-items: center;

    gap: 10px;

    color: #94a3b8;

    font-size: 13px;

}

.enterprise-status-indicator {

    width: 10px;

    height: 10px;

    border-radius: 999px;

    flex: 0 0 10px;

}

.enterprise-status-ready {

    background: #22c55e;

}

.enterprise-status-warning {

    background: #f59e0b;

}

.enterprise-status-error {

    background: #ef4444;

}

/* ==========================================================
   Shared Footer
   ========================================================== */

.enterprise-application-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 18px 20px;

    background: #1e293b;

    border-radius:
        var(--enterprise-app-panel-radius);

    border:
        1px solid rgba(
            148,
            163,
            184,
            .10
        );

}

.enterprise-footer-group {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

}

/* ==========================================================
   Responsive Layout
   ========================================================== */

@media (max-width: 1400px) {

    .enterprise-application-main {

        grid-template-columns:

            minmax(
                220px,
                240px
            )

            minmax(
                0,
                1fr
            );

    }

    .enterprise-application-context {

        grid-column: 1 / -1;

    }

}

@media (max-width: 1100px) {

    .enterprise-application-main {

        grid-template-columns: 1fr;

    }

    .enterprise-application-navigation,
    .enterprise-application-workspace,
    .enterprise-application-context {

        width: 100%;

    }

}

@media (max-width: 768px) {

    .enterprise-application {

        gap: 16px;

    }

    .enterprise-application-header {

        padding: 18px;

    }

    .enterprise-application-panel {

        padding: 16px;

    }

    .enterprise-application-footer {

        flex-direction: column;

        align-items: flex-start;

        gap: 14px;

    }

    .enterprise-footer-group {

        width: 100%;

    }

}

/* ==========================================================
   Accessibility
   ========================================================== */

.enterprise-sr-only {

    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;

}

.enterprise-focusable:focus-visible {

    outline: 2px solid #38bdf8;

    outline-offset: 2px;

}

/* ==========================================================
   Utility Helpers
   ========================================================== */

.enterprise-flex {

    display: flex;

}

.enterprise-flex-column {

    display: flex;

    flex-direction: column;

}

.enterprise-align-center {

    align-items: center;

}

.enterprise-justify-between {

    justify-content: space-between;

}

.enterprise-gap-sm {

    gap: 8px;

}

.enterprise-gap-md {

    gap: 16px;

}

.enterprise-gap-lg {

    gap: 24px;

}

.enterprise-fill {

    width: 100%;

}

.enterprise-overflow-auto {

    overflow: auto;

}

.enterprise-text-muted {

    color: #94a3b8;

}

.enterprise-text-accent {

    color: #38bdf8;

}

/* ==========================================================
   End of Enterprise Application Framework
   UI-2
   ========================================================== */