:root {
    --bg-dark: #070b14;
    --bg-surface: #0e1526;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-card-hover: rgba(26, 38, 64, 0.95);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.4);

    --primary-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sub: #cbd5e1;

    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.command-suite-body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.1) 0%, transparent 45%);
}

/* Navbar */
.suite-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: rgba(14, 21, 38, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.suite-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    overflow: hidden;
    padding: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-pro {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.brand-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.suite-telemetry-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.btn-history-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-history-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-indigo);
}

/* Workspace */
.suite-workspace {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

/* Command Search Card */
.command-search-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 32px;
}

.search-card-header h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-card-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.command-search-form {
    display: flex;
    gap: 14px;
}

.input-glow-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 18px;
}

.input-glow-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.input-glow-wrapper input:focus {
    border-color: var(--primary-indigo);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.btn-command-launch {
    background: linear-gradient(135deg, var(--primary-indigo), #4338ca);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px 28px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    white-space: nowrap;
}

.btn-command-launch:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.7);
    transform: translateY(-2px);
}

.chip-cloud-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.chip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    margin-right: 4px;
}

.chip-title i {
    font-size: 14px;
}


.chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-indigo);
    color: #fff;
}

/* Loader */
.suite-loader-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(11, 17, 32, 0.95));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

.radar-scan-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-indigo);
    animation: radarPulse 2.4s ease-out infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-color: var(--accent-cyan);
    animation-delay: 0s;
}

.ring-2 {
    width: 60%;
    height: 60%;
    border-color: var(--primary-indigo);
    animation-delay: 0.8s;
}

@keyframes radarPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.radar-center-icon {
    font-size: 28px;
    position: relative;
    z-index: 2;
    animation: spinIcon 8s linear infinite;
}

@keyframes spinIcon {
    to { transform: rotate(360deg); }
}

.scan-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.live-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulseDot 1.5s infinite;
}

.loader-text-group h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.loader-text-group p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.loader-stepper-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}

.stepper-node {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.35;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-muted);
}

.node-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.stepper-node.active {
    opacity: 1;
    color: #fff;
    font-weight: 700;
}

.stepper-node.active .node-icon {
    background: var(--primary-indigo);
    border-color: var(--primary-indigo);
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.stepper-line {
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
}


/* Report Canvas */
.suite-report-canvas {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Banner */
.master-header-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-pill-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.pill-indigo {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary-indigo);
    color: #a5b4fc;
    font-weight: 700;
}

.pill-emerald {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
    font-weight: 700;
}

.company-hero-name {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
}

.company-hero-tagline {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 4px;
}

.header-export-actions {
    display: flex;
    gap: 12px;
}

.btn-export {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-export:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-indigo);
}

/* Master KPI Summary Bar */
.master-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kpi-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;

    /* Ensure card heights align perfectly */
    min-height: 100px;
}

.widget-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.widget-indigo .widget-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary-indigo); }
.widget-cyan .widget-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.widget-emerald .widget-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.widget-amber .widget-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.widget-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.widget-val {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
}

/* Executive Document Paper (Continuous Unified Sections) */
.executive-paper-document {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.paper-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.section-badge-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-badge-title h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

/* 2x2 Grid Layout for All Cards */
.card-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.paper-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.paper-card h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.paper-card-text {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.paper-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.paper-list li {
    font-size: 14px;
    color: var(--text-sub);
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}

.paper-list li::before {
    content: "•";
    color: var(--accent-cyan);
    font-size: 20px;
    position: absolute;
    left: 4px;
    top: -3px;
}

/* Executive Briefing CEO Proposal */
.pitch-executive-briefing {
    background: linear-gradient(180deg, rgba(17, 24, 44, 0.95), rgba(11, 17, 32, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.1);
}

.briefing-header {
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 20px;
    margin-bottom: 28px;
}

.briefing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid var(--accent-amber);
    color: var(--accent-amber);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.briefing-header h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
}

.briefing-target {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.briefing-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.briefing-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: all 0.2s ease;
}

.card-indigo-glow { border-top: 3px solid var(--primary-indigo); }
.card-cyan-glow { border-top: 3px solid var(--accent-cyan); }

.briefing-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.briefing-card-content h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin-bottom: 8px;
}

.briefing-text {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.briefing-roadmap-wrapper {
    margin-bottom: 28px;
}

.briefing-roadmap-wrapper h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.roadmap-timeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.roadmap-phase-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-emerald);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phase-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-emerald);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sub);
    line-height: 1.4;
}

.briefing-cta-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(244, 63, 94, 0.12));
    border: 1px solid var(--accent-amber);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.cta-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cta-content h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--accent-amber);
}

.cta-text-body {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* History Modal */
.history-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 620px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-indigo);
}

.hidden { display: none !important; }

.text-indigo { color: var(--primary-indigo); }
.text-cyan { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-emerald); }
.text-amber { color: var(--accent-amber); }
.text-rose { color: var(--accent-rose); }
