@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/* Apply font to all elements */
* {
    font-family: 'IBM Plex Sans', 'Manrope', 'Poppins', sans-serif;
}

:root {
    --background: #f8fafc;
    --foreground: #011728;
    --muted: #f7fafc;
    --muted-foreground: #4a5568;
    --card: #f8fafc;
    --card-foreground: #011728;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --primary: #011728;
    --primary-foreground: #f8fafc;
    --primary-hover: #011728;
    --secondary: #f8fafc;
    --secondary-foreground: #011728;
    --accent: #04D9FF;
    --accent-foreground: #011728;
    --accent-hover: #33E3FF;
    --destructive: #ff0000;
    --destructive-foreground: #ffffff;
    --ring: #e2e8f0;
    --rag-blue: #3b82f6;
    --rag-red: #ef4444;
    --rag-amber: #f59e0b;
    --rag-yellow: yellow;   
    --rag-green: #10b981;
    --rag-dark-green: #086d4c;
    --rag-neutral: #767676;
    --trend-red: rgb(241, 168, 168);
    --trend-green: rgb(146, 231, 146);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: rgba(255, 255, 255, 0.3);
    --radius: 0.5rem;
}

/* Main body styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--background);
    color: var(--foreground);
}

.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    flex-grow: 1;
    transition: margin-left 0.3s ease, width 0.3s ease;
    z-index: 1;
    background-color: #ffffff;
}

.header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 1rem;
}

.user-name {
    font-weight: 500;
}

.company-name {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-bar {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--background);
    border-top: 1px solid var(--border);
}

.chat-input {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background-color: var(--background);
    color: var(--foreground);
}

.chat-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring);
}

.chat-send-button {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-send-button:hover {
    background-color: var(--primary-dark, #0435b3);
}

.marketplace-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    overflow-x: hidden;
    position: relative;
    background-color: #ffffff;
    padding-right: 1rem; /* Add padding to account for scrollbar */
}

.marketplace-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.marketplace-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background-color: #ffffff;
}

.tabs-container {
    padding: 1rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    gap: 2rem;
}

.tab-button {
    /*flex: 1;*/
    background: none;
    border: none;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--muted-foreground);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-button:hover {
    color: var(--foreground);
}

.tab-button.active {
    color: var(--primary);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

.tab-content {
    flex: 1;
    padding: 1rem 1rem 0 1rem;
    font-family: inherit;
    overflow-y: auto;
}

.tabs-content {
    flex: 1;
    /* padding: 1rem 1rem 0 1rem; */
    font-family: inherit;
    overflow-y: none;
    background-color: var(--background);
}

/* Use Cases Tab Styles */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    width: 100%;
    background-color: #ffffff;
}

.use-case-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.use-case-card:hover, .business-case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.use-case-card-content {
    flex: 1;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.use-case-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.use-case-card-header i {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 8px;
}
.use-case-card-header i::before {
    color: var(--icon-color);
}

.use-case-card .use-case-card-header i::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--icon-color);
    opacity: 0.2;
    border-radius: 8px;
    z-index: -1;
}

.use-case-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.use-case-description {
    margin: 0;
    color: #6B7280;
    font-size: 0.975rem;
    line-height: 1.5;
}

.use-case-card-bottom {
    padding: 1rem 1.5rem 1.5rem;
    margin-top: auto;
}

.use-case-card-footer {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #ECFDF5;
    color: #065F46;
}

.status-badge.pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-badge.completed {
    background-color: #EEF2FF;
    color: #3730A3;
}

.status-badge.in.review {
    background-color: #F3E8FF;
    color: #6B21A8;
}

.department-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
    background-color: #F3F4F6;
    color: #374151;
}

.linked-case {
    font-size: 0.875rem;
}

.linked-cases {
    margin-top: 1rem;
}

.linked-case-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.linked-case-column {
    flex: 1;
}

.linked-case-label {
    display: block;
    color: #6B7280;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.linked-case-link {
    color: #0066FF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.linked-case-link:hover {
    text-decoration: underline;
}

/* Business Cases Tab Styles */
.business-cases-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .business-cases-list {
        grid-template-columns: 1fr;
    }
}

.business-case-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.business-case-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.business-case-header i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.business-case-info {
    flex-grow: 1;
}

.business-case-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.business-case-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.priority-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.priority-badge.high {
    background-color: #FEE2E2;
    color: #991B1B;
}

.priority-badge.medium {
    background-color: #FEF3C7;
    color: #92400E;
}

