/* CSS Variables & Theme Configuration */
:root {
    --bg-base: #080b12;
    --bg-panel: rgba(15, 20, 31, 0.65);
    --bg-panel-hover: rgba(22, 29, 43, 0.8);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', system-ui, -apple-system, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #111827 0%, var(--bg-base) 70%);
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.sphere-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-indigo);
    top: -200px;
    left: -100px;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    bottom: -200px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 20px);
    }
}

/* System Context Bar */
.system-context-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: rgba(8, 11, 18, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 100;
}

.context-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.context-divider {
    margin: 0 12px;
    opacity: 0.5;
}

.context-systems {
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1600px;
    min-width: 1400px;
    margin: 0 auto;
    padding: 44px 16px 16px 16px;
    gap: 16px;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    height: 72px;
    flex-shrink: 0;
}

.header-titles {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid var(--accent-indigo);
    color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.title-group {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

.header-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Branding */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid var(--border-subtle);
    transition: opacity 0.3s;
}

.brand-container.muted-brand {
    opacity: 0.4;
    transform: scale(0.95);
    transform-origin: right center;
}

.powered-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.brand-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 8px 12px;
}

.btn-xl {
    padding: 16px 32px;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
    width: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: white;
    width: 100%;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary.rerun-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Main Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 280px minmax(500px, 1fr) 500px;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-header h3 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
}

.panel-inner-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-inner-flex {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

/* Forms */
.section-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.input-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    resize: none;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.input-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--accent-blue);
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.input-select option {
    background: var(--bg-base);
    color: var(--text-primary);
}

.agent-directive-format {
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.6;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.05);
}

.prompt-input-wrapper {
    position: relative;
    border-radius: var(--radius-sm);
}

.prompt-glow {
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    z-index: -1;
    opacity: 1;
    filter: blur(4px);
    transition: opacity 0.3s;
    animation: pulseGlow 4s infinite alternate;
}

.muted-directive {
    opacity: 0.4;
    pointer-events: none;
    transition: all 0.5s ease;
}

.muted-directive .prompt-glow {
    opacity: 0;
    animation: none;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.7;
    }
}

/* Artifacts */
.artifacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artifact-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.artifact-scan-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.2), transparent);
    transform: skewX(-20deg);
}

.artifact-chip.scanning .artifact-scan-effect {
    animation: scanPulse 1.5s infinite;
}

@keyframes scanPulse {
    100% {
        left: 200%;
    }
}

