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

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 0;
    color: #e5e5e5;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: #000000;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid #2a2a2a;
    text-align: center;
}

.sidebar-logo {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto 16px auto;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.4;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 12px;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    text-align: left;
    color: #9ca3af;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: #1a1a1a;
    color: #ff6b35;
}

.nav-item.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: #ffffff;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.nav-label {
    flex: 1;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid #2a2a2a;
}

.sidebar-footer-text {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.sidebar-footer-subtext {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #0f0f0f;
    min-height: 100vh;
}

.page-header {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 32px 48px;
}

.page-header-content h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}

.content-area {
    padding: 48px;
    max-width: 1400px;
}

h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Section */
.upload-section {
    max-width: 1400px;
}

/* Integration Tabs */
.integration-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid #2a2a2a;
}

.integration-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.integration-tab:hover {
    color: #ff6b35;
    background: #1a1a1a;
}

.integration-tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.integration-icon {
    font-size: 18px;
}

.integration-content {
    display: none;
}

.integration-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Connector Cards */
.connector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.connector-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.connector-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.connector-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.connector-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.connector-logo {
    font-size: 32px;
}

.connector-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.connector-info p {
    font-size: 12px;
    color: #6b7280;
}

.connector-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connector-status.connected {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.connector-status.disconnected {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.connector-body p {
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 16px;
}

.connector-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #6b7280;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* API Integration Cards */
.api-integration-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.api-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.api-integrations {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-item {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
}

.api-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.api-item-header h5 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.api-item-header p {
    font-size: 12px;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

.api-item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.7;
    transition: all 0.2s;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.api-item-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #9ca3af;
}

.api-badge {
    padding: 4px 8px;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.api-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.api-status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.api-status-badge.error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* Upload Area */
.upload-area {
    margin: 32px 0;
}

.upload-box {
    border: 2px dashed #3a3a3a;
    border-radius: 12px;
    padding: 64px;
    text-align: center;
    background: #0f0f0f;
    transition: all 0.3s;
}

.upload-box:hover {
    background: #1a1a1a;
    border-color: #ff6b35;
}

.upload-box p {
    font-size: 16px;
    color: #e5e5e5;
    margin-bottom: 8px;
}

.upload-hint {
    color: #9ca3af;
    font-size: 14px;
}

/* Data Source Summary */
.data-source-summary {
    margin: 48px 0;
    padding: 32px;
    background: #0f0f0f;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.data-source-summary h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 24px;
}

.source-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.source-usage-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.source-usage-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.source-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.source-usage-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.source-description {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 20px;
    line-height: 1.6;
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usage-item {
    padding: 12px;
    background: #0f0f0f;
    border-radius: 8px;
    border-left: 3px solid #2a2a2a;
}

.usage-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.usage-badge.risk {
    background: #dc2626;
    color: white;
}

.usage-badge.ai {
    background: #3b82f6;
    color: white;
}

.usage-badge.viz {
    background: #8b5cf6;
    color: white;
}

.usage-badge.migration {
    background: #10b981;
    color: white;
}

.usage-item p {
    font-size: 13px;
    color: #d1d5db;
    line-height: 1.6;
    margin: 0;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.status-card {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.status-card:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
    border-color: #ff6b35;
}

.status-icon {
    font-size: 32px;
}

.status-info h4 {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.status-info p {
    color: #9ca3af;
    font-size: 14px;
}

/* Risk Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h2 {
    margin: 0;
}

/* Radar + Cards Grid */
.radar-dashboard-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 48px;
    align-items: start;
    margin: 32px 0;
}

.radar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.risk-cards-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-filter label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e5e5;
}

.filter-select {
    padding: 10px 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    color: #e5e5e5;
    font-family: 'Poppins', sans-serif;
    min-width: 250px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-select:hover {
    border-color: #ff6b35;
}

.risk-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.risk-card {
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.risk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.risk-card.critical {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.risk-card.high {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.risk-card.medium {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.risk-card.low {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.risk-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.risk-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.risk-action {
    font-size: 13px;
    opacity: 0.95;
}

/* Findings */
.findings-section {
    margin-top: 48px;
}

.findings-section h3 {
    margin: 32px 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.finding {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.finding:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.finding.critical {
    border-left-color: #dc2626;
    background: #1a0f0f;
}

.finding.high {
    border-left-color: #ff6b35;
    background: #1a1410;
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.finding-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.finding-badge.critical {
    background: #dc2626;
    color: white;
}

.finding-badge.high {
    background: #ff6b35;
    color: white;
}

.finding-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.finding-body p {
    margin: 12px 0;
    line-height: 1.7;
    color: #d1d5db;
    font-size: 14px;
}

.finding-body strong {
    color: #ffffff;
    font-weight: 600;
}

.business-context {
    background: #1a1410;
    border-left: 3px solid #ff6b35;
    padding: 16px;
    margin: 16px 0;
    border-radius: 6px;
}

.business-context p {
    font-weight: 600;
    margin-bottom: 8px;
    color: #ff6b35;
}

.business-context ul {
    margin-left: 20px;
    margin-top: 8px;
}

.business-context li {
    margin: 6px 0;
    color: #d1d5db;
    font-size: 14px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-secondary.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-success {
    background: #10b981;
    color: white;
    margin-top: 24px;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* AI Analysis */
.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.analysis-header h2 {
    margin: 0;
}

.model-config-panel {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-config-panel h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.config-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.config-input,
.config-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    color: #e5e5e5;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.config-input:focus,
.config-textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.config-textarea {
    resize: vertical;
    min-height: 100px;
}

.config-slider {
    width: 100%;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.config-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #ff6b35;
    border-radius: 50%;
    cursor: pointer;
}

.config-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ff6b35;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.slider-value span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #ff6b35;
}

.slider-hint {
    font-size: 12px;
    color: #6b7280;
}

.config-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
}

.config-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.config-status {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
}

.config-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

.config-status.error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    color: #dc2626;
}

.analysis-section {
    max-width: 1000px;
}

.analysis-section > p {
    font-size: 15px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.query-section {
    display: flex;
    gap: 16px;
    margin: 24px 0;
}

.query-select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    color: #e5e5e5;
    background: #1a1a1a;
    font-family: 'Poppins', sans-serif;
}

.query-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.analysis-result {
    margin-top: 32px;
}

.ai-response {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ai-response h3 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.ai-response h4 {
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 12px;
}

.ai-response h5 {
    color: #ffffff;
    margin-top: 15px;
    margin-bottom: 10px;
}

.ai-response p {
    color: #d1d5db;
}

.ai-response ul,
.ai-response ol {
    color: #d1d5db;
}

.ai-response li {
    color: #d1d5db;
}

.ai-response strong {
    color: #ffffff;
}

.cost-info {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
    font-size: 13px;
    color: #9ca3af;
}

.cost-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Visualization */
.viz-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.solution-list {
    margin-bottom: 40px;
}

.solution-list h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.solution-card {
    background: #1a1a1a;
    border: 2px solid;
    border-radius: 12px;
    padding: 24px;
    padding-top: 48px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.solution-card.critical {
    border-color: #dc2626;
}

.solution-card.high {
    border-color: #ff6b35;
}

.solution-card.medium {
    border-color: #fbbf24;
}

.risk-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.risk-badge.critical {
    background: #dc2626;
    color: white;
}

.risk-badge.high {
    background: #ff6b35;
    color: white;
}

.risk-badge.medium {
    background: #fbbf24;
    color: #000;
}

.solution-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.solution-icon {
    font-size: 32px;
}

.solution-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.solution-header p {
    font-size: 13px;
    color: #9ca3af;
}

.solution-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

.detail-row span:first-child {
    color: #9ca3af;
}

.detail-row span:last-child {
    color: #e5e5e5;
    font-weight: 500;
}

.architecture-diagram {
    animation: fadeIn 0.3s;
}

.diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.diagram-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

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

.diagram-container {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 40px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.diagram-container pre.mermaid {
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.diagram-container .mermaid svg {
    max-width: 100%;
    height: auto;
}

.legend {
    margin-top: 24px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.legend h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.legend-item {
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 8px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.legend-item.critical {
    background: #dc2626;
    color: white;
}

.legend-item.high {
    background: #f59e0b;
    color: white;
}

.legend-item.medium {
    background: #fbbf24;
    color: #78350f;
}

.legend-item.low {
    background: #10b981;
    color: white;
}

.legend p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Migration Plan */
.migration-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.migration-plan-header h2 {
    margin: 0;
}

.migration-header {
    display: flex;
    justify-content: space-around;
    margin: 32px 0;
    padding: 32px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.migration-stat {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: #ff6b35;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    font-weight: 500;
}

.phase-section {
    margin: 32px 0;
}

.phase {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.phase:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.phase-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.phase-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
}

.phase-badge.critical {
    background: #dc2626;
}

.phase-badge.high {
    background: #f59e0b;
}

.phase-badge.medium {
    background: #fbbf24;
    color: #78350f;
}

.phase-timeline {
    height: 32px;
    background: #2a2a2a;
    border-radius: 16px;
    margin: 20px 0;
    overflow: hidden;
}

.timeline-bar {
    height: 100%;
    border-radius: 16px;
    transition: width 1s ease;
}

.phase-content p {
    margin: 12px 0;
    color: #d1d5db;
    font-size: 14px;
}

.phase-content ul {
    margin-left: 20px;
    margin-top: 12px;
}

.phase-content li {
    margin: 10px 0;
    line-height: 1.7;
    color: #d1d5db;
    font-size: 14px;
}

.migration-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

/* Responsive */
@media (max-width: 1024px) {
    .radar-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .radar-container {
        min-height: 380px;
    }
}

/* Mobile hamburger button — hidden on desktop, matches main website nav-toggle */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e5e5e5;
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay behind sidebar on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}
.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        left: -290px;
        top: 0;
        transition: left 0.3s ease;
        z-index: 150;
    }
    .sidebar.open {
        left: 0;
    }

    .sidebar-header {
        padding: 20px 16px;
    }
    .sidebar-logo {
        height: 36px;
        margin-bottom: 8px;
    }
    .sidebar-title {
        font-size: 12px;
    }

    .main-content {
        margin-left: 0;
    }

    .page-header {
        padding: 16px;
    }
    .page-header-content h1 {
        font-size: 20px;
    }

    .content-area {
        padding: 16px;
    }

    .query-section {
        flex-direction: column;
    }

    .query-controls {
        flex-direction: column;
    }

    .migration-header {
        flex-direction: column;
        gap: 24px;
    }

    .risk-summary {
        grid-template-columns: 1fr;
    }

    .risk-cards-column {
        grid-template-columns: 1fr 1fr;
    }

    .radar-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-actions {
        flex-wrap: wrap;
    }

    .connector-grid {
        grid-template-columns: 1fr;
    }

    .upload-buttons-grid {
        grid-template-columns: 1fr;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .correlation-row {
        flex-wrap: wrap;
    }

    .migration-plan-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table-container {
        overflow-x: auto;
    }

    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: #3b82f6;
    color: white;
}

/* ============================================================
   AI Analysis — Mode Toggle, Query Controls, Metrics
   ============================================================ */
.mode-toggle {
    display: flex;
    gap: 0;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
    border: 1px solid #2a2a2a;
}
.mode-toggle-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.mode-toggle-btn.active[data-mode="ai"] {
    background: #ff6b35;
    color: #fff;
}
.mode-toggle-btn.active[data-mode="rule-based"] {
    background: #3b82f6;
    color: #fff;
}
.mode-toggle-btn:hover:not(.active) {
    background: #222;
    color: #e5e5e5;
}

.query-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.query-mode-toggle {
    display: flex;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
}
.query-mode-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.query-mode-btn.active {
    background: #2a2a2a;
    color: #fff;
}
.query-mode-btn:hover:not(.active) {
    background: #1f1f1f;
    color: #e5e5e5;
}

.query-input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #e5e5e5;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.query-input:focus {
    border-color: #ff6b35;
}
.query-input::placeholder {
    color: #6b7280;
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.analysis-metrics {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.metric-chip {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.metric-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.metric-value {
    font-size: 14px;
    color: #e5e5e5;
    font-weight: 600;
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    color: #9ca3af;
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #2a2a2a;
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Finding badge for LOW severity */
.finding.low {
    border-left: 4px solid #10b981;
}
.finding-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Phase badge for LOW */
.phase.low {
    border-left: 4px solid #10b981;
}
.phase-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Solution card for low risk */
.solution-card.low {
    border-left: 4px solid #10b981;
}
.risk-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
/* ============================================================
   New styles for updated demo — upload buttons, correlations,
   assets table, applications table, structured findings
   ============================================================ */

/* Upload Buttons Grid */
.upload-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.upload-button-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}
.upload-button-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}
.upload-btn-icon { font-size: 36px; margin-bottom: 12px; }
.upload-button-card h4 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.upload-button-card p { font-size: 12px; color: #6b7280; margin-bottom: 16px; line-height: 1.5; }
.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.progress-bar {
    flex: 1;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: #ff6b35;
    border-radius: 3px;
    transition: width 0.3s;
}
.progress-text { font-size: 11px; color: #9ca3af; white-space: nowrap; }

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.last-assessed {
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.dashboard-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

/* Correlation Tab */
.correlation-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.correlation-status {
    font-size: 14px;
    color: #9ca3af;
}
.correlation-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.correlation-summary-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.corr-type-label { font-size: 12px; color: #9ca3af; }
.corr-type-count { font-size: 28px; font-weight: 700; color: #fff; }
.correlation-list-header { margin-bottom: 12px; }
.correlation-list-header h3 { font-size: 18px; font-weight: 600; color: #fff; }
.correlation-list { display: flex; flex-direction: column; gap: 6px; }
.correlation-row {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.corr-chip {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.corr-meta {
    flex: 1;
    font-size: 13px;
    color: #e5e5e5;
}
.corr-strategy {
    background: transparent;
    border: 1px solid #333;
    color: #6b7280;
    font-size: 10px;
}
.empty-state {
    text-align: center;
    padding: 48px;
    color: #6b7280;
    font-size: 14px;
}

/* Data Tables (Assets & Applications) */
.assets-header { margin-bottom: 20px; }
.assets-header h2 { margin-bottom: 4px; }
.assets-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-group label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}
.data-table-container {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table thead {
    background: #0f0f0f;
}
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #1f1f1f;
    color: #d1d5db;
    vertical-align: middle;
}
.data-table tr:hover {
    background: #1f1f1f;
}
.type-chip {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 11px;
    color: #9ca3af;
}
.risk-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.hostname-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 10px;
    color: #9ca3af;
    margin: 2px 4px 2px 0;
}
.table-footer {
    padding: 12px 16px;
    font-size: 12px;
    color: #6b7280;
}

/* Structured AI Findings */
.asset-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #2a2a2a;
    border-radius: 4px;
    font-size: 11px;
    color: #9ca3af;
    font-family: 'Courier New', monospace;
}
.priority-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.priority-chip.immediate { background: #dc262622; color: #dc2626; }
.priority-chip.critical { background: #dc262622; color: #dc2626; }
.priority-chip.high { background: #ff6b3522; color: #ff6b35; }
.priority-chip.medium { background: #fbbf2422; color: #fbbf24; }
.priority-chip.low { background: #10b98122; color: #10b981; }
.priority-chip.standard { background: #3b82f622; color: #3b82f6; }
.priority-chip.best-practice { background: #8b5cf622; color: #8b5cf6; }
.priority-chip.info { background: #6b728022; color: #6b7280; }
.timeline-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 10px;
    color: #9ca3af;
}

/* Migration Plan Actions */
.migration-plan-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.migration-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Finding badge for medium */
.finding.medium {
    border-left-color: #fbbf24;
    background: #1a1a10;
}
.finding-badge.medium {
    background: #fbbf24;
    color: #000;
}