.business-case-details {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.business-case-details p {
    margin: 0 0 1rem 0;
}

.metrics {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background-color: var(--secondary);
    padding: 1rem;
    border-radius: var(--radius);
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.metric-label i {
    margin-right: 0.25rem;
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
}

.metric-value {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px; /* Keep your existing margin */
}

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

.metric-value-text {
    margin-left: auto; /* Push to the right */
}

/* New styles for grouped metric keys */
.metric-subtype-group {
    margin-bottom: 0.75rem;
    /* Removed border */
}

.metric-subtype-header {
    color: #64748b; /* Subtle text color */
    padding: 0.25rem 0.5rem; /* Reduced padding */
    font-size: 0.75rem; /* Smaller font size */
    font-weight: 500; /* Less bold */
    /* Removed background color and border */
}

.metric-subtype-items {
    padding: 0.25rem 0; /* Reduced padding */
}

.related-use-case {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.related-use-case-label {
    color: var(--muted-foreground);
    display: block;
    margin-bottom: 0.5rem;
}

.related-use-case-link {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-use-case-link:hover {
    text-decoration: underline;
}

.highlight {
    animation: highlightAnimation 1s ease-in-out;
}

@keyframes highlightAnimation {
    0% { background-color: rgba(0, 62, 227, 0.5); }
    100% { background-color: transparent; }
}

.business-case-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.risk-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

.risk-badge.unacceptable-risk {
    background-color: #FEE2E2;
    color: #991B1B;
}

.risk-badge.high-risk {
    background-color: #FEF3C7;
    color: #92400E;
}

.risk-badge.limited-risk {
    background-color: #D1FAE5;
    color: #065F46;
}

.risk-badge.minimal-risk {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.search-and-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-bar {
    display: flex;
    flex-grow: 1;
}

.search-bar input {
    flex-grow: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-right: none;
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    font-size: 1rem;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-bar button:hover {
    background-color: var(--primary-dark, #0435b3);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.sort-options label {
    font-weight: 500;
}

.sort-options select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--background);
    color: var(--foreground);
}

.ai-card-grid, .kpi-card-grid {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap:  8px;
    row-gap: 32px;
}

.ai-card, .kpi-card {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 1rem 1rem 0rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

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

.ai-card-header, .kpi-card-header {
    display: flex;
    align-items: center;
}

.ai-card-icon, .kpi-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-card-icon i, .kpi-card-icon i {
    color: var(--card);
    font-size: 1rem;
}

.ai-card-title, .kpi-card-title {
    flex-grow: 1;
    min-width: 0;
}

.ai-card-name, .kpi-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ai-card-owner {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    margin-bottom: 2px;
}

.ai-card-details, .kpi-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.5rem;
}

.ai-card-detail, .kpi-card-detail {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    margin-top: 2px;
    margin-bottom: 2px;
}

.ai-card-detail i, .kpi-card-detail i {
    margin-right: 0.5rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.ai-card-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: 9999px;
    font-weight: 500;
}

.tag.ai-type {
    background-color: #E6F0FF;
    color: #0547E3;
}

.tag.ai-type.in-house {
    background-color: #E6F0FF;
    color: #0547E3;
}

.tag.ai-type.vendor {
    background-color: #C5E0FF;
    color: #0439B3;
}

.tag.ai-type.hybrid {
    background-color:  #A3D0FF;
    color: #032B83;
}

.tag.ai-type.online {
    background-color:  #A3D0FF;
    color: #011b54;
}

.tag.pii {
    background-color: #FFEAEA;
    color: #B91C1C;
}

.tag.spi {
    background-color: #FED7D7;
    color: #9B1C1C;
}

.tag.lifecycle.use-case { background-color: #0AFF74; color: #172121; }
.tag.lifecycle.business-case { background-color: #0AFF74; color: #172121; }
.tag.lifecycle.initiatives { background-color: #0AFF74; color: #172121; }
.tag.lifecycle.development { background-color: #00E061; color: #172121; }
.tag.lifecycle.testing { background-color: #008F3E; color: #EEEEEE; }
.tag.lifecycle.pilot { background-color: #008F3E; color: #EEEEEE; }
.tag.lifecycle.production { background-color: #00662C; color: #EEEEEE; }
.tag.lifecycle.decommission { background-color: #EEEEEE; color: #172121; }
.tag.supplier { background-color: #E8F4FD; color: #1976D2; border: 1px solid #BBDEFB; }

.data-tags {
    display: flex;
    gap: 0.25rem;
}

/* Dynamic AI card icon colors */
.ai-card-icon-1 { background-color: #4CAF50; }
.ai-card-icon-2 { background-color: #F44336; }
.ai-card-icon-3 { background-color: #2196F3; }
.ai-card-icon-4 { background-color: #9C27B0; }
.ai-card-icon-5 { background-color: #FF9800; }
.ai-card-icon-6 { background-color: #795548; }
.ai-card-icon-7 { background-color: #607D8B; }
.ai-card-icon-8 { background-color: #00BCD4; }
.ai-card-icon-9 { background-color: #FF5722; }
.ai-card-icon-10 { background-color: #673AB7; }
.ai-card-icon-11 { background-color: #3F51B5; }
.ai-card-icon-12 { background-color: #E91E63; }
.ai-card-icon-13 { background-color: #8BC34A; }
.ai-card-icon-14 { background-color: #FFC107; }
.ai-card-icon-15 { background-color: #03A9F4; }
.ai-card-icon-16 { background-color: #CDDC39; }
.ai-card-icon-17 { background-color: #009688; }
.ai-card-icon-18 { background-color: #FF4081; }
.ai-card-icon-19 { background-color: #7C4DFF; }
.ai-card-icon-20 { background-color: #FF5252; }

.kpi-card-icon-1 { background-color: #4CAF50; }
.kpi-card-icon-2 { background-color: #F44336; }

/* Responsive adjustments */
@media (max-width:  1600px) {
    .ai-card-grid, .kpi-card-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1400px) {
    .ai-card-grid, .kpi-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .ai-card-grid, .kpi-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar-nav-main, .sidebar-nav-bottom {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        margin: 0.25rem;
    }

    .main-content {
        height: auto;
    }

    .ai-card-grid, .kpi-card-grid {
        grid-template-columns: 1fr;
    }

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

    .user-info {
        margin-top: 1rem;
    }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--muted-foreground);
}

.sort-options {
    display: flex;
    gap: 0.5rem;
}

.sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.0rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: all 0.2s ease;
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    cursor: pointer;
}

.sort-button:hover {
    background-color: var(--muted);
}

.sort-button:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.sort-button i {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    display: none;
}

.sort-button.asc i, .sort-button.desc i {
    display: inline-block;
}

.sort-button.asc i {
    transform: rotate(-180deg);
}

.sort-button.desc i {
    transform: rotate(0deg);
}

.ai-card.clickable, .kpi-card.clickable {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.ai-card.clickable:hover, .kpi-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Assessment styles */
.assessment-templates-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.assessment-templates-table th,
.assessment-templates-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.assessment-templates-table td:last-child {
    white-space: nowrap;
}

.assessment-templates-table th {
    background-color: var(--muted);
    font-weight: 600;
    cursor: pointer;
}

.assessment-templates-table th:hover {
    background-color: var(--secondary);
}

.assessment-templates-table th.asc::after {
    content: ' ▲';
}

.assessment-templates-table th.desc::after {
    content: ' ▼';
}

.assessment-templates-table tbody tr:nth-child(even) {
    background-color: var(--muted);
}

.assessment-templates-table tbody tr:hover {
    background-color: var(--secondary);
}

.assessment-templates-table th:last-child,
.assessment-templates-table td:last-child {
    text-align: right;
    padding-right: 1rem;
}

.assessment-templates-table .number-column {
    text-align: right;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin: 0 2px;
    font-size: 1rem;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
    border-radius: 50%;
}

.icon-button:hover {
    color: var(--foreground);
    background-color: var(--muted);
}

.icon-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring);
}

.send-button:hover {
    color: var(--primary);
}

.edit-button:hover {
    color: var(--primary);
}

.archive-button:hover {
    color: var(--destructive);
}

.icon-button i {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
}

.manage-assessments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.manage-assessments-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.primary-button {
    background-color: #0447E3;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(5, 53, 179, 0.1);
}

.primary-button:hover {
    background-color: #042a8f;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(5, 53, 179, 0.2);
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(5, 53, 179, 0.2);
}

.primary-button i {
    font-size: 0.875rem;
}

.assessment-templates-table {
    width: 100%;
    border-collapse: collapse;
}

.assessment-templates-table td {
    padding: 0.75rem;
    vertical-align: middle;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.owner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.take-assessments-content {
    flex: 1;
    padding: 0 1rem 1rem 1rem;
    max-width: calc(100% - 360px - 2rem); /* Adjust to account for the wider my-assessments and gap */
    box-sizing: border-box;
}

/* Accordion styles */
.accordion-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.accordion-header {
    background-color: var(--muted);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tick-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 50%;
}

.tick-icon.completed {
    background-color: #4CAF50;
    color: white;
}

.questions-answered-label {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.accordion-content {
    padding: 1rem;
    display: none;
}

.accordion-content.active {
    display: block;
}

.question {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-right: 1rem;
}

.question-label {
    flex: 0 0 70%;
    font-weight: 500;
}

.question-input {
    flex: 0 0 30%;
}

.question input[type="text"],
.question input[type="number"],
.question select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    box-sizing: border-box;
}

.question .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question .radio-option {
    display: flex;
    align-items: center;
}

.question input[type="radio"] {
    margin-right: 0.5rem;
}

#save-assessment-btn {
    margin-top: 1rem;
}

.take-assessments-layout {
    display: flex;
    gap: 2rem;
}

.my-assessments {
    flex: 0 0 500px; /* Increased from 300px to 360px (20% wider) */
}

.my-assessments h3 {
    margin: 0;
}

.my-assessments-table {
    width: 100%;
    border-collapse: collapse;
}

.my-assessments-table th,
.my-assessments-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.my-assessments-table th {
    font-weight: 600;
    background-color: var(--muted);
}

.assessment-link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.assessment-link:hover {
    text-decoration: underline;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status.pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status.in-progress {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status.complete {
    background-color: #D1FAE5;
    color: #065F46;
}

.status.overdue {
    background-color: #FEE2E2;
    color: #991B1B;
}

.take-assessments-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start; /* Ensures top alignment */
    padding-top: 1rem; /* Consistent spacing from the top */
}

.my-assessments {
    flex: 0 0 500px;
}

.take-assessments-content {
    flex: 1;
    /*padding: 0 1rem 1rem 1rem;*/
    max-width: calc(100% - 500px - 2rem);
}

.assessment-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.assessment-section-title h3 {
    font-weight: bold;
    /*margin-bottom: 1rem;*/
}

.assessment-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-system-name, .ai-model-name {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.assessment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assessment-progress-bar {
    width: 100px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.assessment-progress-fill {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

.completion-text {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.score-block {
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Prerequisites styles */
.prerequisites-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem; /* Add padding around the content */
    /*
    flex-grow: 1;
    *overflow-y: auto;*
    overflow-x: hidden;
    padding: 2rem;
    display: flex;
    gap: 2rem;*/

}

.readiness-column {
    flex: 0 0 30%;
}

.readiness-summary {
    margin-bottom: 2rem;
}

.readiness-kpi-card {
    background-color: var(--secondary);
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-foreground);
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--secondary-foreground);
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: #e0e0e0;
    border-radius: 0.25rem;
    height: 0.75rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress {
    background-color: var(--accent-foreground);
    height: 100%;
}

.key-readiness-areas {
    margin-bottom: 2rem;
}

.readiness-table, .checklist-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.875rem;
}

.readiness-table th, .readiness-table td,
.checklist-table th, .checklist-table td {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
}

.readiness-table th, .checklist-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: left;
}

.status-good { background-color: #C8E6C9; color: #1B5E20; }
.status-fair { background-color: #FFF9C4; color: #F57F17; }
.status-incomplete { background-color: #FFCDD2; color: #B71C1C; }
.status-complete { background-color: #34D399; color: #064E3B; }

.file-upload-label {
    cursor: pointer;
}

.file-upload-label:hover .upload-icon {
    color: var(--primary-hover);
}

.evidence-icon {
    cursor: pointer;
    transition: color 0.3s ease;
}

.evidence-icon:hover {
    color: var(--primary-hover);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background-color: var(--background);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
}

.popup-content {
    text-align: center;
}

.popup-message {
    font-size: 1rem;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.popup-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.popup-button-confirm {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.popup-button-confirm:hover {
    background-color: var(--primary-dark, #0435b3);
}

.popup-button-cancel {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.popup-button-cancel:hover {
    background-color: var(--secondary-dark, #d1d5db);
}

.detailed-checklist {
    width: 100%;
    height: calc(100vh - 300px); /* Adjust this value as needed */
    overflow: hidden;
    /*height: calc(100vh - 200px); /* Adjust this value as needed */
    /*overflow-y: auto;*/
    /*position: relative;*/
}

.prerequisites-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.readiness-column.left-column {
    flex: 0 0 80%;
    max-width: calc(80% - 1rem); /* Subtract padding to prevent overflow */
}

.readiness-column.right-column {
    flex: 0 0 20%;
    max-width: calc(20% - 1rem); /* Subtract padding to prevent overflow */
    padding-right: 1rem; /* Add padding to prevent overlap with scrollbar */
}

.readiness-summary {
    position: sticky;
    top: 1rem;
    padding-right: 1rem; /* Add padding to prevent overlap with scrollbar */
}

@media (max-width: 1024px) {
    .prerequisites-content {
        flex-direction: column;
    }

    .readiness-column.left-column,
    .readiness-column.right-column {
        flex: 0 0 100%;
    }

    .readiness-summary {
        position: static;
    }
}

.section-header {
    background-color: #f0f4f8;
    font-weight: bold;
    cursor: pointer;
}

.section-toggle {
    cursor: pointer;
    width: 20px; /* Set a fixed width */
    height: 20px; /* Set a fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-toggle i {
    font-size: 14px; /* Adjust the icon size as needed */
    transition: transform 0.3s ease;
}

.section-toggle i.fa-chevron-down {
    transform: rotate(0deg);
}

.section-toggle i.fa-chevron-right {
    transform: rotate(-90deg);
}

.section-header:hover .section-toggle {
    transform: scale(1.2);
}

.section-items {
    display: table-row;
}

.checklist-table-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.checklist-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.checklist-table thead {
    position: sticky;
    top: 0;
    background-color: #f8fafc;
    z-index: 10;
}

.checklist-table th,
.checklist-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checklist-table th {
    font-weight: 600;
    color: #4a5568;
}

.checklist-table .item-column,
.checklist-table .item-column th,
.checklist-table .item-column td {
    width: 25%;
}

.checklist-table .requirement-column,
.checklist-table .requirement-column th,
.checklist-table .requirement-column td {
    width: 45%;
}

.checklist-table .narrow-column,
.checklist-table .narrow-column th,
.checklist-table .narrow-column td {
    width: 10%;
}

.checklist-table th.narrow-column,
.checklist-table td.narrow-column,
.inner-table td.narrow-column {
    text-align: center;
}

.inner-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.inner-table td {
    padding: 0.5rem;
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #f1f5f9;
    /*border-bottom: 1px solid #e2e8f0;*/
}

.section-name {
    font-weight: bold;
    font-size: 1.1em;
}

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

.section-header .status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.evidence-icon, .upload-icon {
    cursor: pointer;
    color: #4A5568;
}

.evidence-icon:hover, .upload-icon:hover {
    color: #2D3748;
}

.chat-bar {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.chat-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.checklist-table .narrow-column {
    width: 80px;
    text-align: center;
}

.checklist-table td:nth-child(3),
.checklist-table td:nth-child(4),
.checklist-table td:nth-child(5) {
    text-align: center;
}

.assessment-results-layout {
    display: flex;
    gap: 2rem;
}

.assessment-list {
    flex: 0 0 30%;
}

.assessment-details {
    flex: 1;
}

.completed-assessments-table {
    width: 100%;
    border-collapse: collapse;
}

.completed-assessments-table th,
.completed-assessments-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.completed-assessments-table th {
    background-color: var(--muted);
    font-weight: 600;
}

.assessment-link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.assessment-link:hover {
    text-decoration: underline;
}

.assessment-details-content {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.assessment-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.assessment-details-header h3 {
    margin: 0;
    font-size: 1rem;
}

.assessment-details-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.assessment-details-info p {
    margin: 0;
}

.assessment-details-info strong {
    font-weight: 600;
}

.assessment-sections {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.assessment-section {
    border-bottom: 1px solid var(--border);
}

.assessment-section:last-child {
    border-bottom: none;
}

.assessment-section-header {
    background-color: var(--muted);
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* Assessment results styles */
.assessment-section-content {
    padding: 1rem;
    display: none;
}

.assessment-section-content.active {
    display: block;
}

.assessment-question {
    margin-bottom: 1rem;
}

.assessment-question p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.assessment-answer {
    background-color: var(--accent);
    padding: 0.5rem;
    border-radius: var(--radius);
}

#assessment-charts-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

#assessment-chart-container {
    width: 28%;
    height: 300px;
}

#assessment-chart-container {
    width: 100%;
    height: 250px;
}

@media (max-width: 768px) {
    .heatmap-container,
    #assessment-chart-container {
        width: 100%;
    }
}

.heatmap-container {
    width: 70%;
}

.completed-assessments-dropdown {
    position: relative;
    max-width: 400px;
    margin-bottom: 20px;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    background-color: var(--muted);
}

.dropdown-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring);
}

.chevron-down {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.dropdown-item {
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--muted);
}

.dropdown-open .dropdown-content {
    display: block;
}

.dropdown-open .chevron-down {
    transform: rotate(180deg);
}

.subcategory {
    margin-left: 10px;
    border-bottom: 1px solid #ccc;
    padding-left: 10px;
    padding-bottom: 10px;
}

/* My assessments toggle styles */
.toggle-container {
    display: flex;
    align-items: center;
    font-size: 0.8em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 18px;
    margin: 0 4px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(10px);
}

.slider.round {
    border-radius: 17px;
}

.slider.round:before {
    border-radius: 50%;
}

.primary-name {
    font-weight: bold;
}

.secondary-name {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

/* Align toggle to the right */
.toggle-right {
    display: flex;
    justify-content: flex-end;
    /* margin-top: 1rem; */
}

/* Toast styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    border-radius: 4px;
    max-width: 300px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

/* Feedback styles */
.section-feedback {
    padding-left: 1.5rem;
}

/* Lifecycle styles */
.lifecycle-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}
.lifecycle-headers {
    display: flex;
    padding: 1rem;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
}
.lifecycle-header {
    flex: 1;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #34495e;
    padding: 0 0.5rem;
}
.lifecycle-header .system-count {
    font-size: 0.8rem;
    font-weight: 400;
    color: #7f8c8d;
    margin-left: 0.25rem;
}
.lifecycle-grid {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}
.lifecycle-columns {
    display: flex;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}
.lifecycle-column {
    flex: 1;
    min-width: 0;
    padding: 1rem 0.5rem;
    border-right: 1px solid var(--border);
}
.lifecycle-column:last-child {
    border-right: none;
}
.lifecycle-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.lifecycle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.lifecycle-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lifecycle-card-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.lifecycle-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2C3E50;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lifecycle-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #7F8C8D;
}

.lifecycle-card-owner {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    margin-right: 0.5rem;
}

.lifecycle-card-duration {
    margin: 0;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.lifecycle-card p {
    font-size: 0.75rem;
    color: #7F8C8D;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.data-tables-container {
    background-color: #ffffff;
    border-top: 1px solid var(--border);
    position: relative;
    height: 80%;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, box-shadow 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.data-tables-container.open {
    max-height: 60vh;
    opacity: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.data-table-scroll {
    height: 50%;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
}

.data-table-scroll + .data-table-scroll {
    padding-top: 0;
}

.data-tables-container h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    background-color: #f1f3f5;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-tables-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    z-index: 2;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

.model-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex children to shrink */
    height: 100%;
    overflow: hidden; /* Prevents content from overflowing */
}

/* AI Vendors styles */
.vendor-content, .system-content, .dataset-content, .integrations-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ai-vendor-container, .ai-system-container, .ai-model-container, .ai-dataset-container, .integrations-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.ai-vendor-grid, .integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.ai-system-grid, .ai-dataset-grid, .ai-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.ai-vendor-card, .ai-system-card, .ai-dataset-card, .integration-card, .ai-model-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}
.ai-system-card, .ai-dataset-card, .ai-model-card {
    padding: 0.5rem;
}
.ai-vendor-card:hover, .ai-system-card:hover, .ai-model-card:hover, .ai-dataset-card:hover, .integration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}
.ai-vendor-card-header, .ai-system-card-header, .ai-model-card-header, .ai-dataset-card-header, .integration-card-header {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
.ai-vendor-card-logo, .ai-system-card-logo, .ai-model-card-logo, .ai-dataset-card-logo, .integration-card-logo {
    width: 36px;
    height: 36px;
    /*border-radius: 50%;*/
    object-fit: cover;
}
.ai-vendor-card-name, .ai-system-card-name, .ai-model-card-name, .ai-dataset-card-name, .integration-card-name {
    margin-left: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}
.ai-system-owner-name, .ai-dataset-owner-name, .ai-model-owner-name {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #383e48;
}
.ai-vendor-card-body, .ai-system-card-body, .ai-model-card-body, .ai-dataset-card-body, .integration-card-body {
    padding: 0.75rem;
    flex-grow: 1;
}
.ai-vendor-card-description, .ai-system-card-description, .ai-model-card-description, .ai-dataset-card-description, .integration-card-description {
    color: #4a5568;
    font-size: 0.8125rem;
    line-height: 1.4;
}
.ai-vendor-card-footer, .ai-system-card-footer, .ai-model-card-footer, .ai-dataset-card-footer, .integration-card-footer {
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
}
.ai-vendor-card-type, .ai-system-card-type, .ai-model-card-type, .ai-dataset-card-type, .integration-card-type, .vendor-risk-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.ai-vendor-card-type.model, .integration-card-type.cloud {
    background-color: #E6F0FF;
    color: #0547E3;
}
.ai-vendor-card-type.data, .integration-card-type.database {
    background-color: #C5E0FF;
    color: #0439B3;
}
.ai-vendor-card-type.product, .integration-card-type.api {
    background-color: #A3D0FF;
    color: #032B83;
}
.ai-vendor-card-type.outsourcing {
    background-color: #000000;
    color: #5b89f5;
}
.ai-vendor-card-type.professional {
    background-color: #000000;
    color: #b0c7ff;
}
.ai-vendor-card-type.service {
    background-color: #A3D0FF;
    color: #001748;
}
.vendor-risk-low {
    background-color: #86efac;;
    color: var(--secondary-foreground);
}
.vendor-risk-medium {
    background-color: #fbbf24;
    color: var(--secondary-foreground);
}
.vendor-risk-high {
    background-color: #fca5a5;;
    color: var(--secondary-foreground);
}

.selected-vendor-view, .selected-system-view, .selected-model-view, .selected-buscase-view, .selected-dataset-view, .selected-integration-view {
    display: none;
    flex-direction: column;
    /*padding: 1rem;
    gap: 1rem;*/
    height: 100%;
}
.selected-vendor-header, .selected-system-header, .selected-model-header, .selected-buscase-header, .selected-dataset-header, .selected-integration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 1rem;
}
.selected-vendor-content, .selected-system-content, .selected-model-content, .selected-buscase-content, .selected-dataset-content, .selected-integration-content {
    flex: 1; /* Take up remaining space */
    display: flex;
    /*gap: 1rem;*/
    overflow: hidden; /* Hide overflow */
}

.selected-vendor-details, .selected-system-details, .selected-model-details, .selected-buscase-details, .selected-dataset-details, .selected-integration-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Hide overflow */
    padding-left: 1rem;
}

.selected-vendor-logo-name {
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between logo and name */
}

.selected-vendor-logo {
    width: 50px;
    height: 50px;
    object-fit: cover; /* Ensure the logo fits within the dimensions */
}

.tabs-container {
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
}
.tabs, .buscase-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0; /* Prevent tabs from shrinking */
}
.tab-button, .buscase-tab-button {
    background: none;
    border: none;
    padding: 1rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    border-bottom: 2px solid transparent;
}
.tab-button.active, .buscase-tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content, .buscase-tab-content {
    flex: 1; /* Take up remaining space */
    overflow-y: auto; /* Allow scrolling within tab content */
    background-color: white;
    border-radius: 0.5rem;
    /*padding: 1rem;*/
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
}
.close-tabs, .buscase-close-tabs {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #4a5568;
}
.close-tabs:hover, .buscase-close-tabs:hover {
    color: #1a202c;
}

.info-group {
    margin-bottom: 1rem;
}
.info-group h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}
.info-item {
    display: flex;
    margin-bottom: 0.25rem;
}
.info-label {
    font-weight: 500;
    width: 240px; /* Increased from 150px to 200px */
    color: #4a5568;
    flex-shrink: 0; /* Prevent label from shrinking */
}
.info-value {
    color: #1a202c;
    flex-grow: 1; /* Allow value to take up remaining space */
}
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 100px; /* Ensure minimum width */
    text-align: center; /* Center the text */
    white-space: nowrap; /* Prevent text wrapping */
}
.status-badge.compliant {
    background-color: #C6F6D5;
    color: #22543D;
}
.status-badge.non-compliant {
    background-color: #FED7D7;
    color: #822727;
}
.status-badge.under-review {
    background-color: #FEEBC8;
    color: #744210;
}

/* Test results styles */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.left-controls, .right-controls {
    display: flex;
    align-items: center;
}
.left-controls .selector-group {
    margin-right: 20px;
}
.selector-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.selector-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.selector-group label {
    margin-right: 0.5rem;
    white-space: nowrap;
}
.system-select {
    width: 300px; /* Adjust this value based on your longest AI system name */
}
.system-select, .date-picker {
    height: 40px;
    border-radius: 6px;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    padding: 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: hsl(var(--foreground));
    outline: none;
    transition: border-color 0.2s ease-in-out;
}
.system-select:focus, .date-picker:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}
.test-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11%, 1fr)); /* Set min width to 11% and allow expansion */
    gap: 20px;
    width: 100%; /* Ensure the grid takes full width */
}
.test-kpi-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}
.test-kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.test-kpi-card.selected {
    background-color: var(--card-bg-color);
}
.test-kpi-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.test-kpi-icon {
    margin-right: 12px;
    transition: transform 0.3s ease;
}
.test-kpi-card:hover .test-kpi-icon {
    transform: scale(1.1);
}
.test-kpi-title {
    font-weight: bold;
}
.test-kpi-value {
    font-size: 24px;
    font-weight: bold;
}
.results-table-container {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.results-table th {
    position: sticky;
    top: 0;
    background-color: #f2f2f2;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}
.results-table th, .results-table td {
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.results-table tr:last-child td {
    border-bottom: none;
}
.results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.results-table tr:hover {
    background-color: #f5f5f5;
}
/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .2s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .2s;
}
input:checked + .slider {
    background-color: var(--primary);
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}
input:checked + .slider:before {
    transform: translateX(18px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}
@media (max-width: 1400px) {
    .test-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .test-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .selector-group {
        margin-bottom: 0.5rem;
    }
    .system-select, .date-picker {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .test-kpi-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.chart-container {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    width: 100%; /* Ensure it takes full width of the parent */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
}
.chart-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%; /* Ensure it takes full width of the container */
    margin-bottom: 10px; /* Add a small margin between rows */
    padding: 5px 0; /* Add some vertical padding */
}
.chart-row h3 {
    width: 300px;
    margin: 0;
    padding-right: 20px;
}
.mini-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex-grow: 1;
}
.mini-chart {
    width: calc(25% - 15px);
    min-width: 200px;
    height: 150px; /* Reduced from 200px */
}
.results-table-container {
    display: none;
}

@media (max-width: 1200px) {
    .chart {
        width: calc(50% - 10px);
    }
}
@media (max-width: 768px) {
    .chart {
        width: 100%;
    }
}

/* base user and bell styles */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-section {
    display: flex;
    align-items: center;
}
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 10px;
    margin-right: 20px;
    font-size: 20px;
    display: inline-block;
}
.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
}
.tooltip {
    display: none;
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    top: 100%;
    right: 0;
    margin-top: 10px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.tooltip.show {
    display: block;
}
#tooltip-link {
    color: #fff;
    text-decoration: none;
    margin-left: 5px;
    cursor: pointer;
}
#tooltip-link:hover {
    text-decoration: underline;
}
.tooltip .fa-external-link-alt {
    margin-left: 2px;
}

/* Issues styles */
.table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#issues-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

#issues-table th,
#issues-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

#issues-table th {
    position: sticky;
    top: 0;
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
    z-index: 10;
    cursor: pointer;
}

#issues-table th.sortable:hover {
    background-color: #edf2f7;
}

#issues-table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

#issues-table tbody tr:hover {
    background-color: #f1f5f9;
}

.issue-name {
    cursor: pointer;
    color: #3182ce;
    text-decoration: none;
}

.issue-name:hover {
    text-decoration: underline;
}

.issue-details {
    display: none;
}

.issue-details-content {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px;
    position: relative;
}

.issue-details h4 {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.issue-details ul {
    list-style-type: none;
    padding-left: 0;
}

.issue-details li {
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f7fafc;
    border-radius: 4px;
}

.issue-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.issue-status-new { background-color: #9ae6b4; color: #22543d; }
.issue-status-open { background-color: #faf089; color: #744210; }
.issue-status-in-progress { background-color: #90cdf4; color: #2c5282; }
.issue-status-resolved { background-color: #e9d8fd; color: #44337a; }
.issue-status-closed { background-color: #cbd5e0; color: #1a202c; }

.issue-priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.issue-priority-low { background-color: #c6f6d5; color: #22543d; }
.issue-priority-medium { background-color: #feebc8; color: #7b341e; }
.issue-priority-high { background-color: #fed7d7; color: #742a2a; }
.issue-priority-critical { background-color: #feb2b2; color: #9b2c2c; }

.linked-issue {
    color: #3182ce;
    text-decoration: none;
    cursor: pointer;
}

.linked-issue:hover {
    text-decoration: underline;
}

/* New styles for creating gap between button and table */
#create-issue-btn {
    margin-bottom: 20px;
}

.manage-issues-content {
    margin-top: 20px;
}

/* New styles for close button */
.close-details {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: #4a5568;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
}

.close-details:hover {
    color: #2d3748;
}

/* New styles for sort indicators */
.sort-indicator {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
}

.sort-asc .sort-indicator {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #4a5568;
}

.sort-desc .sort-indicator {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #4a5568;
}

.selected-row {
    background-color: rgba(59, 130, 246, 0.1); /* Light blue background */
    transition: background-color 0.3s ease;
}

.selected-row:hover {
    background-color: rgba(59, 130, 246, 0.2); /* Slightly darker on hover */
}

.issue-row {
    transition: background-color 0.3s ease;
}

.issue-row.selected-row {
    background-color: rgba(59, 130, 246, 0.1); /* Light blue background */
}

.issue-row.selected-row:hover {
    background-color: rgba(59, 130, 246, 0.2); /* Slightly darker on hover */
}

/* Ensure the selected row style overrides any existing styles */
#issues-table tbody tr.issue-row.selected-row {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

#issues-table tbody tr.issue-row.selected-row:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

/* Reduce space between rows in issue comments and history */
.issue-details-content ul {
    margin: 0;
    padding-left: 20px;
}

.issue-details-content li {
    margin-bottom: 0.1rem;
}

.issue-details-content h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.1rem;
}



.overview-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    /*padding: 1rem;*/
}

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

.card {
    background-color: var(--card-background);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--card-foreground);
}

.card-content {
    color: var(--card-muted-foreground);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-2 h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--card-muted-foreground);
}

.grid-2 p {
    margin: 0;
    color: var(--card-foreground);
}

.badge-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--badge-radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-secondary {
    background-color: var(--badge-secondary-background);
    color: var(--badge-secondary-foreground);
}

.badge-destructive {
    background-color: var(--badge-destructive-background);
    color: var(--badge-destructive-foreground);
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

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

.ai-system-card-header, .ai-model-card-header, .ai-dataset-card-header {
    position: relative;
}

.warning-triangle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.warning-triangle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    right: 0;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1;
}

.warning-triangle::before {
    content: '';
    position: absolute;
    bottom: 75%;
    right: 10px;
    border: 5px solid transparent;
    border-top-color: #333;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.warning-triangle:hover::after,
.warning-triangle:hover::before {
    visibility: visible;
    opacity: 1;
}


.menu-tooltip {
    position: fixed;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-tooltip.visible {
    opacity: 1;
}


.model-details-wrapper, .system-details-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    overflow-x: hidden;
    padding: 1.5rem;
}

.model-details-left, .system-details-left {
    flex: 0 0 70%;
    max-width: 70%;
}

.model-details-right, .system-details-right {
    flex: 0 0 30%;
    max-width: 30%;
}

.model-description, .system-description {
    margin-bottom: 2rem;
}

.model-description h2, .system-description h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.model-description p, .system-description p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.model-info-grid, .system-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.model-sources h2, 
.system-sources h2,
.use-cases h2,
.model-details-right h2,
.system-details-right h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.sources-grid {
    display: grid;
    gap: 0.75rem;
}

.source-item h3 {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.25rem;
}

.source-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563EB;
    text-decoration: none;
    font-size: 0.875rem;
    word-break: break-all;
}

.source-link i {
    font-size: 0.75rem;
    color: #6B7280;
}

.use-cases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.use-cases-list {
    list-style: none;
    padding: 0;
    font-size: 0.875rem;
    color: #374151;
}

.use-cases-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.model-metadata, .system-metadata {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem; /* Added padding to model-metadata */
    background-color: #F9FAFB; /* Light background color for visual separation */
    border-radius: 0.5rem; /* Rounded corners */
}

.primary-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #FFFFFF;
    background-color: #2563EB;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .model-details-wrapper, .system-details-wrapper {
        flex-direction: column;
        padding: 1rem;
    }

    .model-details-left,
    .model-details-right,
    .system-details-left,
    .system-details-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .model-info-grid, .system-info-grid {
        grid-template-columns: 1fr;
    }

    .model-metadata, .system-metadata {
        padding: 1rem; /* Adjusted padding for smaller screens */
    }
}

#model-description, #system-description {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}

#model-description:focus, #system-description:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.model-details-wrapper, .system-details-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    overflow-x: hidden;
    padding: 1.5rem;
}

.model-details-left, .system-details-left{
    flex: 0 0 70%;
    max-width: 70%;
}

.model-details-right, .system-details-right {
    flex: 0 0 30%;
    max-width: 30%;
}

.model-metadata, .system-metadata {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #F9FAFB;
    border-radius: 0.5rem;
}

.metadata-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metadata-dropdown label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6B7280;
}

.metadata-dropdown select {
    padding: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

/* New styles for the selected item details */
.selected-item-details {
    margin-top: 2rem;
}

.selected-item-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.selected-item-card-content {
    padding: 1.5rem;
}

.selected-item-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.selected-item-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
}

.selected-item-meta {
    display: flex;
    gap: 1.5rem;
}

.meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.response-badge,
.evidence-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

.response-badge {
    background-color: #E6F0FF;
    color: #0547E3;
}

.evidence-badge {
    background-color: #F0FDF4;
    color: #166534;
}

.meta-details {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: #6b7280;
    padding-left: 0.5rem;
}

.meta-details span {
    line-height: 1.4;
}

.selected-item-section {
    margin-bottom: 1.25rem;
}

.selected-item-section:last-child {
    margin-bottom: 0;
}

.selected-item-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 0.5rem 0;
}

.selected-item-section p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1a202c;
    margin: 0;
}

.selected-item-card-content p {
    margin-bottom: 0.5rem;
}

.selected-item-card-content strong {
    font-weight: 600;
    color: #4a5568;
}

.readiness-column.right-column {
    display: flex;
    flex-direction: column;
}

.selected-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.selected-item-card {
    flex-grow: 1;
    width: 100%;
}

/* Updated styles for table row hover, selected states, and padding */
.inner-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.inner-table tbody tr {
    transition: background-color 0.2s ease;
}

.inner-table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
    cursor: pointer;
}

.inner-table tbody tr.selected {
    background-color: rgba(59, 130, 246, 0.2);
}

.inner-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Ensure the hover effect doesn't apply to the section header */
.checklist-table .section-header,
.checklist-table .section-header:hover,
.checklist-table .section-header-content,
.checklist-table .section-header-content:hover {
    background-color: inherit;
    cursor: default;
}

.checklist-table .section-header td {
    background-color: inherit;
    padding: 0.75rem;
}

/* Styles for the section items container */
.checklist-table .section-items:hover {
    background-color: inherit;
}

.checklist-table .section-items > td {
    padding: 0;
}

/* Adjust the width of specific columns */
.inner-table .item-column {
    width: 25%;
}

.inner-table .requirement-column {
    width: 45%;
}

.inner-table .narrow-column {
    width: 10%;
    text-align: center;
}

/* Specific styles for section header content */
.section-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: #f1f5f9;
    /*border-bottom: 1px solid #e2e8f0;*/
}

.section-name {
    font-weight: bold;
    font-size: 1.1em;
}

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

.section-toggle {
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .prerequisites-content {
        flex-direction: column;
    }

    .readiness-column.left-column,
    .readiness-column.right-column {
        width: 100%;
    }
}

/* Add animation styles for the badges */
.response-badge,
.evidence-badge {
    transition: all 0.3s ease-in-out;
}

.response-badge.response-yes,
.evidence-badge.evidence-yes {
    animation: badgeUpdate 0.5s ease-in-out;
}

.response-badge.response-no,
.evidence-badge.evidence-no {
    animation: badgeUpdate 0.5s ease-in-out;
    background-color: #FEE2E2;
    color: #991B1B;
}

@keyframes badgeUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Add data attributes to track selected row */
tr[data-section-index][data-item-index] {
    transition: background-color 0.3s ease;
}

tr[data-section-index][data-item-index].selected {
    background-color: rgba(59, 130, 246, 0.1);
}


/* ROI tab styles */
.roi-tab-layout {
    display: flex;
    gap: 2rem;
    padding: 1rem;
}

.roi-tab-systems-container {
    flex: 1;
    max-width: 600px;
}

.roi-tab-system-details {
    height: 100%;
}

.roi-tab-systems-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.roi-tab-system-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.roi-tab-system-card:hover {
    background-color: var(--accent);
}

.roi-tab-system-card.selected {
    border-color: var(--primary);
}

.roi-tab-detail-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.roi-tab-detail-content {
    padding: 1.5rem;
}

.roi-tab-empty-state {
    color: var(--muted-foreground);
    text-align: center;
    padding: 2rem;
}

.roi-tab-error {
    color: var(--destructive);
    text-align: center;
    padding: 1rem;
    background-color: var(--destructive-foreground);
    border-radius: var(--radius);
    margin: 1rem;
}

.roi-tab-system-card .ai-card-header {
    display: flex;
    align-items: center;
    gap: 1rem; /* Adds spacing between icon and content */
}

.roi-tab-system-card .ai-card-icon {
    flex-shrink: 0; /* Prevents icon from shrinking */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roi-tab-system-card .ai-card-title {
    min-width: 0; /* Allows text to truncate properly */
}

.roi-tab-system-card .ai-card-name {
    font-size: 0.925rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roi-tab-system-card .ai-card-owner {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
    margin-top: 0.25rem;
}

.roi-input-group {
    margin-bottom: 1rem;
}

.roi-result {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Container styles */
.roi-content {
    display: flex;
    height: calc(100vh - 250px);
    overflow: hidden; /* Prevent overall container scroll */
}

/* Left panel styles */
.roi-tab-left-panel {
    width: 20%;
    border-right: 1px solid var(--border);
    padding-right: 1rem;
    overflow-y: auto; /* Keep scroll for left panel */
}

/* Right panel styles */
.roi-tab-right-panel {
    width: 80%;
    padding-left: 1rem;
    overflow-y: hidden; /* Remove scroll from right panel */
}

/* Update the system details container */
.roi-tab-system-details {
    height: 100%;
    overflow-y: hidden;
}

/* Override the general tab-content overflow for ROI tab */
#roi.tab-content {
    overflow-y: hidden;
}

/* Ensure roi-content takes full height */
.roi-content {
    height: calc(100vh - 250px);
    display: flex;
    overflow: hidden;
}

/* Left panel with scroll */
.roi-tab-left-panel {
    width: 20%;
    border-right: 1px solid var(--border);
    padding-right: 1rem;
    overflow-y: auto;
}

/* Right panel without scroll */
.roi-tab-right-panel {
    width: 80%;
    padding-left: 1rem;
    overflow: hidden;
}

/* System details container */
.roi-tab-system-details {
    height: 100%;
    overflow: hidden;
}

/* Add inline form group styles */
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-group-inline label {
flex: 0 0 200px;
text-align: right;
font-size: 0.875rem;
color: var(--foreground);
}

.form-group-inline input {
flex: 1;
max-width: 300px;
padding: 0.5rem;
border: 1px solid var(--border);
border-radius: var(--radius);
background-color: var(--background);
}

#roi-tab-system-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.section-container {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary), 0.1);
}

/* Header styles */
.roi-tab-right-panel {
    flex: 1;
    min-height: 0;
    position: relative;
}

.roi-tab-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.roi-tab-detail-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.roi-tab-detail-content {
    padding: 1.5rem;
}

.roi-card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.roi-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.roi-card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.roi-card-content {
    padding: 1.5rem;
}

.roi-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.roi-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.roi-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.roi-form-group input,
.roi-form-group select {
    height: 2.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--background);
}

.kpi-badge-revenue,
.kpi-badge-cost,
.kpi-badge-risk,
.kpi-badge-compliance {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.kpi-badge-revenue { background-color: #22c55e; }
.kpi-badge-cost { background-color: #ef4444; }
.kpi-badge-risk { background-color: #f59e0b; }
.kpi-badge-compliance { background-color: #6366f1; }

.roi-summary {
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

.roi-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roi-summary-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.roi-summary-content #roiValue, .roi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.roi-expected-value, .roi-delta-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.roi-tab-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.roi-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.roi-card-header {
    padding: 0.5rem 1rem; /* Reduced from 0.75rem */
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
}

.roi-card-title {
    font-size: 1rem; /* Reduced from 1.125rem */
    font-weight: 600;
    color: #111827;
    line-height: 1; /* Added to reduce vertical space */
}

.roi-card-content {
    padding: 1rem;
}

.roi-form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.roi-form-row:last-child {
    margin-bottom: 0;
}

.roi-form-row label {
font-size: 0.875rem;
    font-weight: 500;
    width: 8rem;
    flex-shrink: 0;
}

.roi-card:nth-child(2) .roi-form-row label {
    width: 10rem;
}

.roi-form-row input,
.roi-form-row select {
    width: 12rem;
    height: 2.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--background);
    margin-right: 1rem;
}

.roi-form-row input:last-child,
.roi-form-row select:last-child {
    margin-right: 0;
}

/* Hide sections when no system selected */
.roi-tab-system-details {
    display: none;
}

.roi-tab-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Add the standard appearance property along with vendor prefixes */
.roi-form-row input[type="number"] {
    appearance: textfield; /* Standard */
    -webkit-appearance: textfield; /* Webkit/Blink */
    -moz-appearance: textfield; /* Firefox */
}

/* Remove spinner for Webkit browsers */
.roi-form-row input[type="number"]::-webkit-outer-spin-button,
.roi-form-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.formatted-number {
    display: inline-block;
    height: 2.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--background);
    cursor: text;
    width: 12rem;
    font-size: 0.875rem;
    line-height: 1; /* Match the label */
    align-content: center;
}

/* Remove hover effect */
.formatted-number:hover {
    border-color: var(--border-color);
}

/* Ensure inputs have same alignment */
.roi-form-row input,
.roi-form-row select {
    line-height: 1;
    font-size: 0.875rem;
}

.roi-tab-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.roi-tab-detail-header .system-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.roi-tab-detail-header .system-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.roi-summary {
    display: none;
}


/* Overview Layout */
.ai-governance-overview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow: visible; /* Changed from overflow: hidden */
}

.overview-row {
    display: flex;
    flex-direction: column;
}

.overview-row h4 {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* Section Styles */
.governance-section, .flows-section {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.governance-section h3, .flows-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Governance Grid */
.governance-grid, .ai-overview-card-grid {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.governance-scores {
    flex: 0 0 50%;
}

.governance-commentary {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.governance-commentary .ai-overview-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Governance Status Card */
.ai-overview-governance-status-card {
    flex: 0 0 20%;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.governance-status-score {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.governance-status {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1;
}

.governance-score {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

/* Governance Table */
.ai-overview-card.governance-scores {
    flex: 1;
    min-width: 0; /* Allows the card to shrink below its content size */
}

.ai-overview-card-content {
    overflow-x: auto; /* Allow horizontal scrolling for the table if needed */
    overflow-y: visible; /* Prevent vertical scrolling within the card */
}

.governance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.governance-table th,
.governance-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.governance-table th {
    font-weight: 600;
    color: var(--muted-foreground);
    background-color: var(--muted);
    position: sticky;
    top: 0;
    z-index: 10;
}

.governance-table tr:last-child td {
    border-bottom: none;
}

.governance-table td:nth-child(2),
.governance-table th:nth-child(2) {
    text-align: center;
    width: 15%;
}

.governance-table td:nth-child(3),
.governance-table th:nth-child(3) {
    text-align: center;
    width: 15%;
}

.governance-table td:nth-child(3) span {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.governance-table td:nth-child(1),
.governance-table th:nth-child(1) {
    width: 20%;
}

.governance-table td:nth-child(4),
.governance-table th:nth-child(4) {
    width: 50%;
}

@media (max-width: 768px) {
    .governance-table {
        font-size: 0.75rem;
    }

    .governance-table th,
    .governance-table td {
        padding: 0.5rem;
    }

    .governance-table td:nth-child(4),
    .governance-table th:nth-child(4) {
        display: none;
    }

    .governance-table td:nth-child(1),
    .governance-table th:nth-child(1),
    .governance-table td:nth-child(2),
    .governance-table th:nth-child(2),
    .governance-table td:nth-child(3),
    .governance-table th:nth-child(3) {
        width: 33.33%;
    }
}

@media (max-width: 768px) {
    .governance-table {
        font-size: 0.75rem;
    }

    .governance-table th,
    .governance-table td {
        padding: 0.5rem;
    }

    .governance-table td:nth-child(4),
    .governance-table th:nth-child(4) {
        display: none;
    }
}

/* Rating Colors */
.rating-fully.compliant {
    background-color: #34d399;
    color: #064e3b;
}
.rating-excellent {
    background-color: #009b31;
    color: #ffffff;
}
.rating-good {
    background-color: #54be74;
    color: #000000;
}
.rating-fair {
    background-color: #ffd94e;
    color: #000000;
}
.rating-not.compliant {
    background-color: #bc0000;
    color: #ffffff;
}

/* Add this new style for any rating that doesn't match the above */
.rating-unknown {
    background-color: #c2c2c2;
    color: #000000;
}

/* Updated styles for flows section */
.flows-section {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    width: 100%;
    overflow: hidden;
}

.flow-diagram {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.flow-diagram svg {
    width: 100%;
    height: 100%;
}

.tab-content#overview{
    flex: 1;
    /*padding: 1rem 1rem 0 1rem;*/
    font-family: inherit;
    overflow-y: hidden;
}



/* New styles for regulation section */
.regulation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    min-height: 0; /* Important for Firefox */
}

.regulation-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--foreground);
}

/* New wrapper for better map positioning */
.map-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0; /* Important for Firefox */
    padding: 1rem;
}

/* Updated world map container */
#world-map-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100vh - 200px);
    overflow: hidden;
}

#world-map-container svg {
    width: auto;
    height: 100%;
    max-width: 100%;
}

#world-map-container svg path {
    stroke: #333;
    stroke-width: 0.5;
}

/* New styles for hotspots */
.hotspot {
    fill: var(--primary);
    cursor: pointer;
    transition: fill 0.3s ease;
}

.hotspot:hover {
    fill: var(--primary-dark, #0435b3);
}

/* New styles for regulation info */
.regulation-info {
    position: absolute;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
    max-width: 300px;
    z-index: 1000;
}

.regulation-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.regulation-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Style for the status tag */
.regulation-status-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
}


/* Business Case ROI Calculator Styles */
.buscase-roi-columns {
    display: flex;
    gap: 2rem;
}

.buscase-roi-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.buscase-roi-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: #f9fafb;
}

.buscase-roi-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.buscase-roi-card-content {
    padding: 1.5rem;
}

.buscase-roi-form-row {
    display: flex;
    align-items: center;
}

.buscase-roi-form-row label {
    flex: 0 0 60%;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.buscase-roi-form-row input,
.buscase-roi-form-row select {
    flex: 1;
    height: 2rem;
    margin: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    /*color: #111827;*/
    background-color: #ffffff;
}

.buscase-roi-form-row input:focus,
.buscase-roi-form-row select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.buscase-roi-form-row input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Estimated ROI Results Styling */
#estimatedTotalCost,
#estimatedCurrentCost,
#estimatedTargetCost,
#estimatedReturn,
#estimatedROI {
    font-weight: 600;
    color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .buscase-roi-form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .buscase-roi-form-row label {
        flex: 0 0 100%;
        margin-bottom: 0.5rem;
    }

    .buscase-roi-form-row input,
    .buscase-roi-form-row select {
        width: 100%;
    }
}


.buscase-summary-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.buscase-summary-container {
    display: flex;
    gap: 2rem;
    flex: 1;
    overflow: hidden;
}

.buscase-summary-basic-info {
    flex: 0 0 40%; /* Reduce the width of the left column */
}

.buscase-summary-financials {
    flex: 0 0 50%; /* Increase the width of the right column */
}
.buscase-summary-section {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.buscase-summary-section h3 {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.buscase-summary-scope-dropdowns {
    display: flex;
    gap: 1rem;
}

.buscase-summary-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.buscase-summary-dropdown label {
    margin-bottom: 0.25rem;
}

.buscase-summary-dropdown select,
.buscase-summary-section input[type="text"],
.buscase-summary-section input[type="number"],
.buscase-summary-section textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.buscase-summary-section textarea {
    flex: 1;
    min-height: 4rem;
    resize: none;
}

.buscase-summary-recommended-solution-table {
    width: 100%;
    border-collapse: collapse;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.buscase-summary-recommended-solution-table tbody {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.buscase-summary-recommended-solution-table tr {
    display: flex;
    /*border-bottom: 1px solid #ccc;*/
}

.buscase-summary-recommended-solution-table th,
.buscase-summary-recommended-solution-table td {
    padding: 0.5rem;
    text-align: left;
    display: flex;
    align-items: center;
}

.buscase-summary-recommended-solution-table th {
    /*background-color: #f0f0f0;
    font-weight: bold;
    width: 30%;
    flex: 0 0 30%;*/
    flex: 0 0 30%;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.buscase-summary-recommended-solution-table td {
    width: 70%;
    flex: 0 0 70%;
}

.buscase-summary-recommended-solution-table td input,
.buscase-summary-recommended-solution-table td textarea {
    width: 100%;
}

@media (max-width: 768px) {
    .buscase-summary-container {
        flex-direction: column;
    }
}

.selected-buscase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}

.buscase-icon-and-name {
    display: flex;
    align-items: center;
}

.buscase-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0547E3; /* Default color, you can change this dynamically */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.buscase-icon i {
    color: white;
    font-size: 1.25rem;
}

#selected-buscase-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.buscase-close-tabs {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #666;
    cursor: pointer;
}

.buscase-close-tabs:hover {
    color: #333;
}


/* Approval tab styles */
.buscase-approval-info-group {
    margin-bottom: 1rem;
}

.buscase-approval-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.buscase-approval-item input[type="text"],
.buscase-approval-item select {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-approval-item .buscase-approval-status {
    width: 20px;
    height: 20px;
}

.buscase-approval-item .buscase-approval-remove {
    background-color: var(--destructive);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

#buscase-approval-add {
    margin-top: 1rem;
}


/* Solution Options tab styles */
.buscase-options-content {
    height: 100%;
    overflow: hidden;
}

.buscase-options-info-group {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#buscase-options-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* Add some padding to account for potential scrollbar */
}

.buscase-options-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-options-item input[type="text"],
.buscase-options-item textarea,
.buscase-options-item input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-options-item textarea {
    min-height: 4rem;
    resize: vertical;
}

.buscase-options-pros-cons {
    display: flex;
    gap: 1rem;
}

.buscase-options-pros,
.buscase-options-cons {
    flex: 1;
    min-height: 4rem;
}

.buscase-options-cost-remove {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buscase-options-cost {
    flex-grow: 1;
    margin-right: 1rem;
}

.buscase-options-remove {
    background-color: var(--destructive);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

#buscase-options-add {
    margin-top: 1rem;
}


/* Stakeholders tab styles */
.buscase-stakeholders-info-group {
    margin-bottom: 1rem;
}

.buscase-stakeholders-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.buscase-stakeholders-item input[type="text"],
.buscase-stakeholders-item select {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-stakeholders-item .buscase-stakeholders-remove {
    background-color: var(--destructive);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

#buscase-stakeholders-add {
    margin-top: 1rem;
}


/* Project Team tab styles */
.buscase-team-info-group {
    margin-bottom: 1rem;
}

.buscase-team-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.buscase-team-item input[type="text"],
.buscase-team-item select {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-team-item .buscase-team-remove {
    background-color: var(--destructive);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

#buscase-team-add {
    margin-top: 1rem;
}


/* Risks tab styles */
.buscase-risks-info-group {
    margin-bottom: 1rem;
}

.buscase-risks-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-risks-item input[type="text"],
.buscase-risks-item select,
.buscase-risks-item textarea {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-risks-item input[type="text"].buscase-risks-id {
    width: 100px;
}

.buscase-risks-item input[type="text"].buscase-risks-name {
    flex-grow: 1;
}

.buscase-risks-item textarea {
    width: 100%;
    min-height: 4rem;
    resize: vertical;
}

.buscase-risks-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.buscase-risks-dropdown-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buscase-risks-item select {
    width: 150px;
}

.buscase-risks-color-marker {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.buscase-risks-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.buscase-risks-score .score-value {
    min-width: 2ch;
    text-align: center;
}

.risk-rating {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: white;
    font-size: 0.875rem;
}

.buscase-risks-item .buscase-risks-remove {
    background-color: var(--destructive);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

#buscase-risks-add {
    margin-top: 1rem;
}

.buscase-risks-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.buscase-risks-dropdowns {
    display: flex;
    gap: 1rem;
}

.buscase-risks-dropdown-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buscase-risks-item select {
    width: 120px;
}

.buscase-risks-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    margin-left: auto;
}



/* Implementation tab styles */
.buscase-implementation .implementation-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.buscase-implementation .accordion-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.buscase-implementation .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--muted);
    cursor: pointer;
}

.buscase-implementation .accordion-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.buscase-implementation .accordion-toggle {
    font-size: 0.875rem;
}

.buscase-implementation .accordion-content {
    padding: 1rem;
    display: none;
}

.buscase-implementation .implementation-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.buscase-implementation .implementation-item input[type="text"],
.buscase-implementation .implementation-item input[type="date"],
.buscase-implementation .implementation-item textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.buscase-implementation .implementation-item textarea {
    min-height: 4rem;
    resize: vertical;
}

.buscase-implementation .add-item-btn,
.buscase-implementation .remove-item-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
}

.buscase-implementation .add-item-btn {
    background-color: var(--primary);
    color: white;
    margin-top: 1rem;
}

.buscase-implementation .remove-item-btn {
    background-color: var(--destructive);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .buscase-implementation .implementation-item {
        flex-direction: column;
    }
}

/* Risk assessment styles */
.buscase-risks-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.buscase-risks-dropdowns {
    display: flex;
    gap: 1rem;
}

.buscase-risks-dropdown-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buscase-risks-item select {
    width: 120px;
}

.buscase-risks-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    margin-left: auto;
}

/* Timeline styles */
.timeline {
    position: relative;
    height: 150px; /* Increased height to accommodate text below the line */
    margin: 20px 0;
    background-color: var(--muted);
    border-radius: var(--radius);
    padding: 0 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30%; /* Moved the line higher */
    left: 60px;
    right: 60px;
    border-top: 2px solid var(--border);
}

.timeline-item {
    position: absolute;
    top: 30%; /* Align with the line */
    transform: translateX(-50%);
    min-width: 120px;
}

.timeline-point {
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.timeline-content {
    position: absolute;
    top: 20px; /* Adjust distance from the line */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 120px;
    word-wrap: break-word;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0 0 4px 0; /* Add some space between date and name */
}

.timeline-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    max-width: 120px; /* Limit width to prevent overlap */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Page title icon */
.page-title-icon {
    margin-right: 8px;
}


/* ROI dashboard */
.roi-dashboard-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.roi-dashboard-content svg {
    background-color: white;
    border-radius: 4px;
}
.roi-dashboard-content text {
    font-family: Arial, sans-serif;
    font-size: 12px;
}
.roi-dashboard-content .domain {
    stroke: #ccc;
}
.roi-dashboard-content .tick line {
    stroke: #ddd;
}
.roi-dashboard-content .tick text {
    fill: #666;
}

.roi-tooltip {
    text-align: left;
    padding: 12px;
    font: 14px sans-serif;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
}
.dashboard-layout {
    display: flex;
    gap: 20px;
}
#scatter-plot-container {
    flex: 1;
    max-height: 560px;
}
#data-table-container {
    flex: 1;
    overflow-y: auto;
    max-height: 550px;
}
#systems-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}
#systems-data-table th,
#systems-data-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}
#systems-data-table th {
    background-color: #f2f2f2;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: normal;
    padding: 8px;
    text-align: left;
}
#systems-data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
#systems-data-table tr:hover {
    background-color: #e9e9e9;
}
.highlighted {
    background-color: #ffff99 !important;
}
#systems-data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#systems-data-table tbody tr:hover {
    background-color: #f0f0f0;
}

#systems-data-table tbody tr.selected {
    background-color: #e0e0e0;
    font-weight: bold;
}

.point-group {
    cursor: pointer;
}
.roi-line {
    pointer-events: none;
}

/* Add to existing styles.css */
.y-axis-select-container {
    display: flex;
    flex-direction: column; 
    gap: 0.5rem;
    width: 200px;
    padding-right: 1rem; /* Add spacing between container and chart */
}

.y-axis-select-container label {
    white-space: nowrap;
    margin: 0;
    padding: 0; /* Remove any default padding */
    font-size: 0.875rem;
}

.y-axis-select-container select {
    width: 100%;
    min-width: 120px;
    padding: 0.375rem 0; /* Remove left/right padding */
    margin: 0; /* Remove any margins */
}

#data-table-container {
    flex: 1; /* Allow table to take remaining space */
    overflow-x: auto; /* Enable horizontal scroll if needed */
}

#systems-data-table {
    width: 100%; /* Table fills container */
}

.dashboard-controls {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

.dashboard-layout {
    display: flex;
    gap: 1rem;
    overflow: hidden;
}

/* Add to existing styles.css */
.roi-tab-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.roi-controls-container {
    display: flex;
    flex-direction: column; /* Use flex column layout */
    gap: 1rem;
}

.roi-controls {
    display: flex;
    flex-direction: row; /* Change to column layout */
}

.y-axis-select-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 200px;
}

.roi-key {
    display: flex;
    flex-direction: row; /* Change to column layout */
    gap: 0.5rem;
    font-size: 0.875rem; /* Make the key text smaller */
}

.roi-key-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roi-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block; /* Ensure marker is shown */
    margin-left: 01rem; /* Add space between marker and text */
}

.roi-marker.current-roi {
    background-color: steelblue;
}

.roi-marker.previous-roi {
    background-color: #ccc;
}

.roi-marker.expected-roi {
    background-color: steelblue;
    opacity: 0.5;
}

.scatter-plot-container {
    height: 300px; /* Adjust height to fit */
    flex: 0 0 auto;
    margin-right: 1rem; /* Add padding between chart and table */
}

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

#systems-data-table {
    width: 100%;
}

/* Op model styles */
.hierarchy-container {
    display: flex;
    gap: 1rem;
    overflow: hidden; /* Ensure no horizontal scroll */
    height: 100%; /* Extend to fill parent */
}
.hierarchy-left {
    width: 85%; /* Left side takes up 80% of the width */
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    transition: width 0.3s ease; /* Add transition for width */
}
.hierarchy-right {
    width: 15%; /* Right side takes up 20% of the width */
    padding: 1rem;
    border-left: 1px solid #ccc;
    box-sizing: border-box;
    transition: width 0.3s ease, padding 0.3s ease; /* Add transition for padding */
    position: relative; /* Ensure the toggle button is positioned correctly */
}
.hierarchy-right.collapsed {
    width: 0;
    padding: 0;
    border: none;
}
.control-panel-content {
    display: block;
}
.hierarchy-right.collapsed .control-panel-content {
    display: none;
}
#toggle-control-panel {
    position: absolute;
    top: 50%;
    left: -30px; /* Adjust position to ensure visibility */
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000; /* Increase z-index to ensure it appears in front */
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 40px; /* Set width */
    height: 40px; /* Set height */
}
.level1 {
    width: calc((100% - 3rem) / 4); /* 4 boxes per row with 1rem gap between them */
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}
.level1-name {
    margin-bottom: 10px; /* Add space below the name */
    font-weight: bold;
    cursor: pointer; /* Make cursor look clickable */
    position: relative; /* Required for tooltip */
}
.level2 {
    width: 100%; /* Full width within the level 1 box */
    padding: 10px;
    border: 1px solid #aaa;
    border-radius: 6px;
    margin-bottom: 5px;
    box-sizing: border-box;
    font-size: 0.9em; /* Smaller font size */
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer; /* Make cursor look clickable */
    position: relative; /* Required for tooltip */
}

.level2-name {
    margin-bottom: 5px; /* Add space below the name */
    font-weight: 600;
}

.hierarchy-group-1 { background-color: rgba(232, 244, 252, 0.6); }
.hierarchy-group-2 { background-color: rgba(232, 252, 235, 0.6); }
.hierarchy-group-3 { background-color: rgba(252, 243, 232, 0.6); }
.hierarchy-group-4 { background-color: rgba(243, 232, 252, 0.6); }
.hierarchy-group-5 { background-color: rgba(252, 232, 244, 0.6); }
.hierarchy-group-6 { background-color: rgba(232, 252, 252, 0.6); }
.hierarchy-group-7 { background-color: rgba(245, 245, 220, 0.6); }
.hierarchy-group-8 { background-color: rgba(230, 230, 250, 0.6); }

/* Tooltip styling */
.hierarchy-tooltip {
    position: absolute;
    top: 100%; /* Position below the element */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%) translateY(10px); /* Center horizontally and add vertical space */
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 6px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.7rem;
    font-weight: 500;
    max-width: 300px; /* Set max width to 300px */
    width: auto; /* Allow width to adjust */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break within the width */
}

.level1-name:hover .hierarchy-tooltip,
.level2:hover .hierarchy-tooltip {
    opacity: 1;
}

.toggle-tooltip {
    position: relative;
    display: inline-block;
    width: 30px; 
    height: 18px;
    margin: 0 4px;
    vertical-align: middle;
}

.toggle-tooltip input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-tooltip .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 17px;
}

.toggle-tooltip .slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-tooltip input:checked + .slider {
    background-color: #2196F3;
}

.toggle-tooltip input:checked + .slider:before {
    transform: translateX(10px);
}

.metric-marker {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    /*margin-right: 4px;*/
}

.metric-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.metric-name, .metric-value-text {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 3px;
    cursor: pointer; /* Indicate that it can be clicked */
    transition: color 0.3s ease, transform 0.3s ease; /* Add transition for color and transform */
}

.metric-name:hover, .level1-name:hover, .level2-name:hover {
    color: #007BFF; /* Change color on hover */
}

.metric-value {
    margin-bottom: 6px; /* Add gap between metric names */
}

.metric-description, .level1-description, .level2-description, .metric-comment {
    margin-top: 5px;
    font-size: 0.8rem;
    font-weight: 400;
    color: black
}

.metric-value-colour {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-right: 2px;
    margin-bottom: 2px;
}

.metric-value-colour:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.colour-box {
    width: 10px;
    height: 10px;
    border-radius: 50px;
    border: 1px solid #ccc;
}

.colour-label {
    font-size: 12px;
    color: #333;
    margin-left: 4px;
}

.show-all-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dataset styles */
.overview-content {
display: flex;
flex-direction: column;
gap: 1.5rem;
}

.overview-left-column,
.overview-right-column {
flex: 1;
display: flex;
flex-direction: column;
gap: 1.5rem;
}

.overview-top-row,
.overview-bottom-row {
display: grid;
gap: 1.5rem;
margin-bottom: 1.5rem;
}

.overview-top-row {
grid-template-columns: repeat(3, 1fr);
}

.overview-bottom-row {
grid-template-columns: repeat(4, 1fr);
}

.overview-card {
background: white;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
padding: 1.5rem;
display: flex;
flex-direction: column;
}

.overview-card h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 1rem;
color: #111827;
}

.overview-card p {
color: #4b5563;
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 1rem;
}

.overview-card ul {
list-style: none;
padding: 0;
margin: 0;
}

.overview-card li {
color: #4b5563;
font-size: 0.875rem;
line-height: 1.5;
margin-bottom: 0.5rem;
}

.statistics-list,
.sensitivity-list,
.security-list {
margin-bottom: 1rem;
}

.statistics-item,
.sensitivity-item,
.security-item {
position: relative;
padding-left: 1rem;
}

.statistics-item:before,
.sensitivity-item:before,
.security-item:before {
content: "•";
position: absolute;
left: 0;
color: #6b7280;
}

.security-heading {
font-weight: 500;
margin-top: 1rem;
}

.overview-card p:last-child,
.overview-card ul:last-child {
margin-bottom: 0;
}

.roles-table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}

.roles-table th,
.roles-table td {
padding: 0.5rem;
text-align: left;
border-bottom: 1px solid #e5e7eb;
}

.roles-table th {
font-weight: 600;
color: #111827;
}

.roles-table td {
color: #4b5563;
}

.tag-group {
display: flex;
gap: 0.5rem;
}

.tag {
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
border-radius: 9999px;
font-weight: 500;
}

.tag.version {
background-color: #e5e7eb;
color: #374151;
}

.tag.date {
background-color: #dbeafe;
color: #1e40af;
}

/* New styles for top and bottom rows */

@media (max-width: 1200px) {
.overview-top-row,
.overview-bottom-row {
    grid-template-columns: 1fr;
}
.overview-content {
    flex-direction: column;
}
}

@media (max-width: 1024px) {
.overview-bottom-row {
    grid-template-columns: 1fr;
}
}

@media (max-width: 768px) {
.overview-top-row,
.overview-bottom-row {
    grid-template-columns: 1fr;
}
}

.roles-card,
.description-card,
.details-card {
overflow-x: auto;
}

.roles-table {
min-width: 100%;
}


.attributes-container {
    display: flex;
    gap: 2rem;
    padding: 1rem;
}

.attributes-left-column {
    flex: 1;
    max-width: 50%;
}

.attributes-right-column {
    flex: 1;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.attributes-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
}

.attributes-card h3 {
    color: #1a202c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.attributes-card ul {
    list-style-type: none;
    padding-left: 0;
}

.attributes-card ul.data-examples li {
    margin-bottom: 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
}

.attributes-table-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.attributes-table th,
.attributes-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.attributes-table th {
    background-color: #f8fafc;
    font-weight: 600;
}

.attributes-table tr:hover {
    background-color: #f8fafc;
}

.attributes-table .quality-score {
    font-weight: bold;
    text-align: center;
}

.attributes-table .quality-score.red {
    background-color: #FFCCCB;
    color: #8B0000;
}

.attributes-table .quality-score.yellow {
    background-color: #FFFFA7;
    color: #8B8000;
}

.attributes-table .quality-score.green {
    background-color: #90EE90;
    color: #006400;
}

/* Home page styles */
.home-content {
    display: flex;
    flex-direction: column; /* Arrange children in rows */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .home-content-left,
  .home-content-right {
    flex: 1 1 calc(50% - 1rem); /* Adjust flex-basis to account for gap */
    min-width: 300px; /* Ensure a minimum width for readability */
  }
  
  .ai-risk-visual,
  .ai-value-visual {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
  }
  
  .risk-box,
  .value-box {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 1.5rem;
    text-align: left;
  }
  
  .overall-risk,
  .overall-value {
    margin-bottom: 1.5rem;
  }
  
  .risk-breakdown,
  .value-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .risk-score,
  .value-score {
    font-size: 2.25rem;
    font-weight: bold;
    margin: 0.75rem 0;
  }
  
  .risk-trend,
  .value-trend {
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 0.375rem;
  }
  
  .risk-trend .fa-arrow-up,
  .value-trend .fa-arrow-up {
    font-size: 1rem;
  }
  
  .home-content h3,
  .home-content h4 {
    margin: 0;
    color: #1e293b;
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 0.5rem;
  }
  
  .home-content h3 i,
  .home-content h4 i {
    font-size: 1.25rem;
  }
  
  /* RAG colour scheme for risk boxes */
  .risk-box.high-risk {
    background-color: #ffebee;
    border-color: #ffcdd2;
  }
  
  .risk-box.medium-risk {
    background-color: #fff3e0;
    border-color: #ffe0b2;
  }
  
  .risk-box.low-risk {
    background-color: #e8f5e9;
    border-color: #c8e6c9;
  }
  
  .high-risk .risk-score,
  .high-risk i,
  .high-risk .risk-trend {
    color: #d32f2f;
  }
  
  .medium-risk .risk-score,
  .medium-risk i,
  .medium-risk .risk-trend {
    color: #f57c00;
  }
  
  .low-risk .risk-score,
  .low-risk i,
  .low-risk .risk-trend {
    color: #388e3c;
  }
  
  /* Value box colours */
  .value-box {
    background-color: #e3f2fd;
    border-color: #bbdefb;
  }
  
  .value-box .value-score,
  .value-box i,
  .value-box .value-trend {
    color: #1565c0;
  }
  
  /* Responsive design */
  @media (max-width: 768px) {
    .home-content {
      flex-direction: column;
    }
  
    .risk-breakdown,
    .value-breakdown {
      grid-template-columns: 1fr;
    }
  }
  
  /* Donut Charts Styles */
  .home-content-bottom {
    margin-bottom: 2rem;
    padding: 0 1.5rem 1.5rem; /* Add padding to match other sections */
  }
  
  .donut-charts-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .donut-chart {
    flex: 1 1 calc(20% - 1rem); /* 5 charts per row, accounting for gap */
    min-width: 200px;
    max-width: 260px;
    background-color: white;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem; /* Add margin to separate rows */
    height: 200px;
  }
  
  .donut-chart h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #1e293b;
  }
  
  .donut-chart canvas {
    width: 100%;
  }
  
  /* Responsive design for donut charts */
  @media (max-width: 1400px) {
    .donut-chart {
      flex-basis: calc(25% - 1rem); /* 4 charts per row */
    }
  }
  
  @media (max-width: 1200px) {
    .donut-chart {
      flex-basis: calc(33.33% - 1rem); /* 3 charts per row */
    }
  }
  
  @media (max-width: 900px) {
    .home-content-left,
    .home-content-right {
      flex-basis: 100%; /* Full width on smaller screens */
    }
    .donut-chart {
      flex-basis: calc(50% - 1rem); /* 2 charts per row */
    }
  }
  
  @media (max-width: 600px) {
    .donut-chart {
      flex-basis: 100%; /* 1 chart per row */
    }
  }

.clickable {
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable:hover {
transform: translateY(-5px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* New sidebar with submenus */
.sidebar-container {
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    width: 250px; /* Set a fixed width for the sidebar */
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    background: var(--primary);
    transition: all 0.3s ease;
    height: 100vh;
}

.sidebar ul {
    padding-left: 0;
}

.sidebar .logo-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 10px;
}

/* Container for icon and logo name */
.logo-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    margin-left: 12px;
}

.sidebar .logo-details i {
    font-size: 1.2rem;
    color: white;
}

.sidebar .logo-details .logo_name {
    font-size: 1.1rem;
    color: var(--primary-foreground);
    font-weight: 600;
    margin-left: 16px;
}

.sidebar.close .logo-details .logo_name {
    opacity: 0;
    pointer-events: none;
}

/* Environment badge styles */
.environment-badge {
    display: block;
    font-size: 0.8rem;
    font-weight: normal;
    color: #a0aec0;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 50px; /* Align with the logo name */
}

/* Environment-specific colors */
.environment-badge.dev {
    color: var(--primary-foreground);
}

.environment-badge.demo {
    color: var(--rag-green);
}

.environment-badge.prod {
    color: var(--rag-red);
}

.sidebar .nav-links {
    height: 100%;
    padding: 10px 0 15px 0;
    overflow: auto;
}

.sidebar.close .nav-links {
    overflow: visible;
}

.sidebar .nav-links::-webkit-scrollbar {
    display: none;
}

.sidebar .nav-links li {
    position: relative;
    list-style: none;
    transition: all 0.4s ease;
}

.sidebar .nav-links li:hover {
    background: var(--sidebar-hover-bg);
}

.sidebar .nav-links li .iocn-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.close .nav-links li .iocn-link {
    display: block;
}

.sidebar .nav-links li i {
    height: 40px;
    min-width: 60px;
    text-align: center;
    line-height: 40px;
    color: var(--primary-foreground);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar .nav-links li.showMenu i.arrow {
    transform: rotate(-180deg);
}

.sidebar.close .nav-links i.arrow {
    display: none;
}

.sidebar .nav-links li a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-links li a .link_name {
    font-size: 16px;
    font-weight: 400;
    color: var(--primary-foreground);
}

.sidebar.close .nav-links li a .link_name {
    opacity: 0;
    pointer-events: none;
}

.sidebar .nav-links li .sub-menu {
    padding: 6px 6px 14px 80px;
    margin-top: -10px;
    background: var(--primary);
    display: none;
}

.sidebar .nav-links li.showMenu .sub-menu {
    display: block;
    padding: 6px 6px 14px 60px;
    margin-top: -10px;
}

.sidebar .nav-links li .sub-menu a {
    color: var(--primary-foreground);
    font-size: 15px;
    padding: 5px 0;
    white-space: nowrap;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.sidebar .nav-links li .sub-menu a:hover {
    opacity: 1;
}

.sidebar.close .nav-links li .sub-menu {
    position: absolute;
    left: 100%;
    top: -10px;
    margin-top: 0;
    padding: 10px 20px;
    border-radius: 0 6px 6px 0;
    transition: all 0.4s ease;
    opacity: 0;
    display: block;
    pointer-events: none;
    transition: 0s;
}

.sidebar.close .nav-links li:hover .sub-menu {
    top: 0;
    opacity: 1;
    pointer-events: auto;
}

.sidebar .nav-links li .sub-menu .link_name {
    display: none;
}

.sidebar.close .nav-links li .sub-menu .link_name {
    font-size: 18px;
    opacity: 1;
    display: block;
}

.sidebar .nav-links li .sub-menu.blank {
    opacity: 1;
    pointer-events: auto;
    padding: 3px 20px 6px 16px;
    opacity: 0;
    transition: 0s;
}

.sidebar .nav-links li:hover .sub-menu.blank {
    top: 50%;
    transform: translateY(-50%);
}

.sidebar.close + .main-content {
    margin-left: 60px; /* Width of closed sidebar */
    width: calc(100% - 60px);
}

hr {
    border-color: var(--primary-hover);
}

.toggle-sidebar {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--primary-foreground);
    border: 2px solid var(--background);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    font-size: 12px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.toggle-sidebar:hover {
    background: var(--primary-foreground);
    color: var(--primary);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}

.sidebar .nav-item.active > .sub-menu {
    display: block !important;  /* Force submenu to stay open */
    max-height: 1000px;        /* Adjust value based on your needs */
}

.sidebar .sub-menu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: calc(var(--submenu-padding) - 3px);  /* Adjust for border */
}

/* Optional: Add hover effects */
.sidebar .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Active submenu item */
.sidebar .sub-menu a.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Parent menu item when submenu is active */
.sidebar .nav-links li.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Style for active submenu items */
.sidebar .nav-links li .sub-menu a.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Keep submenu open when active */
.sidebar .nav-links li.active .sub-menu {
    display: block !important;
}

/* Remove any existing hover effects that might interfere */
.sidebar .nav-links li.active:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .sub-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Login styles */
body.login-page {
    background: linear-gradient(to right, var(--primary), var(--primary-hover));
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

body.login-page .login-wrapper {
    display: flex;
    width: 800px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

body.login-page .login-info {
    flex: 1;
    padding: 40px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

body.login-page .login-info .logo {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 20px;
}

body.login-page .login-info .logo_name {
    font-size: 24px;
    color: #333;
    margin-left: 10px;
}

body.login-page .login-info p {
    font-size: 16px;
    color: #666;
}

body.login-page .login-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.login-page .login-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

body.login-page .form-group {
    margin-bottom: 20px;
    text-align: left;
}

body.login-page .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

body.login-page .form-group input,
body.login-page .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

body.login-page button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

body.login-page button[type="submit"]:hover {
    background: var(--primary-hover);
}

body.login-page .secondary-btn {
    width: 100%;
    padding: 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 5px;
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease, color 0.3s ease;
    border: 2px solid var(--primary);
}

body.login-page .secondary-btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.request-user-modal {
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.request-user-modal-content {
    background: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 420px; /* Reduce from 500px to 420px for better fit */
    position: relative;
}

.request-user-modal-content .secondary-btn {
    width: 100%;         /* Make button fill modal width */
    min-width: 0;        /* Remove min-width */
    max-width: 100%;     /* Prevent overflow */
    display: block;
    margin: 20px auto 0 auto;
    box-sizing: border-box; /* Ensure padding doesn't overflow */
}
.request-user-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.user-avatar {
    cursor: pointer;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    padding: 10px;
    text-align: center;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
    width: 200px;
}

.user-menu.show {
    display: block;
}

.user-menu .form-group {
    margin-bottom: 15px;
}

.user-menu label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.user-menu select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.user-menu button {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.user-menu button:hover {
    background: var(--primary-hover);
}


/* Home content styles */
.home-content {
    display: flex;
    /*padding: 20px;*/
    height: 100%;
}

.home-column {
    flex: 1; /* Allow the column to grow and fill available vertical space */
    display: flex;
    flex-direction: column; /* Ensure the content inside the column is arranged vertically */
    justify-content: space-between; /* Space out the content within the column */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ffffff; /* Optional: Add a background color */
    overflow: hidden; /* Prevent scrolling for the entire column */
    max-height: 500px; /* Set a maximum height for the column */
}

.home-column h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #444;
    margin: 0;
}

.home-column p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    margin-bottom: 0.5rem;
}

.primary-button {
    background-color: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s ease-in-out;
}

.primary-button:hover {
    background-color: var(--accent-hover);
}



/* Modern Risk Dashboard KPI Cards */
.ai-risk-dashboard {
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .ai-risk-dashboard-header {
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .ai-risk-dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
  }
  
  .ai-risk-dashboard-header p {
    color: #64748b;
    font-size: 0.875rem;
  }
  
  .ai-risk-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  /* Card styles */
  .ai-risk-card {
    position: relative;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Add cursor pointer to indicate clickable */
  }
  
  .ai-risk-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
  }
  
  .ai-risk-card.total-risk::before {
    background-color: #3b82f6; /* Blue */
  }
  
  .ai-risk-card.very-high-risk::before {
    background-color: #7f1d1d; /* Dark red */
}

  .ai-risk-card.high-risk::before {
    background-color: #ef4444; /* Red */
  }
  
  .ai-risk-card.medium-risk::before {
    background-color: #f59e0b; /* Amber */
  }
  
  .ai-risk-card.low-risk::before {
    background-color: #10b981; /* Green */
  }

  .ai-risk-card.very-low-risk::before {
    background-color: #0ea5e9; /* Blue */
}

  .ai-risk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
  
  .ai-risk-card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-width: 2px;
    border-style: solid;
  }
  
  .ai-risk-card.total-risk.active {
    border-color: #3b82f6; /* Blue */
  }

  .ai-risk-card.very-high-risk.active {
    border-color: #7f1d1d; /* Dark red */
}

  .ai-risk-card.high-risk.active {
    border-color: #ef4444; /* Red */
  }
  
  .ai-risk-card.medium-risk.active {
    border-color: #f59e0b; /* Amber */
  }
  
  .ai-risk-card.low-risk.active {
    border-color: #10b981; /* Green */
  }

  .ai-risk-card.very-low-risk.active {
    border-color: #0ea5e9; /* Blue */
}

  .ai-risk-card-header {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .ai-risk-card-icon {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.75rem;
  }
  
  .total-risk .ai-risk-card-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
  }

  .very-high-risk .ai-risk-card-icon {
    background-color: rgba(127, 29, 29, 0.1);
    color: #7f1d1d;
}

  .high-risk .ai-risk-card-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
  }
  
  .medium-risk .ai-risk-card-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
  }
  
  .low-risk .ai-risk-card-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
  }

  .very-low-risk .ai-risk-card-icon {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

  .ai-risk-card-icon i {
    font-size: 1rem;
  }
  
  .ai-risk-card-title h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
  }
  
  /* Update the card body to use flexbox for positioning the value and trend side by side */
  .ai-risk-card-body {
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
  }
  
  .ai-risk-card-value-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
  }
  
  .ai-risk-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    transition: transform 0.3s ease;
  }
  
  .ai-risk-card:hover .ai-risk-card-value {
    transform: scale(1.05);
    transform-origin: left;
  }
  
  /* Remove the description margin since we're removing the description */
  .ai-risk-card-description {
    display: none; /* Hide the description */
  }
  
  .ai-risk-card-trend, .board-card-trend, .home-card-trend {
    padding: 0.1rem 0.3rem;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    border-radius: 9999px;
    width: fit-content;
  }
  
  .ai-risk-card-trend.up {
    background-color: var(--trend-green);
    color: black;
  }
  
  .ai-risk-card-trend.down {
    background-color: var(--trend-red);
    color: white;
  }
  
  .ai-risk-card-trend.neutral {
    background-color: var(--rag-neutral);
    color: white;
  }
  
  .ai-risk-card-trend.green {
    background-color: var(--trend-green);
    color: white;
  }
  
  .ai-risk-card-trend.red {
    background-color: var(--trend-red);
    color: white;
  }
  
  .ai-risk-card-trend.neutral {
    background-color: var(--rag-neutral);
    color: white;
  }

  .ai-risk-card-trend i {
    margin-right: 0.25rem;
  }
  
  /* Chart containers - Updated to include all three elements */
  .ai-risk-dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 0.75rem;
  }
  
  .ai-risk-chart-container {
    padding: 0.75rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 220px; /* Reduced height */
  }
  
  .ai-risk-chart-container.chart {
    align-items: center; /* Center chart content */
  }
  
  .ai-risk-chart-container h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    text-align: center;
    width: 100%;
  }
  
  /* Canvas container to ensure proper sizing */
  .ai-risk-chart-container canvas {
    width: 100% !important;
    height: calc(100% - 1.5rem) !important;
    max-height: 200px;
  }
  
  /* Full-width risk details section */
  .ai-risk-details-section {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
  }
  
  /* Risk details header with title and clear filter button */
  .risk-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.clear-filter-btn {
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    order: 2; /* Ensure clear button comes after toggle */
}

.clear-filter-btn:hover {
    background-color: #e5e7eb;
}

  .ai-risk-details-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    text-align: left;
    width: 100%;
    position: sticky;
    top: 0;
    background-color: white;
    padding: 0.25rem 0.5rem;
    z-index: 2;
  }
  
  /* Table container to ensure proper scrolling */
  .risk-details-table-container {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Risk details table styles */
  .risk-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    table-layout: fixed;
  }

  /* Column widths to prevent horizontal scrolling */
.risk-details-table th:nth-child(1),
.risk-details-table td:nth-child(1) {
  width: 8%;
}

.risk-details-table th:nth-child(2),
.risk-details-table td:nth-child(2) {
  width: 18%;
}

.risk-details-table th:nth-child(3),
.risk-details-table td:nth-child(3) {
  width: 18%;
}

.risk-details-table th:nth-child(4),
.risk-details-table td:nth-child(4) {
  width: 18%;
}

.risk-details-table th:nth-child(5),
.risk-details-table td:nth-child(5),
.risk-details-table th:nth-child(6),
.risk-details-table td:nth-child(6),
.risk-details-table th:nth-child(7),
.risk-details-table td:nth-child(7),
.risk-details-table th:nth-child(8),
.risk-details-table td:nth-child(8),
.risk-details-table th:nth-child(9),
.risk-details-table td:nth-child(9) {
  width: 8%;
  text-align: center;
}

.risk-details-table td {
  padding: 0.35rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  line-height: 1.2;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Left-aligned table headers */
.risk-details-table th {
    padding: 0.35rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    background-color: #f8fafc;
    line-height: 1.2;
  }

/* Center align specific column headers */
.risk-details-table th.center-align {
    text-align: center;
}
  
  /* Color coding for risk types */
  .risk-details-table .risk-type {
    font-weight: 500;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    text-align: center;
    width: 60px;
  }
  
  .risk-details-table .very-high-risk {
    background-color: rgba(127, 29, 29, 0.1);
    color: #7f1d1d;
}

  .risk-details-table .high-risk {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
  }
  
  .risk-details-table .medium-risk {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
  }
  
  .risk-details-table .low-risk {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
  }

  .risk-details-table .very-low-risk {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

  /* Color coding for risk scores */
  .risk-details-table .risk-score,
  .risk-details-table .risk-appetite-cell {
    text-align: center;
    font-weight: normal;
    width: 70px;
    color: #1e293b;
    font-size: 0.75rem;
    border-radius: 0.25rem;
  }
  
  /* Inherent Risk and Residual Risk color coding */
  .risk-details-table .very-high-score {
    background-color: rgba(127, 29, 29, 0.1);
    color: #7f1d1d;
    font-weight: 500;
}

  .risk-details-table .high-score {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-weight: 500;
  }
  
  .risk-details-table .medium-score {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    font-weight: 500;
  }
  
  .risk-details-table .low-score {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 500;
  }

  .risk-details-table .very-low-score {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    font-weight: 500;
}

  /* Control Effectiveness color coding (inverse) */
  .risk-details-table .good-control {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-weight: 500;
  }
  
  .risk-details-table .medium-control {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    font-weight: 500;
  }
  
  .risk-details-table .poor-control {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-weight: 500;
  }

  .risk-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-align: center;
    padding: 1rem;
  }
  
  .risk-details-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .risk-details-empty p {
    font-size: 0.75rem;
  }
  
  /* Responsive adjustments */
  @media (max-width: 1200px) {
    .ai-risk-dashboard-charts {
      grid-template-columns: 1fr 1fr; /* Two columns on medium screens */
    }
  }
  
  @media (max-width: 768px) {
    .ai-risk-dashboard-cards {
      grid-template-columns: 1fr;
    }
  
    .ai-risk-dashboard-charts {
      grid-template-columns: 1fr; /* One column on small screens */
    }
  
    .ai-risk-chart-container {
      height: 200px; /* Smaller height on mobile */
    }
  
    .ai-risk-details-section {
      max-height: 250px;
    }
  }
  
  /* Make better use of horizontal space on larger screens */
  @media (min-width: 1200px) {
    .ai-risk-dashboard-cards {
      grid-template-columns: repeat(6, 1fr); /* Force 4 columns on larger screens */
    }
  }


  /* Risk Framework Styles */
.framework-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
  }
  
  .framework-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .framework-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .framework-selector label {
    font-weight: 500;
    color: var(--foreground);
  }
  
  .framework-selector select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    min-width: 200px;
  }
  
  .framework-table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  
  .framework-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
  }
  
  .framework-table thead {
    position: sticky;
    top: 0;
    background-color: var(--muted);
    z-index: 10;
  }
  
  .framework-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--foreground);
    border-bottom: 1px solid var(--border);
  }
  
  .framework-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }
  
  /* Hierarchical styling */
  .framework-table .l1-row {
    background-color: var(--background);
    font-weight: 600;
  }
  
  .framework-table .l2-row {
    background-color: var(--muted);
  }
  
  .framework-table .l2-row .risk-id,
  .framework-table .l2-row .risk-name {
    padding-left: 1.5rem;
  }
  
  .framework-table .l3-row .risk-id,
  .framework-table .l3-row .risk-name {
    padding-left: 3rem;
  }
  
  .framework-table .risk-id {
    width: 15%;
    font-family: monospace;
  }
  
  .framework-table .risk-name {
    width: 25%;
  }
  
  .framework-table .risk-description {
    width: 60%;
  }
  
  .loading-container,
  .error-container {
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
  }
  
  .error-container {
    color: var(--destructive);
  }
  
  .empty-message {
    text-align: center;
    padding: 2rem;
    color: var(--muted-foreground);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .framework-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
  
    .framework-selector {
      width: 100%;
    }
  
    .framework-selector select {
      width: 100%;
    }
  
    .framework-table .risk-id {
      width: 20%;
    }
  
    .framework-table .risk-name {
      width: 30%;
    }
  
    .framework-table .risk-description {
      width: 50%;
    }
  }
  
/* Control effectiveness percentage styles */
.control-effectiveness-cell {
    text-align: center;
    font-weight: 500;
    position: relative;
}

.control-effectiveness-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: 2px;
}

.control-effectiveness-high {
    color: #10b981;
}

.control-effectiveness-medium {
    color: #f59e0b;
}

.control-effectiveness-low {
    color: #ef4444;
}

/* Risk appetite styles */
.risk-appetite-cell {
    text-align: center;
    font-weight: 500;
}

/* Risk appetite exceeded indicator */
.risk-appetite-exceeded {
    background-color: rgba(239, 68, 68, 0.15);
    position: relative;
    text-align: left; /* Align text to the left */
    padding-left: 10px; /* Add some padding on the left */
}

.risk-appetite-exceeded::after {
    content: "⚠️";
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 14px;
}

/* Add this new style for the appetite status text */
.appetite-status-text {
    display: inline-block;
    width: calc(100% - 25px); /* Make room for the icon */
}

.risk-appetite-within {
    background-color: rgba(16, 185, 129, 0.1);
}

/* Toggle switch styles */
.risk-details-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; /* Push controls to the right */
  }

  .appetite-toggle-container {
    display: flex;
    align-items: center;
    gap: 5px;
    order: 1; /* Ensure toggle comes before clear button */
  }
  
  .appetite-toggle-label {
    font-size: 0.875rem;
    color: #4b5563;
  }
  
  .appetite-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
  }
  
  .appetite-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .appetite-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
  }
  
  .appetite-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  
  input:checked + .appetite-toggle-slider {
    background-color: #ef4444;
  }
  
  input:focus + .appetite-toggle-slider {
    box-shadow: 0 0 1px #ef4444;
  }
  
  input:checked + .appetite-toggle-slider:before {
    transform: translateX(20px);
  }
  
  .appetite-toggle-text {
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 120px;
  }

/* Add styles for the system link */
.system-link {
color: #3b82f6;
text-decoration: none;
font-weight: 500;
transition: color 0.2s, text-decoration 0.2s;
display: inline-flex;
align-items: center;
}

.system-link:hover {
color: #2563eb;
text-decoration: underline;
}

.system-link:after {
content: "\f35d";
font-family: "Font Awesome 5 Free";
font-weight: 900;
font-size: 0.75em;
margin-left: 0.25rem;
opacity: 0.7;
}

#tab3.tab-content #risk{
    max-height: none !important; /* Override the inline max-height */
    overflow-y: hidden !important; /* Override the inline overflow-y */
    height: calc(100vh - 250px) !important; /* Set a fixed height that fits the screen */
}

.tab3-layout #risk {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 200px);
    overflow: hidden; /* Prevent the entire container from scrolling */
}

.tab3-layout .framework-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Container should not scroll */
    max-height: 100%; /* Ensure it doesn't exceed parent height */
}

.tab3-layout .framework-header{
    flex-shrink: 0; /* Prevent header from shrinking */
}

.tab3-layout .framework-table-container {
    overflow-y: auto; /* Only the table container should scroll */
}

.tab3-layout .risk-panel {
    flex: 2;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Risk panel should not scroll */
    max-height: 100%; /* Ensure it doesn't exceed parent height */
}

.risk-panel h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.risk-panel p {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

#controls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#controls-table th,
#controls-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

#controls-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

#controls-table tbody tr:hover {
    background-color: #f1f5f9;
    cursor: pointer;
}

#appetite-table-body tr {
    cursor: pointer;
}

#appetite-table-body tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Style for the risk details panel */
.risk-panel .risk-detail-item {
    margin-bottom: 1rem;
}

.risk-panel .risk-detail-label {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.risk-panel .risk-detail-value {
    padding-left: 0.5rem;
}



/* Risk Panel Header Styles */
.risk-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.risk-panel-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.risk-id {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.risk-matrix-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.risk-panel-framework {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.framework-label {
    font-size: 0.75rem;
    color: #64748b;
}

.framework-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.risk-panel-content {
    overflow-y: auto;
    max-height: calc(100% - 70px); /* Adjust based on header height */
}

/* New layout for risk assessment */
.risk-assessment-layout {
    display: flex;
    gap: 20px;
}

.risk-assessment-controls-column {
    flex: 1;
    min-width: 0; /* Allow column to shrink if needed */
}

.risk-matrix-column {
    flex: 1.5; /* Give the matrix more space */
    min-width: 0; /* Allow column to shrink if needed */
}

/* Risk Assessment Container */
.risk-assessment-container {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

/* Risk Score Display */
.risk-score-display {
    margin-top: 15px;
}

/* Risk Matrix Styles */
.risk-matrix-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* For absolute positioning of axis labels */
}

.risk-matrix {
    display: flex;
    margin-bottom: 10px;
    position: relative; /* For absolute positioning of axis labels */
}

.risk-matrix-content {
    display: flex;
    flex-direction: column;
}

.risk-matrix-labels {
    display: flex;
    justify-content: space-between;
}

.risk-matrix-labels.y-labels {
    flex-direction: column;
    padding-right: 5px;
    height: 250px;
}

.risk-matrix-labels.x-labels {
    flex-direction: row;
    width: 250px;
    padding-top: 5px;
}

.risk-matrix-label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-align: center;
    flex: 1;
}

.risk-matrix-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    width: 250px;
    height: 250px;
    gap: 2px;
}

.risk-matrix-cell {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.risk-matrix-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Styles for inherent risk and risk appetite indicators */
.risk-matrix-cell.selected-cell-inherent::before {
    content: "I";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    z-index: 5;
}

.risk-matrix-cell.selected-cell-appetite::after {
    content: "A";
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    z-index: 5;
}

/* Risk level background colors */
.very-low-risk-bg {
    background-color: rgba(14, 165, 233, 0.7); /* Light blue */
}

.low-risk-bg {
    background-color: rgba(16, 185, 129, 0.7); /* Light green */
}

.medium-risk-bg {
    background-color: rgba(245, 158, 11, 0.7); /* Light amber */
}

.high-risk-bg {
    background-color: rgba(239, 68, 68, 0.7); /* Light red */
}

.very-high-risk-bg {
    background-color: rgba(127, 29, 29, 0.7); /* Dark red */
}

/* Risk matrix legend */
.risk-matrix-legend {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.risk-matrix-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.risk-matrix-legend-color {
    width: 15px;
    height: 15px;
    border: 1px solid #ccc;
}

.risk-matrix-legend-text {
    font-size: 12px;
    color: #333;
}

/* Risk assessment controls */
.risk-assessment-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-assessment-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-assessment-control label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    width: 80px; /* Fixed width for labels to align controls */
}

.risk-assessment-select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1; /* Take up remaining space */
}

/* Risk score styles */
.risk-matrix-score {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.very-high-score {
    background-color: rgba(127, 29, 29, 0.2);
    color: #7f1d1d;
}

.high-score {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.medium-score {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

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

.very-low-score {
    background-color: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
}

/* Axis labels - FIXED POSITIONING */
.risk-matrix-axis-labels {
    position: relative;
    width: 100%;
    height: 20px;
}

.risk-matrix-y-axis-label {
    position: absolute;
    transform: rotate(-90deg);
    left: -80px; /* Moved closer to the matrix */
    top: 125px; /* Positioned in the middle of the matrix */
    font-size: 12px;
    font-weight: bold;
    color: #333;
    width: 100px; /* Fixed width to ensure proper positioning */
    text-align: center;
}

.risk-matrix-x-axis-label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .risk-assessment-layout {
        flex-direction: column;
    }
    
    .risk-assessment-controls-column,
    .risk-matrix-column {
        flex: none;
        width: 100%;
    }
    
    /* Adjust axis label positions for mobile */
    .risk-matrix-y-axis-label {
        left: -30px;
        top: -125px;
    }
}

/* Regulations heatmap styles */
#heatmap-container {
    margin-bottom: 50px;
    display: flex;
    justify-content: left;
}
/*
#heatmap-container svg {
    font-family: 'Poppins', sans-serif;
}
*/
#heatmap-container .axis text {
    font-size: 12px;
    fill: #333;
}

#heatmap-container .axis path,
#heatmap-container .axis line {
    stroke: #ccc;
}

/* Heatmap cell cursor change */
#heatmap-container rect {
    cursor: pointer; /* Change cursor to pointer when hovering over cells */
    transition: stroke 0.2s ease; /* Only change the stroke, no movement */
}

#heatmap-container rect:hover {
    stroke: #000; /* Highlight border on hover */
}

