/* ═══════════════════════════════════════════════════════════════
   GBC AIR OPS — GLOBAL SIDEBAR STYLES
   Single source of truth. Loaded by gbc_sidebar.js.
   DO NOT duplicate these styles in individual page <style> blocks.
   All selectors are scoped under #gbc-global-sidebar to prevent
   page-specific CSS from altering sidebar appearance.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shell layout (every page must use this) ── */
.gbc-app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.gbc-main-content {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

/* ── Sidebar container ── */
#gbc-global-sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Brand block ── */
#gbc-global-sidebar .gbs-brand {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

#gbc-global-sidebar .gbs-brand-tag {
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #38bdf8;
    font-weight: 600;
}

#gbc-global-sidebar .gbs-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 4px;
    letter-spacing: -.01em;
}

#gbc-global-sidebar .gbs-brand-sub {
    font-size: 11px;
    color: #475569;
    margin-top: 2px;
}

#gbc-global-sidebar .gbs-brand-pills {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#gbc-global-sidebar .gbs-pill {
    font-size: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

#gbc-global-sidebar .gbs-pill-blue {
    background: rgba(56,189,248,.12);
    color: #38bdf8;
    border: 1px solid rgba(56,189,248,.25);
}

#gbc-global-sidebar .gbs-pill-green {
    background: rgba(74,222,128,.12);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.25);
}

/* ── Navigation groups ── */
#gbc-global-sidebar .gbs-nav-group {
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #334155;
    padding: 10px 8px 4px;
    font-weight: 600;
    margin-top: 4px;
}

/* ── Navigation buttons ── */
#gbc-global-sidebar .gbs-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: none;
    color: #94a3b8;
    padding: 9px 10px;
    border-radius: 8px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    border-left: 2px solid transparent;
    box-sizing: border-box;
    line-height: 1.3;
}

#gbc-global-sidebar .gbs-nav-btn:hover {
    background: rgba(255,255,255,.05);
    color: #cbd5e1;
}

#gbc-global-sidebar .gbs-nav-btn.active {
    background: rgba(56,189,248,.1);
    color: #38bdf8;
    border-left-color: #38bdf8;
    font-weight: 600;
}

#gbc-global-sidebar .gbs-nav-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Badges ── */
#gbc-global-sidebar .gbs-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    color: #fff;
    background: #ef4444;
}

#gbc-global-sidebar .gbs-badge-amber {
    background: #f59e0b;
    color: #0f172a;
}

/* ── Disabled / future items ── */
#gbc-global-sidebar .gbs-nav-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ── Dev tools separator ── */
#gbc-global-sidebar .gbs-dev-section {
    margin-top: 16px;
    border-top: 1px solid #3f1515;
    padding-top: 12px;
}

#gbc-global-sidebar .gbs-dev-label {
    font-size: 9px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #6b2222;
    margin-bottom: 8px;
    padding-left: 4px;
}

#gbc-global-sidebar .gbs-dev-btn {
    width: 100%;
    border-radius: 8px;
    padding: 9px 14px;
    text-align: left;
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.07);
    color: #f87171;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}

#gbc-global-sidebar .gbs-dev-btn:hover {
    background: rgba(239,68,68,.15);
    border-color: rgba(239,68,68,.6);
}

/* ── Footer / user block ── */
#gbc-global-sidebar .gbs-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #1e293b;
}

#gbc-global-sidebar .gbs-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

#gbc-global-sidebar .gbs-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

#gbc-global-sidebar .gbs-user-name {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

#gbc-global-sidebar .gbs-user-role {
    font-size: 11px;
    color: #475569;
}

/* ── Scrollbar inside sidebar ── */
#gbc-global-sidebar::-webkit-scrollbar {
    width: 4px;
}
#gbc-global-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#gbc-global-sidebar::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   OCC SIDEBAR REFINEMENT — GBC AIR OPS
   Matches Leon-style operational seriousness.
   Square corners, dense nav, rectangular chips.
   ═══════════════════════════════════════════════════════════════ */

/* Brand block: sharp, no shadow */
#gbc-global-sidebar .gbs-brand {
    border-radius: 4px;
    box-shadow: none;
    padding: 11px 12px;
    margin-bottom: 14px;
}

#gbc-global-sidebar .gbs-brand-name  { font-size: 16px; }
#gbc-global-sidebar .gbs-brand-tag   { letter-spacing: .14em; }

/* Pills: rectangular OCC chips */
#gbc-global-sidebar .gbs-pill        { border-radius: 3px; }

/* Nav buttons: tighter */
#gbc-global-sidebar .gbs-nav-btn {
    padding: 7px 10px;
    font-size: 12.5px;
}

/* Badges: rectangular */
#gbc-global-sidebar .gbs-badge       { border-radius: 3px; }

/* Nav group labels: tighter tracking */
#gbc-global-sidebar .gbs-nav-group   { letter-spacing: .13em; padding: 8px 8px 3px; }

/* Footer: tighter */
#gbc-global-sidebar .gbs-footer      { padding-top: 10px; }
#gbc-global-sidebar .gbs-user        { padding: 6px 8px; }

/* Dev section: tighter */
#gbc-global-sidebar .gbs-dev-btn     { border-radius: 4px; }

/* ── END OCC SIDEBAR REFINEMENT ── */

/* ═══════════════════════════════════════════════════════════════
   GBC AIR OPS — GLOBAL DESIGN TOKENS
   Loaded first; Design System v2 blocks in each HTML override
   individual values. These establish the shared baseline.
   ═══════════════════════════════════════════════════════════════ */

