html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1e3a5f;
    border-color: #1e3a5f;
}

.btn-primary:hover {
    background-color: #152a45;
    border-color: #152a45;
    color: #ffffff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e51920;
}

.validation-message {
    color: #e51920;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Dropdown Button Fixes */
.dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

.dropdown-item-content {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.dropdown-item-content:hover {
    background-color: var(--bs-dropdown-link-hover-bg, #e9ecef);
    color: var(--bs-dropdown-link-hover-color, #1e2125);
}

/* Make the entire button area clickable */
.dropdown-item.border-0.bg-transparent {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
}

.dropdown-item.border-0.bg-transparent:hover {
    background: transparent !important;
}

.dropdown-item.border-0.bg-transparent:focus {
    background: transparent !important;
    box-shadow: none !important;
}

/* Navigation Styling */
.page {
    transition: all 0.3s ease;
}

.sidebar {
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%) !important;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    border: none !important;
}

/* Ensure seamless gradient in navigation */
.sidebar .top-row,
.sidebar .nav-scrollable,
.sidebar .nav-item,
.sidebar .nav-item a {
    border: none !important;
    background: transparent !important;
}

.sidebar .top-row {
    background: rgba(0, 0, 0, 0.2) !important;
}

main {
    transition: all 0.3s ease;
}

/* Sidebar Toggle Button - Desktop collapse functionality */
.sidebar-toggle {
    position: fixed;
    bottom: 20px;
    left: 238px;
    width: 24px;
    height: 48px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    transition: left 0.3s ease, background 0.2s ease;
}

.sidebar-toggle:hover {
    background: linear-gradient(180deg, #2a4a6f 0%, #1d2b3a 100%);
}

.sidebar-toggle .toggle-icon {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

@media (min-width: 641px) {
    .sidebar-toggle {
        display: flex;
    }

    /* Collapsed sidebar state */
    .page.sidebar-collapsed .sidebar {
        width: 0 !important;
        min-width: 0 !important;
    }

    .page.sidebar-collapsed .sidebar-toggle {
        left: 0;
    }

    .page.sidebar-collapsed .sidebar .nav-scrollable,
    .page.sidebar-collapsed .sidebar .top-row,
    .page.sidebar-collapsed .sidebar .navbar-toggler {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
}

.top-row {
    background: linear-gradient(90deg, #1e3a5f 0%, #0d1b2a 100%) !important;
    border: none !important;
    border-bottom: none !important;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
}

.navbar-brand {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.5rem;
    text-decoration: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: #e0e0e0 !important;
    text-decoration: none;
    transform: scale(1.02);
}

.logo-image {
    height: 45px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: filter 0.3s ease, opacity 0.3s ease;
    display: block;
}

/* Make logo appear white */
.logo-image.logo-white {
    filter: brightness(0) invert(1);
}

.logo-image:hover {
    opacity: 0.9;
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        height: 40px;
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 36px;
        max-width: 120px;
    }
}

.nav-link {
    color: #e0e0e0 !important;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-weight: 500;
}

.nav-item .bi {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Dark theme for navigation */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: #e0e0e0 !important;
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

/* Homepage Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(201, 122, 32, 0.1) 0%, rgba(255, 179, 71, 0.05) 100%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #c97a20;
}

.hero-section h1 i {
    color: #ffffff;
}

.hero-section .lead {
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-section .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Modal Improvements */
.modal {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.modal-backdrop {
    z-index: 9998 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.modal.show {
    display: block !important;
}

.modal.d-block {
    display: block !important;
}

.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid #007bff;
    background-color: white;
    position: relative;
    z-index: 10000;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Content Area Transitions */
.content {
    transition: all 0.3s ease;
}

/* Button Transitions */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Card Transitions */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Feature Cards - Theme-matched styling
   ============================================ */

.feature-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 58, 95, 0.15);
    border-color: #1e3a5f;
}

.feature-card .card-body {
    padding: 2rem 1.5rem;
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
}

/* Aircraft icon - Navy blue */
.feature-icon-aircraft {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a73 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* Manual icon - Amber/Orange */
.feature-icon-manual {
    background: linear-gradient(135deg, #c97a20 0%, #e8a040 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(201, 122, 32, 0.3);
}

/* AI icon - Teal */
.feature-icon-ai {
    background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Tools icon - Slate */
.feature-icon-tools {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.3);
}

.feature-card .card-title {
    color: #1e3a5f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.feature-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-card a {
    color: inherit;
    text-decoration: none;
}

.feature-card a:hover .card-title {
    color: #c97a20;
}

/* Stat Cards - Navy Blue Theme */
.card.bg-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a6f 100%) !important;
    border: none !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #1e4a5f 0%, #2a5a6f 100%) !important;
    border: none !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #3a4a5f 0%, #4a5a6f 100%) !important;
    border: none !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #0d2b4a 0%, #1e3a5f 100%) !important;
    border: none !important;
}

/* Stat card icon styling */
.card.bg-primary i,
.card.bg-success i,
.card.bg-warning i,
.card.bg-info i {
    opacity: 0.7;
}

/* User Management Styles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.table-responsive .table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* ============================================
   Theme-matched Badge Styles
   ============================================ */

/* Manufacturer badge - Navy blue outline */
.badge-manufacturer {
    background-color: transparent;
    border: 1px solid #1e3a5f;
    color: #1e3a5f;
    font-weight: 500;
}

/* Category badge - Amber/orange outline */
.badge-category {
    background-color: transparent;
    border: 1px solid #c97a20;
    color: #c97a20;
    font-weight: 500;
}

/* Count badge - Slate outline */
.badge-count {
    background-color: transparent;
    border: 1px solid #495057;
    color: #495057;
    font-weight: 500;
}

/* Status Active - Green outline */
.badge-status-active {
    background-color: transparent;
    border: 1px solid #28a745;
    color: #28a745;
    font-weight: 500;
}

/* Status Inactive - Gray outline */
.badge-status-inactive {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    font-weight: 500;
}

/* Info badge - Teal outline */
.badge-info-outline {
    background-color: transparent;
    border: 1px solid #17a2b8;
    color: #17a2b8;
    font-weight: 500;
}

/* Primary badge - Navy filled (for emphasis) */
.badge-primary-theme {
    background-color: #1e3a5f;
    border: 1px solid #1e3a5f;
    color: #ffffff;
    font-weight: 500;
}

/* Success badge - Green filled */
.badge-success-theme {
    background-color: #28a745;
    border: 1px solid #28a745;
    color: #ffffff;
    font-weight: 500;
}

/* Orange badge - for versions/counts */
.bg-orange {
    background-color: #e67e22 !important;
    color: #ffffff !important;
}

/* Override Bootstrap bg-primary to use navy theme */
.bg-primary {
    background-color: #1e3a5f !important;
}

/* Override Bootstrap bg-info to use navy theme */
.bg-info {
    background-color: #1e3a5f !important;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* PDF.js Viewer Styles */
.pdfjs-viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #525659;
    position: relative;
}

.pdfjs-pages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pdfjs-page-wrapper {
    position: relative;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.pdfjs-page-label {
    position: absolute;
    top: -25px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.pdfjs-page-canvas {
    display: block;
}

.pdfjs-highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Left margin indicator for visual grounding (replaces bounding box highlight) */
.pdfjs-margin-indicator {
    position: absolute;
    left: 0;
    width: 4px;
    background-color: #2196F3;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

.pdfjs-margin-indicator-pulse {
    animation: margin-indicator-pulse 2s ease-in-out;
}

@keyframes margin-indicator-pulse {
    0% {
        background-color: #1976D2;
        box-shadow: 0 0 4px rgba(33, 150, 243, 0.5);
    }
    50% {
        background-color: #0d6efd;
        box-shadow: 0 0 8px rgba(33, 150, 243, 0.8);
    }
    100% {
        background-color: #1976D2;
        box-shadow: 0 0 4px rgba(33, 150, 243, 0.5);
    }
}

/* Legacy bounding box highlight (kept for backwards compatibility) */
.pdfjs-highlight-box {
    position: absolute;
    /* Solid blue highlight base color */
    background-color: rgba(33, 150, 243, 0.4);
    border: 2px solid #2196F3;
    border-radius: 3px;
    pointer-events: none;
}

.pdfjs-highlight-pulse {
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
	    /* Keep the highlight consistently blue while still pulsing slightly */
	    0% {
	        background-color: rgba(33, 150, 243, 0.3);
	        border-color: #1976D2;
	    }
	    50% {
	        background-color: rgba(33, 150, 243, 0.6);
	        border-color: #0d6efd;
	    }
	    100% {
	        background-color: rgba(33, 150, 243, 0.3);
	        border-color: #1976D2;
	    }
}

.pdfjs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 16px;
}

/* Page placeholder styles for progressive loading */
.pdfjs-page-placeholder {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdfjs-page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(240, 240, 240, 0.9);
}

.pdfjs-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: pdfjs-spin 1s linear infinite;
}

@keyframes pdfjs-spin {
    to {
        transform: rotate(360deg);
    }
}

.pdfjs-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ff6b6b;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

.pdfjs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pdfjs-controls .btn {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
}

.pdfjs-controls .btn i {
    font-size: 16px;
}

.pdfjs-page-info {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    min-width: 60px;
    text-align: center;
}

.pdfjs-divider {
    width: 1px;
    height: 24px;
    background-color: #dee2e6;
    margin: 0 8px;
}

.pdfjs-viewer-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.pdfjs-container {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.pdfjs-controls {
    flex-shrink: 0;
}

/* Ensure PDF toolbar (up/down + zoom) is always visible in the
   VisualGrounding viewer by floating it over the page content. */
.visual-grounding-viewer .pdfjs-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    border-top: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

/* Visual Grounding Viewer enhancements */
.visual-grounding-viewer {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.visual-grounding-viewer .grounding-header {
    flex-shrink: 0;
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.visual-grounding-viewer .pdf-viewer-container {
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.visual-grounding-viewer .grounding-text {
    flex-shrink: 0;
    max-height: 150px;
    overflow-y: auto;
}

/* ============================================
   Part 145 Compliance Review Tool Theme
   ============================================ */

/* Content Section Headers - Blue theme */
.section-header-blue {
    background-color: #1e3a5f;
    color: #ffffff;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header-blue .page-refs {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
}

/* Content Section Headers - Orange/Amber theme */
.section-header-orange {
    background-color: #c97a20;
    color: #ffffff;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Content Section Body */
.section-body {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1rem;
    border-radius: 0 0 4px 4px;
}

.section-body-light {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1rem;
    border-radius: 0 0 4px 4px;
}

/* Reference buttons */
.ref-btn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e3a5f;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ref-btn:hover {
    background-color: #1e3a5f;
    color: #ffffff;
    border-color: #1e3a5f;
}

/* Action Button Bar */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 1030;
    transition: left 0.3s ease;
}

.page.sidebar-collapsed .action-bar {
    left: 0;
}

@media (max-width: 640.98px) {
    .action-bar {
        left: 0;
    }
}

/* Action Buttons */
.btn-accept {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-accept:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: #ffffff;
}

.btn-modified {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-modified:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-flag {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-flag:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #ffffff;
}

.btn-ai {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-ai:hover {
    background-color: #5a32a3;
    border-color: #4e2d91;
    color: #ffffff;
}

.btn-next {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-next:hover {
    background-color: #0069d9;
    border-color: #0062cc;
    color: #ffffff;
}

/* Chapter Navigation Sidebar */
.chapter-nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.chapter-header {
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1rem 0.5rem 1rem;
    margin: 0;
}

.chapter-item {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.chapter-item:hover {
    background-color: #f8f9fa;
    color: #1e3a5f;
}

.chapter-item.active {
    background-color: #e3f2fd;
    color: #1e3a5f;
    border-left-color: #1e3a5f;
    font-weight: 500;
}

/* Progress indicator */
.progress-indicator {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

/* Header action buttons */
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.header-btn.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.header-btn.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Status badge in header */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.status-badge.status-active {
    background-color: #28a745;
    color: #ffffff;
}

.status-badge.status-inactive {
    background-color: #6c757d;
    color: #ffffff;
}

/* Editable content area */
.editable-content {
    background-color: #fff8e1;
    border: 1px solid #ffcc80;
    border-radius: 4px;
    padding: 1rem;
    position: relative;
}

.editable-content::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background-color: #ffcc80;
    border-radius: 4px;
    opacity: 0.5;
}

/* Reference examples accordion */
.reference-examples {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 1rem;
}

.reference-examples-header {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.reference-examples-header:hover {
    background-color: #e9ecef;
}

.reference-examples-body {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

/* ============================================
   Action Buttons - Theme-matched styling
   ============================================ */

/* Action button group container */
.action-btn-group {
    display: flex;
    gap: 0.375rem;
    flex-wrap: nowrap;
}

/* Base action button styles */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btn-action i {
    font-size: 0.75rem;
}

/* View button - matches primary theme */
.btn-action-view {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

.btn-action-view:hover {
    background-color: #2a4a73;
    border-color: #2a4a73;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.3);
}

/* Edit button - navy theme */
.btn-action-edit {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

.btn-action-edit:hover {
    background-color: #152a45;
    border-color: #152a45;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.4);
}

/* Delete button - danger with softer initial state */
.btn-action-delete {
    background-color: transparent;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-action-delete:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Icon-only variant for compact tables */
.btn-action-icon {
    padding: 0.375rem 0.5rem;
    min-width: 32px;
}

.btn-action-icon span {
    display: none;
}

/* Show text on larger screens */
@media (min-width: 992px) {
    .btn-action-icon span {
        display: inline;
    }

    .btn-action-icon {
        padding: 0.375rem 0.75rem;
    }
}

/* Info/Chat button - orange accent */
.btn-action-info {
    background-color: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
}

.btn-action-info:hover {
    background-color: #d35400;
    border-color: #c0392b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(230, 126, 34, 0.4);
}

/* Success/Restore button - navy theme */
.btn-action-success {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

.btn-action-success:hover {
    background-color: #152a45;
    border-color: #152a45;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.4);
}

/* Warning/Deactivate button */
.btn-action-warning {
    background-color: transparent;
    border-color: #ffc107;
    color: #856404;
}

.btn-action-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}