/* Adjust space for system and regulation labels */
#heatmap-container .axis text {
    font-size: 12px;
    fill: #333;
    text-anchor: start; /* Align text to the start */
}

#heatmap-container .axis.x-axis text {
    transform: rotate(-45deg); /* Rotate for better readability */
    text-anchor: end; /* Align text to the end */
}

/* Adjust SVG size */
#heatmap-container svg {
    width: 800px; /* Revert to a smaller width */
    height: 400px; /* Revert to a smaller height */
}

/* Subtle styling for the data table */
#data-table {
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 12px; /* Smaller font size */
    width: 100%;
    border: 1px solid #ddd; /* Subtle border */
}

#data-table thead tr {
    background-color: #f9f9f9; /* Light gray background */
    color: #333; /* Darker text */
    text-align: left; /* Left-align headers */
    font-weight: bold;
}

#data-table th,
#data-table td {
    padding: 10px 12px; /* Adjust padding for better row height */
    text-align: left; /* Left-align data */
    border: 1px solid #ddd; /* Subtle border for cells */
}

#data-table tbody tr {
    border-bottom: 1px solid #ddd;
}

#data-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9; /* Light gray for alternating rows */
}

#data-table tbody tr:hover {
    background-color: #f1f1f1; /* Slightly darker gray on hover */
    cursor: pointer;
}

