/* ========================================
   Dashboard Command Center Layout
   ======================================== */

/* ── Body override for dashboard ── */
body.dashboard-command-center {
    background: var(--gs-surface-1, var(--dark-surface-deep));
    overflow-x: hidden;
}

body.dashboard-command-center .hero-banner-section {
    display: none !important;
}

body.dashboard-command-center .nav-bar {
    display: none !important;
}

/* ── Command Bar (top header) ── */
.cc-command-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 20px;
    background: linear-gradient(180deg, var(--purple-7c-a3), transparent),
                var(--gs-surface-2, var(--dark-surface-1e1e32-a95));
    border-bottom: 1px solid var(--gs-card-border, var(--dark-border-color));
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    flex-shrink: 0;
}

body.dashboard-command-center.has-nav-rail .cc-command-bar {
    top: var(--header-height, 48px);
}

.cc-command-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple-7c-a40) 30%, var(--purple-card-hover) 50%, var(--purple-7c-a40) 70%, transparent);
}

.cc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.cc-logo img {
    width: var(--logo-cc);
    height: var(--logo-cc);
    object-fit: contain;
}

.cc-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--gs-text-primary, var(--dark-text-primary));
    letter-spacing: -0.3px;
}

.cc-org-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--dark-surface-card);
    border: 1px solid var(--gs-card-border);
    border-radius: 8px;
    flex-shrink: 1;
    min-width: 0;
}

.cc-org-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gs-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.cc-org-code {
    font-size: 11px;
    font-weight: 500;
    color: var(--purple-7c-a80);
    background: var(--purple-7c-a10);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.cc-org-scope {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.cc-scope-locked { background: var(--semantic-success-light); color: var(--semantic-success); }
.cc-scope-open { background: var(--semantic-warning-light); color: var(--semantic-warning); }
.cc-scope-demo { background: var(--semantic-neutral-light); color: var(--scaffold-gray-mid); }

.cc-spacer { flex: 1; }

.cc-search-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--dark-surface-card);
    border: 1px solid var(--gs-card-border);
    border-radius: 8px;
    color: var(--gs-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.cc-search-trigger:hover {
    background: var(--dark-border-color);
    border-color: var(--purple-btn-hover);
    color: var(--gs-text-secondary);
}

.cc-search-trigger kbd {
    font-size: 10px;
    padding: 1px 4px;
    border: 1px solid var(--dark-border-hover);
    border-radius: 3px;
    color: var(--gs-text-muted);
    font-family: inherit;
}

.cc-credits-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--dark-surface-card);
    border: 1px solid var(--gs-card-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--gs-text-secondary);
    white-space: nowrap;
    cursor: default;
}

.cc-credits-pill .cc-credits-value {
    font-weight: 700;
    color: var(--pd-accent-light, var(--rail-accent-muted));
}

.cc-user-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--dark-surface-card);
    border: 1px solid var(--gs-card-border);
    border-radius: 8px;
    color: var(--gs-text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.cc-user-menu:hover {
    background: var(--dark-border-color);
    border-color: var(--purple-btn-hover);
    color: var(--gs-text-primary);
    text-decoration: none;
}

.cc-help-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-surface-card);
    border: 1px solid var(--gs-card-border);
    border-radius: 6px;
    color: var(--gs-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.cc-help-btn:hover {
    background: var(--purple-7c-a15);
    border-color: var(--purple-btn-hover);
    color: var(--gs-text-primary);
}

/* ── Dashboard Shell (sidebar + main) ── */
.cc-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* ── Sidebar ── */
.cc-sidebar {
    width: 56px;
    background: var(--gs-surface-1, var(--dark-surface-deep));
    border-right: 1px solid var(--gs-card-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-nav);
}

.cc-sidebar:hover,
.cc-sidebar.pinned {
    width: 220px;
}

.cc-sidebar::-webkit-scrollbar { width: 0; }

.cc-sidebar-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--dark-surface-card);
}

.cc-sidebar-section:last-child {
    border-bottom: none;
    margin-top: auto;
}

.cc-sidebar-label {
    font-size: var(--label-size);
    font-weight: var(--label-weight);
    text-transform: uppercase;
    letter-spacing: var(--label-spacing);
    color: var(--gs-text-muted);
    padding: 8px 16px 4px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.cc-sidebar:hover .cc-sidebar-label,
.cc-sidebar.pinned .cc-sidebar-label {
    opacity: 1;
}

.cc-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: var(--gs-text-muted);
    text-decoration: none;
    font-size: var(--data-size);
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-base);
    position: relative;
    border-radius: 0;
}

.cc-sidebar-item:hover {
    color: var(--gs-text-primary);
    background: var(--dark-surface-card);
    text-decoration: none;
}

.cc-sidebar-item.active {
    color: var(--gs-text-primary);
    background: var(--purple-7c-a10);
}

