/* ==========================================================================
   STRATEKKA CORE — Design System & Dynamic Shell (0.1.0-dev.1)
   Pure native CSS. Zero external dependencies, fonts, or CDNs.
   Consumes CSS Custom Properties derived by ThemeEngine (/assets/theme.css).
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-family: var(--font-sans);
    color: var(--color-text, #1e293b);
    background: var(--color-bg, #f4f6fa);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Shell default dimensions */
    --shell-col-split: 70%;
    --shell-frame-split: 22%;
    --shell-header-height: 56px;
    --shell-page-gutter: clamp(75px, 5vw, 100px);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg, #f4f6fa);
    color: var(--color-text, #1e293b);
}

body.is-resizing-col {
    cursor: col-resize !important;
    user-select: none !important;
}

body.is-resizing-row {
    cursor: row-resize !important;
    user-select: none !important;
}

a {
    color: var(--color-secondary, #0284c7);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary, #1e3a8a);
}

:focus-visible {
    outline: 3px solid var(--focus-ring, var(--color-accent, #f59e0b));
    outline-offset: 2px;
}

/* ==========================================================================
   SHARED UI ELEMENTS (Typography, Forms, Buttons, Alerts, Badges)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text, #1e293b);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: 1.85rem;
    letter-spacing: -0.025em;
    margin: 0.25rem 0 1.25rem;
}

h2 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

h3 {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

small {
    color: var(--color-text-muted, #64748b);
    font-size: 0.82rem;
}

.eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted, #64748b);
    margin: 0 0 0.25rem;
}

.vendor {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-text-muted, #64748b);
    text-transform: uppercase;
}

/* Cards & Layout */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.card {
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: var(--radius-lg, 0.5rem);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
}

.card h2, .card h3 {
    margin-top: 0;
}

.card .stat {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary, #1e3a8a);
    margin: 0.25rem 0;
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text, #1e293b);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: var(--radius-md, 0.375rem);
    font: inherit;
    font-size: 0.92rem;
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #1e293b);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-secondary, #0284c7);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light, #e8efff);
}

.input-error {
    border-color: var(--color-danger, #dc2626) !important;
}

.field-error {
    color: var(--color-danger, #dc2626);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.field-hint {
    color: var(--color-text-muted, #64748b);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Color Picker Input */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid var(--color-border, #dce2ec);
    width: 44px;
    height: 40px;
    border-radius: var(--radius-md, 0.375rem);
    cursor: pointer;
    padding: 2px;
    background: #ffffff;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Buttons */
button, .btn, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.15rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md, 0.375rem);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary, button[type="submit"]:not(.btn-secondary):not(.btn-danger):not(.btn-outline):not(.shell-dropdown-logout) {
    background: var(--color-primary, #1e3a8a);
    color: var(--color-primary-contrast, #ffffff);
}

.btn-primary:hover, button[type="submit"]:not(.btn-secondary):not(.btn-danger):not(.btn-outline):not(.shell-dropdown-logout):hover {
    background: var(--color-primary-hover, #172554);
}

.btn-secondary {
    background: var(--color-secondary, #0284c7);
    color: var(--color-secondary-contrast, #ffffff);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover, #0369a1);
}

.btn-accent {
    background: var(--color-accent, #f59e0b);
    color: var(--color-accent-contrast, #0f172a);
}

.btn-accent:hover {
    background: var(--color-accent-hover, #d97706);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-border, #dce2ec);
    color: var(--color-text, #1e293b);
}

.btn-outline:hover {
    background: var(--color-surface-hover, #f8fafc);
    border-color: var(--color-text-muted, #64748b);
}

.btn-danger {
    background: var(--color-danger, #dc2626);
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* Action button container for tables and lists */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
    display: inline-flex;
}

/* Alerts & Notices */
.error, .notice {
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md, 0.375rem);
    margin: 1.25rem 0;
    font-size: 0.92rem;
}

.error {
    background: var(--color-danger-bg, #fef2f2);
    color: var(--color-danger, #dc2626);
    border: 1px solid #fecaca;
}

.notice {
    background: var(--color-success-bg, #f0fdf4);
    color: var(--color-success, #16a34a);
    border: 1px solid #bbf7d0;
}

.shell-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.shell-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.shell-alert-notice {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Contrast & Accessibility Indicators */
.contrast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.contrast-card {
    padding: 1rem;
    border-radius: var(--radius-md, 0.375rem);
    border: 1px solid var(--color-border, #dce2ec);
    background: var(--color-surface, #ffffff);
}

.contrast-card .ratio {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.badge-wcag-pass {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full, 9999px);
    background: var(--color-success-bg, #f0fdf4);
    color: var(--color-success, #16a34a);
}

.badge-wcag-warn {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full, 9999px);
    background: var(--color-warning-bg, #fffbeb);
    color: var(--color-warning, #d97706);
}

/* Badges for roles and status */
.badge-role {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full, 9999px);
}

.badge-role-admin {
    background: #eff6ff;
    color: var(--color-primary, #1e3a8a);
    border: 1px solid #bfdbfe;
}

.badge-role-user {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-status {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full, 9999px);
}

.badge-status-active {
    background: var(--color-success-bg, #f0fdf4);
    color: var(--color-success, #16a34a);
    border: 1px solid #bbf7d0;
}

.badge-status-inactive {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.badge-status-revoked {
    background: var(--color-danger-bg, #fef2f2);
    color: var(--color-danger, #dc2626);
    border: 1px solid #fecaca;
}

.badge-self {
    font-size: 0.75rem;
    color: var(--color-secondary, #0284c7);
    font-weight: 600;
    margin-left: 0.35rem;
}

/* Form extras */
.input-disabled {
    background: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed;
    border-color: #cbd5e1 !important;
}

.shell-form-divider {
    border: 0;
    border-top: 1px solid var(--color-border, #dce2ec);
    margin: 1.5rem 0;
}

.shell-dropdown-user-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: background 0.15s ease;
}

.shell-dropdown-user-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.data-table th {
    background: var(--color-bg, #f4f6fa);
    color: var(--color-text-muted, #64748b);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 0.85rem;
    border-bottom: 2px solid var(--color-border, #dce2ec);
}

.data-table td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--color-border, #dce2ec);
    vertical-align: middle;
    color: var(--color-text, #1e293b);
}

.data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* Technical Token Box */
.token-callout {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius-md, 0.375rem);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.token-callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.5rem;
}

.token-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm, 0.25rem);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}

.token-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0f172a;
    word-break: break-all;
    flex: 1;
}

.logo-preview-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--color-bg, #f4f6fa);
    border: 1px dashed var(--color-border, #dce2ec);
    border-radius: var(--radius-md, 0.375rem);
    margin-bottom: 1.25rem;
}

.logo-preview-img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    background: #ffffff;
    padding: 0.5rem;
    border-radius: var(--radius-sm, 0.25rem);
    border: 1px solid var(--color-border, #dce2ec);
}

dt {
    font-weight: 650;
    margin-top: 0.75rem;
    color: var(--color-text, #1e293b);
}

dd {
    margin-left: 0;
    color: var(--color-text-muted, #64748b);
}

/* ==========================================================================
   AUTHENTICATION PAGE (Non-Shell View)
   ========================================================================== */

.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #0b1329 0%, #1e293b 100%);
}

.auth-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.form-control,
.login-form input[type="text"],
.login-form input[type="password"] {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: var(--radius-md, 0.375rem);
    font: inherit;
    font-size: 0.92rem;
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #1e293b);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--color-secondary, #0284c7);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light, #e8efff);
}

.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-company-logo {
    max-width: 80px;
    max-height: 48px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.login-brand h2 {
    font-size: 1.25rem;
    margin: 0.25rem 0;
    color: #1e293b;
}

.auth-footer {
    text-align: center;
    padding: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* ==========================================================================
   DYNAMIC SHELL: 04 — GLOBAL HEADER
   ========================================================================== */

.shell-header {
    background-color: var(--shell-header-bg, var(--color-primary, #0c192c));
    color: var(--shell-header-text, #ffffff);
    border-bottom: 1px solid var(--shell-header-border, rgba(255, 255, 255, 0.08));
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--shell-header-height, 56px);
    width: 100%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.shell-header-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--shell-page-gutter);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

/* 4.1 STRATEKKA CORE Brand Logotype */
.shell-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.shell-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #ffffff;
    text-transform: uppercase;
}

.shell-brand-logo {
    height: 30px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

/* 4.2 Horizontal Navigation Bar */
.shell-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    margin: 0 0.5rem;
}

.shell-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    text-decoration: none;
    color: var(--shell-header-text-muted, #cbd5e1);
    font-size: 0.84rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.shell-nav-item:hover {
    background: var(--shell-header-hover, rgba(255, 255, 255, 0.1));
    color: var(--shell-header-text, #ffffff);
}

.shell-nav-item.is-active {
    background: var(--shell-header-active, rgba(255, 255, 255, 0.16));
    color: var(--shell-header-text, #ffffff);
    font-weight: 600;
}

.shell-nav-icon {
    width: 15px;
    height: 15px;
    opacity: 0.85;
    flex-shrink: 0;
}

.shell-chevron-icon {
    width: 11px;
    height: 11px;
    opacity: 0.7;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.shell-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent, #f59e0b);
    color: #0f172a;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    margin-left: 0.15rem;
}

/* Dropdown menus */
.shell-nav-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.shell-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 200;
    background: #ffffff;
    color: var(--color-text, #1e293b);
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    padding: 0.5rem 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.shell-dropdown-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.shell-dropdown-header {
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748b;
}

.shell-dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 1rem;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s ease;
}

.shell-dropdown-item:hover {
    background: #f1f5f9;
}

.shell-dropdown-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.shell-dropdown-item-meta {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 2px;
}

.shell-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.4rem 0;
}

.shell-dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-secondary, #0284c7);
    text-decoration: none;
}

.shell-dropdown-link:hover {
    background: #f8fafc;
    text-decoration: underline;
}

.shell-dropdown-empty {
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    color: #94a3b8;
    font-style: italic;
}

/* 4.3 User Profile & Area */
.shell-user-area {
    position: relative;
    flex-shrink: 0;
}

.shell-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--shell-header-hover, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--shell-header-border, rgba(255, 255, 255, 0.15));
    border-radius: 9999px;
    padding: 0.25rem 0.75rem 0.25rem 0.3rem;
    color: var(--shell-header-text, #ffffff);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.shell-user-btn:hover {
    background: var(--shell-header-active, rgba(255, 255, 255, 0.15));
    border-color: var(--shell-header-border, rgba(255, 255, 255, 0.25));
}

.shell-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    background: var(--color-accent, #f59e0b);
    border: 2px solid var(--shell-header-border, rgba(255, 255, 255, 0.35));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-accent-contrast, #0f172a);
    flex-shrink: 0;
}

.shell-user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.shell-user-role {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--shell-header-text-muted, #e2e8f0);
}

.shell-dropdown-user {
    right: 0;
    left: auto;
    min-width: 275px;
    max-width: 320px;
    border-radius: 0.625rem;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.14), 0 6px 12px -4px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--color-border, #dce2ec);
    background: #ffffff;
    padding: 0.35rem 0;
    overflow: hidden;
}

.shell-dropdown-user-header {
    padding: 0.85rem 1rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    margin-top: -0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.shell-dropdown-user-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.shell-dropdown-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: var(--color-accent, #f59e0b);
    color: var(--color-accent-contrast, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shell-dropdown-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shell-dropdown-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-dropdown-user-email {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 1px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-dropdown-user-badges {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    padding-top: 0.1rem;
}

.shell-dropdown-badge-role {
    background: #e2e8f0;
    color: #334155;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.01em;
}

.shell-dropdown-user-company {
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-dropdown-user .shell-dropdown-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    margin: 0.1rem 0.35rem;
    width: calc(100% - 0.7rem);
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    font-family: inherit;
    color: #334155;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
    box-sizing: border-box;
    outline: none;
}

.shell-dropdown-user .shell-dropdown-item:hover,
.shell-dropdown-user .shell-dropdown-item:focus-visible {
    background: #f1f5f9;
    color: var(--color-primary, #0f172a);
}

.shell-dropdown-user .shell-dropdown-item:focus-visible {
    outline: 2px solid var(--color-accent, #f59e0b);
    outline-offset: -1px;
}

.shell-dropdown-icon {
    width: 15px;
    height: 15px;
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.12s ease;
}

.shell-dropdown-user .shell-dropdown-item:hover .shell-dropdown-icon,
.shell-dropdown-user .shell-dropdown-item:focus-visible .shell-dropdown-icon {
    color: var(--color-primary, #0f172a);
}

.shell-dropdown-btn-action {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    color: #334155;
    text-align: left;
    text-decoration: none;
}

.shell-logout-form {
    margin: 0;
    padding: 0;
}

.shell-dropdown-logout {
    color: #dc2626 !important;
}

.shell-dropdown-logout .shell-dropdown-icon {
    color: #dc2626 !important;
}

.shell-dropdown-user .shell-dropdown-logout:hover,
.shell-dropdown-user .shell-dropdown-logout:focus-visible {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.shell-dropdown-user .shell-dropdown-logout:hover .shell-dropdown-icon,
.shell-dropdown-user .shell-dropdown-logout:focus-visible .shell-dropdown-icon {
    color: #b91c1c !important;
}

/* ==========================================================================
   DYNAMIC SHELL: 05 — HERO BANNER COMPACT
   ========================================================================== */

.shell-hero {
    background-color: #0c192c;
    background-image: linear-gradient(135deg, rgba(12, 25, 44, 0.55) 0%, rgba(12, 25, 44, 0.30) 60%, rgba(2, 132, 199, 0.10) 100%), url('/assets/hero-background.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid var(--hero-secondary-border, var(--color-border, #dce2ec));
    box-shadow: var(--hero-secondary-shadow, 0 2px 8px rgba(0, 0, 0, 0.03));
    color: #ffffff;
    padding: 1.25rem 0;
    position: relative;
    width: 100%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.shell-hero-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--shell-page-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.shell-hero-content {
    flex: 1;
    min-width: 280px;
}

.shell-hero-intro {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.15rem 0;
    line-height: 1.2;
}

.shell-hero-company {
    font-size: clamp(2rem, 2.5vw, 2.35rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 0.5rem 0;
}

.shell-hero-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
}

.shell-hero-message {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.shell-hero-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.4;
}

/* 5.3 Square Company Logo Card (140x140 1:1) */
.shell-hero-logo-card {
    width: 140px;
    height: 140px;
    min-width: 140px;
    max-width: 140px;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border, #dce2ec);
    flex-shrink: 0;
}

.shell-hero-logo-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.shell-hero-logo-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.72rem;
    gap: 0.4rem;
    line-height: 1.25;
}

.shell-hero-logo-fallback svg {
    color: #cbd5e1;
}

/* ==========================================================================
   DYNAMIC SHELL: UX-ALERT-01 — SYSTEM NOTIFICATIONS COMPACT (36-48px)
   ========================================================================== */

.shell-alert-banner-wrap {
    width: 100%;
    padding: 0.75rem var(--shell-page-gutter) 0;
    box-sizing: border-box;
}

.shell-alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 38px;
    height: 40px;
    padding: 0 1rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    font-weight: 500;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.shell-alert-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.shell-alert-text {
    flex: 1;
    min-width: 0;
}

.shell-alert-notice,
.shell-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.shell-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.shell-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.shell-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ==========================================================================
   DYNAMIC SHELL: 06 — WORKSPACE & SPLITTERS (~70% / ~30%)
   ========================================================================== */

.shell-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.shell-workspace {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.5rem var(--shell-page-gutter) 2rem;
    gap: 0;
    align-items: stretch;
}

/* 6.1 Left Modular Workspace (~70% on standard desktop, fills space on ultrawide) */
.shell-modular-col {
    flex: 1 1 auto;
    width: var(--shell-col-split, 70%);
    min-width: 480px;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}

/* 6.3 Column Splitter Divider */
.shell-resizer-col {
    width: 14px;
    margin: 0 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    user-select: none;
    position: relative;
    transition: background 0.15s ease;
    border-radius: 4px;
}

.shell-resizer-col:hover,
body.is-resizing-col .shell-resizer-col {
    background: rgba(30, 58, 138, 0.08);
}

.shell-resizer-col-handle {
    width: 4px;
    height: 48px;
    border-radius: 4px;
    background: #cbd5e1;
    transition: background 0.15s ease, height 0.15s ease;
}

.shell-resizer-col:hover .shell-resizer-col-handle,
body.is-resizing-col .shell-resizer-col .shell-resizer-col-handle,
.shell-resizer-col:focus-visible .shell-resizer-col-handle {
    background: var(--color-primary, #1e3a8a);
    height: 64px;
}

/* 6.2 Right Sidebar Workspace (~30% capped at 460px on ultrawide) */
.shell-sidebar-col {
    width: calc(100% - var(--shell-col-split, 70%) - 18px);
    max-width: 460px;
    min-width: 280px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==========================================================================
   DYNAMIC SHELL: 07 — MODULAR FRAMES (FRAME A & FRAME B)
   ========================================================================== */

.shell-frame {
    background: #ffffff;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.625rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Frame A: Top compact (~22%) — Synthèse & indicateurs (Auto-adapt with manual resizer support) */
.shell-frame-a {
    height: auto;
    flex-basis: auto;
    flex-grow: 0;
    flex-shrink: 0;
    min-height: 115px;
    max-height: 38%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shell-frame-a.is-manually-resized {
    height: var(--shell-frame-split, 22%);
    flex-basis: var(--shell-frame-split, 22%);
}

.shell-frame-shared-body {
    padding: 0.75rem 1.15rem;
    display: flex;
    align-items: center;
    overflow-y: auto;
}

.shell-shared-empty-state {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
}

.shell-shared-empty-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.375rem;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shell-shared-empty-content {
    flex: 1;
    min-width: 0;
}

.shell-shared-empty-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.shell-shared-empty-desc {
    margin: 0.15rem 0 0 0;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.35;
}

/* ==========================================================================
   Frame A — Module Synthesis KPI Grid (CORE-0.1.2-SYNTHESIS-01 / Density C)
   ========================================================================== */
.synthesis-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
    width: 100%;
    align-items: stretch;
}

.synthesis-kpi-card {
    background: #f8fafc;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.375rem;
    padding: 0.45rem 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

a.synthesis-kpi-card:hover {
    background: #f1f5f9;
    border-color: var(--color-primary, #1e3a8a);
}

.synthesis-kpi-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem;
    min-width: 0;
}

.synthesis-kpi-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.synthesis-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted, #64748b);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.synthesis-kpi-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.synthesis-kpi-badge {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.2;
    text-transform: capitalize;
}

.synthesis-kpi-badge-success {
    background: #dcfce7;
    color: #15803d;
}

.synthesis-kpi-badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.synthesis-kpi-badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.synthesis-kpi-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.synthesis-kpi-badge-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.synthesis-kpi-trend {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.synthesis-kpi-hint {
    font-size: 0.65rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.synthesis-kpi-card[data-state="success"] .synthesis-kpi-value {
    color: #15803d;
}
.synthesis-kpi-card[data-state="warning"] .synthesis-kpi-value {
    color: #b45309;
}
.synthesis-kpi-card[data-state="danger"] .synthesis-kpi-value {
    color: #b91c1c;
}
.synthesis-kpi-card[data-state="info"] .synthesis-kpi-value {
    color: #0369a1;
}

@media (max-width: 900px) {
    .synthesis-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 0.5rem;
    }
    .synthesis-kpi-value {
        font-size: 1.15rem;
    }
}

@media (max-width: 600px) {
    .synthesis-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
}

@media (max-width: 380px) {
    .synthesis-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* 7.2 Horizontal Frame Splitter Divider with Right-Aligned Handle (UX-RESIZE-01) */
.shell-resizer-row {
    height: 16px;
    margin: 4px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Outer right edge */
    padding-right: 8px;
    cursor: row-resize;
    user-select: none;
    position: relative;
    border-radius: 4px;
    z-index: 10;
}

.shell-resizer-row-line {
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    transition: background 0.15s ease;
}

.shell-resizer-row-handle {
    position: relative;
    z-index: 2;
    height: 10px;
    width: 44px;
    border-radius: 9999px;
    background: #e2e8f0;
    border: 1px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: row-resize;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.shell-resizer-grip-dot,
.shell-resizer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #64748b;
    transition: background 0.15s ease;
}

.shell-resizer-row-handle:hover,
.shell-resizer-row:focus-visible .shell-resizer-row-handle,
body.is-resizing-row .shell-resizer-row-handle {
    background: var(--color-primary, #1e3a8a);
    border-color: var(--color-primary, #1e3a8a);
}

.shell-resizer-row-handle:hover .shell-resizer-dot,
.shell-resizer-row-handle:hover .shell-resizer-grip-dot,
.shell-resizer-row:focus-visible .shell-resizer-dot,
body.is-resizing-row .shell-resizer-dot {
    background: #ffffff;
}

/* Frame B: Modular workspace taking full height of modular column */
.shell-frame-b {
    flex: 1 1 auto;
    height: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shell-frame-tag,
.shell-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.shell-frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--color-border, #dce2ec);
    background: #f8fafc;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    flex-shrink: 0;
}

.shell-frame-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.shell-frame-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shell-frame-body {
    flex: 1 1 auto;
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ==========================================================================
   MODULAR & SHARED CONTENT (Clean card style, no dashed borders)
   ========================================================================== */

.shell-modular-content {
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 220px;
    box-sizing: border-box;
}

.shell-modular-icon-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.shell-icon-tile {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tile-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.tile-grey {
    background: #f1f5f9;
    color: #475569;
}

.shell-modular-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.shell-modular-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem;
    max-width: 480px;
    line-height: 1.4;
}

.shell-skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    max-width: 340px;
    margin: 0.75rem 0 1.25rem;
}

.shell-skeleton-line {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.line-long {
    width: 100%;
}

.line-medium {
    width: 70%;
    align-self: center;
}

.line-short {
    width: 45%;
    align-self: center;
}

.shell-shared-content {
    background: #ffffff;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 160px;
    box-sizing: border-box;
}

.shell-shared-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.shell-shared-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 0.75rem;
    max-width: 460px;
    line-height: 1.4;
}

.shell-chart-icon-group {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
    margin-bottom: 0.5rem;
}

.shell-chart-bar {
    width: 8px;
    border-radius: 2px;
    background: #cbd5e1;
}

.bar-1 {
    height: 12px;
}

.bar-2 {
    height: 26px;
    background: #93c5fd;
}

.bar-3 {
    height: 18px;
}

/* ==========================================================================
   DYNAMIC SHELL: 08 — RIGHT SIDEBAR PANELS (Uniformized ~185px, Empty States)
   ========================================================================== */

/* 08.0 — Contextual Connections Supervision Card (CORE-CONNECTION-SUPERVISION-01) */
.shell-connections-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.85rem 1.15rem !important;
    background: #ffffff !important;
    border: 1px solid var(--color-border, #dce2ec) !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 0 !important;
}

.shell-connections-card .shell-panel-body {
    overflow: visible;
}

.shell-connections-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.shell-connection-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-subtle, #f1f5f9);
}

.shell-connection-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.shell-connection-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.shell-connection-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.shell-connection-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    line-height: 1.25;
}

.shell-connection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.shell-connection-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 9999px;
}

/* 5 State badges per Section 8 */
/* 1. Connecté (Normal / Discreet) */
.shell-conn-badge-connected {
    color: #065f46;
    background: #d1fae5;
}
.shell-conn-badge-connected .shell-connection-dot {
    background: #10b981;
}

/* 2. Connexion interrompue (Warning / Interrupted) */
.shell-conn-badge-interrupted {
    color: #92400e;
    background: #fef3c7;
}
.shell-conn-badge-interrupted .shell-connection-dot {
    background: #f59e0b;
}

/* 3. Reconnexion requise (Alert / Danger) */
.shell-conn-badge-reconnect {
    color: #991b1b;
    background: #fee2e2;
}
.shell-conn-badge-reconnect .shell-connection-dot {
    background: #ef4444;
}

/* 4. Service temporairement indisponible (Degraded / Transient) */
.shell-conn-badge-degraded {
    color: #92400e;
    background: #fef3c7;
}
.shell-conn-badge-degraded .shell-connection-dot {
    background: #f59e0b;
}

/* 5. État indisponible (Neutral / Unknown) */
.shell-conn-badge-unknown {
    color: #475569;
    background: #f1f5f9;
}
.shell-conn-badge-unknown .shell-connection-dot {
    background: #94a3b8;
}

.shell-connection-action {
    display: flex;
    margin-top: 0.25rem;
}

.shell-connection-reconnect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.375rem !important;
    text-decoration: none;
    font-weight: 500;
}

.shell-connection-notice {
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
    margin-top: 0.15rem;
}

/* 08.1 — Universal Quick Access Card (UX-01 / PRIMARY ACTION TOKENS) */
.shell-panel-quick-access,
.shell-quick-access-card,
.shell-panel-launcher.shell-panel-quick-access {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.85rem 1.15rem !important;
    background: #ffffff !important;
    border: 1px solid var(--color-border, #dce2ec) !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 0 !important;
}

.shell-panel-quick-access .shell-panel-body,
.shell-quick-access-card .shell-panel-body {
    overflow: visible;
}

.shell-launcher-bar {
    width: 100%;
}

.shell-launcher-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.shell-launcher-tile {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    aspect-ratio: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary, #1e3a8a);
    border: 1px solid var(--color-primary, #1e3a8a);
    border-radius: var(--radius-sm, 0.375rem);
    color: var(--color-primary-contrast, #ffffff);
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    box-sizing: border-box;
}

.shell-launcher-tile:hover {
    background: var(--color-primary-hover, #172554);
    border-color: var(--color-primary-hover, #172554);
    color: var(--color-primary-contrast, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.shell-launcher-tile.is-active,
.shell-launcher-tile:focus-visible {
    background: var(--color-primary, #1e3a8a);
    border-color: var(--color-primary, #1e3a8a);
    color: var(--color-primary-contrast, #ffffff);
    box-shadow: 0 0 0 2px var(--color-surface, #ffffff), 0 0 0 4px var(--color-primary, #1e3a8a);
    outline: none;
}

.shell-launcher-code {
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.shell-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.shell-launcher-icon svg {
    display: block;
}

/* 08.2 — Active Module Synthesis Panel in Sidebar */
.shell-panel-synthesis {
    height: auto !important;
    min-height: 190px !important;
    max-height: 280px !important;
}

.shell-panel-synthesis .shell-panel-body {
    overflow-y: auto;
    padding-right: 2px;
}

.shell-panel-synthesis .synthesis-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
}

.shell-panel-synthesis .synthesis-kpi-card {
    padding: 0.4rem 0.55rem;
    min-width: 0;
}

.shell-panel-synthesis .synthesis-kpi-value {
    font-size: 1.15rem;
}

.shell-panel-synthesis .synthesis-kpi-label {
    font-size: 0.68rem;
}

.shell-panel {
    background: #ffffff;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.625rem;
    padding: 0.95rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 215px;
    min-height: 215px;
    max-height: 215px;
    box-sizing: border-box;
    overflow: hidden;
}

.shell-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.shell-panel-header-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.shell-panel-header-title h3 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1e293b;
}

.shell-panel-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    flex-shrink: 0;
}

.shell-panel-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--color-secondary, #0284c7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.shell-panel-action:hover {
    color: var(--color-primary, #1e3a8a);
    text-decoration: underline;
}

.shell-panel-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.shell-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.shell-panel-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.shell-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    margin-top: 5px;
    flex-shrink: 0;
}

.shell-dot-info {
    background: #3b82f6;
}

.shell-dot-warning {
    background: #f59e0b;
}

.shell-dot-success {
    background: #10b981;
}

.shell-dot-danger {
    background: #ef4444;
}

.shell-panel-item-text {
    flex: 1;
    min-width: 0;
    color: #334155;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-panel-item-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Empty States for Outlook & Agenda (Full-width, comfortable, readable) */
.shell-panel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0.75rem;
    width: 100%;
    margin: auto 0;
}

.shell-empty-state-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.shell-empty-state-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
    max-width: 320px;
}

/* Panel 4: Support STRATEKKA */
.shell-panel-support {
    background: #ffffff;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.625rem;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.shell-support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f1f5f9;
}

.shell-support-header-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.shell-support-header-left h3 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
}

.shell-badge-status-green {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #065f46;
    background: #d1fae5;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
}

.shell-badge-status-green::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #10b981;
}

.shell-support-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.shell-support-main {
    flex: 1;
    min-width: 0;
}

.shell-support-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
}

.shell-support-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.shell-support-sep {
    opacity: 0.6;
}

.shell-support-actions {
    display: flex;
}

.shell-btn-ticket {
    background: #0c192c;
    color: #ffffff;
    padding: 0.5rem 0.95rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: background 0.15s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.shell-btn-ticket:hover {
    background: #1e3a8a;
    color: #ffffff;
}

.shell-support-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.25rem;
}

.shell-support-assistant-img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

/* ==========================================================================
   DYNAMIC SHELL: 09 — FOOTER
   ========================================================================== */

.shell-footer {
    background: #ffffff;
    border-top: 1px solid var(--color-border, #dce2ec);
    padding: 0.75rem 0;
    font-size: 0.76rem;
    color: #64748b;
    margin-top: auto;
    width: 100%;
}

.shell-footer-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--shell-page-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.shell-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shell-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.shell-footer-sep {
    color: #cbd5e1;
}

.shell-footer-brand {
    font-weight: 600;
    color: #334155;
}

/* Sub-views inside shell container */
.shell-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shell-btn-link {
    background: transparent;
    border: none;
    color: var(--color-secondary, #0284c7);
    cursor: pointer;
    padding: 0;
    font-size: 0.82rem;
    text-decoration: underline;
}

.shell-notif-full-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.shell-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--color-border, #dce2ec);
    border-radius: 0.375rem;
}

.shell-notif-text {
    flex: 1;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --shell-page-gutter: 1.25rem;
    }

    .shell-workspace {
        flex-direction: row;
        gap: 1rem;
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .shell-modular-col {
        flex: 1 1 58%;
        min-width: 0;
    }

    .shell-resizer-col {
        display: none !important;
    }

    .shell-sidebar-col {
        flex: 0 0 clamp(280px, 38%, 360px);
        min-width: 280px;
        max-width: 360px;
    }

    .shell-panel {
        height: auto;
        min-height: 0;
        max-height: none;
    }
}

@media (max-width: 768px) {
    :root {
        --shell-page-gutter: 1rem;
    }

    .shell-header {
        height: auto;
    }

    .shell-header-inner {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        flex-wrap: wrap;
    }

    .shell-nav {
        order: 3;
        width: 100%;
        margin: 0.5rem 0 0;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        white-space: nowrap;
    }

    .shell-workspace {
        flex-direction: column;
        gap: 1.25rem;
        padding-top: 0.75rem;
        padding-bottom: 1.5rem;
    }

    .shell-modular-col {
        width: 100% !important;
        flex-basis: auto !important;
        min-width: 0;
    }

    .shell-resizer-col {
        display: none !important;
    }

    .shell-sidebar-col {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin-top: 0;
    }

    .shell-panel {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .shell-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .shell-hero-logo-card {
        width: 100px;
        height: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    .cards, .form-grid {
        grid-template-columns: 1fr;
    }
}