#tab1 #data-table-container {
    margin-top: 20px;
    display: none; /* Initially hidden */
    width: 100%;
    display: none;
}


/* Theme Container */
.board-theme-container {
    margin-bottom: 1rem; /* Reduce bottom margin */
    padding: 1rem; /* Reduce padding */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--muted);
    display: flex;
    flex-direction: column; /* Stack themes vertically */
    width: 100%; /* Full width for each theme */
}

/* Theme Header */
.board-theme-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem; /* Reduce bottom margin */
}

.board-theme-header h2 {
    font-size: 1.2rem; /* Reduce font size */
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.board-theme-header i {
    margin-right: 0.25rem; /* Reduce spacing between icon and text */
    color: var(--primary);
}

/* Theme Row */
.board-theme-row {
    display: flex; /* Use flexbox for layout */
    flex-direction: row; /* Arrange KPI cards in a row */
    gap: 1rem; /* Space between KPI cards */
    overflow-x: auto; /* Allow horizontal scrolling if cards exceed the container width */
    padding: 0.5rem 0; /* Reduce padding */
}

/* Board Container */
.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 2rem; /* Reduce padding */
    padding-right: 2rem; /* Reduce padding */
    padding-bottom: 2rem; /* Reduce padding */
    background-color: var(--background);
}