.cc-sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--rail-accent);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--purple-7c-a40);
}

.cc-sidebar-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.cc-sidebar-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.cc-sidebar-text {
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.cc-sidebar:hover .cc-sidebar-text,
.cc-sidebar.pinned .cc-sidebar-text {
    opacity: 1;
}

.cc-sidebar-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 8px auto;
    background: none;
    border: 1px solid var(--dark-border-color);
    border-radius: 6px;
    color: var(--gs-text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-base);
    opacity: 0;
    flex-shrink: 0;
}

.cc-sidebar:hover .cc-sidebar-pin,
.cc-sidebar.pinned .cc-sidebar-pin {
    opacity: 1;
}

.cc-sidebar-pin:hover {
    background: var(--purple-7c-a15);
    border-color: var(--purple-btn-hover);
    color: var(--rail-accent-muted);
}

.cc-sidebar.pinned .cc-sidebar-pin {
    background: var(--purple-btn-bg);
    border-color: var(--purple-7c-a40);
    color: var(--accent-purple-hover);
}

/* ── Main Content Area ── */
.cc-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 40px;
    overflow-y: auto;
}

/* ── Status Bar (Row 1) ── */
.cc-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-card-border);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cc-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gs-text-secondary);
    white-space: nowrap;
}

.cc-status-item strong {
    color: var(--gs-text-primary);
    font-weight: 700;
}

.cc-status-item.attention strong {
    color: var(--semantic-warning);
}

.cc-status-item.active strong {
    color: var(--semantic-success);
}

.cc-status-divider {
    width: 1px;
    height: 20px;
    background: var(--gs-card-border);
    flex-shrink: 0;
}

.cc-status-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.cc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--purple-7c-a15);
    border: 1px solid var(--purple-btn-hover);
    border-radius: 6px;
    color: var(--rail-accent-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.cc-action-btn:hover {
    background: var(--purple-card-bg);
    border-color: var(--purple-7c-a50);
    color: var(--accent-purple-hover);
    text-decoration: none;
}

/* ── Panel Grid ── */
.cc-panel-row {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.cc-panel-row.primary {
    grid-template-columns: repeat(3, 1fr);
}

.cc-panel-row.secondary {
    grid-template-columns: repeat(2, 1fr);
}

.cc-panel-row.full {
    grid-template-columns: 1fr;
}

/* ── Panel Card ── */
.cc-panel {
    background: var(--gs-surface-2);
    border: 1px solid var(--gs-card-border);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
}

.cc-panel:hover {
    border-color: var(--gs-card-border-hover, var(--purple-a7-a30));
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--black-a20);
}

.cc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--dark-surface-card);
}

.cc-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gs-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-panel-title-icon {
    font-size: 14px;
    opacity: 0.7;
}

