:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --accent-color: #ff6600;
    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Enhanced Tab Navbar Styles - Removed (Not Used) */

.form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.form-header {
    background: #ffffff;
    color: #1a1a1a;
    padding: 1.75rem 2rem;
    text-align: left;
    flex-shrink: 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.3px;
}

.form-header h1 i {
    color: #0066cc;
    font-size: 1.4rem;
}

.form-header .subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.progress-container {
    background: #f8f9fa;
    padding: 1rem 2rem 1rem;
    border-bottom: 3px solid #dee2e6;
    flex-shrink: 0;
    position: relative;
    margin-bottom: 0;
}

.progress {
    height: 6px;
    border-radius: 10px;
    background: #e8ecef;
    overflow: visible;
    position: relative;
}

.progress-bar {
    background: #0066cc;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    background: #004d99;
    border-radius: 0 10px 10px 0;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* SKELETON LOADING STYLES */
.skeleton {
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 50%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton element types */
.skeleton-header {
    height: 80px;
    margin-bottom: 0;
}

.skeleton-progress {
    height: 60px;
    margin-bottom: 0;
}

.skeleton-tabs {
    height: 50px;
    margin-bottom: 0;
}

.skeleton-section-title {
    height: 45px;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.skeleton-label {
    height: 20px;
    width: 150px;
    margin-bottom: 0.35rem;
}

.skeleton-input {
    height: 45px;
    margin-bottom: 0.85rem;
    border-radius: 6px;
}

.skeleton-input-small {
    height: 45px;
    border-radius: 6px;
}

.skeleton-textarea {
    height: 100px;
    margin-bottom: 0.85rem;
    border-radius: 6px;
}

.skeleton-select {
    height: 45px;
    margin-bottom: 0.85rem;
    border-radius: 6px;
}

.skeleton-button {
    height: 50px;
    border-radius: 50px;
    min-width: 120px;
}

.skeleton-checkbox {
    height: 25px;
    width: 200px;
    margin-bottom: 0.75rem;
    border-radius: 4px;
}

.skeleton-radio {
    height: 25px;
    width: 150px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-inline-group {
    height: 30px;
    width: 100%;
    margin-bottom: 0.85rem;
}

.skeleton-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.skeleton-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.skeleton-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.skeleton-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.skeleton-field-group {
    margin-bottom: 0.85rem;
}

.skeleton-body-diagram {
    height: 400px;
    border-radius: 8px;
    margin: 1rem 0;
}

.skeleton-special-section {
    height: 150px;
    border-radius: 8px;
    margin: 0.85rem 0 0 0;
}

/* Individual skeleton loading for form elements */
.loading .form-label {
    position: relative;
    min-height: 20px;
    color: transparent !important;
}

.loading .form-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    height: 20px;
    width: 150px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    z-index: 10;
}

.loading .form-control,
.loading .form-select {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-loading 1.5s ease-in-out infinite !important;
    color: transparent !important;
    border-color: #e0e0e0 !important;
    pointer-events: none !important;
    user-select: none !important;
}

.loading .form-control::placeholder {
    color: transparent !important;
}

.loading textarea.form-control {
    resize: none !important;
}

.loading .form-check {
    position: relative;
}

.loading .form-check::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 25px;
    width: 100%;
    max-width: 200px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    z-index: 10;
}

.loading .form-check-input,
.loading .form-check-label {
    opacity: 0;
}

.loading .section-title {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-loading 1.5s ease-in-out infinite !important;
    color: transparent !important;
    border-left-color: #e0e0e0 !important;
}

.loading .section-title i {
    opacity: 0;
}

.loading .btn {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-loading 1.5s ease-in-out infinite !important;
    color: transparent !important;
    border-color: #e0e0e0 !important;
    pointer-events: none !important;
    user-select: none !important;
}

.loading .btn i {
    opacity: 0;
}

.loading .body-diagram-container,
.loading .fast-assessment,
.loading .ob-section {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-loading 1.5s ease-in-out infinite !important;
}

.loading .body-diagram-container *,
.loading .fast-assessment *,
.loading .ob-section * {
    opacity: 0 !important;
}

/* Header skeleton */
.loading .form-header h1,
.loading .form-header .subtitle {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    color: transparent !important;
    border-radius: 4px;
}

.loading .form-header h1 i,
.loading .form-header .subtitle i {
    opacity: 0;
}

/* Progress skeleton */
.loading .progress-container > div:not(.skeleton-overlay) {
    opacity: 0;
}

.loading .progress-container {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Tabs skeleton - Single unified skeleton bar */
.loading .tabs-container {
    position: relative;
}

.loading .tabs-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    z-index: 100;
    border-bottom: 2px solid #e8ecef;
}

.loading .nav-tabs {
    opacity: 0;
}

/* Ensure body stays visible during loading */
body.loading {
    overflow: hidden;
}

/* Add smooth transition when loading completes */
body:not(.loading) .form-label,
body:not(.loading) .form-control,
body:not(.loading) .form-select,
body:not(.loading) .section-title,
body:not(.loading) .btn,
body:not(.loading) .nav-tabs .nav-link {
    transition: all 0.3s ease;
}

/* Skeleton overlay positioning */
.skeleton-overlay {
    display: none;
}

.loading .skeleton-overlay {
    display: none !important;
}

/* Add relative positioning to containers */
.form-header,
.progress-container,
.tabs-container,
.navigation-buttons,
.form-section {
    position: relative;
}

/* Responsive skeleton adjustments */
@media (max-width: 1200px) {
    .skeleton-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .skeleton-grid-2,
    .skeleton-grid-3,
    .skeleton-grid-4 {
        grid-template-columns: 1fr;
    }

    .skeleton-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.tabs-container {
    background: #ffffff;
    border-bottom: 2px solid #e8ecef;
    flex-shrink: 0;
    overflow-x: auto;
    white-space: nowrap;
    padding-top: 0.5rem;
}

.nav-tabs {
    border-bottom: none;
    padding: 0 2rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
    display: flex;
    gap: 0;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    background: transparent;
    padding: 1rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-bottom: 3px solid transparent;
    border-right: 1px solid #e8ecef;
    transition: all 0.2s ease;
    position: relative;
    margin: 0;
}

.nav-tabs .nav-link:first-child {
    border-top-left-radius: 0;
}

.nav-tabs .nav-link:last-child {
    border-right: none;
}

.nav-tabs .nav-link:hover {
    color: #0066cc;
    background: #f8f9fa;
    border-bottom-color: #80b3e6;
}

.nav-tabs .nav-link.active {
    color: #0066cc;
    background: #ffffff;
    border-bottom-color: #0066cc;
    border-right-color: transparent;
    font-weight: 600;
}

.nav-tabs .nav-link.completed {
    color: #198754;
}

.form-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: #fafbfc;
}

.form-section {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section-title {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 0.65rem 1rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

/* LARGER FORM INPUTS AND LABELS */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.form-control, .form-select {
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    height: auto;
    min-height: 45px;
}

.form-select[multiple] {
    min-height: 120px;
    padding: 0.5rem;
}

.form-select[multiple] option {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
}

.form-select[multiple] option:checked {
    background: var(--primary-color);
    color: white;
}

.form-select[multiple] option:hover {
    background: #e3f2fd;
}

.form-select[multiple] option:checked:hover {
    background: var(--secondary-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

textarea.form-control {
    min-height: 100px;
}

/* LARGER CHECKBOXES AND RADIOS */
.form-check-input {
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.2rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* OPTIMIZED GRID LAYOUTS */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

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

/* SPECIAL SECTIONS */
.fast-assessment, .ob-section, .waiver-section {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin: 0.85rem 0 0 0;
    font-size: 0.95rem;
}

.fast-assessment {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
}

.fast-assessment h6 {
    color: #856404;
    font-weight: 600;
    margin-bottom: 0.65rem;
    font-size: 1rem;
}

.ob-section {
    background-color: #d1ecf1;
    border: 2px solid #17a2b8;
}

.ob-section h6 {
    color: #0c5460;
    font-weight: 600;
    margin-bottom: 0.65rem;
    font-size: 1rem;
}

.waiver-section {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
}

.waiver-section h6 {
    color: #721c24;
    font-weight: 600;
    margin-bottom: 0.65rem;
    font-size: 1rem;
}

.waiver-section p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.signature-box {
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    background-color: #fafafa;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.signature-box i {
    font-size: 2rem;
    color: #ccc;
}

.signature-box p {
    font-size: 0.9rem;
    margin: 0.75rem 0 0 0;
    color: #666;
}

/* BODY DIAGRAM SECTION */
.body-diagram-container {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.body-diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.body-diagram-header h6 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.body-diagram-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

.body-views {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: flex-start;
}

.body-view {
    text-align: center;
}

.view-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.body-image-container {
    position: relative;
    display: inline-block;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: crosshair;
}

.body-image {
    display: block;
    width: 220px;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* Injury markers */
.injury-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    animation: markerPop 0.3s ease;
}

@keyframes markerPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.injury-marker:hover {
    transform: translate(-50%, -50%) scale(1.25);
}

.injury-marker.laceration { background: #dc3545; }
.injury-marker.fracture { background: #fd7e14; }
.injury-marker.burn { background: #ffc107; color: #333; }
.injury-marker.contusion { background: #6f42c1; }
.injury-marker.abrasion { background: #20c997; }
.injury-marker.other { background: #6c757d; }

.injury-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    overflow-y: auto;
    max-height: 500px;
}

.injury-type-selector {
    margin-bottom: 1rem;
}

.injury-type-selector label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.injury-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.injury-type-btn {
    padding: 0.6rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.injury-type-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.injury-type-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.injury-list-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.injury-item {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-color);
    position: relative;
    font-size: 0.85rem;
}

.injury-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.injury-number {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.injury-type-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.injury-type-badge.laceration { background: #dc3545; }
.injury-type-badge.fracture { background: #fd7e14; }
.injury-type-badge.burn { background: #ffc107; color: #333; }
.injury-type-badge.contusion { background: #6f42c1; }
.injury-type-badge.abrasion { background: #20c997; }
.injury-type-badge.other { background: #6c757d; }

.injury-notes {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    resize: vertical;
    min-height: 50px;
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.delete-btn:hover {
    background: #c82333;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.diagram-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.diagram-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem;
}

.navigation-buttons {
    background: white;
    padding: 1rem 2rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.btn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1rem;
    min-width: 120px;
    border: 2px solid;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

/* Remove underline from all buttons globally */
button,
.btn,
[type="button"],
[type="submit"],
[role="button"],
a,
a:hover,
a:focus,
a:active {
    text-decoration: none !important;
}

/* Specifically target Notiflix buttons and notifications */
#NotiflixConfirmWrap button,
#NotiflixConfirmWrap a,
#NotiflixNotifyWrap button,
#NotiflixNotifyWrap a,
#NotiflixReportWrap button,
#NotiflixReportWrap a,
#NotiflixBlockWrap button,
#NotiflixBlockWrap a,
.notiflix-confirm-button,
.notiflix-report-button,
.nx-button,
[id^="Notiflix"] button,
[id^="Notiflix"] a,
[class*="notiflix"] button,
[class*="notiflix"] a {
    text-decoration: none !important;
}

.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
    color: white;
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

.btn-primary:active {
    background-color: #004080;
    border-color: #004080;
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline-primary {
    background-color: white;
    color: #0066cc;
    border-color: #0066cc;
}

.btn-outline-primary:hover {
    background-color: #e6f2ff;
    border-color: #0052a3;
    color: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.15);
}

.btn-outline-primary:active {
    background-color: #cce5ff;
    border-color: #004080;
    color: #004080;
    transform: translateY(0);
    box-shadow: none;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.btn-success:active {
    background-color: #1e7e34;
    border-color: #1e7e34;
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline-secondary {
    background-color: white;
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #5a6268;
    color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.15);
}

.btn-outline-secondary:active {
    background-color: #e9ecef;
    border-color: #495057;
    color: #495057;
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline-danger {
    background-color: white;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #fff5f5;
    border-color: #c82333;
    color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.15);
}

.btn-outline-danger:active {
    background-color: #ffe6e6;
    border-color: #bd2130;
    color: #bd2130;
    transform: translateY(0);
    box-shadow: none;
}

.required-field::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

.mb-section {
    margin-bottom: 0.85rem;
}

.summary-content {
    max-width: none;
    padding: 0;
}

.summary-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.summary-section h7 {
    color: var(--secondary-color);
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    font-size: 1.1rem;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin: 0;
}

.summary-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.summary-table td:first-child {
    font-weight: 600;
    color: #333;
    width: 40%;
    background: #f8f9fa;
    border-right: 2px solid #e9ecef;
}

.summary-table td:last-child {
    width: 60%;
    color: #495057;
}

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

.summary-table tr:hover td {
    background: #f8f9fa;
}

.summary-table tr:hover td:first-child {
    background: #e9ecef;
}

.form-body::-webkit-scrollbar {
    width: 10px;
}

.form-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.form-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.form-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.injury-sidebar::-webkit-scrollbar {
    width: 6px;
}

.injury-sidebar::-webkit-scrollbar-track {
    background: #e9ecef;
}

.injury-sidebar::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.inline-group {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-group-compact {
    margin-bottom: 0.85rem;
}

/* Vehicle selection modal styles */
.vehicle-option {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vehicle-option:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.vehicle-option.selected {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
}

.vehicle-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.vehicle-details {
    font-size: 0.9rem;
    color: #6c757d;
}

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .body-diagram-content {
        grid-template-columns: 1fr;
    }
    
    .body-views {
        gap: 1.5rem;
    }
    
    .body-image {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .form-body {
        padding: 1rem 1rem 1.5rem 1rem;
        min-height: calc(100vh - 350px) !important;
    }

    .navigation-buttons {
        padding: 1.25rem 1rem !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        flex-shrink: 0 !important;
    }

    .navigation-buttons .btn {
        width: 100% !important;
        padding: 0.65rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
    }

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

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

    .nav-tabs {
        padding: 0 1rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }

    .body-views {
        flex-direction: column;
        gap: 1rem;
    }

    .progress-container {
        padding: 0.85rem 1rem 0.65rem;
    }

    .form-header {
        padding: 1.25rem 1rem;
    }

    .form-header h1 {
        font-size: 1.1rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .form-header h1 i {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .form-header .subtitle {
        font-size: 0.8rem;
        margin-top: 0.35rem;
        margin-left: 1.7rem !important;
    }
}

/* NARRATIVE REPORT STYLES - PREMIUM DESIGN */
.narrative-report-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e3e8ef;
    border-radius: 16px;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.12);
    transition: all 0.3s ease;
}

.narrative-report-container:hover {
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.18);
    transform: translateY(-2px);
}

.narrative-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-bottom: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.narrative-format-toggle {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 6px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.format-btn {
    padding: 0.65rem 1.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.format-btn.active {
    background: white;
    color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

.format-btn i {
    font-size: 1.1rem;
}

.narrative-controls .btn-outline-primary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.narrative-controls .btn-outline-primary:hover {
    background: white;
    color: #0066cc;
    border-color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.narrative-content {
    padding: 2.5rem 3rem;
    background: white;
    min-height: 450px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.96rem;
    line-height: 1.9;
    color: #1a1a1a;
    white-space: pre-wrap;
    overflow-x: auto;
    position: relative;
}

.narrative-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #00b4d8, #0066cc);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    opacity: 0.3;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.narrative-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    text-align: center;
    color: #6c757d;
}

.narrative-placeholder i {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.narrative-placeholder p {
    margin: 1.5rem 0 2rem 0;
    font-size: 1.05rem;
    font-family: 'Segoe UI', sans-serif;
    color: #495057;
    font-weight: 500;
}

.narrative-actions {
    display: flex;
    gap: 1rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid #e3e8ef;
    flex-wrap: wrap;
}

.narrative-actions .btn {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 2px;
}

.narrative-actions .btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.narrative-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.narrative-actions .btn-outline-secondary {
    background: white;
    border-color: #6c757d;
    color: #495057;
}

.narrative-actions .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.narrative-actions .btn-outline-success {
    background: white;
    border-color: #28a745;
    color: #28a745;
}

.narrative-actions .btn-outline-success:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.narrative-actions .btn i {
    font-size: 1.1rem;
}

/* Narrative text formatting */
.narrative-text {
    font-family: 'Courier New', monospace;
}

.narrative-text .narrative-header {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.narrative-text .narrative-section {
    margin-bottom: 1.5rem;
}

.narrative-text .narrative-section-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-decoration: underline;
}

.narrative-text .narrative-list {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.narrative-text .narrative-list-item {
    margin-bottom: 0.25rem;
}

.narrative-text .narrative-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    font-style: italic;
    color: #6c757d;
}

/* Responsive narrative report */
@media (max-width: 992px) {
    .narrative-controls {
        padding: 1.5rem 1.5rem;
        gap: 1rem;
    }

    .narrative-format-toggle {
        flex: 1;
    }

    .narrative-content {
        padding: 2rem 1.5rem;
        font-size: 0.92rem;
    }

    .narrative-actions {
        padding: 1.5rem;
    }

    .narrative-actions .btn {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .narrative-report-container:hover {
        transform: none;
    }

    .narrative-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1rem;
    }

    .narrative-format-toggle {
        width: 100%;
        justify-content: stretch;
    }

    .format-btn {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.88rem;
    }

    .narrative-controls .btn-outline-primary {
        width: 100%;
        justify-content: center;
    }

    .narrative-content {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .narrative-placeholder {
        min-height: 350px;
    }

    .narrative-placeholder p {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .narrative-actions {
        flex-direction: column;
        padding: 1.25rem 1rem;
        gap: 0.75rem;
    }

    .narrative-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

@media print {
    body {
        overflow: visible;
        height: auto;
    }
    .form-container {
        height: auto;
    }
    .tabs-container, .navigation-buttons, .progress-container {
        display: none;
    }
    .form-body {
        overflow: visible;
        padding: 1rem;
    }
    .tab-pane {
        display: block !important;
    }

    /* Print narrative report cleanly */
    .narrative-controls,
    .narrative-actions {
        display: none !important;
    }

    .narrative-report-container {
        border: none;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .narrative-content {
        padding: 0;
        font-size: 11pt;
    }
}