/* Board Grid */
.board-grid{
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack themes vertically */
    gap: 1rem; /* Reduce spacing between themes */
    width: 100%; /* Full width for the grid */
}

/* Board KPI Card */
.board-kpi-card, .home-kpi-card {
    position: relative;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06); /* Reduce shadow size */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.8rem; /* Reduce padding */
    border-left: 6px solid var(--primary); /* Reduce border size */
    flex: 1; /* Ensure all cards have the same width */
    max-width: 350px; /* Optional: Set a maximum width for the cards */
}

.board-kpi-card:hover, .home-kpi-card:hover {
    transform: translateY(-3px); /* Reduce hover effect */
    box-shadow: 0 6px 10px -3px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05); /* Reduce hover shadow */
}

/* KPI Name */
.board-kpi-card .board-kpi-name, .home-kpi-card .home-kpi-name {
    font-size: 0.9rem; /* Reduce font size */
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    margin-bottom: 0.25rem; /* Reduce bottom margin */
}

/* KPI Data Value */
.board-kpi-card .board-kpi-data-value, .home-kpi-card .home-kpi-data-value {
    font-size: 2rem; /* Reduce font size */
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem; /* Reduce bottom margin */
}

/* KPI Data Label */
.board-kpi-card .board-kpi-data-label, .home-kpi-card .home-kpi-data-label {
    font-size: 1rem; /* Reduce font size */
    color: var(--muted-foreground);
    margin-left: 0.4rem; /* Reduce left margin */
}

/* KPI Links */
.board-kpi-card .board-kpi-link, .home-kpi-card .home-kpi-link {
    font-size: 0.8rem; /* Reduce font size */
    color: var(--muted-foreground);
    margin: 0.15rem 0; /* Reduce vertical margin */
}

.board-kpi-card .board-kpi-link a, .home-kpi-card .home-kpi-link a {
    text-decoration: none;
}

.board-kpi-card .board-kpi-link a:hover, .home-kpi-card .home-kpi-link a:hover {
    text-decoration: underline;
}

/* RAG Status Colors */
.board-green-status, .home-green-status {
    border-left-color: var(--rag-green); /* Green for good status */
}

.board-amber-status, .home-amber-status {
    border-left-color: var(--rag-amber); /* Amber for warning status */
}

.board-red-status, .home-red-status {
    border-left-color: var(--rag-red); /* Red for critical status */
}

/* Link Status Colors */
.board-link-green, .home-link-green {
    color: var(--rag-green); /* Green */
}

.board-link-amber, .home-link-amber {
    color: var(--rag-amber); /* Yellow */
}

.board-link-red, .home-link-red {
    color: var(--rag-red); /* Red */
}



/* Vendor Completion Status Styling */
.vendor-completion-status {
    margin-bottom: 1.5rem;
}

.vendor-completion-bar {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--foreground);
}

.vendor-progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--muted);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 0.5rem;
}

.vendor-progress-bar-fill, .vendor-review-progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

/* Vendor Shared Table Styling */
.vendor-shared-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.vendor-shared-table th, .vendor-shared-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.vendor-shared-table th {
    background-color: var(--muted);
    font-weight: 600;
    color: var(--foreground);
}

