/* ===================================
   Salesforce Lightning Design System
   Care Management Portal Styles
   =================================== */

/* CSS Variables - SLDS Design Tokens */
:root {
    /* Colors */
    --slds-g-color-brand-1: #0176D3;
    --slds-g-color-brand-2: #0250D9;
    --slds-g-color-accent-2: #0250D9;
    --slds-g-color-surface-container-1: #FFFFFF;
    --slds-g-color-surface-container-2: #F3F3F3;
    --slds-g-color-surface-container-3: #E5E5E5;
    --slds-g-color-on-surface-1: #5C5C5C;
    --slds-g-color-on-surface-2: #2E2E2E;
    --slds-g-color-border-1: #C9C9C9;
    --slds-g-color-border-2: #E5E5E5;
    --slds-g-color-error: #BA0517;
    --slds-g-color-success: #2E844A;
    --slds-g-color-warning: #DD7A01;
    --slds-g-color-destructive: #BA0517;

    /* Spacing */
    --slds-g-spacing-0: 0px;
    --slds-g-spacing-1: 4px;
    --slds-g-spacing-2: 8px;
    --slds-g-spacing-3: 12px;
    --slds-g-spacing-4: 16px;
    --slds-g-spacing-5: 20px;
    --slds-g-spacing-6: 24px;
    --slds-g-spacing-7: 32px;
    --slds-g-spacing-8: 40px;

    /* Border Radius */
    --slds-g-radius-border-1: 4px;
    --slds-g-radius-border-2: 8px;
    --slds-g-radius-border-3: 12px;
    --slds-g-radius-border-4: 20px;

    /* Typography */
    --slds-g-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'Segoe UI', sans-serif;
    --slds-g-font-scale-neg-2: 10px;
    --slds-g-font-scale-neg-1: 12px;
    --slds-g-font-scale-base: 13px;
    --slds-g-font-scale-1: 14px;
    --slds-g-font-scale-2: 16px;
    --slds-g-font-scale-3: 18px;
    --slds-g-font-scale-4: 20px;
    --slds-g-font-scale-5: 28px;
    
    /* Text Colors */
    --slds-g-color-on-surface-3: #03234D;

    /* Grid */
    --grid-columns: 12;
    --grid-gutter: 16px;
    --grid-margin: 16px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    color: var(--slds-g-color-on-surface-2);
    background: var(--slds-g-color-surface-container-2);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--slds-g-color-accent-2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===================================
   Global Header
   =================================== */
.global-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 var(--slds-g-spacing-3);
    background: var(--slds-g-color-surface-container-1);
    border-bottom: 1px solid var(--slds-g-color-border-2);
}

.header-left {
    display: flex;
    align-items: center;
    width: 200px;
    padding: 0 var(--slds-g-spacing-1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 482px;
    margin: 0 auto;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 32px;
    background: var(--slds-g-color-surface-container-1);
    border: 1px solid var(--slds-g-color-on-surface-1);
    border-radius: 9999px;
    padding: 0 var(--slds-g-spacing-2);
    gap: var(--slds-g-spacing-2);
}

.search-icon {
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2);
    line-height: 18px;
}

.search-input::placeholder {
    color: var(--slds-g-color-on-surface-1);
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--slds-g-spacing-4);
    padding: 0 var(--slds-g-spacing-4);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================
   Global Navigation
   =================================== */
.global-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 4px 24px 4px 0;
    background: var(--slds-g-color-surface-container-1, white);
    box-shadow: 0px -1px 1px 0px rgba(0,0,0,0.05), 0px 1.4px 1.5px 0px rgba(0,0,0,0.09), 0px 0px 1.49px 0px rgba(0,0,0,0.09);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-4);
}

.app-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: var(--slds-g-spacing-4);
    background: transparent;
    border: none;
    cursor: pointer;
}

.app-launcher svg rect {
    fill: #747474;
}