/* Base typography normalisation (applies to all pages) */
html   { font-size: 13px; }
body   {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Global table reset */
table  { border-collapse: collapse; width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* Scrollbar: consistent thin dark style across all modules */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ── END GLOBAL DESIGN TOKENS ── */

/* ═══════════════════════════════════════════════════════════════
   GBC AIR OPS — SHARED OCC COMPONENT LIBRARY
   Reusable layout primitives for all modules.
   These are BASE definitions; module-specific overrides win.
   ═══════════════════════════════════════════════════════════════ */

/* ── ops-section-header ── */
.ops-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.ops-section-header .osh-left    { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ops-section-header .osh-eyebrow { font-size:9px; font-weight:700; letter-spacing:.18em; text-transform:uppercase; color:#475569; }
.ops-section-header .osh-title   { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#e2e8f0; }
.ops-section-header .osh-sub     { font-size:11px; color:#64748b; }
.ops-section-header .osh-right   { display:flex; align-items:center; gap:8px; flex-shrink:0; }

/* ── ops-toolbar ── */
.ops-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.ops-toolbar-sep    { width:1px; height:16px; background:#1e293b; flex-shrink:0; }
.ops-toolbar-spacer { flex:1; min-width:0; }

/* ── ops-panel ── */
.ops-panel {
    border: 1px solid #1e293b;
    border-radius: 8px;
    background: #0a1628;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ops-panel .ops-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.ops-panel .ops-panel-head .oph-title { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#cbd5e1; }
.ops-panel .ops-panel-head .oph-sub   { font-size:10.5px; color:#475569; margin-top:1px; }
.ops-panel .ops-panel-body            { flex:1; overflow-y:auto; padding:10px 14px; display:flex; flex-direction:column; gap:8px; }

/* ── ops-side-panel ── */
.ops-side-panel {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ops-side-panel .osp-section     { border-bottom:1px solid #1e293b; flex-shrink:0; }
.ops-side-panel .osp-section:last-child { border-bottom:none; }
.ops-side-panel .osp-head        { padding:8px 12px; font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.10em; color:#475569; background:#0a1628; border-bottom:1px solid #1e293b; }
.ops-side-panel .osp-body        { padding:8px 10px; display:flex; flex-direction:column; gap:4px; overflow-y:auto; }

/* ── ops-table ── */
.ops-table { width:100%; border-collapse:collapse; }
.ops-table thead th {
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}
.ops-table tbody tr   { border-bottom:1px solid rgba(30,41,59,.9); transition:background .1s; }
.ops-table tbody tr:hover { background:rgba(30,41,59,.5); }
.ops-table tbody td   { padding:7px 10px; font-size:12.5px; vertical-align:middle; color:#cbd5e1; }
/* Left-stripe severity helpers (any element) */
.ops-row-nogo { border-left:3px solid #ef4444 !important; }
.ops-row-crit { border-left:3px solid #f97316 !important; }
.ops-row-warn { border-left:3px solid #eab308 !important; }
.ops-row-ok   { border-left:3px solid #22c55e !important; }
.ops-row-info { border-left:3px solid #38bdf8 !important; }
.ops-row-dim  { opacity:.42 !important; }

/* ── ops-badge ── */
.ops-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-radius: 3px;
    border: 1px solid;
    padding: 2px 7px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ops-badge-nogo    { background:rgba(239,68,68,.15);  border-color:rgba(239,68,68,.4);  color:#fca5a5; }
.ops-badge-crit    { background:rgba(249,115,22,.15); border-color:rgba(249,115,22,.4); color:#fdba74; }
.ops-badge-warn    { background:rgba(234,179,8,.15);  border-color:rgba(234,179,8,.4);  color:#fde047; }
.ops-badge-ok      { background:rgba(34,197,94,.12);  border-color:rgba(34,197,94,.35); color:#4ade80; }
.ops-badge-info    { background:rgba(14,165,233,.12); border-color:rgba(14,165,233,.35);color:#7dd3fc; }
.ops-badge-neutral { background:#1e293b; border-color:#334155; color:#94a3b8; }
.ops-badge-dim     { background:transparent; border-color:#1e293b; color:#475569; }

/* ── ops-row-item ─ compact list row ── */
.ops-row-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(30,41,59,.7);
    font-size: 12px;
    transition: background .1s;
}
.ops-row-item:hover            { background:rgba(30,41,59,.45); }
.ops-row-item:last-child       { border-bottom:none; }
.ops-row-item .ori-sev         { width:3px; min-height:20px; align-self:stretch; border-radius:2px; flex-shrink:0; }
.ops-row-item .ori-body        { flex:1; min-width:0; }
.ops-row-item .ori-id          { font-size:11px; font-weight:700; color:#e2e8f0; font-variant-numeric:tabular-nums; }
.ops-row-item .ori-desc        { font-size:11.5px; color:#94a3b8; line-height:1.35; margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ops-row-item .ori-meta        { font-size:10px; color:#475569; margin-top:2px; }
.ops-row-item .ori-actions     { display:flex; gap:4px; flex-shrink:0; }

/* ── Phase 3-25: Alert Badge Pulse Animation ────────────────────────── */
@keyframes gbc-bus-pulse-anim {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    40%  { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
#occ-alert-badge.gbc-bus-pulse {
    animation: gbc-bus-pulse-anim 0.9s ease-out;
}

/* ── END SHARED OCC COMPONENT LIBRARY ── */