.vendor-shared-table tr:last-child td {
    border-bottom: none;
}

.vendor-shared-table .vendor-file-status {
    text-align: center;
}

.vendor-uploaded-icon {
    color: var(--success);
    font-size: 1.25rem;
}

.vendor-not-uploaded-icon {
    color: var(--destructive);
    font-size: 1.25rem;
}

.vendor-approval-checkbox {
    cursor: pointer;
    transform: scale(1.2);
}

.vendor-upload-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-foreground);
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.vendor-upload-button:hover {
    background-color: var(--primary-hover);
}

.vendor-view-link {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}

.vendor-view-link:hover {
    text-decoration: underline;
}

.delete-file-button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.delete-file-button:hover {
    color: var(--danger-hover);
}


/* Vendor Profile Styling */
.vendor-profile .profile-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    justify-content: space-between; /* Ensure columns are spaced evenly */
}

.vendor-profile .profile-column {
    flex: 0 0 calc(50% - 1rem); /* Each column takes 50% of the width minus the gap */
    display: flex;
    flex-direction: row;
    gap: 1rem;
    min-width: 300px; /* Ensure columns don't shrink too much */
}

.vendor-profile .info-group {
    background-color: #ffffff;
    padding: 1rem;
}

.vendor-profile .info-group h2 {
    font-size: 0.875rem; /* Smaller font size */
    font-weight: 600; /* Bold font weight */
    color: #111827; /* Darker color */
    margin-bottom: 1rem; /* Space below the header */
}

.vendor-profile .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.vendor-profile .info-item:last-child {
    border-bottom: none;
}

.vendor-profile .info-label {
    font-weight: 600;
    font-size: 1rem;
}

.vendor-profile .info-value {
    font-weight: 400;
    color: #333333;
    font-size: 0.9rem;
    text-align: left;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .vendor-profile .profile-content {
        flex-direction: column; /* Stack columns vertically on smaller screens */
    }

    .vendor-profile .profile-column {
        flex: 1 1 100%; /* Columns take full width on smaller screens */
    }
}

.board-kpi-data-trend-container, .home-kpi-data-trend-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ensures the container spans the full width */
}

.board-card-trend, .home-card-trend {
    display: flex;
    align-items: center;
    margin-left: auto; /* Pushes the trend container to the far right */
}

.board-card-trend i, .home-card-trend i {
    margin-right: 8px; /* Adds space between the arrow and the trend value */
}

.board-card-trend span, .home-card-trend span {
    display: inline-block;
}

.board-card-trend.green, .home-card-trend.green {
    background-color: var(--trend-green);
    color: black;
}

.board-card-trend.red, .home-card-trend.red {
    background-color: var(--trend-red);
    color: black;
}

.board-card-trend.neutral, .home-card-trend.neutral {
    background-color: var(--rag-neutral);
    color: black;
}



.home-kpi-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    justify-content: space-between;
    align-items: flex-start; /* ← Changed to keep cards at top */
    min-height: 150px; 
}

@media (max-width: 768px) {
    .home-kpi-container {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
        justify-content: center; /* Center items when wrapped */
    }
}

.home-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Ensure columns stretch to fill vertical space */
    gap: 1.5rem; /* Add spacing between columns */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    height: 100%; /* Ensure the container takes up the full height */
}



/* Backlog Cards Container */
.backlog-cards-container,
.in-progress-cards-container {
    display: flex; /* Use flexbox for vertical alignment */
    flex-direction: column; /* Stack cards vertically */
    align-items: stretch; /* Ensure cards fill the width of the container */
    justify-content: flex-start; /* Align cards to the top */
    gap: 1rem; /* Add spacing between cards */
    padding-top: 1rem;
    box-sizing: border-box; /* Include padding in the width calculation */
    overflow-y: auto; /* Enable vertical scrolling if content overflows */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    flex-grow: 1; /* Allow the container to grow and fill available space */
}

/* Backlog Card and In-Progress Card */
.backlog-card, .in-progress-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px; /* Rounded corners */
    padding: 1rem; /* Add padding inside the card */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover effect */
    cursor: pointer; /* Indicate interactivity */
    width: calc(100% - 2.5rem); /* Ensure the card fills the container minus scrollbar space */
    max-width: 100%; /* Limit the card's width to prevent overflow */
}

/* Hover effect for cards */
.backlog-card:hover, .in-progress-card:hover {
    transform: translateY(-5px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}

/* Issue Name */
.home-issue-name {
    font-size: 0.9rem; /* Reduce font size */
    font-weight: 600; /* Slightly lighter font weight */
    margin-bottom: 0.25rem; /* Reduce bottom margin */
}

.home-issue-link {
    color: #3182ce; /* Blue color for links */
    text-decoration: none;
    font-weight: 500;
}

.home-issue-link:hover {
    text-decoration: underline;
}

.in-progress-card .issue-status {
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 0.01rem;
}

/* System Name */
.backlog-card .link-name, .in-progress-card .link-name {
    font-size: 0.8rem; /* Adjust font size */
    font-weight: 500;
    color: #4a5568; /* Set text color */
    margin-bottom: 0.01rem; /* Add spacing below */
}

/* Priority */
.backlog-card .priority, .in-progress-card .priority {
    font-size: 0.8rem; /* Reduce font size */
    font-weight: 600; /* Slightly lighter font weight */
    margin-bottom: 0.25rem; /* Reduce bottom margin */
}

.backlog-card .priority-critical, .in-progress-card .priority-critical {
    color: var(--rag-red); /* Red */
}

.backlog-card .priority-high, .in-progress-card .priority-high {
    color: var(--rag-amber); /* Amber */
}

.backlog-card .priority-medium, .in-progress-card .priority-medium {
    color: var(--rag-yellow); /* Orange */
}

.backlog-card .priority-low, .in-progress-card .priority-low {
    color: var(--rag-green); /* Green */
}

.backlog-card .priority-very-low, .in-progress-card .priority-very-low {
    color: var(--rag-dark-green); /* Green */
}

/* New Tag */
.backlog-card .new-tag {
    position: absolute;
    top: 0.5rem; /* Adjust position */
    right: 2rem; /* Adjust position */
    background-color: var(--rag-green); /* Blue */
    color: #ffffff;
    font-size: 0.7rem; /* Reduce font size */
    font-weight: 600; /* Slightly lighter font weight */
    padding: 0.15rem 0.4rem; /* Reduce padding */
    border-radius: 3px; /* Reduce border radius */
    text-transform: uppercase;
    z-index: 0; /* Ensure it does not overlap the priority circle */
}

/* New tag styling in modal */
.new-tag {
    display: inline-block;
    background-color: var(--rag-green);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}


/* Sort Buttons Container */
.sort-buttons-container {
    position: sticky; /* Make it stick to the top */
    top: 0; /* Stick to the top of the parent container */
    z-index: 10; /* Ensure it stays above other content */
    display: flex; /* Use flexbox for horizontal alignment */
    align-items: center; /* Vertically align label and buttons */
    justify-content: flex-start; /* Align items to the left */
    gap: 0.5rem; /* Add space between the label and buttons */
    background-color: #ffffff; /* Match the background color */
    padding: 10px 0; /* Add padding for spacing */
}

/* Sort Label */
.sort-label {
    font-size: 0.8rem; /* Smaller font size */
    font-weight: 600; /* Bold font weight */
    color: #4a5568; /* Muted text color */
    line-height: 1; /* Match the line height to the button height */
    margin: 0; /* Remove any default margins */
}

/* Sort Buttons */
.sort-buttons {
    display: flex;
    gap: 0.4rem; /* Reduce space between buttons */
    margin: 0; /* Remove any default margins */
}

.backlog-sort-button, .in-progress-sort-button {
    background-color: #f1f5f9; /* Light gray background for secondary buttons */
    color: #1e293b; /* Dark text color */
    border: 1px solid #e2e8f0; /* Light border */
    padding: 0.1rem 0.4rem; /* Reduce padding for smaller buttons */
    font-size: 0.75rem; /* Reduce font size */
    font-weight: 500; /* Slightly lighter font weight */
    border-radius: 4px; /* Slightly smaller border radius */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    display: flex;
    align-items: center; /* Center align text and marker */
    gap: 0.25rem; /* Add space between text and marker */
}

.backlog-sort-button:hover, .in-progress-sort-button:hover {
    background-color: #e2e8f0; /* Slightly darker gray on hover */
    color: #1e293b; /* Keep text color consistent */
}

.backlog-sort-button.active, .in-progress-sort-button.active {
    background-color: #e2e8f0; /* Highlight active button */
    color: #1e293b; /* Darker text for active button */
    font-weight: 600; /* Slightly bolder font weight */
}

.backlog-sort-button .sort-marker, .in-progress-sort-button .sort-marker {
    font-size: 0.75rem; /* Smaller marker size */
    color: #64748b; /* Muted color for marker */
}

.backlog-sort-button.active .sort-marker, .in-progress-sort-button.active .sort-marker {
    color: #1e293b; /* Darker color for active marker */
}


/* Priority Circle Tooltip */
.priority-circle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 1; /* Ensure it appears above other elements */
}

.priority-circle:hover::after {
    content: attr(title); /* Use the title attribute as the tooltip content */
    position: absolute;
    top: -30px; /* Position above the circle */
    right: 0;
    background-color: #1a202c; /* Dark background for the tooltip */
    color: #ffffff; /* White text for contrast */
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.priority-circle:hover::before {
    content: '';
    position: absolute;
    top: -10px; /* Position the arrow above the tooltip */
    right: 10px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #1a202c transparent; /* Arrow pointing down */
    z-index: 10;
}

/* Colors for Different Priority Levels */
.priority-critical {
    background-color: var(--rag-red); /* Red */
}

.priority-high {
    background-color: var(--rag-amber); /* Orange */
}

.priority-medium {
    background-color: var(--rag-yellow); /* Yellow */
    border: 1px solid #d69e2e; /* Slightly darker yellow border */
}

.priority-low {
    background-color: var(--rag-green); /* Green */
}

.priority-very-low {
    background-color: var(--rag-dark-green); /* Teal */
}

/* Ensure the card has relative positioning for the circle */
.backlog-card, .in-progress-card {
    position: relative;
}

/* Optional: Custom Tooltip Styling */
.priority-circle:hover::after {
    content: attr(title); /* Use the title attribute as content */
    position: absolute;
    top: -25px;
    right: 0;
    background-color: #1a202c;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}

/* Style for cards with "Closed" status */
.in-progress-card.closed-status {
    background-color: #E0E0E0; /* Light grey background */
    border: 1px solid #dcdcdc; /* Subtle grey border */
    color: #6b7280; /* Muted text color */
}



/* Home Issue Modal Styles */
.home-issue-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.home-issue-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 550px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

.home-issue-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.home-issue-close-button:hover {
    color: #333;
}

.home-issue-modal-content h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.home-issue-modal-body {
    margin-bottom: 25px;
}

.modal-field {
    margin-bottom: 18px;
}

.modal-field p {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.modal-field strong {
    min-width: 100px;
    display: inline-block;
    color: #555;
}

.modal-select, .modal-date-picker {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background-color: #f9f9f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-select:focus, .modal-date-picker:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 34, 60, 0.1);
    outline: none;
}

.modal-date-picker {
    cursor: pointer;
}

#save-issue-changes {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

#save-issue-changes:hover {
    background-color: var(--primary-hover);
}


/* Priority Tag Styles */
.priority-tag {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    color: #ffffff;
    text-transform: capitalize;
    margin-left: 10px;
}

/* Colors for Different Priority Levels */
.priority-critical {
    background-color: var(--rag-red); /* Red */
}

.priority-high {
    background-color: var(--rag-amber); /* Orange */
}

.priority-medium {
    background-color: var(--rag-yellow); /* Yellow */
    border: 1px solid #d69e2e; /* Slightly darker yellow border */
    color: #000000; /* Black font color */
}

.priority-low {
    background-color: var(--rag-green); /* Green */
}

.priority-very-low {
    background-color: var(--rag-dark-green); /* Teal */
}


/* Style for issue counts in column headers */
.issue-count {
    font-size: 0.85rem; /* Smaller font size */
    font-weight: normal; /* Optional: Make the font weight lighter */
    color: #6b7280; /* Optional: Use a muted color for better readability */
    margin-left: 0.5rem; /* Add spacing between the header and the count */
}


#save-status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.date-picker-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.modal-date-picker {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.clear-date-btn {
    margin-left: 8px;
    padding: 6px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #666;
}

.clear-date-btn:hover {
    background-color: #e0e0e0;
}


/* Operating Model specific styles */
.op-model-metric-value {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 6px;
}

.op-model-metric-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.op-model-metric-left {
    /*display: flex;*/
    align-items: center;
}

.op-model-metric-value-text {
    margin-left: auto; /* Push to the right */
    font-size: 0.8rem;
    padding: 0 8px;
}

.op-model-metric-description,
.op-model-metric-comment {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    padding-left: 15px; /* Indent the description */
}

/* Grouped metric keys with subtle headers */
.op-model-subtype-group {
    margin-bottom: 0.75rem;
}

.op-model-subtype-header {
    color: #64748b; /* Subtle text color */
    padding: 0.25rem 0.5rem; /* Reduced padding */
    font-size: 0.75rem; /* Smaller font size */
    font-weight: 500; /* Less bold */
}

.op-model-subtype-items {
    padding: 0.25rem 0; /* Reduced padding */
}

/* Toggle styles */
.op-model-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.op-model-toggle-label {
    font-size: 0.875rem;
    color: #4a5568;
}

.op-model-toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.op-model-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.op-model-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.op-model-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .op-model-slider {
    background-color: var(--primary);
}

input:checked + .op-model-slider:before {
    transform: translateX(16px);
}

/* Styles for the metric key items */
.op-model-key-item {
    display: flex;
    align-items: center;
    padding: 2px 6px; /* Reduced padding */
    margin-bottom: 2px; /* Reduced margin */
    border-radius: 3px; /* Smaller border radius */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.op-model-key-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.op-model-color-box {
    display: inline-block;
    width: 12px; /* Smaller color box */
    height: 12px; /* Smaller color box */
    border-radius: 3px; /* Smaller border radius */
    margin-right: 6px; /* Reduced margin */
}

.op-model-color-label {
    font-size: 0.75rem; /* Smaller font size */
}

.op-model-key-selected {
    font-weight: 500;
    /* The background color will be set dynamically */
}

.op-model-show-all {
    margin-top: 6px; /* Reduced margin */
    border-top: 1px solid #e2e8f0;
    padding-top: 6px; /* Reduced padding */
}

/* Make the subtype headers smaller too */
.op-model-subtype-header {
    color: #64748b;
    padding: 0.15rem 0.25rem; /* Reduced padding */
    font-size: 0.7rem; /* Smaller font size */
    font-weight: 500;
}

.op-model-subtype-items {
    padding: 0.15rem 0; /* Reduced padding */
}

.op-model-subtype-group {
    margin-bottom: 0.5rem; /* Reduced margin */
}



/* Principles Styles */
.principles-container {
    margin: 20px 0;
    position: relative;
}

.principles-table-wrapper {
    overflow-y: auto;
    max-height: 65vh; /* Slightly less than the tab content to account for margins */
    position: relative;
}

.principles-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.principles-header-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    background-color: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.principles-header-table th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.principles-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    font-size: 0.8rem;
}

.principles-table tr:hover td {
    background-color: #f9f9f9;
}

.principles-section-header {
    background-color: #e9ecef;
    font-weight: bold;
}

.principles-section-header td {
    padding: 12px 15px;
    border-bottom: 2px solid #ddd;
    border-top: 2px solid #ddd;
    background-color: #e9ecef !important;
}


/* Standards Styles */
.standards-container {
    margin: 20px 0;
    position: relative;
}

.standards-table-wrapper {
    overflow-y: auto;
    max-height: 65vh;
    position: relative;
}

.standards-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.standards-header-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    background-color: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.standards-header-table th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.standards-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    font-size: 0.8rem;
}

.standards-table tr:hover td {
    background-color: #f9f9f9;
}

.standards-section-header {
    background-color: #e9ecef;
    font-weight: bold;
}

.standards-section-header td {
    padding: 12px 15px;
    border-bottom: 2px solid #ddd;
    border-top: 2px solid #ddd;
    background-color: #e9ecef !important;
}

.standards-link {
    color: #0066cc;
    text-decoration: none;
}

.standards-link:hover {
    text-decoration: underline;
}

.standards-key-components {
    white-space: pre-line;
}


/* Task Cards Container */
.home-tasks-container {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
    overflow-y: auto;;
  }
  
  /* Task Card Base Styles */
  .home-tasks-card {
    display: flex;
    background-color: white;
    border-radius: 4px; /* Smaller radius */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Lighter shadow */
    padding: 6px 4px; /* Reduced horizontal padding */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    margin-bottom: 16px; /* Add small margin between cards */
  }
  
  .home-tasks-card:hover {
    transform: translateY(-1px); /* Smaller hover effect */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }
  
  /* Task Type Specific Styles */
  .home-tasks-task {
    border-left-color: #3b82f6; /* Blue for tasks */
  }
  
  .home-tasks-meeting {
    border-left-color: #8b5cf6; /* Purple for meetings */
  }
  
  /* Task Icon */
  .home-tasks-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Smaller icon */
    height: 20px; /* Smaller icon */
    border-radius: 50%;
    margin-right: 6px; /* Less margin */
    flex-shrink: 0;
  }
  
  .home-tasks-task .home-tasks-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
  }
  
  .home-tasks-meeting .home-tasks-icon {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
  }
  
  .home-tasks-icon i {
    font-size: 10px; /* Smaller icon */
  }
  
  /* Task Content */
  .home-tasks-content {
    flex: 1;
    min-width: 0; /* Ensures text truncation works */
    padding-right: 40px; /* Make room for the time indicator */
  }
  
  /* Override the column styles with more specific selectors */
  .home-tasks-title {
    font-size: 0.8rem !important; /* Smaller font */
    font-weight: 600 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    margin-bottom: 0.4rem !important;
  }
  
  /* Make sure our p styles override the column styles */
  .home-tasks-content .home-tasks-description {
    font-size: 0.8rem !important; /* Smaller font */
    color: #64748b !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.2 !important; /* Tighter line height */
    display: none !important; /* Hide description by default */
}

/* Show description when card is expanded */
.home-tasks-card.expanded .home-tasks-description {
  display: -webkit-box !important; /* Show description when expanded */
  font-weight: 400 !important; /* Normal weight */
  margin-bottom: 0.4rem !important; /* Less margin */
}
  
  /* Task Metadata */
  .home-tasks-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* Less gap */
    font-size: 0.7rem; /* Smaller font */
    color: #64748b;
  }
  
  .home-tasks-metadata span {
    display: inline-flex;
    align-items: center;
    gap: 2px; /* Less gap */
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    font-weight: normal !important;
    margin: 0 !important;
  }
  
  .home-tasks-metadata i {
    font-size: 8px; /* Smaller icon */
  }
  
  /* Priority Tags */
  .home-tasks-priority {
    padding: 0px 3px; /* Less padding */
    border-radius: 2px; /* Smaller radius */
    font-weight: 500 !important;
    font-size: 0.7rem !important; /* Smaller font */
    text-transform: uppercase;
    margin: 0 !important;
    line-height: 1.2 !important;
  }
  
  .home-tasks-priority-critical {
    background-color: #fee2e2;
    color: #991b1b !important;
  }
  
  .home-tasks-priority-high {
    background-color: #ffedd5;
    color: #9a3412 !important;
  }
  
  .home-tasks-priority-medium {
    background-color: #fef3c7;
    color: #92400e !important;
  }
  
  .home-tasks-priority-low {
    background-color: #ecfdf5;
    color: #065f46 !important;
  }
  
  /* Days Remaining Indicator */
  .home-tasks-remaining {
    position: absolute;
    top: 4px; /* Less spacing */
    right: 4px; /* Less spacing */
    padding: 0px 4px; /* Less padding */
    border-radius: 8px; /* Smaller radius */
    font-size: 0.7rem !important; /* Smaller font */
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }
  
  .home-tasks-remaining-text {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    margin: 0 !important;
  }
  
  .home-tasks-remaining-normal {
    background-color: #e0f2fe;
    color: #0369a1 !important;
  }
  
  .home-tasks-remaining-soon {
    background-color: #fef3c7;
    color: #92400e !important;
  }
  
  .home-tasks-remaining-urgent {
    background-color: #ffedd5;
    color: #9a3412 !important;
  }
  
  .home-tasks-remaining-overdue {
    background-color: #fee2e2;
    color: #991b1b !important;
  }
  
  /* Empty State */
  .home-tasks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 8px; /* Less padding */
    color: #94a3b8;
    text-align: center;
  }
  
  .home-tasks-empty i {
    font-size: 18px; /* Smaller icon */
    margin-bottom: 8px; /* Less margin */
  }
  
  .home-tasks-empty p {
    margin: 0 !important;
    font-size: 0.8rem !important; /* Smaller font */
    font-weight: normal !important;
    line-height: 1.2 !important;
  }
  


/* Shadow Process Accordion Styles */
.shadow-process-overview {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.shadow-process-overview h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.shadow-process-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* This adds consistent spacing between all sections */
}

.shadow-accordion-section {
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    height: auto; /* Ensure it adjusts dynamically */
}

.shadow-accordion-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.shadow-accordion-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary);
    transition: background-color 0.2s ease;
}

.shadow-accordion-header:hover {
    background-color: #f1f3f5;
}

.shadow-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.shadow-accordion-header h3, .supplier-position-section h3{
    margin: 0;
    flex-grow: 1;
    font-weight: 500;
}

.shadow-accordion-toggle {
    transition: transform 0.3s ease;
}