.app-name {
    color: var(--slds-g-color-on-surface-3, #03234D);
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    white-space: nowrap;
}

.nav-tabs {
    display: flex;
    align-items: center;
    margin-left: var(--slds-g-spacing-4);
    gap: var(--slds-g-spacing-1);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    padding: var(--slds-g-spacing-2) var(--slds-g-spacing-3);
    color: var(--slds-g-color-on-surface-1, #5C5C5C);
    font-size: var(--slds-g-font-scale-1);
    font-weight: 590;
    line-height: 19px;
    border-radius: var(--slds-g-radius-border-1);
    transition: background 0.2s, color 0.2s;
}

.nav-tab:hover {
    background: var(--slds-g-color-surface-container-2, #f3f3f3);
    text-decoration: none;
    color: var(--slds-g-color-on-surface-3, #03234D);
}

.nav-tab.active {
    background: var(--slds-g-color-accent-container-1, #E5F0FD);
    color: var(--slds-g-color-accent-2, #0250D9);
}

.tab-icon {
    width: 16px;
    height: 16px;
}

/* ===================================
   Page Header
   =================================== */
.page-header {
    background: var(--slds-g-color-surface-container-2);
    padding: var(--slds-g-spacing-4) var(--slds-g-spacing-4);
}

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

.page-header-left {
    flex: 1;
}

.record-type {
    margin-bottom: var(--slds-g-spacing-1);
}

.record-type-label {
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    line-height: 18px;
}

.record-title {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    margin-bottom: var(--slds-g-spacing-3);
}

.record-icon {
    flex-shrink: 0;
}

.record-name {
    font-size: var(--slds-g-font-scale-5);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-3);
    line-height: 35px;
}

.record-highlights {
    display: flex;
    gap: var(--slds-g-spacing-7);
}

.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.highlight-label {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    line-height: 17px;
    text-transform: uppercase;
}

.highlight-value {
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-3);
    line-height: 18px;
}

.page-header-actions {
    display: flex;
    gap: var(--slds-g-spacing-2);
    align-items: center;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--slds-g-spacing-1);
    padding: 0 var(--slds-g-spacing-3);
    height: 32px;
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 17px;
}

.btn-brand {
    background: #0176D3;
    color: white;
    border: 1px solid #0176D3;
}

.btn-brand:hover {
    background: #014486;
    border-color: #014486;
}

.btn-outline {
    background: white;
    color: var(--slds-g-color-on-surface-2, #2e2e2e);
    border: 1px solid #C9C9C9;
}

.btn-outline:hover {
    background: #F3F3F3;
}

.btn-neutral {
    background: white;
    color: var(--slds-g-color-on-surface-2, #2e2e2e);
    border: 1px solid #C9C9C9;
}

.btn-neutral:hover {
    background: #F3F3F3;
}

.btn-destructive-text {
    background: transparent;
    color: var(--slds-g-color-on-surface-1, #5C5C5C);
    border: 1px solid #C9C9C9;
}

.btn-destructive-text:hover {
    background: #F3F3F3;
}

.btn-text-destructive {
    background: transparent;
    color: #BA0517;
    border: none;
}

.btn-text-destructive:hover {
    background: rgba(186, 5, 23, 0.1);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    background: white;
    border: 1px solid #C9C9C9;
    border-radius: 24px;
}

.btn-icon:hover {
    background: #F3F3F3;
}

.btn-sm {
    height: 28px;
    padding: 0 var(--slds-g-spacing-3);
    font-size: 11px;
}

.btn-disabled,
.btn:disabled {
    background: var(--slds-g-color-surface-container-1, white);
    color: var(--slds-g-color-on-surface-1, #747474);
    border-color: var(--slds-g-color-border-2, #E5E5E5);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover,
.btn:disabled:hover {
    background: var(--slds-g-color-surface-container-1, white);
}

.btn-brand.btn-disabled,
.btn-brand:disabled {
    background: #A8D4F5;
    border-color: #A8D4F5;
    color: white;
    opacity: 0.7;
}

.btn-brand.btn-disabled:hover,
.btn-brand:disabled:hover {
    background: #A8D4F5;
    border-color: #A8D4F5;
}

/* ===================================
   Main Content Grid
   =================================== */
.main-content {
    flex: 1;
    padding: 0 var(--grid-margin) var(--slds-g-spacing-6);
    background: var(--slds-g-color-surface-container-2);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gutter);
    max-width: 100%;
}

.left-column {
    grid-column: span 9;
    background: var(--slds-g-color-surface-container-1);
    border-radius: 12px;
    min-height: 500px;
    overflow: hidden;
}

.right-column {
    grid-column: span 3;
    padding-top: 0;
}

/* ===================================
   Tab Navigation
   =================================== */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid var(--slds-g-color-border-2);
    padding: 0 var(--slds-g-spacing-4);
    background: var(--slds-g-color-surface-container-1);
}

.tab-item {
    display: flex;
    align-items: center;
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    line-height: 18px;
}

.tab-item:hover {
    color: var(--slds-g-color-on-surface-2);
    text-decoration: none;
}

.tab-item.active {
    color: var(--slds-g-color-brand-1);
    border-bottom-color: var(--slds-g-color-brand-1);
    font-weight: 400;
}

.tab-item.tab-disabled {
    color: var(--slds-g-color-on-surface-1);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===================================
   Details Content
   =================================== */
.details-content {
    padding: var(--slds-g-spacing-4);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--slds-g-spacing-6);
}

.details-column {
    display: flex;
    flex-direction: column;
    gap: var(--slds-g-spacing-4);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--slds-g-spacing-1);
}

.field-label {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 700;
    color: var(--slds-g-color-on-surface-1);
    line-height: 17px;
}

.field-value {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    font-size: var(--slds-g-font-scale-neg-1);
    color: var(--slds-g-color-on-surface-2);
    min-height: 24px;
}

.field-value.empty {
    color: var(--slds-g-color-on-surface-1);
}

.field-value.editable {
    position: relative;
    padding-right: var(--slds-g-spacing-6);
}

.field-value.editable .edit-btn {
    position: absolute;
    right: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.field-value.editable:hover .edit-btn {
    opacity: 1;
}

.field-link {
    color: var(--slds-g-color-accent-2);
}

.owner-icon {
    flex-shrink: 0;
}

.field-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--slds-g-radius-border-1);
}

.edit-btn:hover {
    background: var(--slds-g-color-surface-container-2);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
    font-size: var(--slds-g-font-scale-neg-2);
    border-radius: var(--slds-g-radius-border-1);
    white-space: nowrap;
}

.badge-info {
    background: #E5F4FD;
    color: var(--slds-g-color-brand-1);
}

/* ===================================
   Section Cards
   =================================== */
.section-card {
    margin-top: var(--slds-g-spacing-5);
    border: 1px solid var(--slds-g-color-border-2);
    border-radius: 12px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    background: var(--slds-g-color-surface-container-2);
    border-radius: var(--slds-g-radius-border-2) var(--slds-g-radius-border-2) 0 0;
    border-bottom: 1px solid var(--slds-g-color-border-2);
}

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

.section-title {
    font-size: var(--slds-g-font-scale-1);
    font-weight: 600;
    color: var(--slds-g-color-on-surface-3);
    line-height: 19px;
}

.section-content {
    padding: var(--slds-g-spacing-4);
}

.map-preview {
    margin-top: var(--slds-g-spacing-3);
    border-radius: var(--slds-g-radius-border-2);
    overflow: hidden;
    background: var(--slds-g-color-surface-container-3);
    height: 120px;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================
   Assessment Card
   =================================== */
.assessment-card {
    background: var(--slds-g-color-surface-container-1);
    border-radius: var(--slds-g-radius-border-3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    border-bottom: 1px solid var(--slds-g-color-border-2);
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
}

.card-icon {
    flex-shrink: 0;
}

.card-title {
    font-size: var(--slds-g-font-scale-3);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-3);
    line-height: 28px;
}

.card-header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--slds-g-radius-border-1);
}

.card-header-action:hover {
    background: var(--slds-g-color-surface-container-2);
}

/* Sidebar Sort Dropdown */
.sidebar-sort-container {
    position: relative;
}

.sidebar-sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    background: var(--slds-g-color-surface-container-1, white);
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
}

/* Card body - no max-height, card grows with content */

.card-footer {
    display: flex;
    justify-content: center;
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    border-top: 1px solid var(--slds-g-color-border-2);
}

.view-all-link {
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-accent-2);
    line-height: 18px;
}

/* ===================================
   Assessment Items
   =================================== */
.assessment-item {
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    border-bottom: 1px solid var(--slds-g-color-border-2);
    transition: background-color 0.5s ease-out;
}

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

/* Highlight effect for newly added assessments */
.assessment-item.newly-added {
    background-color: #FBF3E0;
}

.assessment-full-card.newly-added {
    background-color: #FBF3E0;
}

.assessment-field {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: var(--slds-g-spacing-2);
}

.assessment-label {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 700;
    color: var(--slds-g-color-on-surface-1);
    line-height: 17px;
}

.assessment-value {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2);
    line-height: 17px;
}

.assessment-value.required {
    color: var(--slds-g-color-error);
}

.assessment-link {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: var(--slds-g-color-accent-2);
    line-height: 17px;
}

.assessment-source {
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
}

.assessment-reason-link {
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-accent-2);
    text-decoration: underline;
    line-height: 18px;
}

