﻿:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #f8f9fa;
    --text-color: #333333;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

    body.sidebar-active {
        overflow: hidden;
    }

/* ================== SIDEBAR STYLES ================== */
#sidebar {
    min-height: 100vh;
    width: 250px;
    transition: transform 0.3s ease;
    background-color: var(--secondary-color);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}

#content {
    width: calc(100% - 250px);
    transition: all 0.3s ease;
    margin-left: 250px;
    min-height: 100vh;
}

/* Overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .overlay.active {
        display: block;
        opacity: 1;
    }

/* ================== MOBILE STYLES ================== */
@media (max-width: 991px) {
    /* Sidebar is hidden by default on mobile */
    #sidebar {
        transform: translateX(-100%);
        margin-left: 0;
    }

    /* Make content full width */
    #content {
        width: 100%;
        margin-left: 0;
    }

    /* Active state for sidebar */
    #sidebar.active {
        transform: translateX(0);
    }

    /* Show hamburger button */
    #sidebarCollapse {
        display: block !important;
        position: fixed;
        z-index: 1000;
        left: 15px;
        top: 15px;
    }

    /* Show overlay when menu is active */
    .overlay.active {
        display: block;
        opacity: 1;
    }
}

/* ================== EXISTING STYLES ================== */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #2980b9;
    }

.container {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 20px;
    margin-top: 20px;
}

.logo-container {
    padding: 2px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    max-width: 100%;
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 10px 15px;
    transition: all 0.3s;
}

    #sidebar .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
        color: #ffffff !important;
    }

    #sidebar .nav-link i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
    }

#sidebar .admin-section {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

#sidebar .admin-section-title {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px;
    margin-bottom: 5px;
}

#sidebar .admin-section .nav-link {
    padding-left: 25px;
}

/* Collapsible admin menu */
#adminMenu {
    display: none;
}

#adminMenuToggle {
    cursor: pointer;
}

    #adminMenuToggle i.fa-chevron-down {
        transition: transform 0.3s;
    }

    #adminMenuToggle.collapsed i.fa-chevron-down {
        transform: rotate(-90deg);
    }

.btn-outline-info-dark {
    color: #0dcaf0;
    border-color: #0dcaf0;
}

    .btn-outline-info-dark:hover {
        color: #fff;
        background-color: #0dcaf0;
        border-color: #0dcaf0;
    }

.btn-outline-warning-dark {
    color: #ffc107;
    border-color: #ffc107;
}

    .btn-outline-warning-dark:hover {
        color: #000;
        background-color: #ffc107;
        border-color: #ffc107;
    }
/* === MOBILE (Portrait) === */
@media (max-width: 767px) {
    body {
        font-size: 0.9rem;
        overflow-x: hidden;
    }

    .table th, .table td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }

    .table-responsive {
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1050;
        width: 60vw;
        max-width: 280px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        font-size: 1rem;
    }

        #sidebar.active {
            transform: translateX(0);
        }

    #sidebarCollapse {
        position: fixed;
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        z-index: 1040;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 4px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .accordion-header {
        display: flex;
        flex-wrap: wrap;
    }

    .accordion-content td {
        padding: 0.25rem;
    }

    .key, .value {
        font-size: 0.8rem;
    }
}

/* === MOBILE (Landscape) === */
@media (max-width: 991px) and (orientation: landscape) {
    #sidebar {
        width: 40vw;
        max-width: 260px;
    }

    .file-viewer.open {
        height: 60vh;
    }
}

/* === iPhone Specific === */
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) {
    #sidebar {
        width: 60vw;
    }

    #sidebarCollapse {
        top: 10px;
        left: 10px;
    }
}

/* === DESKTOP === */
@media (min-width: 992px) {
    #sidebar {
        transform: translateX(0);
        transition: transform 0.3s ease;
    }

        #sidebar.active {
            transform: translateX(-100%);
        }

    #content,
    .main-content {
        margin-left: 250px;
        transition: margin-left 0.3s ease;
    }

    #sidebar.active ~ #content,
    #sidebar.active ~ .main-content {
        margin-left: 0;
    }
}

/* Prevent background scroll + ensure sidebar scrolls */
body.sidebar-active {
    overflow-y: auto;
}

@media (max-width: 991px) {
    #sidebar {
        font-size: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        #sidebar .nav-link {
            padding: 12px 18px;
            font-size: 1.05rem;
        }
}

