/* ==========================================================================
   TRUSTEDAIGOV® UNIFIED DESIGN SYSTEM (core.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* --- Master HSL Color Tokens --- */
    --brand-hue-blue: 221;
    --brand-hue-purple: 262;
    --brand-hue-teal: 174;
    --brand-hue-green: 160;
    --brand-hue-red: 0;
    --brand-hue-amber: 38;

    /* --- Base Dark Palette --- */
    --bg-base:      #030712;
    --bg-surface:   #0b0f19;
    --bg-raised:    #111827;
    --bg-hover:     #1f2937;
    --border-sub:   #1f2937;
    --border-dim:   #374151;
    --border-lit:   #4b5563;

    /* --- Typography & Text --- */
    --text-base:    #f3f4f6;
    --text-dim:     #9ca3af;
    --text-muted:   #4b5563;

    /* --- Brand & System Accents --- */
    --accent-blue:  hsl(var(--brand-hue-blue), 83%, 53%);
    --accent-teal:  hsl(var(--brand-hue-teal), 84%, 41%);
    --accent-purple:hsl(var(--brand-hue-purple), 83%, 60%);
    --accent-green: hsl(var(--brand-hue-green), 84%, 39%);
    --accent-red:   hsl(var(--brand-hue-red), 84%, 60%);
    --accent-amber: hsl(var(--brand-hue-amber), 92%, 50%);

    /* --- Glowing States --- */
    --glow-blue:    rgba(59, 130, 246, 0.25);
    --glow-teal:    rgba(13, 148, 136, 0.25);
    --glow-purple:  rgba(124, 58, 237, 0.25);
    --glow-green:   rgba(16, 185, 129, 0.2);
    --glow-red:     rgba(239, 68, 68, 0.25);

    /* --- Radius & Spacing --- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* --- Spacing Scale --- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 36px;
    --space-xxl: 48px;

    /* --- Typography Scale --- */
    --font-h1: 32px;
    --font-h2: 24px;
    --font-h3: 18px;
    --font-h4: 14px;
    --font-body: 13px;
    --font-sm: 11px;
    --font-xs: 9px;

    /* --- Animation / Transition --- */
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Typography --- */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-base);
    -webkit-font-smoothing: antialiased;
}

/* --- Unified Governance Cards --- */
.gov-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-sub);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.gov-card:hover {
    border-color: var(--border-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.gov-card-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-family: var(--font-sans);
}

/* --- Severity Badges --- */
.gov-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.gov-badge-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 10px var(--glow-red);
}
.gov-badge-high {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}
.gov-badge-medium {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
.gov-badge-low {
    background: rgba(75, 85, 99, 0.1);
    border-color: var(--border-dim);
    color: var(--text-dim);
}
.gov-badge-compliant {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 10px var(--glow-green);
}

/* --- Unified Tables --- */
.gov-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.gov-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-sub);
}
.gov-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-base);
}
.gov-table tr:hover td {
    background: var(--bg-raised);
}

/* ==========================================================================
   RUNTIME-TO-ASSURANCE (R2A) PIPELINE COMPONENT
   ========================================================================== */
.r2a-container {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(13, 148, 136, 0.05) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.r2a-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.r2a-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-raised);
    border: 1px solid var(--border-sub);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    min-width: 120px;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.r2a-node::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.3s;
    pointer-events: none;
}
.r2a-node.active-stage {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px var(--glow-blue);
}
.r2a-node.active-stage::after {
    border-color: var(--accent-purple);
    animation: border-glow 1.5s infinite alternate;
}
.r2a-node.assurance-stage {
    border-color: var(--accent-teal);
    box-shadow: 0 0 15px var(--glow-teal);
}
.r2a-node-icon {
    font-size: 18px;
    margin-bottom: 6px;
}
.r2a-node-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.r2a-node.active-stage .r2a-node-label {
    color: var(--text-base);
}
.r2a-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    font-weight: bold;
    animation: pulse-arrow 2s infinite;
}
.r2a-arrow.active-arrow {
    color: var(--accent-blue);
}
.r2a-arrow.assurance-arrow {
    color: var(--accent-teal);
}