.assessment-actions {
    display: flex;
    gap: var(--slds-g-spacing-2);
    margin-top: var(--slds-g-spacing-2);
    padding-top: var(--slds-g-spacing-2);
}

/* GenAI Badge */
.genai-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--slds-g-spacing-1);
    padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
    background: linear-gradient(90deg, #E8DAFF 0%, #FFE5F0 100%);
    border-radius: var(--slds-g-radius-border-4);
    font-size: var(--slds-g-font-scale-neg-2);
    color: #6B21A8;
    margin-bottom: var(--slds-g-spacing-2);
}

.genai-badge svg {
    flex-shrink: 0;
}

.info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: var(--slds-g-spacing-1);
}

/* ===================================
   Bottom Bar
   =================================== */
.bottom-bar {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-4);
    height: 40px;
    padding: 0 var(--slds-g-spacing-4);
    background: var(--slds-g-color-surface-container-1);
    border-top: 1px solid var(--slds-g-color-border-2);
}

.bottom-bar-item {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-1);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: var(--slds-g-font-scale-neg-1);
    color: var(--slds-g-color-on-surface-1);
    padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
    border-radius: var(--slds-g-radius-border-1);
}

.bottom-bar-item:hover {
    background: var(--slds-g-color-surface-container-2);
}