.cc-panel-action {
    font-size: 11px;
    color: var(--rail-accent-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.cc-panel-action:hover {
    color: var(--accent-purple-hover);
    text-decoration: none;
}

.cc-panel-body {
    padding: 14px 16px 16px;
}

/* ── Pipeline Health Panel ── */
.cc-pipeline-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.cc-pipe-stat {
    background: var(--gs-surface-3, var(--dark-surface-2d2d46-a95));
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.cc-pipe-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gs-text-primary);
    line-height: 1.2;
}

.cc-pipe-stat-label {
    font-size: 10px;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.cc-pipe-stat-value.success { color: var(--accent-green-dark); }
.cc-pipe-stat-value.danger { color: var(--semantic-danger); }
.cc-pipe-stat-value.active { color: var(--semantic-info); }
.cc-pipe-stat-value.warning { color: var(--semantic-warning); }

.cc-sparkline-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 0;
}

.cc-sparkline-label {
    font-size: 10px;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ── Compliance Score Panel ── */
.cc-score-ring-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cc-score-ring {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cc-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cc-score-ring .ring-bg {
    fill: none;
    stroke: var(--dark-surface-tint);
    stroke-width: 6;
}

.cc-score-ring .ring-fill {
    fill: none;
    stroke: var(--rail-accent-muted);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.cc-score-ring .ring-text {
    fill: var(--gs-text-primary);
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    transform: rotate(90deg);
    transform-origin: 50% 50%;
}

.cc-score-details {
    flex: 1;
    min-width: 0;
}

.cc-score-label {
    font-size: 11px;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.cc-score-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gs-text-primary);
    line-height: 1;
}

.cc-score-trend {
    font-size: 12px;
    margin-top: 4px;
}

.cc-score-trend.up { color: var(--accent-green-dark); }
.cc-score-trend.down { color: var(--semantic-danger); }
.cc-score-trend.flat { color: var(--gs-text-muted); }

.cc-compliance-gaps {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-gap-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gs-text-secondary);
    padding: 4px 8px;
    background: var(--dark-surface-subtle);
    border-radius: 6px;
}

.cc-gap-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cc-gap-item .dot.amber { background: var(--semantic-warning); }
.cc-gap-item .dot.red { background: var(--semantic-danger); }
.cc-gap-item .dot.blue { background: var(--semantic-info); }

/* ── AI Operations Briefing Panel ── */
.cc-briefing-summary {
    font-size: 13px;
    color: var(--gs-text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.cc-briefing-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.cc-briefing-metric {
    background: var(--gs-surface-3);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}

.cc-briefing-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gs-text-primary);
    line-height: 1.2;
}

.cc-briefing-metric-label {
    font-size: 10px;
    color: var(--gs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.cc-briefing-metric-value.green { color: var(--accent-green-dark); }
.cc-briefing-metric-value.amber { color: var(--semantic-warning); }
.cc-briefing-metric-value.red { color: var(--semantic-danger); }

.cc-briefing-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--purple-7c-a12);
    border: 1px solid var(--purple-card-bg);
    border-radius: 8px;
    color: var(--rail-accent-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.cc-briefing-action:hover {
    background: var(--purple-btn-bg);
    border-color: var(--purple-7c-a40);
    color: var(--accent-purple-hover);
    text-decoration: none;
}

/* ── Recent Activity Feed Panel ── */
.cc-activity-feed {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cc-activity-feed::-webkit-scrollbar { width: 4px; }
.cc-activity-feed::-webkit-scrollbar-thumb { background: var(--dark-surface-highlight); border-radius: 2px; }

.cc-activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background var(--transition-base);
}

.cc-activity-item:hover {
    background: var(--dark-surface-subtle);
}

.cc-activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.cc-activity-icon.completed { background: var(--green-bg-subtle); color: var(--accent-green-dark); }
.cc-activity-icon.failed { background: var(--red-bg-subtle); color: var(--semantic-danger); }
.cc-activity-icon.running { background: var(--blue-bg-subtle); color: var(--semantic-info); }
.cc-activity-icon.batch { background: var(--pathway-indigo-bg); color: var(--pathway-indigo); }

.cc-activity-text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--gs-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-activity-text strong {
    color: var(--gs-text-primary);
    font-weight: 600;
}

.cc-activity-time {
    font-size: 11px;
    color: var(--gs-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.cc-activity-link {
    font-size: 11px;
    color: var(--rail-accent-muted);
    text-decoration: none;
    flex-shrink: 0;
}

.cc-activity-link:hover {
    color: var(--accent-purple-hover);
    text-decoration: none;
}

.cc-empty-state {
    text-align: center;
    padding: 24px 16px;
    color: var(--gs-text-muted);
    font-size: 13px;
}

.cc-empty-state-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* ── Batches Panel ── */
.cc-batches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

/* ── Runs Table Panel ── */
.cc-panel.runs-panel-cc {
    overflow: visible;
}

.cc-panel.runs-panel-cc .cc-panel-body {
    padding: 0 16px 16px;
}

/* Override the old full-width hack */
body.dashboard-command-center .glass-panel.runs-panel,
body.dashboard-command-center #recent-batches-card,
body.dashboard-command-center #analytics-summary-card,
body.dashboard-command-center #getting-started-grid,
body.dashboard-command-center #ai-briefing-card {
    width: 100% !important;
    margin-left: 0 !important;
    max-width: none;
}

body.dashboard-command-center .glass-panel.runs-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

body.dashboard-command-center #recent-batches-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

body.dashboard-command-center #analytics-summary-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

body.dashboard-command-center #ai-briefing-card {
    display: none !important;
}

body.dashboard-command-center #getting-started-grid {
    background: transparent !important;
}

body.dashboard-command-center .rto-identity-badge {
    display: none !important;
}

body.dashboard-command-center .main-content,
body.dashboard-command-center main {
    padding: 0 !important;
    margin: 0 !important;
}

body.dashboard-command-center .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.dashboard-command-center main.container {
    display: flex !important;
    flex-wrap: wrap;
    min-height: calc(100vh - 56px);
}

body.dashboard-command-center footer {
    width: 100%;
}

/* Help tour button hidden — moved to command bar */
body.dashboard-command-center #dashboard-help-btn {
    display: none !important;
}

body.dashboard-command-center > div[style*="margin-bottom: 20px"] {
    display: none !important;
}

/* ── Responsive: 1400px+ ── */
@media (min-width: 1400px) {
    .cc-panel-row.primary {
        grid-template-columns: repeat(3, 1fr);
    }
    .cc-sidebar {
        width: 56px;
    }
    .cc-sidebar:hover,
    .cc-sidebar.pinned {
        width: 220px;
    }
}

/* ── Responsive: 1024-1399px ── */
@media (max-width: 1399px) {
    .cc-panel-row.primary {
        grid-template-columns: repeat(2, 1fr);
    }
    .cc-sidebar {
        width: 56px;
    }
    .cc-sidebar:hover {
        width: 200px;
    }
}

/* ── Responsive: 768-1023px (sidebar becomes top nav strip) ── */
@media (max-width: 1023px) {
    .cc-panel-row.primary,
    .cc-panel-row.secondary {
        grid-template-columns: 1fr;
    }

    .cc-sidebar {
        position: static;
        width: 100% !important;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid var(--gs-card-border);
        gap: 0;
    }

    .cc-sidebar:hover,
    .cc-sidebar.pinned {
        width: 100% !important;
    }

    .cc-sidebar-section {
        display: flex;
        flex-direction: row;
        padding: 0;
        border-bottom: none;
        border-right: 1px solid var(--dark-surface-card);
        flex-shrink: 0;
    }

    .cc-sidebar-section:last-child {
        margin-top: 0;
        border-right: none;
    }

    .cc-sidebar-label {
        display: none;
    }

    .cc-sidebar-item {
        flex-direction: column;
        gap: 2px;
        padding: 8px 12px;
    }

    .cc-sidebar-item.active::before {
        left: 4px;
        right: 4px;
        top: auto;
        bottom: 0;
        width: auto;
        height: 3px;
        border-radius: 2px 2px 0 0;
    }

    .cc-sidebar-text {
        font-size: 10px;
        opacity: 1;
    }

    .cc-sidebar:hover .cc-sidebar-text,
    .cc-sidebar.pinned .cc-sidebar-text {
        opacity: 1;
    }

    .cc-sidebar-icon {
        width: 20px;
        height: 20px;
    }

    .cc-sidebar-icon svg {
        width: 16px;
        height: 16px;
    }

    .cc-sidebar .cc-sidebar-pin {
        display: none;
    }

    body.dashboard-command-center main.container {
        flex-direction: column;
    }

    .cc-main {
        margin-left: 0;
        padding: 16px;
    }

    .cc-command-bar {
        gap: 10px;
        padding: 0 12px;
    }

    .cc-org-identity {
        display: none;
    }

    .cc-search-trigger kbd {
        display: none;
    }

    .cc-status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cc-status-divider {
        display: none;
    }

    .cc-status-actions {
        margin-left: 0;
        width: 100%;
    }

    .cc-status-actions .cc-action-btn {
        flex: 1;
        justify-content: center;
    }

    .cc-briefing-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Responsive: below 768px ── */
@media (max-width: 767px) {
    .cc-sidebar {
        display: none;
    }

    .cc-main {
        margin-left: 0;
        padding: 12px;
    }

    .cc-command-bar {
        gap: 8px;
        padding: 0 10px;
        height: 50px;
    }

    .cc-logo-text {
        display: none;
    }

    .cc-search-trigger span {
        display: none;
    }

    .cc-credits-pill {
        display: none;
    }

    .cc-panel-row.primary,
    .cc-panel-row.secondary {
        grid-template-columns: 1fr;
    }

    .cc-pipeline-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cc-briefing-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .cc-score-ring-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cc-batches-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile bottom nav */
    .cc-mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--gs-surface-1);
        border-top: 1px solid var(--gs-card-border);
        z-index: var(--z-header);
        padding: 4px 0;
        justify-content: space-around;
    }

    .cc-mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 8px;
        color: var(--gs-text-muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        transition: color var(--transition-base);
        min-width: 44px;
    }

    .cc-mobile-nav-item:hover,
    .cc-mobile-nav-item.active {
        color: var(--rail-accent-muted);
        text-decoration: none;
    }

    .cc-mobile-nav-item svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
    }

    body.dashboard-command-center {
        padding-bottom: 56px;
    }
}

@media (min-width: 768px) {
    .cc-mobile-nav {
        display: none;
    }
}

/* ── Trial/Onboarding overrides ── */
body.dashboard-command-center #trial-banner {
    border-radius: 10px !important;
    margin-bottom: 16px !important;
}

body.dashboard-command-center #onboarding-progress-card {
    border-radius: 10px !important;
    margin-bottom: 16px !important;
}

/* ── Getting Started override ── */
body.dashboard-command-center #getting-started-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

body.dashboard-command-center #getting-started-grid .semantic-card {
    background: var(--gs-surface-2) !important;
    border: 1px solid var(--gs-card-border) !important;
    border-radius: 12px !important;
    color: var(--gs-text-secondary) !important;
}

@media (max-width: 767px) {
    body.dashboard-command-center #getting-started-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Analytics card override ── */
body.dashboard-command-center .analytics-stats-grid {
    gap: 10px;
}

body.dashboard-command-center .analytics-stat-tile {
    background: var(--gs-surface-3) !important;
    border-color: var(--gs-card-border) !important;
}
