/* risk-assessment-app.html — page-specific styles */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

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

/* Sidebar with Modern Design */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo img {
    height: 32px;
}

/* Navigation Items with Modern Styling */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item.section-header {
    background: rgba(43,139,230,0.2);
    border-left: 4px solid #2b8be6;
    color: #2b8be6;
    font-weight: 600;
    margin: 8px 0 4px 0;
    box-shadow: 0 4px 15px rgba(43,139,230,0.2);
}

.nav-item.active-page {
    background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
    border-left: 4px solid #5468f2;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}

.nav-item .material-icons {
    margin-right: 12px;
    font-size: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .expand-icon {
    display: none;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

.expand-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-item.section-header.expanded .expand-icon {
    transform: rotate(90deg);
}

.nav-item.section-header.expanded {
    background: #26303f;
}

/* AI Agent Decision button expanded state */
.nav-item.expanded {
    background: #26303f;
}

.nav-item.expanded .expand-icon {
    transform: rotate(90deg);
}

/* Sub-navigation with Modern Design */
.nav-subitems {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #26303f;
    backdrop-filter: blur(10px);
}

.nav-subitems.expanded {
    max-height: 1000px;
}

.sidebar.collapsed .nav-subitems {
    display: none;
}

.nav-subitems .nav-item {
    background: transparent;
    padding-left: 52px;
    font-weight: 400;
    margin: 2px 0;
}

.nav-subitems .nav-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(8px);
}

.nav-subitems .nav-item.active-page {
    background: rgba(84,104,242,0.2);
    border-left: 3px solid #5468f2;
}

/* Main Content with Modern Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
}

.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    margin-left: 20px;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Modern Button Styling */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    min-width: 200px;
    height: 56px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43,139,230,0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Content Area with Modern Cards */
.content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.card-header {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43,139,230,0.1), rgba(84,104,242,0.1));
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f2f5f9;
}

.card-subtitle {
    color: #8c99a8;
    font-size: 16px;
    font-weight: 400;
}

.card-content {
    padding: 32px;
}

/* Risk Assessment Interface */
.risk-assessment-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    min-height: 600px;
    margin-bottom: 32px;
}

.assessment-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.assessment-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: none;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.assessment-input:focus {
    outline: none;
    border-color: #2b8be6;
    box-shadow: 0 0 0 4px rgba(43,139,230,0.1);
}

.assessment-input::placeholder {
    color: #838f9f;
}

.assessment-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.assessment-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

/* Results Panel */
.results-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.results-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.results-content:empty::before {
    content: "Risk assessment results will appear here...";
    color: #838f9f;
    font-style: italic;
}

.results-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Risk Features */
.risk-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
    flex-shrink: 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.feature-description {
    color: #8c99a8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2b8be6;
}

.stat-label {
    font-size: 12px;
    color: #838f9f;
    margin-top: 4px;
}

/* Risk Level Indicators */
.risk-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-level.critical {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.risk-level.high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.risk-level.medium {
    background: rgba(43,139,230,0.2);
    color: #2b8be6;
}

.risk-level.low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Risk Matrix */
.risk-matrix {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.matrix-row {
    display: grid;
    grid-template-columns: 200px repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    align-items: center;
}

.matrix-header {
    font-weight: 600;
    color: #2b8be6;
    padding: 8px;
    background: rgba(43,139,230,0.1);
    border-radius: 6px;
}

.matrix-cell {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    text-align: center;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #2b8be6;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(43,139,230,0.3);
    border-top: 2px solid #2b8be6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .risk-assessment-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        background: #26303f;
    }

    .sidebar .nav-text {
        display: none;
    }

    .header-title {
        font-size: 20px;
    }

    .content {
        padding: 20px;
    }

    .platform-grid,
    .systems-grid {
        grid-template-columns: 1fr;
    }

    .priority-metrics {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Risk Assessment Response Styling */
.risk-response {
    line-height: 1.8;
    color: #c9d2dc;
}

.ai-response {
    line-height: 1.8;
    color: #c9d2dc;
}

.ai-response h1, .ai-response h2, .ai-response h3 {
    color: #2b8be6;
    margin: 20px 0 12px 0;
}

.ai-response p {
    margin-bottom: 12px;
}

.ai-response ul, .ai-response ol {
    margin: 12px 0;
    padding-left: 24px;
}

.ai-response li {
    margin-bottom: 8px;
}

.risk-response h1, .risk-response h2, .risk-response h3 {
    color: #2b8be6;
    margin: 20px 0 12px 0;
}

.risk-response p {
    margin-bottom: 12px;
}

.risk-response ul, .risk-response ol {
    margin: 12px 0;
    padding-left: 24px;
}

.risk-response li {
    margin-bottom: 8px;
}

.risk-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid;
}

.risk-card.critical {
    border-left-color: #ef4444;
}

.risk-card.high {
    border-left-color: #f59e0b;
}

.risk-card.medium {
    border-left-color: #2b8be6;
}

.risk-card.low {
    border-left-color: #10b981;
}

.sample-data-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #45a049, #5bb974);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.sample-data-btn .material-icons {
    font-size: 1.1rem;
}