/* ===================================
   Scrollbar Styling
   =================================== */
/* Card body scrollbar styles removed - card now grows with content */

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .left-column,
    .right-column {
        grid-column: span 1;
    }

    .right-column {
        order: -1;
        padding-top: var(--slds-g-spacing-4);
    }

    .assessment-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .record-highlights {
        flex-wrap: wrap;
        gap: var(--slds-g-spacing-4);
    }

    .page-header-content {
        flex-direction: column;
        gap: var(--slds-g-spacing-3);
    }

    .page-header-actions {
        flex-wrap: wrap;
    }

    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

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

/* ===================================
   Secondary Navigation (Sub-tabs)
   =================================== */
.secondary-navigation {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 var(--slds-g-spacing-4);
    background: var(--slds-g-color-surface-container-1, white);
    border-bottom: 1px solid var(--slds-g-color-border-2, #C9C9C9);
}

.secondary-nav-tabs {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-1);
    height: 100%;
}

.secondary-nav-tab {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    padding: var(--slds-g-spacing-2) var(--slds-g-spacing-3);
    height: 32px;
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2, #2e2e2e);
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
    border: 1px solid var(--slds-g-color-border-2, #C9C9C9);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    text-decoration: none;
    transition: background 0.15s;
}

.secondary-nav-tab.active {
    background: var(--slds-g-color-surface-container-1, white);
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

.secondary-nav-tab:hover {
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
    text-decoration: none;
}

.subtab-icon {
    width: 16px;
    height: 16px;
    color: #1B96FF;
}

.subtab-dropdown {
    width: 12px;
    height: 12px;
    color: var(--slds-g-color-on-surface-1, #5C5C5C);
}

.subtab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: var(--slds-g-spacing-2);
    background: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    color: var(--slds-g-color-on-surface-1, #5C5C5C);
}

.subtab-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--slds-g-color-on-surface-2, #2e2e2e);
}

/* ===================================
   Assessments Full View (Figma Design)
   =================================== */
.assessments-full-view {
    padding: var(--slds-g-spacing-4);
    max-width: 100%;
}

.assessments-page-title {
    font-family: var(--slds-g-font-family);
    font-size: 27px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-3, #03234D);
    line-height: 35px;
    margin-bottom: var(--slds-g-spacing-4);
}

/* Controls Container */
.assessments-controls-container {
    background: var(--slds-g-color-surface-container-1, white);
    border-radius: 8px;
    padding: var(--slds-g-spacing-4);
    margin-bottom: var(--slds-g-spacing-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--slds-g-spacing-4);
}

.controls-row:first-child {
    margin-bottom: var(--slds-g-spacing-3);
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 345px;
}

.search-icon-sm {
    position: absolute;
    left: 12px;
    pointer-events: none;
}

.search-assessments-input {
    width: 100%;
    height: 32px;
    padding: 0 var(--slds-g-spacing-3) 0 36px;
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2, #181818);
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 4px;
    outline: none;
}

.search-assessments-input::placeholder {
    color: var(--slds-g-color-on-surface-1, #5C5C5C);
}

.search-assessments-input:focus {
    border-color: var(--slds-g-color-brand-1, #0176D3);
    box-shadow: 0 0 0 1px var(--slds-g-color-brand-1, #0176D3);
}

/* Icon Buttons Group */
.icon-buttons-group {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
}

.btn-icon-bordered {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--slds-g-color-surface-container-1, white);
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-icon-bordered:hover {
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
}

/* Sort Dropdown */
.sort-dropdown-container {
    position: relative;
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    background: var(--slds-g-color-surface-container-1, white);
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2, #181818);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.sort-option:hover {
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
}

.sort-option .sort-check {
    opacity: 0;
    flex-shrink: 0;
}

.sort-option.active .sort-check {
    opacity: 1;
}

.sort-option.active {
    color: var(--slds-g-color-brand-1, #0176D3);
    font-weight: 500;
}

/* Count Info */
.assessments-count-info {
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2, #181818);
    line-height: 18px;
}

/* Toggle and Send Group */
.toggle-send-group {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-4);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
    cursor: pointer;
}

.toggle-text {
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2, #181818);
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 10px;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-input:checked + .toggle-slider {
    background: var(--slds-g-color-brand-1, #0176D3);
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

/* Assessment Cards List */
.assessment-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Assessment Full Card */
.assessment-full-card {
    background: var(--slds-g-color-surface-container-1, white);
    border-radius: 8px;
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    box-shadow: 1px 0 0 0 #C9C9C9, -1px 0 0 0 #C9C9C9, 0 -1px 0 0 #C9C9C9, 0 1px 0 0 #E5E5E5;
    transition: background-color 0.5s ease-out;
}

.assessment-full-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--slds-g-spacing-2) 0;
    margin-bottom: var(--slds-g-spacing-3);
}

.assessment-title-row {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
}

.add-checkbox-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--slds-g-color-surface-container-1, white);
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.15s;
}

.add-checkbox-btn:hover {
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
}

.add-checkbox-btn.selected {
    background: #0176D3;
    border-color: #0176D3;
}

.add-checkbox-btn.selected:hover {
    background: #014486;
    border-color: #014486;
}

.assessment-full-name {
    font-family: 'Segoe UI', var(--slds-g-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #0B5CAB;
    line-height: 24px;
}

.mcg-logo {
    height: 19px;
    width: auto;
}

.assessment-full-actions {
    display: flex;
    align-items: center;
    gap: var(--slds-g-spacing-2);
}

.btn-text-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 var(--slds-g-spacing-3);
    background: transparent;
    border: 1px solid var(--slds-g-color-border-1, #C9C9C9);
    border-radius: 24px;
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: #BA0517;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-text-dismiss:hover {
    background: rgba(186, 5, 23, 0.05);
}

.btn-text-dismiss-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 var(--slds-g-spacing-3);
    background: transparent;
    border: 1px solid var(--slds-g-color-border-2, #E5E5E5);
    border-radius: 24px;
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-neg-1);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1, #747474);
    cursor: not-allowed;
}

.start-arrow {
    font-size: 10px;
    margin-left: 4px;
}

/* Assessment Details Grid */
.assessment-full-details {
    display: flex;
    align-items: flex-start;
    gap: 91px;
    margin-bottom: var(--slds-g-spacing-3);
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-family: 'Segoe UI', var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #444444;
    line-height: 20px;
}

.detail-value {
    font-family: 'Segoe UI', var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #181818;
    line-height: 20px;
}

.detail-link {
    font-family: 'Segoe UI', var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #0B5CAB;
    line-height: 20px;
    text-decoration: underline;
}

.assessment-description {
    font-family: 'Segoe UI', var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #181818;
    line-height: 20px;
}

/* GenAI Badge Inline */
.genai-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(90deg, #E8DAFF 0%, #FFE5F0 100%);
    border-radius: 20px;
    font-family: var(--slds-g-font-family);
    font-size: 11px;
    font-weight: 400;
    color: #6B21A8;
    margin-left: var(--slds-g-spacing-2);
}

.info-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Text utilities */
.text-error {
    color: #BA0517 !important;
}

/* ===================================
   Suggestion Reason Popover
   =================================== */
.reason-popover {
    position: fixed;
    z-index: 1000;
    width: 318px;
    background: var(--slds-g-color-surface-container-1, white);
    border-radius: 12px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.12), 0 7px 7px 0 rgba(0, 0, 0, 0.12), 0 -1px 3px 0 rgba(0, 0, 0, 0.07);
}

.popover-content {
    display: flex;
    flex-direction: column;
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px 12px;
}

.popover-title {
    font-family: var(--slds-g-font-family);
    font-size: 16px;
    font-weight: 400;
    color: #001E5B;
    line-height: 22px;
}

.popover-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}

.popover-close:hover {
    background: var(--slds-g-color-surface-container-2, #F3F3F3);
}

.popover-body {
    padding: 0 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reason-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reason-label {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #5C5C5C;
    line-height: 18px;
}

.reason-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 16px;
}

.reason-icon {
    flex-shrink: 0;
}

.reason-text {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 400;
    color: #181818;
    line-height: 17px;
}

.reason-separator {
    font-size: 12px;
    color: #5C5C5C;
}

.reason-date {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 400;
    color: #5C5C5C;
    line-height: 17px;
}

/* GenAI Reason Section */
.genai-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.genai-reason-box {
    background: #ECE1F9;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.genai-reason-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 590;
    color: #2E2E2E;
    line-height: 18px;
}

.genai-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.genai-suggested-date {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 400;
    color: #03234D;
    line-height: 17px;
}

.genai-reason-text-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.genai-reason-text {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #03234D;
    line-height: 18px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.genai-reason-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.show-more-link {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 500;
    color: #0176D3;
    text-decoration: none;
    cursor: pointer;
    align-self: flex-start;
}

.show-more-link:hover {
    text-decoration: underline;
}

.genai-sources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 16px;
    padding-top: 4px;
}

.sources-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 16px;
    cursor: pointer;
    padding: 4px 0;
}

.sources-header:hover {
    opacity: 0.8;
}

.sources-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sources-chevron.expanded {
    transform: rotate(90deg);
}

.sources-list-content {
    padding-left: 20px;
    padding-top: 4px;
}

.sources-label {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #5C5C5C;
    line-height: 18px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 16px;
}

.source-icon {
    flex-shrink: 0;
}

.source-link {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 400;
    color: #0250D9;
    line-height: 17px;
    text-decoration: none;
}

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

/* Popover Nubbin (Arrow) */
.popover-nubbin {
    position: absolute;
    bottom: -10px;
    left: 16px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.link {
    color: #0B5CAB;
    text-decoration: underline;
}

/* ===================================
   Assessments Tab Content (Left Card)
   =================================== */
.assessments-tab-content {
    padding: 0 16px;
}

/* Scoped Tabs Container */
.scoped-tabs-container {
    background: var(--slds-g-color-surface-container-1);
    border: 1px solid var(--slds-g-color-border-1);
    border-radius: var(--slds-g-radius-border-3);
    overflow: hidden;
    margin-top: 16px;
}

.scoped-tabs {
    display: flex;
    background: var(--slds-g-color-surface-container-1);
    border-bottom: 1px solid var(--slds-g-color-border-1);
}

.scoped-tab {
    padding: var(--slds-g-spacing-3) var(--slds-g-spacing-4);
    font-family: var(--slds-g-font-family);
    font-size: var(--slds-g-font-scale-base);
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 18px;
}

.scoped-tab:hover {
    color: var(--slds-g-color-on-surface-2);
    background: var(--slds-g-color-surface-container-2);
}

.scoped-tab.active {
    color: var(--slds-g-color-accent-2);
    border-bottom-color: var(--slds-g-color-accent-2);
    background: var(--slds-g-color-surface-container-1);
}

.scoped-tab-spacer {
    flex: 1;
    border-bottom: 1px solid var(--slds-g-color-border-1);
}

.scoped-tab-content {
    padding: 24px 16px;
    background: var(--slds-g-color-surface-container-1);
}

/* Find Assessments Search Box */
.find-assessments-search-box {
    background: #FAFCFF;
    border: 1px solid #C9C9C9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.search-box-content {
    display: flex;
    align-items: stretch;
    gap: 16px;
    position: relative;
}

.search-box-text {
    flex: 1;
    padding: 20px 33px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.search-box-title {
    font-family: var(--slds-g-font-family);
    font-size: 28px;
    font-weight: 600;
    color: #181818;
    line-height: 32px;
    margin: 0;
    opacity: 0.8;
    letter-spacing: 0.364px;
}

.search-box-description {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #2E2E2E;
    line-height: 18px;
    margin: 0;
}

.search-box-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-input-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--slds-g-color-surface-container-1);
    border: 1px solid var(--slds-g-color-on-surface-1);
    border-radius: 8px;
    padding: 6px 8px;
    flex: 1;
    min-width: 250px;
    max-width: 390px;
    height: 32px;
}

.search-field-icon {
    flex-shrink: 0;
}

.find-assessment-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    color: var(--slds-g-color-on-surface-2);
    line-height: 18px;
}

.find-assessment-input::placeholder {
    color: var(--slds-g-color-on-surface-1);
}

.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.search-clear-btn:hover {
    opacity: 0.8;
}

.search-clear-btn svg circle {
    fill: #5C5C5C;
}

.search-clear-btn:hover svg circle {
    fill: #3E3E3E;
}

.search-box-illustration {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
}

.landscape-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

/* Neutral Button (Disabled state) */
.btn-neutral {
    background: var(--slds-g-color-surface-container-3);
    border: 1px solid #757575;
    color: #757575;
    border-radius: 9999px;
    padding: 6px 16px;
    font-family: var(--slds-g-font-family);
    font-size: 14px;
    font-weight: 590;
    cursor: not-allowed;
}

.btn-neutral:not(.btn-disabled) {
    background: var(--slds-g-color-surface-container-1);
    border-color: var(--slds-g-color-on-surface-1);
    color: var(--slds-g-color-on-surface-2);
    cursor: pointer;
}

.btn-neutral:not(.btn-disabled):hover {
    background: var(--slds-g-color-surface-container-2);
}

/* Brand Button with Icon */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-with-icon svg {
    flex-shrink: 0;
}

/* GenAI Suggestions Button - Rounded Style */
.btn-genai-suggestions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #0176D3;
    border: 1px solid #0176D3;
    border-radius: 20px;
    color: #FFFFFF;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-genai-suggestions:hover {
    background: #014486;
    border-color: #014486;
}