@media (max-width: 991px) and (orientation: landscape) {
    body.sidebar-active {
        height: 100%;
        overflow-y: auto;
    }

    body:not(.sidebar-active) {
        height: auto;
        overflow-y: auto;
    }

    #sidebar {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

 
}

@media (min-width: 992px) {
    .overlay {
        display: none !important;
        background: none !important;
    }

    html, body {
        height: auto !important;
        overflow-y: auto !important;
    }
    #sidebar {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.metric-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ================== LEASE QUALITY STYLES ================== */
.detail-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    background: white;
    margin-bottom: 1.5rem;
}

.detail-card .card-header {
    background: linear-gradient(135deg, #06798C 0%, #0a9db5 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
}

.score-hero {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.score-hero .score-value {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.score-hero .score-label {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.score-excellent { color: #198754; }
.score-favorable { color: #20c997; }
.score-standard { color: #ffc107; }
.score-below { color: #fd7e14; }
.score-unfavorable { color: #dc3545; }
.score-unscored { color: #6c757d; }

.bg-score-excellent { background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%); }
.bg-score-favorable { background: linear-gradient(135deg, #d1f2eb 0%, #a6e3d7 100%); }
.bg-score-standard { background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%); }
.bg-score-below { background: linear-gradient(135deg, #ffe4cc 0%, #ffd1a3 100%); }
.bg-score-unfavorable { background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%); }

.score-hero .score-progress {
    max-width: 200px;
    margin: 0 auto;
}

.score-hero .score-progress .progress {
    height: 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.1);
}

.term-score-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.term-score-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Clickable category cards - Link from Analysis to Clauses tab */
.term-score-card.clickable-category {
    cursor: pointer;
}

.term-score-card.clickable-category .view-clauses-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.term-score-card.clickable-category:hover .view-clauses-icon {
    opacity: 1;
}

.term-score-card.clickable-category:hover {
    border-color: var(--aw-heading, #06798C);
}

.term-score-bar {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    margin-top: 0.5rem;
}

.term-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.concern-item {
    padding: 1rem;
    border-left: 4px solid #dc3545;
    background: #fff8f8;
    margin-bottom: 0.75rem;
    border-radius: 0 10px 10px 0;
}

.concern-item.severity-critical {
    border-left-color: #7c0000;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe8e8 100%);
}

.concern-item.severity-high {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffecec 100%);
}

.concern-item.severity-medium {
    border-left-color: #fd7e14;
    background: linear-gradient(135deg, #fff8f0 0%, #fff0e0 100%);
}

.concern-item.severity-low {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffdf0 0%, #fff8e0 100%);
}

.positive-item {
    padding: 1rem;
    border-left: 4px solid #198754;
    background: linear-gradient(135deg, #f0fff4 0%, #e0ffe8 100%);
    margin-bottom: 0.75rem;
    border-radius: 0 10px 10px 0;
}

/* Recommendation items - blue/teal theme */
.recommendation-item {
    padding: 1rem;
    border-left: 4px solid #0d6efd;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    margin-bottom: 0.75rem;
    border-radius: 0 10px 10px 0;
}

.recommendation-item.priority-high {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffecec 100%);
}

.recommendation-item.priority-medium {
    border-left-color: #fd7e14;
    background: linear-gradient(135deg, #fff8f0 0%, #fff0e0 100%);
}

.recommendation-item.priority-low {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #f0fafc 0%, #e5f6f9 100%);
}

/* Card container backgrounds and headers for visual distinction */
/* Matches the Actions tab summary-card style with subtle colored headers */

/* Assessment Summary card - gray/neutral theme */
.detail-card.assessment-summary-card .card-header {
    background: linear-gradient(135deg, rgba(108,117,125,0.15), rgba(108,117,125,0.05)) !important;
    border-bottom: 1px solid rgba(108,117,125,0.2);
}
.detail-card.assessment-summary-card .card-header h6,
.detail-card.assessment-summary-card .card-header .bi {
    color: #495057 !important;
}

/* Concerns card - red theme (matches overdue style) */
.detail-card.concerns-card .card-header {
    background: linear-gradient(135deg, rgba(220,53,69,0.15), rgba(220,53,69,0.05)) !important;
    border-bottom: 1px solid rgba(220,53,69,0.2);
}
.detail-card.concerns-card .card-header h6,
.detail-card.concerns-card .card-header .bi {
    color: #dc3545 !important;
}

/* Positives card - green theme (matches completed style) */
.detail-card.positives-card .card-header {
    background: linear-gradient(135deg, rgba(25,135,84,0.15), rgba(25,135,84,0.05)) !important;
    border-bottom: 1px solid rgba(25,135,84,0.2);
}
.detail-card.positives-card .card-header h6,
.detail-card.positives-card .card-header .bi {
    color: #198754 !important;
}

/* Recommendations card - blue theme (matches pending style) */
.detail-card.recommendations-card .card-header {
    background: linear-gradient(135deg, rgba(13,110,253,0.15), rgba(13,110,253,0.05)) !important;
    border-bottom: 1px solid rgba(13,110,253,0.2);
}
.detail-card.recommendations-card .card-header h6,
.detail-card.recommendations-card .card-header .bi {
    color: #0d6efd !important;
}

.severity-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.severity-critical { background: #7c0000; color: white; }
.severity-high { background: #dc3545; color: #333; }
.severity-medium { background: #fd7e14; color: #333; }
.severity-low { background: #ffc107; color: #333; }

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

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.radar-chart-container {
    position: relative;
    height: 350px;
}

.score-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.impact-positive {
    color: #198754;
}

.impact-negative {
    color: #dc3545;
}

/* ================== PORTFOLIO ANALYSIS STYLES ================== */

/* Card header styling for analysis pages */
.aw-container-card-header {
    padding: 1.25rem 1.5rem !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #E1E8EB;
    border-radius: 10px 10px 0 0;
}

.aw-container-card-header h5,
.aw-container-card-header h6 {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1A4E63;
}

.aw-container-card-header i {
    color: #1A4E63;
    font-size: 1.1em;
}

/* Analysis section styling */
.analysis-section {
    background: #FFFFFF;
    border: 1px solid #E1E8EB;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0px 2px 8px rgba(26, 78, 99, 0.08);
}

.analysis-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E1E8EB;
}

.analysis-section-header h6 {
    margin: 0;
    font-weight: 600;
}

/* Near Term Priorities card styling */
.priority-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 2px 8px rgba(26, 78, 99, 0.08);
    height: 100%;
}

.priority-card .card-header {
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.priority-card .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1rem;
}

.priority-card .list-group-item:last-child {
    border-bottom: none;
}

/* Leases Requiring Attention styling */
.lease-attention-card {
    background: #FFFFFF;
    border: 1px solid #E1E8EB;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0px 2px 6px rgba(26, 78, 99, 0.06);
    transition: box-shadow 0.2s ease;
}

.lease-attention-card:hover {
    box-shadow: 0px 4px 12px rgba(26, 78, 99, 0.12);
}

.lease-attention-card.priority-critical {
    border-left: 4px solid #dc3545;
}

.lease-attention-card.priority-high {
    border-left: 4px solid #fd7e14;
}

.lease-attention-card.priority-medium {
    border-left: 4px solid #ffc107;
}

/* Lease Details Grid Styling */
.lease-details-grid {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.lease-detail-section {
    background: #FFFFFF;
    border-radius: 6px;
    padding: 0.75rem;
    height: 100%;
    border: 1px solid #E1E8EB;
}

.lease-detail-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1A4E63;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #E1E8EB;
    display: flex;
    align-items: center;
}

.lease-detail-item {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.lease-detail-item .label {
    color: #6c757d;
    font-weight: 500;
}

.lease-detail-item .value {
    color: #1A4E63;
    font-weight: 600;
}

.lease-issues-section,
.lease-actions-section {
    font-size: 0.9rem;
}

.lease-issues-section ul,
.lease-actions-section ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.lease-issues-section li,
.lease-actions-section li {
    margin-bottom: 0.25rem;
}

/* Analysis text blocks */
.analysis-text-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    line-height: 1.6;
}

/* Stat values for analysis summary */
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1A4E63;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Executive Summary styling */
.executive-summary {
    line-height: 1.7;
    color: #333;
}

/* Print styles for Portfolio Analysis */
@media print {
    .aw-container-card-header {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .analysis-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .priority-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lease-attention-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lease-details-grid {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .lease-detail-section {
        background: #FFFFFF !important;
        border: 1px solid #E1E8EB !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .lease-detail-header {
        color: #1A4E63 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .btn-aw,
    .btn {
        display: none !important;
    }
}

/* ================== TAB NAVIGATION (SHARED) ================== */
/* Enhanced tab navigation with raised tabs on gray background */
/* Used by: LandDocuments/Details, Collections/Details, and other tabbed pages */
.details-tabs {
    border-bottom: none;
    margin-bottom: 0;
    background: #f8f9fa;
    padding: 0.5rem 0.5rem 0;
    border-radius: 8px 8px 0 0;
}

.details-tabs .nav-link {
    border: 1px solid #dee2e6 !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    margin-right: 3px;
    background: #e9ecef;
    position: relative;
    top: 1px;
    transition: all 0.2s ease;
}

.details-tabs .nav-link:hover {
    background: #fff;
    color: var(--aw-heading, #06798C);
}

.details-tabs .nav-link.active {
    color: var(--aw-heading, #06798C);
    background: #fff;
    border-color: #dee2e6;
    font-weight: 600;
}

.details-tabs .nav-link i {
    margin-right: 0.5rem;
}

.tab-content.aw-container-body {
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    background: #fff;
    padding-top: 1rem;
}

/* Info List - for displaying document details */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.info-value {
    color: #212529;
}

/* ===================================
   Document Modifications Tab Styles
   =================================== */

/* Statistics Bar */
.modifications-stats-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.modifications-stats-bar .stat-item {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.modifications-stats-bar .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A4E63;
    line-height: 1.2;
}

.modifications-stats-bar .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modifications-stats-bar .stat-info .stat-number { color: #0dcaf0; }
.modifications-stats-bar .stat-warning .stat-number { color: #ffc107; }
.modifications-stats-bar .stat-success .stat-number { color: #198754; }

/* Filter Bar */
.modification-filter-bar {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
}

/* Modification Cards */
.modification-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.modification-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Card status variants */
.modification-card.modification-critical {
    border-left: 4px solid #dc3545;
}

.modification-card.modification-warning {
    border-left: 4px solid #ffc107;
}

.modification-card.modification-material {
    border-left: 4px solid #0dcaf0;
}

.modification-card.modification-standard {
    border-left: 4px solid #6c757d;
}

/* Card Header */
.modification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mod-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.mod-location {
    color: #495057;
    font-size: 0.9rem;
}

/* Card Body */
.modification-card-body {
    padding: 1.25rem;
}

/* Text Changes */
.mod-text-changes {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.mod-text-original,
.mod-text-replacement {
    margin-bottom: 0.5rem;
}

.mod-text-original:last-child,
.mod-text-replacement:last-child {
    margin-bottom: 0;
}

.mod-text-label {
    display: inline-block;
    min-width: 90px;
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

.mod-text-value {
    display: inline;
}

.mod-text-value del {
    background-color: #ffeef0;
    color: #c12d2d;
    text-decoration: line-through;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}

.mod-text-value ins {
    background-color: #e6ffec;
    color: #1a7f37;
    text-decoration: none;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}

/* Field Impact */
.mod-field-impact {
    background: #fff8e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid #ffc107;
}

.mod-field-label {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-bottom: 0.25rem;
}

.mod-field-value {
    font-weight: 500;
    color: #333;
}

/* Impact Description */
.mod-impact-description {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4ff 100%);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid #0d6efd;
}

.mod-impact-description p {
    color: #333;
    line-height: 1.5;
}

/* Metadata */
.mod-metadata {
    font-size: 0.9rem;
}

.mod-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.mod-meta-label {
    color: #6c757d;
}

.mod-meta-value {
    font-weight: 500;
}

/* Visual Description */
.mod-visual-description {
    padding-top: 0.75rem;
    border-top: 1px dashed #dee2e6;
}

/* Inline Modification Indicator on Clauses */
.modification-indicator {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.modification-indicator:hover {
    animation: none;
    transform: scale(1.05);
}

/* Highlight effect when navigating to a modification */
.modification-highlight {
    animation: highlight-pulse 0.5s ease-in-out 3;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.4) !important;
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(13, 110, 253, 0.4); }
    50% { box-shadow: 0 0 30px rgba(13, 110, 253, 0.6); }
}

/* Responsive adjustments for modifications */
@media (max-width: 768px) {
    .modification-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mod-header-right {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .mod-field-impact .row {
        gap: 0.5rem;
    }

    .mod-field-impact .col-md-4 {
        width: 100%;
    }
}