.shadow-accordion-header.shadow-active .shadow-accordion-toggle {
    transform: rotate(180deg);
}

.shadow-websites-count {
    margin-right: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: #e2e8f0;
    border-radius: 1rem;
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

.shadow-accordion-content {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.shadow-accordion-content.shadow-active {
    display: block !important;
    height: auto !important;
    max-height: 800px !important;
    padding: 1.5rem !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* File Upload Styles */
.shadow-file-upload {
    margin-top: 1rem;
    padding: 1.5rem;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.shadow-file-upload:hover {
    border-color: #02223C;
    background-color: rgba(2, 34, 60, 0.05);
}

.shadow-file-upload-icon {
    font-size: 2rem;
    color: #02223C;
    margin-bottom: 1rem;
}

.shadow-file-upload-text {
    margin-bottom: 1rem;
    color: #666;
}

.shadow-file-upload-button {
    background-color: var(--accent);
    color: var(--accent-foreground);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.shadow-file-upload-button:hover {
    background-color: var(--accent-hover);
}

.shadow-file-upload-input {
    display: none;
}

.shadow-file-upload-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.shadow-file-upload-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    display: none;
}

.shadow-file-upload-status.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.shadow-file-upload-status.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.shadow-file-details {
    margin-top: 1.5rem;
    display: none;
}

.shadow-file-details.active {
    display: block;
}

.shadow-file-details-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.shadow-file-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.shadow-file-details-table th,
.shadow-file-details-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.shadow-file-details-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shadow-accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .shadow-step-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .shadow-accordion-header h3 {
        font-size: 1rem;
    }

    .shadow-websites-count {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }    
}


/* Identify Section Styles */
.shadow-identify-section {
    margin-top: 1rem;
}

.shadow-identify-results {
    margin-top: 1.5rem;
}

.shadow-identify-summary {
    background-color: #f9fafb; /* Light background color */
    border: 1px solid #e2e8f0; /* Subtle border */
    border-radius: 0.375rem; /* Rounded corners */
    padding: 1rem; /* Add padding */
    font-size: 0.875rem; /* Slightly smaller font size */
    color: #374151; /* Neutral text color */
    margin-bottom: 1rem; /* Add spacing below */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Optional: Add a distinct header style within shadow-identify-summary */
.shadow-identify-summary h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c; /* Darker text color */
    margin-bottom: 0.5rem;
}

.shadow-identify-warning {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #fff3cd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.shadow-identify-warning i {
    font-size: 1.5rem;
    color: #856404;
    margin-right: 1rem;
}

.shadow-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.shadow-tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.shadow-tab-button:hover {
    color: #02223C;
}

.shadow-tab-button.active {
    color: #02223C;
    border-bottom-color: #02223C;
}

.shadow-tab-content {
    display: none;
}

.shadow-tab-content.active {
    display: block;
}

.shadow-empty-message {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

.shadow-identify-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.shadow-identify-loading i {
    font-size: 1.5rem;
    color: #02223C;
    margin-right: 1rem;
    animation: spin 2s linear infinite;
}

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

.shadow-ai-tag {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    background-color: #d9534f; /* Red background for shadow AI */
    border-radius: 12px;
    text-align: center;
}

.non-shadow-ai-tag {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    background-color: #5cb85c; /* Green background for non-shadow AI */
    border-radius: 12px;
    text-align: center;
}



/* Logout styles */
.logout-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    background-color: var(--primary);
    border-radius: 4px;
    transition: background-color 0.3s;
}

.logout-button:hover {
    background-color: #c82333;
    text-decoration: none;
    color: #fff;
}

.logout-button i {
    margin-right: 8px;
}


/* Flash styles */
.flash-messages {
    width: 100%;
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
}

/* Update login container to handle flash messages */
.login-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}



/* Update container to enable scrolling */
.overdue-assessments-container {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 0 4px;
}

/* Update card styles */
.overdue-assessment-card {
    position: relative;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 12px 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 16px;
    cursor: pointer;
}

/* Update header styles to accommodate the days overdue badge */
.assessment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-right: 80px;
}

/* Add assessment type tag */
.assessment-type-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.assessment-type-tag i {
    font-size: 0.7rem;
    margin-right: 4px;
}

/* Risk level colors */
.assessment-type-tag.critical {
    background-color: #fee2e2;
    color: #991b1b;
}

.assessment-type-tag.high {
    background-color: #ffedd5;
    color: #9a3412;
}

.assessment-type-tag.medium {
    background-color: #fef3c7;
    color: #92400e;
}

.assessment-type-tag.low {
    background-color: #ecfdf5;
    color: #065f46;
}

.assessment-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

/* Style the days overdue badge to match tasks */
.days-overdue {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0px 4px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    background-color: #fee2e2;
    color: #991b1b;
}

/* Update system info styles */
.system-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 4px 0;
    line-height: 1.2;
    font-weight: normal;
}

.system-info .system-name {
    color: #1e293b;
}

/* Add hover effect */
.overdue-assessment-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}



/* Loading Spinner Styles */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

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



/* Third party AI risk styles */
.vendor-risk-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    /*padding: 20px;*/
}

.vendor-risk-dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.vendor-risk-dashboard-section h3 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tooltip Styles */
.vendor-risk-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #6b7280;
    font-size: 14px;
}

.vendor-risk-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vendor-risk-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

/* Adjust tooltip positioning for different contexts */
.vendor-risk-compliance-label .vendor-risk-tooltip:hover::after,
.vendor-risk-alert-content .vendor-risk-tooltip:hover::after {
    left: 0;
    transform: none;
    max-width: 200px;
}

.vendor-risk-compliance-label .vendor-risk-tooltip:hover::before,
.vendor-risk-alert-content .vendor-risk-tooltip:hover::before {
    left: 10px;
    transform: none;
}

/* Risk Cards */
.vendor-risk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.vendor-risk-card {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid;
}

.vendor-risk-card.vendor-risk-high-risk {
    background: #fef2f2;
    border-color: #fca5a5;
}

.vendor-risk-card.vendor-risk-medium-risk {
    background: #fffbeb;
    border-color: #fbbf24;
}

.vendor-risk-card.vendor-risk-low-risk {
    background: #f0fdf4;
    border-color: #86efac;
}

.vendor-risk-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.vendor-risk-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}

.vendor-risk-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.vendor-risk-details p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

/* Compliance Status */
.vendor-risk-compliance-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vendor-risk-compliance-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vendor-risk-compliance-label {
    min-width: 120px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vendor-risk-compliance-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.vendor-risk-compliance-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s ease;
}

.vendor-risk-compliance-percentage {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #10b981;
}

/* Alerts */
/* Compact Critical Alerts Styles */
.vendor-risk-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    /*max-height: 200px;*/
    overflow-y: auto;
}

.vendor-risk-alert-item-compact {
    border-radius: 4px;
    border-left: 3px solid;
    background: white;
    transition: all 0.2s ease;
}

.vendor-risk-alert-item-compact.vendor-risk-alert-critical {
    border-left-color: #ef4444;
    background: var(--card);
}

.vendor-risk-alert-item-compact.vendor-risk-alert-warning {
    border-left-color: #f59e0b;
    background: var(--card);
}

.vendor-risk-alert-item-compact.vendor-risk-alert-info {
    border-left-color: #3b82f6;
    background: var(--card);
}

.vendor-risk-alert-compact-content {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}