.btn-genai-suggestions svg {
    flex-shrink: 0;
}

/* Find Assessments Empty State */
.find-assessments-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    background: var(--slds-g-color-surface-container-1);
}

.empty-state-illustration {
    margin-bottom: 16px;
}

.empty-state-title {
    font-family: var(--slds-g-font-family);
    font-size: 24px;
    font-weight: 400;
    color: #001E5B;
    line-height: 32px;
    margin: 0 0 12px 0;
}

.empty-state-description {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    line-height: 18px;
    text-align: center;
}

.empty-state-description p {
    margin: 0;
}

.empty-state-examples {
    color: var(--slds-g-color-on-surface-2);
    margin-top: 4px !important;
}

/* Find Assessments Results */
.find-assessments-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Results Header with Controls */
.find-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 4px;
}

.find-results-meta {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2);
}

.find-results-meta strong {
    font-weight: 590;
}

.find-results-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* MCG Assessment List Card */
.mcg-assessment-card {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 1px 0px 0px 0px #C9C9C9, -1px 0px 0px 0px #C9C9C9, 0px -1px 0px 0px #C9C9C9, 0px 1px 0px 0px #E5E5E5;
    overflow: hidden;
    position: relative;
}

.mcg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin: 6px;
    background: transparent;
}

.mcg-card-header-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.mcg-checkbox-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #C9C9C9;
    background: #FFFFFF;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mcg-checkbox-btn:hover {
    background: #F3F3F3;
}