.artifact-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.pdf-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.csv-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.artifact-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.data-sources-indicator {
    margin-top: 12px;
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-sources-indicator .source-label {
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-right: 4px;
}

/* Timeline */
.timeline-wrapper {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 24px;
    width: 1px;
    background: var(--border-subtle);
}

.timeline-step {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    opacity: 0.6;
    filter: grayscale(1);
    transition: all 0.4s ease;
}

.timeline-step.active,
.timeline-step.completed {
    opacity: 1;
    filter: grayscale(0);
}

.timeline-step.completed .step-indicator {
    background: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.timeline-step.completed .step-indicator svg {
    opacity: 1;
}

.timeline-step.active .step-indicator {
    background: var(--bg-base);
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px 2px rgba(59, 130, 246, 0.6);
    animation: throbGlow 1.5s infinite;
}

.step-indicator {
    position: absolute;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-highlight);
    border: 1px solid var(--border-subtle);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.step-indicator svg {
    color: var(--bg-base);
    opacity: 0;
    width: 6px;
    height: 6px;
}

.step-text {
    margin-left: 24px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.timeline-step.active .step-text {
    color: var(--text-primary);
    font-weight: 500;
}

.timeline-step.completed .step-text {
    color: var(--text-primary);
}

/* Run Area & Mode Toggles */
.action-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.mode-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
}

.toggle-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
}

.toggle-switch input[type="radio"] {
    display: none;
}

.toggle-switch label {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.toggle-switch input[type="radio"]:checked+label {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

/* Execution Logs */
.execution-logs {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.log-pulse {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: throb 1.5s infinite;
}

@keyframes throb {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.log-content {
    padding: 16px;
    list-style: none;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.log-item {
    font-family: monospace;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    animation: logGlowIn 0.8s ease-out forwards;
    transform: translateY(10px);
    opacity: 0;
}

@keyframes logGlowIn {
    0% {
        transform: translateY(10px);
        opacity: 0;
        text-shadow: 0 0 10px var(--accent-blue);
        color: var(--text-primary);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 20px var(--accent-blue);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
        text-shadow: none;
        color: var(--text-secondary);
    }
}

.log-item.highlight {
    color: var(--accent-blue);
    font-weight: 500;
}

.log-item.summary {
    color: var(--accent-amber);
    font-weight: 500;
    margin-top: 4px;
    padding-left: 12px;
    border-left: 2px solid var(--accent-amber);
}

.log-item::before {
    content: '>';
    margin-right: 8px;
    color: var(--text-muted);
}

/* Right Panel System Header */
.right-panel {
    display: flex;
    flex-direction: column;
}

.active-analysis-header {
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 8px 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

#active-domain-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tabs */
.tabbed-header {
    padding: 0;
}

.tabs {
    display: flex;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    /* Increased from muted for better baseline visibility */
    padding: 16px 0;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #60a5fa;
    /* Brighter blue for punchier active state */
    border-bottom: 2px solid #60a5fa;
    background: linear-gradient(to top, rgba(59, 130, 246, 0.15), transparent);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

#gov-tab-btn {
    color: var(--accent-amber);
    opacity: 0.9;
    border-bottom-color: transparent;
    position: relative;
}

#gov-tab-btn.active {
    color: var(--accent-amber);
    border-bottom-color: var(--accent-amber);
    background: linear-gradient(to top, rgba(245, 158, 11, 0.15), transparent);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

#gov-tab-btn:not(.active):hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.05);
}

.tab-content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
}

/* Placeholder */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
}

.empty-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.intentional-placeholder .empty-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text-primary);
    margin: 8px 0;
}

.intentional-placeholder .empty-desc {
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.intentional-placeholder strong {
    color: var(--text-primary);
    font-weight: 500;
}

.tab-pane {
    height: 100%;
    animation: fadeIn 0.4s ease forwards;
}

/* Tab Content Structuring (Citations, Tables, Memo) */
.structured-content h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 6px;
}

.structured-content ul {
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.structured-content li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.structured-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

/* Citations */
.citation {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.8125rem;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.6875rem;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    vertical-align: top;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges for severity */
.badge-sev,
.badge-owner,
.badge-esc {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
}

.badge-sev.high {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.badge-sev.med {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge-sev.low {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.badge-owner {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.layer-box {
    margin-bottom: 24px;
}

.layer-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.b-det {
    background: rgba(59, 130, 246, 0.15);
    border-left: 2px solid #3b82f6;
    color: #93c5fd;
}

.b-int {
    background: rgba(139, 92, 246, 0.15);
    border-left: 2px solid #8b5cf6;
    color: #c4b5fd;
}

.b-agt {
    background: rgba(245, 158, 11, 0.15);
    border-left: 2px solid #f59e0b;
    color: #fcd34d;
}

.b-hum {
    background: rgba(16, 185, 129, 0.15);
    border-left: 2px solid #10b981;
    color: #6ee7b7;
}

/* Agentic Exception Brief Layout */
.agentic-brief-container {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 8px;
}

.agentic-finding {
    margin-bottom: 12px;
}

.agentic-finding-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.agentic-finding-text {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.agentic-exposure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.agentic-resolutions-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.agentic-resolutions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding-left: 0;
}

.agentic-resolutions-list li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    list-style: none;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    margin-bottom: 0;
}

.agentic-resolutions-list li::before {
    display: none;
}

.agent-boundary-line {
    border-left: 2px solid var(--accent-amber);
    padding-left: 12px;
    margin-top: 16px;
}

.agent-boundary-title {
    font-size: 0.75rem;
    color: var(--accent-amber);
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-boundary-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-amber);
    border-radius: 50%;
}

.agent-boundary-list {
    margin: 0;
    padding-left: 0;
}

.agent-boundary-list li {
    font-size: 0.75rem;
    color: var(--text-muted);
    list-style: none;
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
    line-height: 1.4;
}

.agent-boundary-list li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: var(--accent-red);
    font-size: 0.7rem;
    font-weight: bold;
}

/* Inline Eval Question Note */
.inline-eval-note {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--accent-amber);
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.inline-eval-note strong {
    color: #fcd34d;
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

/* Memo Format */
.memo-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.memo-section:last-child {
    border-bottom: none;
}

.memo-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.memo-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* CFO Footer */
.cfo-footer-note {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--accent-red);
    padding: 12px 16px;
    margin-top: 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cfo-footer-note strong {
    color: #fca5a5;
    font-size: 0.8125rem;
}

/* Decision Signal */
.decision-signal-container {
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    background: rgba(5, 7, 12, 0.95);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 auto;
    max-height: 35%;
    overflow: hidden;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.signal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.signal-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.signal-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.signal-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-indigo);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-indigo);
    animation: throb 2s infinite;
}

.signal-metrics {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.metric-box {
    flex: 1;
    padding: 10px 12px;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-box:last-child {
    border-right: none;
}

.metric-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.metric-value-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.metric-dot.high {
    background: var(--accent-green);
    box-shadow: 0 0 5px var(--accent-green);
}

.metric-dot.moderate {
    background: var(--accent-amber);
    box-shadow: 0 0 5px var(--accent-amber);
}

.metric-dot.medium {
    background: var(--accent-blue);
    box-shadow: 0 0 5px var(--accent-blue);
}

.metric-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.signal-recommendation {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.1), transparent);
    border-left: 2px solid var(--accent-indigo);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    overflow-y: auto;
}

.rec-label {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.rec-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Utilities */
.hidden {
    display: none !important;
}

.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Relaxation for Small Screens */
@media (max-width: 1400px) {
    body {
        overflow-x: auto;
    }
    .app-container {
        min-width: 0 !important;
        padding-left: 8px;
        padding-right: 8px;
    }
    .grid-layout {
        grid-template-columns: 220px minmax(280px, 1fr) minmax(240px, 1fr);
        gap: 12px;
    }
    .panel-inner-flex {
        padding: 12px;
    }
    .btn-xl {
        padding: 12px 20px;
        font-size: 1rem;
    }
    .panel-inner-scroll {
        padding: 16px;
    }
    .panel-header {
        padding: 12px 16px;
    }
}