.vendor-risk-alert-icon-compact {
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.vendor-risk-alert-summary {
    flex: 1;
    min-width: 0;
}

.vendor-risk-alert-title-compact {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.vendor-risk-alert-time-compact {
    display: block;
    font-size: 0.65rem;
    color: #666;
    margin-top: 0.125rem;
}

.vendor-risk-alert-actions-compact {
    display: flex;
    gap: 0.25rem;
}

.vendor-risk-alert-expand,
.vendor-risk-alert-action-compact {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.7rem;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vendor-risk-alert-expand:hover,
.vendor-risk-alert-action-compact:hover {
    background: #f5f5f5;
    color: #333;
}

.vendor-risk-alert-details {
    border-top: 1px solid #eee;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 0.75rem;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding: 0.75rem;
    }
}

.vendor-risk-alert-description-full {
    font-size: 0.8rem;
    line-height: 1.4;
}

.vendor-risk-alert-description-full p {
    margin: 0 0 0.5rem 0;
    color: #555;
}

.vendor-risk-alert-description-full p:last-of-type {
    margin-bottom: 0.75rem;
}

.vendor-risk-alert-full-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.vendor-risk-alert-action-full,
.vendor-risk-alert-dismiss {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vendor-risk-alert-action-full {
    background: #007bff;
    color: white;
}

.vendor-risk-alert-action-full:hover {
    background: #0056b3;
}

.vendor-risk-alert-dismiss {
    background: #6c757d;
    color: white;
}

.vendor-risk-alert-dismiss:hover {
    background: #545b62;
}

/* Scrollbar styling for alerts container */
.vendor-risk-alerts-container::-webkit-scrollbar {
    width: 4px;
}

.vendor-risk-alerts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.vendor-risk-alerts-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.vendor-risk-alerts-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Vendor List */
.vendor-risk-vendor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vendor-risk-vendor-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.vendor-risk-vendor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.vendor-risk-vendor-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.vendor-risk-vendor-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.vendor-risk-vendor-details p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.vendor-risk-vendor-risk {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vendor-risk-score {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: help;
}

.vendor-risk-score.vendor-risk-score-high {
    background: #fef2f2;
    color: #dc2626;
}

.vendor-risk-score.vendor-risk-score-medium {
    background: #fffbeb;
    color: #d97706;
}

.vendor-risk-score.vendor-risk-score-low {
    background: #f0fdf4;
    color: #16a34a;
}

.vendor-risk-trend {
    font-size: 12px;
    cursor: help;
}

.vendor-risk-vendor-action {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.vendor-risk-vendor-action:hover {
    background: #e5e7eb;
}

/* Metrics */
.vendor-risk-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.vendor-risk-metric-card {
    text-align: center;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.vendor-risk-metric-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.vendor-risk-metric-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.vendor-risk-metric-change {
    font-size: 12px;
}

.vendor-risk-metric-change.vendor-risk-metric-positive {
    color: #16a34a;
}

.vendor-risk-metric-change.vendor-risk-metric-negative {
    color: #dc2626;
}

/* Quick Actions */
.vendor-risk-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.vendor-risk-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.vendor-risk-action-btn.vendor-risk-action-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.vendor-risk-action-btn.vendor-risk-action-primary:hover {
    background: var(--primary-hover);
}

.vendor-risk-action-btn.vendor-risk-action-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

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

/* Button tooltips */
.vendor-risk-action-btn:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    max-width: 200px;
    white-space: normal;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vendor-risk-action-btn:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

@media (max-width: 768px) {
    .vendor-risk-dashboard-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

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

    .vendor-risk-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vendor-risk-quick-actions {
        grid-template-columns: 1fr;
    }

    /* Adjust tooltip positioning on mobile */
    .vendor-risk-tooltip:hover::after,
    .vendor-risk-action-btn:hover::after {
        max-width: 180px;
        font-size: 11px;
    }
}

.vendor-risk-compliance-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
}

.vendor-risk-compliance-count {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.vendor-risk-compliance-percentage {
    font-weight: 600;
    color: #10b981;
    font-size: 14px;
}

/* Risk Report Modal Styles */
.vendor-risk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.vendor-risk-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.vendor-risk-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.vendor-risk-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.vendor-risk-modal-date {
    font-size: 0.9rem;
    color: #666;
}

.vendor-risk-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-risk-modal-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.vendor-risk-report-summary {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.vendor-risk-report-summary h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.vendor-risk-report-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 6px;
}

.vendor-risk-report-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.vendor-risk-category-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vendor-risk-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.vendor-risk-stat-label {
    font-weight: 500;
    color: #555;
}

.vendor-risk-stat-value {
    font-weight: 600;
    color: #333;
}

.vendor-risk-recommendations {
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.vendor-risk-overall-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.vendor-risk-overall-item {
    flex: 1;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.vendor-risk-overall-item.vendor-risk-high {
    background: #fee;
    border: 1px solid #fcc;
}

.vendor-risk-overall-item.vendor-risk-medium {
    background: #fff8e1;
    border: 1px solid #ffcc02;
}

.vendor-risk-overall-item.vendor-risk-low {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
}

.vendor-risk-overall-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.vendor-risk-overall-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
}

.vendor-risk-priority-actions {
    margin: 1rem 0;
    /*padding-left: 1.5rem;*/
}

.vendor-risk-priority-actions li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.vendor-risk-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.vendor-risk-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vendor-risk-btn-primary {
    background: #007bff;
    color: white;
}

.vendor-risk-btn-primary:hover {
    background: #0056b3;
}

.vendor-risk-btn-secondary {
    background: #6c757d;
    color: white;
}

.vendor-risk-btn-secondary:hover {
    background: #545b62;
}

@media print {
    .vendor-risk-modal-overlay {
        position: static;
        background: none;
        padding: 0;
    }
    
    .vendor-risk-modal {
        box-shadow: none;
        max-height: none;
        width: 100%;
        max-width: none;
    }
    
    .vendor-risk-modal-footer {
        display: none;
    }
}


/* Vendor Performance Dashboard */
.vendor-performance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.vendor-performance-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.vendor-performance-card.vendor-performance-good {
    background: #f0f9ff;
    border-left-color: #0ea5e9;
}

.vendor-performance-card.vendor-performance-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.vendor-performance-icon {
    font-size: 2rem;
}

.vendor-performance-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.vendor-performance-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.vendor-performance-details p {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

.vendor-requests-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vendor-request-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.vendor-request-item.vendor-request-urgent {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.vendor-request-item.vendor-request-normal {
    background: #f8fafc;
    border-left-color: #64748b;
}

.vendor-request-icon {
    font-size: 1.5rem;
}

.vendor-request-content {
    flex: 1;
}

.vendor-request-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #333;
}

.vendor-request-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.vendor-request-deadline {
    font-size: 0.8rem;
    color: #888;
    font-weight: bold;
}

.vendor-request-action {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.vendor-request-action:hover {
    background: #2563eb;
}

.vendor-compliance-grid {
    display: grid;
    gap: 1rem;
}

.vendor-compliance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 4px;
}

.vendor-compliance-label {
    font-weight: 500;
    color: #333;
}

.vendor-compliance-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.vendor-compliance-status.vendor-compliance-compliant {
    color: #059669;
}

.vendor-compliance-status.vendor-compliance-pending {
    color: #d97706;
}

.vendor-compliance-status.vendor-compliance-non-compliant {
    color: #dc2626;
}

.vendor-document-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.vendor-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.vendor-action-btn.vendor-action-primary {
    background: #3b82f6;
    color: white;
}

.vendor-action-btn.vendor-action-primary:hover {
    background: #2563eb;
}

.vendor-action-btn.vendor-action-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.vendor-action-btn.vendor-action-secondary:hover {
    background: #e2e8f0;
}

.vendor-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.vendor-metric-card {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.vendor-metric-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.vendor-metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.vendor-metric-change {
    font-size: 0.8rem;
}

.vendor-metric-change.vendor-metric-positive {
    color: #059669;
}

.vendor-metric-change.vendor-metric-negative {
    color: #dc2626;
}

.vendor-metric-change.vendor-metric-neutral {
    color: #6b7280;
}

.vendor-tooltip {
    position: relative;
    cursor: help;
}

.vendor-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

    .vendor-risk-modal-large {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
}

.vendor-risk-modal-scrollable {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.vendor-risk-report-meta {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5rem;
}

.vendor-risk-report-meta span {
    margin-right: 2rem;
}

.vendor-risk-executive-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.vendor-risk-key-findings h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.vendor-risk-key-findings ul {
    list-style-type: none;
    padding-left: 0;
}

.vendor-risk-key-findings li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.vendor-risk-trends-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.vendor-risk-chart-placeholder {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.vendor-risk-trend-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vendor-risk-trend-metric {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.vendor-risk-trend-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5rem;
}

.vendor-risk-trend-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.vendor-risk-trend-change {
    font-size: 0.8em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.vendor-risk-positive {
    background: #d4edda;
    color: #155724;
}

.vendor-risk-negative {
    background: #f8d7da;
    color: #721c24;
}

.vendor-risk-analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.vendor-risk-analysis-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
}

.vendor-risk-compliance-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vendor-risk-compliance-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vendor-risk-compliance-bar-item span:first-child {
    min-width: 80px;
    font-weight: 500;
}

.vendor-risk-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.vendor-risk-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.vendor-risk-high-risk-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.vendor-risk-high-risk-table th,
.vendor-risk-high-risk-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.vendor-risk-high-risk-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.vendor-risk-score-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}

.vendor-risk-score-badge.vendor-risk-high {
    background: #dc3545;
}

.vendor-risk-factor {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 0.25rem;
}

.vendor-risk-action-required {
    background: #f8d7da;
    color: #721c24;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 0.25rem;
}

.vendor-risk-action-urgent {
    background: #dc3545;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8em;
}

.vendor-risk-regulatory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.vendor-risk-regulatory-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
}

.vendor-risk-regulatory-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-risk-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.vendor-risk-kri-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1rem 0;
}

.vendor-risk-kri-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.vendor-risk-kri-metric {
    margin-top: 1rem;
}

.vendor-risk-kri-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.vendor-risk-kri-label {
    display: block;
    color: #666;
    margin-bottom: 1rem;
}

.vendor-risk-kri-threshold {
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.vendor-risk-threshold-ok {
    background: #d4edda;
    color: #155724;
}

.vendor-risk-threshold-breach {
    background: #f8d7da;
    color: #721c24;
}

.vendor-risk-actions-priority {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vendor-risk-action-category {
    border-radius: 8px;
    padding: 1.5rem;
}

.vendor-risk-critical-actions {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.vendor-risk-high-actions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.vendor-risk-medium-actions {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.vendor-risk-action-category h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vendor-risk-action-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.vendor-risk-action-category li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.vendor-risk-recommendations-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vendor-risk-recommendation-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.vendor-risk-recommendation-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.vendor-risk-recommendation-item p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.vendor-risk-appendices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vendor-risk-appendix-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
}

.vendor-risk-appendix-item h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.vendor-risk-appendix-item p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}


/* --- AI Products & Assessments Section --- */
.vendor-products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}
.vendor-product-card {
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 320px;
    min-width: 260px;
    padding: 1.2rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.vendor-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.vendor-product-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2a2e3b;
}
.vendor-product-type {
    font-size: 0.95rem;
    color: #6c7a89;
    background: #f2f4fa;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 8px;
}
.vendor-product-details p {
    font-size: 0.98rem;
    color: #444;
    margin-bottom: 0.7rem;
}
.vendor-product-assessment-status {
    display: flex;
    align-items: center;
    font-size: 0.97rem;
    margin-bottom: 0.5rem;
    gap: 0.4rem;
}
.vendor-product-assessment-required {
    color: #d9534f;
}
.vendor-product-assessment-complete {
    color: #28a745;
}
.vendor-product-assessment-action {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.45rem 1.1rem;
    font-size: 0.97rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.2rem;
}
.vendor-product-assessment-action:disabled {
    background: #e3e6ee;
    color: #888;
    cursor: not-allowed;
}
.vendor-product-assessment-action:hover:not(:disabled) {
    background: #0056b3;
}
@media (max-width: 900px) {
    .vendor-products-list {
        flex-direction: column;
        gap: 1rem;
    }
    .vendor-product-card {
        width: 100%;
        min-width: 0;
    }
}

.vendor-compliance-action-btn {
    margin-left: 1rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}
.vendor-compliance-action-btn:hover {
    background: #0056b3;
}



/* Login password styles */
/* Password input container styles */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input[type="password"],
.password-input-container input[type="text"] {
    width: 100%;
    padding-right: 3rem; /* Make space for the toggle button */
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--muted-foreground, #6b7280);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 0.25rem;
}

.password-toggle:hover {
    color: var(--foreground, #111827);
    background-color: var(--muted, #f3f4f6);
}

.password-toggle:focus {
    outline: 2px solid var(--ring, #3b82f6);
    outline-offset: 2px;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ensure the password toggle works well with existing form styles */
.form-group .password-input-container {
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .password-toggle {
        right: 0.5rem;
        padding: 0.375rem;
    }
    
    .password-input-container input[type="password"],
    .password-input-container input[type="text"] {
        padding-right: 2.5rem;
    }
}



/* --- Admin Users Tab Styles --- */
.admin-users-table {
    font-size: 13px;
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}
.admin-users-table th, .admin-users-table td {
    padding: 4px 6px;
    border: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-users-table th {
    background: #f7f7f7;
    font-weight: 600;
    text-align: left;
    position: relative;
    cursor: pointer;
    user-select: none;
}
.admin-users-table th .sort-icon {
    margin-left: 4px;
    font-size: 12px;
    vertical-align: middle;
}
.admin-users-table th.selected {
    color: #0078d4;
}
/* Resizable columns */
.admin-users-table th .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}

.admin-users-table th.failed-attempts,
.admin-users-table td.failed-attempts {
    text-align: right; /* Right align failed attempts column */
}

.admin-users-table td {
    background: #fff;
}
.admin-users-table .admin-users-action-btn {
    padding: 2px 8px;
    font-size: 12px;
    margin: 0 2px;
}
@media (max-width: 1200px) {
    .admin-users-table th, .admin-users-table td {
        font-size: 11px;
        max-width: 80px;
        padding: 2px 4px;
    }
}

.admin-users-table tr:hover {
    background: #f0f6ff;
}

.admin-users-action-btn {
    margin-right: 0.5em;
    padding: 0.35em 0.9em;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-users-action-btn.edit-user-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.admin-users-action-btn.edit-user-btn:hover {
    background: #bbdefb;
}

.admin-users-action-btn.delete-user-btn {
    background: #ffebee;
    color: #d32f2f;
}

.admin-users-action-btn.delete-user-btn:hover {
    background: #ffcdd2;
}

#add-admin-user-btn, #generate-api-key-btn {
    background: var(--accent);
    color: var(--accent-foreground);
    border: none;
    border-radius: 4px;
    padding: 0.5em 1.2em;
    font-size: 1em;
    margin-bottom: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

#add-admin-user-btn:hover, #generate-api-key-btn:hover {
    background: var(--accent-hover);
}


/* --- Admin Users Modal Styles --- */
.admin-user-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-user-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 2rem 2.5rem;
    min-width: 340px;
    max-width: 95vw;
    position: relative;
}
.admin-user-modal h2 {
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.admin-user-modal label {
    display: block;
    margin-top: 1em;
    font-weight: 500;
}
.admin-user-modal input,
.admin-user-modal select {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.3em;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1em;
}
.admin-user-modal-actions {
    margin-top: 1.5em;
    text-align: right;
}
.admin-user-modal-btn {
    padding: 0.45em 1.2em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    margin-left: 0.5em;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-user-modal-btn.save {
    background: #1976d2;
    color: #fff;
}
.admin-user-modal-btn.save:hover {
    background: #1565c0;
}
.admin-user-modal-btn.cancel {
    background: #eee;
    color: #333;
}
.admin-user-modal-btn.cancel:hover {
    background: #e0e0e0;
}


/* --- Admin Delete Confirmation Modal --- */
.admin-delete-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-delete-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 2rem 2.5rem;
    min-width: 320px;
    max-width: 95vw;
    text-align: center;
}
.admin-delete-modal h3 {
    margin-top: 0;
    color: #d32f2f;
    font-size: 1.2rem;
}
.admin-delete-modal p {
    margin: 1em 0 2em 0;
    color: #444;
}
.admin-delete-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1em;
}
.admin-delete-modal-btn {
    padding: 0.45em 1.2em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-delete-modal-btn.confirm {
    background: #d32f2f;
    color: #fff;
}
.admin-delete-modal-btn.confirm:hover {
    background: #b71c1c;
}
.admin-delete-modal-btn.cancel {
    background: #eee;
    color: #333;
}
.admin-delete-modal-btn.cancel:hover {
    background: #e0e0e0;
}



/* Vendors table */
.csv-upload-section {
    padding: 20px;
    background: var(--muted);
    border-radius: 8px;
    margin: 20px 0;
}

.research-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.research-header h3 {
    margin: 0;
    flex-shrink: 0;
}

#file-name-display {
    flex: 1;
    min-width: 0;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-btn {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    border: none;
}

.upload-btn:hover {
    background: var(--primary-hover);
}

.upload-vendors-btn {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid;
    border-color: var(--border);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.upload-vendors-btn:hover {
    background: var(--secondary-hover);
}

.results-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    position: relative;
}

.vendor-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: white;
    font-size: 12px; /* Smaller text */
    table-layout: fixed; /* Fixed layout for better column control */
}

.vendor-table th,
.vendor-table td {
    padding: 8px 10px; /* Reduced padding */
    text-align: left;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vendor-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Fixed vendor name column */
.vendor-table th:first-child,
.vendor-table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
    min-width: 150px;
    max-width: 150px;
    /*border-right: 2px solid #007bff;*/
}

.vendor-table th:first-child {
    background: #f8f9fa;
    z-index: 15; /* Higher than other sticky elements */
}

/* Column width specifications */
.vendor-table th:nth-child(1) { width: 150px; } /* Vendor Name - Fixed */
.vendor-table th:nth-child(2) { width: 100px; } /* Vendor Type */
.vendor-table th:nth-child(3) { width: 150px; } /* Website */
.vendor-table th:nth-child(4) { width: 200px; } /* Short Description */
.vendor-table th:nth-child(5) { width: 200px; } /* Long Description */
.vendor-table th:nth-child(6) { width: 100px; } /* Company ID */
.vendor-table th:nth-child(7) { width: 150px; } /* Head Office */
.vendor-table th:nth-child(8) { width: 50px; } /* Country Code */
.vendor-table th:nth-child(9) { width: 120px; } /* Contact Email */
.vendor-table th:nth-child(10) { width: 180px; } /* Products Offered */
.vendor-table th:nth-child(11) { width: 120px; } /* Certifications */
.vendor-table th:nth-child(12) { width: 150px; } /* Data Handling */
.vendor-table th:nth-child(13) { width: 120px; } /* AI Usage */
.vendor-table th:nth-child(14) { width: 80px; } /* Status */
.vendor-table th:nth-child(15) { width: 200px; } /* Summary */

/* Horizontal scroll for table content */
.results-table-container {
    overflow-x: auto;
    overflow-y: auto;
}

/* Text truncation for long content */
.vendor-table td {
    max-height: 60px;
    overflow: hidden;
    line-height: 1.3;
}

/* Special styling for specific columns */
.vendor-table td:nth-child(3) { /* Website */
    font-family: monospace;
    font-size: 11px;
}

.vendor-table td:nth-child(7) { /* Email */
    font-family: monospace;
    font-size: 11px;
}

/* Status column styling */
.status-processed { 
    color: #28a745; 
    font-weight: bold; 
    font-size: 11px;
    text-transform: uppercase;
}

.status-failed { 
    color: #dc3545; 
    font-weight: bold; 
    font-size: 11px;
    text-transform: uppercase;
}

/* Hover effects */
.vendor-table tbody tr:hover {
    background-color: #f8f9fa;
}

.vendor-table tbody tr:hover td:first-child {
    background-color: #e3f2fd; /* Light blue for fixed column */
}

/* Scrollbar styling */
.results-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.results-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.results-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading and error states */
#loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

#loading-spinner .fa-spinner {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    color: #007bff;
}

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


#error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vendor-table {
        font-size: 10px;
    }
    
    .vendor-table th,
    .vendor-table td {
        padding: 6px 8px;
    }
    
    .vendor-table th:first-child,
    .vendor-table td:first-child {
        min-width: 120px;
        max-width: 120px;
    }
}

/* New row styling */
.vendor-table tr.detail-row td {
    background: #f8f9fa;
    padding: 12px;
    border-bottom: 2px solid #e3f2fd;
}

/* Remove original column widths for moved sections */
.vendor-table th:nth-child(4),
.vendor-table th:nth-child(5),
.vendor-table th:nth-child(12),
.vendor-table th:nth-child(13),
.vendor-table th:nth-child(15) {
    display: none;
}

/* Vendor logo container with name */
.vendor-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vendor-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 4px;
    background: white;
}

.vendor-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Vendor Products & Certifications Pills */
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 2px;
    font-size: 0.9em;
}

.product-pill {
    background-color: #e0f0ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.certification-pill {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}



/* API Keys Section - Scoped Styles */
/* Key Modal - Scoped to API Keys section */
.api-keys-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.api-keys-modal {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.api-keys-modal .key-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--code-background);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.api-keys-modal .key-display code {
    font-family: monospace;
    word-break: break-all;
    flex-grow: 1;
    color: var(--code-text);
}

.api-keys-modal .warning {
    color: var(--warning-orange);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.api-key-modal {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* APIs Page Styles */
.api-details-content,
.governance-content,
.usage-content,
.operations-content,
.security-content,
.limitations-content,
.references-content {
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.overview-row {
    margin-bottom: 2rem;
}

.overview-row h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* API Overview Styles */
.system-details-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 100%;
    padding: 1rem;
}

.system-details-left {
    flex: 0 0 65%;
    max-width: 65%;
}

.system-details-right {
    flex: 0 0 35%;
    max-width: 35%;
}

.system-description,
.api-sources,
.api-characteristics {
    margin-bottom: 2rem;
}

.system-description h2,
.api-sources h2,
.api-characteristics h2,
.system-details-right h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.system-description textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

.system-description textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sources-grid {
    display: grid;
    gap: 0.75rem;
}

.source-item {
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.source-item:hover {
    background-color: #f1f5f9;
}

.source-item h3 {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
    word-break: break-all;
}

.source-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.source-link i {
    font-size: 0.75rem;
    color: #6b7280;
    flex-shrink: 0;
}

.characteristics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.characteristic-item {
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.characteristic-item h4 {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.characteristic-item p {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
    margin: 0;
}

.system-metadata {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.metadata-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-info label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metadata-info p {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
    margin: 0;
    padding: 0.5rem 0;
}

.governance-status.compliant {
    color: #059669;
    font-weight: 600;
}

.governance-status.non-compliant {
    color: #dc2626;
    font-weight: 600;
}

/* API Details Tab Styles */
.api-details-grid {
    display: grid;
    gap: 1rem;
}

.api-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.api-detail-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    flex: 0 0 150px;
}

.api-detail-item p {
    font-size: 0.875rem;
    color: #1f2937;
    margin: 0;
    flex: 1;
    text-align: right;
}

.api-detail-item code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.api-resources {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-item {
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.resource-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
    word-break: break-all;
}

.resource-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Usage Metrics Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-item {
    padding: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    text-align: center;
}

.metric-item h4 {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.performance-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.performance-item {
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.performance-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.performance-item p {
    font-size: 0.875rem;
    color: #1f2937;
    margin: 0;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background-color: #fef2f2;
    color: #991b1b;
}

.status-badge.deprecated {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.beta {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .system-details-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .system-details-left,
    .system-details-right {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .characteristics-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .api-detail-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .api-detail-item h4 {
        flex: none;
    }
    
    .api-detail-item p {
        text-align: left;
    }
}


/* API Keys Table - Matching Users Table Style */
#tab3 .api-keys-table {
    font-size: 13px;
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

#tab3 .api-keys-table th, 
#tab3 .api-keys-table td {
    padding: 4px 6px;
    border: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tab3 .api-keys-table th {
    background: #f7f7f7;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

#tab3 .api-keys-table tr:hover {
    background: #f0f6ff;
}

/* Right-align timestamp columns */
#tab3 .api-keys-table td:nth-child(3),
#tab3 .api-keys-table td:nth-child(4) {
    text-align: right;
}

/* Match action button styles */
#tab3 .api-keys-table .btn-icon {
    margin: 0 2px;
    padding: 2px 8px;
    font-size: 12px;
}

/* Resizable columns */
#tab3 .api-keys-table th .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}

@media (max-width: 1200px) {
    #tab3 .api-keys-table th, 
    #tab3 .api-keys-table td {
        font-size: 11px;
        max-width: 80px;
        padding: 2px 4px;
    }
}

/* API Keys Action Buttons */
#tab3 .admin-users-action-btn {
    margin-right: 0.5em;
    padding: 0.35em 0.9em;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
}

#tab3 .edit-key-btn {
    background: #e3f2fd;
    color: #1976d2;
}

#tab3 .edit-key-btn:hover {
    background: #bbdefb;
}

#tab3 .delete-key-btn {
    background: #ffebee;
    color: #d32f2f;
}

#tab3 .delete-key-btn:hover {
    background: #ffcdd2;
}

/* Remove icon button styles */
#tab3 .btn-icon {
    display: none;
}

/* API Key Generation Modal */
#generate-key-form label {
    display: block;
    margin: 1rem 0;
}

#generate-key-form input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* Align header text */
#tab3 .api-keys-table th {
    text-align: left; /* Default for all headers */
}

#tab3 .api-keys-table th:nth-child(3), /* Created */
#tab3 .api-keys-table th:nth-child(4) { /* Last Used */
    text-align: right;
}

/* Keep data cells right-aligned */
#tab3 .api-keys-table td:nth-child(3),
#tab3 .api-keys-table td:nth-child(4) {
    text-align: right;
}


/* Vendor Management Table - Specific Styles */
.vendor-management-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin: 1rem 0;
    overflow: hidden;
}

.vendor-management-table {
    width: 100%;
    border-collapse: collapse;
}

.vendor-management-table thead th {
    background: #f8f9fa;
    color: #1a365d;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.vendor-management-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.vendor-management-logo-cell {
    width: 60px;
    padding: 0.25rem;
}

.vendor-management-logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 3px;
    background: #f8f9fa;
    padding: 2px;
}

.vendor-management-table tbody td:first-child {
    padding-right: 0;
}

/* Add hover effect for better visual feedback */
.vendor-management-logo-img:hover {
    transform: scale(1.8);
    transition: transform 0.2s ease;
    z-index: 10;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vendor-management-name-cell {
    font-weight: 500;
    color: #2d3748;
    min-width: 200px;
}

.vendor-management-desc-cell {
    color: #718096;
    font-size: 0.875rem;
    line-height: 1.5;
}

.vendor-management-actions-cell {
    width: 180px;
    text-align: right;
}

.vendor-management-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.vendor-management-tag-pill {
    background: #e2e8f0;
    color: #1a365d;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .vendor-management-table thead th:nth-child(n+4),
    .vendor-management-table tbody td:nth-child(n+4) {
        display: none;
    }
}



/* Vendor Assessment Table Styles */
table.vendor-assessment-table {
    --vendor-assessment-primary: #2B3A4E;
    --vendor-assessment-accent: #C43D4B;
    --vendor-assessment-progress-track: #E8EBF0;
    --vendor-assessment-progress-fill: #4A90E2;
    --vendor-assessment-status-complete: #3AA76D;
    --vendor-assessment-status-inprogress: #F5A623;
    --vendor-assessment-status-pending: #AAAAAA;
    --vendor-assessment-status-overdue: #C43D4B;
    
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(43,58,78,0.08);
    font-size: 0.9rem;
}

/* Add these rules to the existing table styling */
.vendor-assessment-table td:nth-child(11) { /* Actions column */
    min-width: 140px;
    white-space: nowrap;
}

/* Existing button styles - ensure they remain compact */
.vendor-assessment-btn-edit,
.vendor-assessment-btn-send,
.vendor-assessment-btn-delete {
    padding: 4px 8px;
    margin: 0 2px;
}

.vendor-assessment-table thead {
    background: var(--vendor-assessment-primary);
}

.vendor-assessment-table th {
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

.vendor-assessment-status-badge {
    min-width: 90px; /* Accommodates "IN PROGRESS" text */
    white-space: nowrap; /* Prevents text wrapping */
    text-align: center;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendor-assessment-status--complete {
    background-color: var(--rag-blue) !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;    
}

.vendor-assessment-status--pending {
    background-color: var(--rag-neutral) !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;  
}

.vendor-assessment-status--in.progress {
    background-color: var(--rag-green) !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;  
}

.vendor-assessment-progress {
    position: relative;
    height: 24px;
    background: var(--vendor-assessment-progress-track);
    overflow: hidden;
}

.vendor-assessment-progress-bar {
    height: 100%;
    background: var(--vendor-assessment-progress-fill);
    transition: width 0.3s ease;
}

.vendor-assessment-progress-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    mix-blend-mode: difference;
}

.vendor-assessment-btn-view {
    background: var(--vendor-assessment-primary);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vendor-assessment-btn-view:hover {
    background: var(--vendor-assessment-accent);
}

.vendor-assessment-table tbody tr:nth-child(even) {
    background: #F8F9FB;
}

.vendor-assessment-table td {
    padding: 1rem;
    border-bottom: 1px solid #E8EBF0;
}

/* Vendor Assessment Rating Styles */
.vendor-assessment-critical {
    background-color: #dc3545 !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.vendor-assessment-high {
    background-color: #fd7e14 !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.vendor-assessment-medium {
    background-color: #ffc107 !important;
    color: black !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.vendor-assessment-low {
    background-color: #28a745 !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.vendor-assessment-none {
    background-color: #6c757d !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.vendor-assessment-btn-refresh {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vendor-assessment-btn-refresh:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.vendor-assessment-btn-refresh:active {
    transform: translateY(0);
}

.fa-sync-alt {
    transition: transform 0.4s ease;
}

.vendor-assessment-btn-refresh:hover .fa-sync-alt {
    transform: rotate(360deg);
}



.va-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Better for long content */
    padding: 2rem;
    z-index: 1000;
}

.va-modal-large { 
    width: 1200px; 
    max-width: 90vw; 
}

.va-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.va-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    position: relative; /* Needed for absolute positioning of child */
}

.va-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #2d3436;
}

.va-modal-content {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.6;
}

.va-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.va-modal-close {
    color: #666;
    padding: 0.5rem;
    margin-left: 1rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.va-modal-close:hover {
    background: #eee;
    color: #444;
}

.va-modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.va-modal-btn-primary {
    background: #1976d2;
    color: white;
    border: 1px solid #1565c0;
}

.va-modal-btn-primary:hover {
    background: #1565c0;
    transform: translateY(-1px);
}

.va-modal-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.va-modal-header-item:last-child {
    border-bottom: none;
}

.va-modal-header-item .va-modal-label {
    font-weight: 500;
    color: #666;
    min-width: 140px;
    margin-right: 2rem;
}

.va-modal-header-item .va-modal-value {
    flex-grow: 1;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Status badge variants */
.va-modal-header-item .va-modal-status, .va-modal-risk {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .va-modal-header-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .va-modal-header-item .va-modal-value {
        text-align: left;
        justify-content: flex-start;
        width: 100%;
    }
}

.va-modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: rgba(255,255,255,0.9);
    z-index: 1001;
}

.va-modal-close i {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
    color: #666;
}

.va-modal-close:hover i {
    color: #dc3545;
    transform: scale(1.2);
}

/* Compact header grid */
.va-modal-header-grid {
    gap: 1rem;
    padding: 1rem 0;
}

/* Tighten progress bar */
.va-modal-progress-container {
    margin: 0.5rem 0;
    padding: 0.25rem;
}

/* Card styling for sections */
.va-section-card {
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* Condensed table */
.va-compact-table td, .va-compact-table th {
    padding: 0.25rem 0.5rem;
}

/* Expand table width */
.va-modal-table {
    width: 100%;
    table-layout: fixed;
}

/* Column width distribution */
.va-modal-table th:nth-child(1) { width: 40%; } /* Question */
.va-modal-table th:nth-child(2) { width: 40%; } /* Response */
.va-modal-table th:nth-child(3) { width: 10%; } /* Score */
.va-modal-table th:nth-child(3) { width: 10%; } /* Importance */

/* Cell padding adjustments */
.va-modal-table td, .va-modal-table th {
    padding: 8px 12px;
}

/* Left-align question header */
.va-modal-table th {
    text-align: left;
    padding-left: 12px;
    white-space: normal;
    word-wrap: break-word;
}

/* Ensure question cells match header alignment */
.va-modal-table td:nth-child(3) {
    text-align: left; 
}

.va-modal-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.va-modal-header-group {
    display: flex;
    gap: 2rem;  /* Spacing between items */
    flex-wrap: wrap;  /* Allow wrapping on mobile */
}

.va-modal-header-main {
    flex: 1;
}

.va-modal-header-details {
    margin-top: 8px;
}

.va-modal-detail-item {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 3px;
}

.va-modal-detail-item:last-child {
    margin-bottom: 0;
}

.va-modal-header-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-right: 40px;
}

.va-modal-overall-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.va-modal-close {
    margin-left: 20px;
}

/* Rest of the existing CSS styles remain the same */
.va-modal-question-group {
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.va-modal-category-header {
    background-color: #e9ecef;
    padding: 15px 20px 10px 20px;
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #007bff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.va-modal-subcategory-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    margin: 0;
    font-size: 1.15em;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.va-modal-header-text {
    flex-grow: 1;
}

.va-modal-category-score,
.va-modal-subcategory-score {
    color: #6c757d;
    font-size: 0.8em;
    font-weight: 400;
    min-width: auto;
    text-align: right;
    padding: 0;
    background: none;
    border-radius: 0;
}

.va-modal-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.va-modal-table th {
    background-color: #ffffff;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.va-modal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.va-modal-question-col {
    width: 40%;
}

.va-modal-response-col {
    width: 40%;
}

.va-modal-score-col {
    width: 5%;
    text-align: center;
}

.va-modal-importance-col {
    width: 5%;
}

.va-modal-warning-col {
    width: 10%;
    text-align: center;
}
.text-danger {
    color: #dc3545;
}

/* Responsive design */
@media (max-width: 768px) {
    .va-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .va-modal-header-main {
        width: 100%;
    }

    .va-modal-header-group {
        gap: 1rem;
    }
    
    .va-modal-header-item {
        flex: 1 1 45%;  /* Allow 2 items per row */
        min-width: 150px;
    }

    .va-modal-header-score {
        align-self: flex-end;
        margin-left: 0;
        margin-top: -10px;
        margin-right: 20px; /* Add this line */
    }
    
    .va-modal-question-col {
        width: 35%;
    }
    .va-modal-response-col {
        width: 50%;
    }
    .va-modal-score-col {
        width: 15%;
    }
    
    .va-modal-category-header,
    .va-modal-subcategory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .va-modal-category-score,
    .va-modal-subcategory-score {
        align-self: flex-end;
    }
}




    /* Collapsible styles */
    .collapsible-header {
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        margin-bottom: 8px;
    }
    
    .collapsible-header:hover {
        background-color: #e9ecef;
    }
    
    .collapsible-content {
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        max-height: 1000px;
        padding: 16px 0;
    }
    
    .collapsible-content.collapsed {
        max-height: 0;
        padding: 0;
    }
    
    .collapsible-icon {
        transition: transform 0.3s ease;
        margin-left: 8px;
    }
    
    .collapsible-header.collapsed .collapsible-icon {
        transform: rotate(-90deg);
    }
    
    .va-modal-category-header {
        background-color: #e3f2fd;
        border-color: #2196f3;
        font-weight: 600;
    }
    
    .va-modal-subcategory-header {
        background-color: #f5f5f5;
        border-color: #9e9e9e;
        margin-top: 8px;
    }