.mcg-checkbox-btn svg path {
    stroke: #0176D3;
}

.mcg-checkbox-btn.selected {
    background: #0176D3;
    border-color: #0176D3;
}

.mcg-checkbox-btn.selected svg path {
    stroke: white;
}

.mcg-assessment-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
}

.mcg-assessment-name {
    font-family: var(--slds-g-font-family);
    font-size: 16px;
    font-weight: 700;
    color: #0B5CAB;
    text-decoration: none;
    line-height: 24px;
}

.mcg-assessment-separator {
    font-family: var(--slds-g-font-family);
    font-size: 16px;
    font-weight: 400;
    color: #0B5CAB;
    line-height: 24px;
}

.mcg-assessment-source {
    display: flex;
    align-items: center;
}

.mcg-assessment-source img {
    height: 15px;
    width: auto;
}

.mcg-assessment-source-text {
    font-family: var(--slds-g-font-family);
    font-size: 14px;
    font-weight: 590;
    color: #0B5CAB;
    text-decoration: none;
}

.mcg-card-header-right {
    display: flex;
    align-items: center;
    width: 129px;
    justify-content: flex-end;
}

.btn-start-arrow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #FFFFFF;
    border: 1px solid #C9C9C9;
    border-radius: 24px;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #181818;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-start-arrow:hover {
    background: #F3F3F3;
}