@keyframes border-glow {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}
@keyframes pulse-arrow {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
}

/* ==========================================================================
   DEMO MODE INTERACTION WIDGET
   ========================================================================== */
.demo-widget {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 250px;
}
.demo-widget-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.demo-widget-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}
.demo-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-family: var(--font-sans);
}
.demo-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}
.demo-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    text-align: center;
}
.demo-btn-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}
.demo-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* ==========================================================================
   TRUST SIGNAL & CRYPTOGRAPHIC INDICATORS
   ========================================================================== */
.trust-seal-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}
.trust-seal-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--glow-green);
}
.trust-seal-text {
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent-teal);
}
.seal-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition-smooth);
}
.seal-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-blue);
}

/* ==========================================================================
   EXECUTIVE EXPERIENCE MODE (C-SUITE REFINEMENTS)
   ========================================================================== */
body.exec-view-mode {
    background-color: #02040a !important;
}
body.exec-view-mode #sidebar,
body.exec-view-mode aside {
    display: none !important;
}
body.exec-view-mode .layout-body,
body.exec-view-mode main {
    grid-template-columns: 1fr !important;
    padding: var(--space-xl) var(--space-xxl) !important;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
body.exec-view-mode .gov-card,
body.exec-view-mode .kpi-card {
    padding: var(--space-xl) !important;
    border-radius: var(--radius-lg) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    background: #070b13 !important;
}
body.exec-view-mode .r2a-container {
    padding: var(--space-xl) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: var(--space-xl) !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(13, 148, 136, 0.03) 100%) !important;
}
body.exec-view-mode .r2a-node {
    padding: var(--space-md) var(--space-lg) !important;
    min-width: 150px !important;
    border-radius: var(--radius-lg) !important;
}
body.exec-view-mode .r2a-node-label {
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
}
body.exec-view-mode .r2a-node-icon {
    font-size: 24px !important;
    margin-bottom: 8px !important;
}
body.exec-view-mode h1,
body.exec-view-mode .sec-title,
body.exec-view-mode h2 {
    font-size: var(--font-h1) !important;
    letter-spacing: -0.03em !important;
    font-weight: 800 !important;
}
body.exec-view-mode h3,
body.exec-view-mode .gov-card-title {
    font-size: var(--font-h3) !important;
    font-weight: 700 !important;
}
body.exec-view-mode p,
body.exec-view-mode .sec-sub,
body.exec-view-mode td,
body.exec-view-mode th {
    font-size: var(--font-h4) !important;
}
body.exec-view-mode .sb-section,
body.exec-view-mode .demo-widget,
body.exec-view-mode #section-demo-control,
body.exec-view-mode #notif-bell-wrap,
body.exec-view-mode .bell-wrap {
    display: none !important;
}
body.exec-view-mode .gov-table th {
    padding: 16px 20px !important;
    font-size: 11px !important;
}
body.exec-view-mode .gov-table td {
    padding: 16px 20px !important;
}

/* --- Standard Interactive Controls --- */
.gov-btn {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-dim);
    background: var(--bg-raised);
    color: var(--text-base);
    font-family: var(--font-sans);
    text-decoration: none;
}
.gov-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-lit);
}
.gov-btn-primary {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}
.gov-btn-primary:hover {
    background: hsl(var(--brand-hue-blue), 83%, 60%);
    border-color: hsl(var(--brand-hue-blue), 83%, 60%);
}
.gov-btn-secondary {
    background: transparent;
    border-color: var(--border-sub);
    color: var(--text-dim);
}
.gov-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-dim);
    color: var(--text-base);
}
.gov-select, .gov-input {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    border: 1px solid var(--border-sub);
    color: var(--text-base);
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}
.gov-select:focus, .gov-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--glow-blue);
}
.gov-input-search {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 99px;
    padding-left: 16px;
    padding-right: 16px;
}
.gov-exec-toggle-container {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 16px;
}