.btn-start-arrow svg {
    width: 12px;
    height: 12px;
}

.btn-start-arrow svg path {
    fill: #0176D3;
    stroke: none;
}

.mcg-sort-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #C9C9C9;
    background: #FFFFFF;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.15s;
}

.mcg-sort-btn:hover {
    background: #F3F3F3;
}

/* MCG Card Metadata Fields */
.mcg-card-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 91px;
    padding: 0 16px;
}

.mcg-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 45px;
}

.mcg-field-label {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #444444;
    line-height: 20px;
    white-space: nowrap;
}

.mcg-field-value {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #181818;
    line-height: 20px;
    white-space: nowrap;
}

/* MCG Card Description */
.mcg-card-description {
    padding: 17px 16px 16px 16px;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: #181818;
    line-height: 20px;
    margin: 0;
}

/* Legacy classes for compatibility */
.find-result-card {
    background: var(--slds-g-color-surface-container-1);
    border: 1px solid var(--slds-g-color-border-1);
    border-radius: 12px;
    padding: 16px;
}

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

.find-result-name {
    font-family: var(--slds-g-font-family);
    font-size: 14px;
    font-weight: 590;
    color: var(--slds-g-color-accent-2);
    text-decoration: none;
}

.find-result-name:hover {
    text-decoration: underline;
}

.find-result-actions {
    display: flex;
    gap: 8px;
}

.find-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 8px;
}

.find-result-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.find-result-label {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
}

.find-result-value {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-2);
}

.find-result-description {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    color: var(--slds-g-color-on-surface-1);
    line-height: 18px;
    margin: 0;
}

/* GenAI Result Badge */
.genai-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #ECE1F9;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 590;
    color: #9050E9;
    margin-bottom: 8px;
}

.genai-result-badge svg {
    width: 12px;
    height: 12px;
}

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    margin-bottom: 8px;
}

.results-count {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 590;
    color: var(--slds-g-color-on-surface-2);
}

/* Patient Assessments Empty State */
.patient-assessments-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    text-align: center;
}

.patient-assessments-empty p {
    font-family: var(--slds-g-font-family);
    font-size: 14px;
    color: var(--slds-g-color-on-surface-1);
    margin: 0;
}

/* Responsive adjustments for assessments full view */
@media (max-width: 1200px) {
    .assessment-full-details {
        flex-wrap: wrap;
        gap: var(--slds-g-spacing-4);
    }
    
    .search-input-wrapper {
        width: 100%;
        max-width: 345px;
    }
    
    .controls-row {
        flex-wrap: wrap;
    }
}

/* ============================================
   GenAI Recommendations Section
   ============================================ */

.genai-recommendations-section,
.search-results-section {
    width: 100%;
    margin-top: 16px;
    padding: 0;
}

.search-results-content {
    display: block;
    padding: 16px 0;
}

.search-results-content.collapsed {
    display: none;
}

.search-results-content .find-assessments-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Expandable Header */
.genai-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    background: #F3F3F3;
    border-radius: 4px;
    user-select: none;
}

.genai-section-header:hover {
    background: #E5E5E5;
}

.genai-chevron {
    transition: transform 0.2s ease;
}

.genai-chevron.expanded {
    transform: rotate(90deg);
}

.genai-section-title {
    font-family: var(--slds-g-font-family);
    font-size: 16px;
    font-weight: 600;
    color: #181818;
}

/* Expandable Content */
.genai-section-content {
    padding: 16px 0;
}

.genai-section-content.collapsed {
    display: none;
}

/* Subtitle Row */
.genai-subtitle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.genai-subtitle-text {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    color: #5C5C5C;
}

.genai-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #ECE1F9;
    border-radius: 12px;
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 500;
    color: #7B41BD;
}

.genai-ai-badge svg {
    flex-shrink: 0;
}

.genai-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.genai-info-btn:hover svg circle,
.genai-info-btn:hover svg path {
    stroke: #7B41BD;
}

.genai-info-btn:hover svg circle[fill] {
    fill: #7B41BD;
}

/* Carousel Container */
.genai-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.genai-carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s ease;
}

/* GenAI Suggestion Card */
.genai-suggestion-card {
    flex: 0 0 calc(33.333% - 11px);
    min-width: 280px;
    border: 1px solid #C9C9C9;
    border-radius: 20px;
    background: #FFFFFF;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.genai-card-header {
    padding: 12px 16px;
    background: #FFFFFF;
}

.genai-card-title {
    font-family: var(--slds-g-font-family);
    font-size: 20px;
    font-weight: 400;
    color: #03234D;
    line-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.genai-card-body {
    padding: 16px;
    padding-top: 0;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.genai-card-description {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    color: #03234D;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reason Box (Purple) */
.genai-reason-box {
    background: #ECE1F9;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.genai-suggestion-card .genai-reason-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.genai-suggestion-card .genai-reason-label {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 590;
    color: #2E2E2E;
    flex: 0 0 auto;
}

.genai-suggestion-card .genai-reason-info-btn {
    margin-left: auto;
}

.genai-suggestion-card .genai-reason-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.genai-reason-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.genai-reason-text {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    color: #03234D;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carousel Card Reason Text - Expandable */
.genai-reason-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.genai-card-reason-text {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    color: #03234D;
    line-height: 18px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.genai-card-reason-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.genai-card-show-more {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 500;
    color: #0176D3;
    text-decoration: none;
    cursor: pointer;
    align-self: flex-start;
    display: none;
}

.genai-card-show-more:hover {
    text-decoration: underline;
}

.genai-card-show-more.visible {
    display: inline;
}

/* Sources Section */
.genai-sources-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    border-top: 1px solid #E5E5E5;
    padding-top: 8px;
}

.genai-sources-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.genai-sources-header:hover {
    opacity: 0.8;
}

.genai-sources-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.genai-sources-chevron.expanded {
    transform: rotate(90deg);
}

.genai-sources-label {
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 500;
    color: #5C5C5C;
}

.genai-sources-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 4px 20px;
}

.genai-source-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #F3F3F3;
}

.genai-source-item:last-child {
    border-bottom: none;
}

.genai-source-icon-wrapper {
    flex-shrink: 0;
    margin-top: 2px;
}

.genai-source-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.genai-source-type {
    font-family: var(--slds-g-font-family);
    font-size: 12px;
    font-weight: 500;
    color: #181818;
    line-height: 16px;
}

.genai-source-detail {
    font-family: var(--slds-g-font-family);
    font-size: 11px;
    font-weight: 400;
    color: #5C5C5C;
    line-height: 15px;
}

.genai-source-value {
    font-family: var(--slds-g-font-family);
    font-size: 11px;
    font-weight: 500;
    color: #0176D3;
    line-height: 15px;
}

/* Card Footer */
.genai-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #E5E5E5;
    background: #FAFAF9;
}

.btn-genai-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #FFFFFF;
    border: 1px solid #0176D3;
    border-radius: 24px;
    color: #0176D3;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 590;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-genai-start:hover {
    background: #0176D3;
    color: #FFFFFF;
}

.btn-genai-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #FFFFFF;
    border: 1px solid #C9C9C9;
    border-radius: 24px;
    color: #181818;
    font-family: var(--slds-g-font-family);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-genai-add:hover {
    background: #F3F3F3;
    border-color: #949494;
}

/* Carousel Indicators */
.genai-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 8px;
}

.genai-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #C9C9C9;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.genai-carousel-indicator.active {
    background: #0176D3;
}

.genai-carousel-indicator:hover:not(.active) {
    background: #949494;
}

/* Responsive Carousel */
@media (max-width: 900px) {
    .genai-suggestion-card {
        flex: 0 0 calc(50% - 8px);
    }
}

@media (max-width: 600px) {
    .genai-suggestion-card {
        flex: 0 0 100%;
    }
}

