/* DEALTURA AI - Main Stylesheet */
/* Dashboard-heavy design with blue gradient theme */

:root {
    --primary-dark: #1e3a5f;
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    --gradient-header: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: var(--gradient-header);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.logo-ai {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: white;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-user {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 0.5rem;
}

.nav-user-link {
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-user-link:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-admin {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nav-admin:hover {
    background: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.5);
}

.nav-logout {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.5);
}

.nav-project-dropdown {
    position: relative;
}

.nav-current-project {
    color: white;
    background: rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-current-project:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
}

.current-project-icon {
    font-size: 0.85rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.nav-project-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.project-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-project-dropdown.open .project-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-700);
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.dropdown-item.active::before {
    content: '●';
    font-size: 0.5rem;
    margin-right: 0.5rem;
    color: var(--primary);
}

.dropdown-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-date {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-left: 1rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.25rem 0;
}

.dropdown-item-all {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.85rem;
}

.dropdown-item-all:hover {
    background: rgba(59, 130, 246, 0.1);
}

.nav-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    margin: 0 -0.5rem;
}

/* Hamburger Menu Button */
.nav-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 1rem;
    transition: all 0.2s ease;
}

.nav-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-menu-btn .menu-bar {
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-menu-btn.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-menu-btn.active .menu-bar:nth-child(2) {
    opacity: 0;
}

.nav-menu-btn.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Site Menu Overlay */
.site-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.site-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Site Menu Panel */
.site-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.site-menu.active {
    right: 0;
}

.site-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--gradient-header);
    color: white;
}

.site-menu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.site-menu-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.site-menu-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.site-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.menu-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.menu-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.25rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.menu-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.menu-item-group {
    position: relative;
}

.menu-sub-items {
    padding-left: 2.5rem;
    background: var(--gray-50);
}

.menu-sub-item {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 2px solid var(--gray-200);
    margin-left: 0.5rem;
    transition: all 0.15s ease;
}

.menu-sub-item:hover {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--gray-100);
}

.menu-user-info {
    background: var(--gray-50);
    border-radius: 6px;
    margin: 0 1rem;
    padding: 0.75rem 1rem !important;
}

.menu-role-badge {
    margin-left: auto;
    font-size: 0.7rem;
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.menu-logout {
    color: var(--danger) !important;
}

.menu-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-sub {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: var(--gray-500);
}

/* Page Headers */
.page-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.header-badge.airport-badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(14, 165, 233, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.header-badge.airport-badge .airport-icon {
    font-size: 1rem;
}

.processing-info-banner {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.processing-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.processing-stat strong {
    color: white;
}

/* Cards & Panels */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

/* Metric Tiles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-tile {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border-left: 4px solid var(--primary);
}

.metric-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.metric-tile.success { border-left-color: var(--success); }
.metric-tile.warning { border-left-color: var(--warning); }
.metric-tile.danger { border-left-color: var(--danger); }
.metric-tile.accent { border-left-color: var(--accent); }

.metric-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.metric-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.metric-icon {
    float: right;
    font-size: 2.5rem;
    opacity: 0.2;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dashboard-grid .card.full-width {
    grid-column: 1 / -1;
}

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

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table .number {
    text-align: right;
    font-family: 'SF Mono', Monaco, monospace;
}

.data-table .critical {
    background: #fef2f2;
}

.data-table .critical td {
    color: var(--danger);
    font-weight: 500;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--primary-lighter); color: var(--primary-dark); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* AI Feature Checkboxes */
.ai-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
}

.checkbox-option:hover {
    border-color: var(--primary-light);
    background: white;
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-box {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 2px;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-box::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

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

.checkbox-label strong {
    color: var(--gray-800);
    font-size: 0.95rem;
}

.checkbox-label span {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-zone-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-zone h3 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.file-list {
    margin-top: 1.5rem;
    text-align: left;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
}

.file-item-name {
    font-weight: 500;
    color: var(--gray-700);
}

.file-item-size {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.file-item-remove {
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
}

/* Progress Bar */
.progress-container {
    margin: 2rem 0;
}

.progress-bar-wrapper {
    background: var(--gray-200);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

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

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

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.progress-percentage {
    font-weight: 600;
    color: var(--primary);
}

/* Processing Steps */
.processing-steps {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.processing-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.step.active .step-icon {
    background: var(--primary);
    color: white;
    animation: pulse 2s infinite;
}

.step.completed .step-icon {
    background: var(--success);
    color: white;
}

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

.step-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    max-width: 80px;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--gray-700);
    font-weight: 500;
}

/* Risk Cards */
.risk-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.risk-card {
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid;
}

.risk-card.high {
    background: #fef2f2;
    border-color: var(--danger);
}

.risk-card.medium {
    background: #fffbeb;
    border-color: var(--warning);
}

.risk-card.positive {
    background: #ecfdf5;
    border-color: var(--success);
}

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

.risk-category {
    font-weight: 600;
    color: var(--gray-700);
}

.risk-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.risk-mitigation {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Compliance Checklist */
.compliance-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.compliance-status {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.compliance-status.required {
    background: var(--danger);
    color: white;
}

.compliance-status.verify {
    background: var(--warning);
    color: white;
}

.compliance-status.if_applicable {
    background: var(--gray-400);
    color: white;
}

.compliance-content {
    flex: 1;
}

.compliance-code {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.compliance-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.compliance-description {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.compliance-notes {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Gantt-style Timeline */
.timeline-container {
    overflow-x: auto;
    padding: 1rem 0;
}

.timeline {
    min-width: 800px;
    position: relative;
}

.timeline-header {
    display: flex;
    border-bottom: 2px solid var(--gray-300);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.timeline-label-col {
    width: 250px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--gray-700);
}

.timeline-bars-col {
    flex: 1;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.timeline-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.timeline-activity {
    width: 250px;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: var(--gray-700);
    padding-right: 1rem;
}

.timeline-bar-container {
    flex: 1;
    height: 24px;
    position: relative;
    background: var(--gray-100);
    border-radius: 4px;
}

.timeline-bar {
    position: absolute;
    height: 100%;
    background: var(--primary-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.timeline-bar.critical {
    background: var(--danger);
}

.timeline-bar.milestone {
    background: var(--accent);
    width: 4px !important;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

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

    .metric-value {
        font-size: 1.5rem;
    }

    .processing-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .processing-steps::before {
        display: none;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Summary Cards Row */
.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
}

.summary-card-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

/* Cost Breakdown Specific */
.cost-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.cost-breakdown-row:last-child {
    border-bottom: none;
}

.cost-breakdown-row.total {
    border-top: 2px solid var(--gray-300);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.cost-breakdown-label {
    color: var(--gray-700);
}

.cost-breakdown-value {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--gray-800);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Project Cards for List */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: all 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.project-card-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.project-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.project-card-metric {
    text-align: center;
}

.project-card-metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.project-card-metric-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ====================================
   SUBMITTALS & SHOP DRAWINGS STYLES
   ==================================== */

/* Info metric tile (blue) */
.metric-tile.info { border-left-color: var(--accent); }
.badge-info { background: #e0f2fe; color: #0369a1; }

/* Header critical badge */
.header-badge.critical {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

/* Project Stage Badges */
.stage-badge {
    font-weight: 600;
}

.stage-badge.stage-preconstruction {
    background: rgba(147, 51, 234, 0.3);
    color: white;
}

.stage-badge.stage-construction {
    background: rgba(16, 185, 129, 0.3);
    color: white;
}

.stage-badge.stage-closeout {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Critical Path Alert */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-critical {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Submittal Division Accordion */
.submittal-division {
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.division-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.2s;
}

.division-header:hover {
    background: var(--gray-100);
}

.division-toggle {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.division-name {
    flex: 1;
    font-weight: 600;
    color: var(--gray-800);
}

.division-count {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.division-content {
    border-top: 1px solid var(--gray-200);
}

.division-content.collapsed {
    display: none;
}

/* Submittal Item */
.submittal-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s;
}

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

.submittal-item:hover {
    background: var(--gray-50);
}

.submittal-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.submittal-info {
    flex: 1;
}

.submittal-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submittal-spec {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.submittal-linked-activity {
    font-size: 0.8125rem;
    color: var(--primary);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.link-icon {
    font-size: 0.875rem;
}

.submittal-meta {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

/* Submittal Details */
.submittal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.detail-item {
    display: flex;
    gap: 0.5rem;
}

.detail-label {
    color: var(--gray-500);
}

.detail-value {
    font-weight: 500;
}

.detail-item.critical .detail-value {
    color: var(--danger);
    font-weight: 600;
}

/* Critical Path Warning */
.critical-indicator {
    color: var(--danger);
    font-size: 1rem;
}

.critical-warning {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fef2f2;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: #991b1b;
    border-left: 3px solid var(--danger);
}

/* Critical Filter Tab */
.filter-tab.critical {
    border-color: var(--danger);
    color: var(--danger);
}

.filter-tab.critical:hover,
.filter-tab.critical.active {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Submittal Requirements Section */
.submittal-requirements {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.requirements-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.requirements-toggle {
    color: var(--primary);
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.requirements-preview {
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.requirements-content {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #bae6fd;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-700);
    white-space: pre-wrap;
}

/* Requirements Section in Submittal Editor */
.requirements-section {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #bae6fd;
}

.requirements-box {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.requirements-intro {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.requirements-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--gray-700);
    white-space: pre-wrap;
}

/* ====================================
   REQUIREMENTS CHECKLIST STYLES
   ==================================== */

.checklist-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.compliance-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.compliance-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--gray-200);
    min-width: 80px;
}

.compliance-stat.met {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.05));
    border-color: #10b981;
}

.compliance-stat.unmet {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
    border-color: #ef4444;
}

.compliance-stat.total {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.05));
    border-color: #3b82f6;
}

.compliance-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.compliance-stat.met .stat-value {
    color: #059669;
}

.compliance-stat.unmet .stat-value {
    color: #dc2626;
}

.compliance-stat.total .stat-value {
    color: #2563eb;
}

.compliance-stat .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.checklist-item:hover {
    border-color: var(--gray-300);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checklist-item.met {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(16, 185, 129, 0.02));
    border-color: #10b981;
}

.checklist-checkbox {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.checklist-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checklist-checkbox .checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
}

.checklist-checkbox input:checked ~ .checkmark {
    background: #059669;
    border-color: #059669;
}

.checklist-checkbox .checkmark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
}

.checklist-checkbox input:checked ~ .checkmark::after {
    opacity: 1;
}

.checklist-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.requirement-text {
    font-size: 0.9375rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.checklist-item.met .requirement-text {
    color: var(--gray-500);
}

.met-by-file {
    font-size: 0.75rem;
    color: #059669;
    font-style: italic;
}

/* Checklist status selector */
.checklist-status-selector {
    flex-shrink: 0;
}

.status-select {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 90px;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Checklist item status styles */
.checklist-item.verified {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.04));
    border-color: #10b981;
}

.checklist-item.partial {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.04));
    border-color: #f59e0b;
}

.checklist-item.missing {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(248, 113, 113, 0.04));
    border-color: #ef4444;
}

.checklist-item.pending {
    background: white;
    border-color: var(--gray-200);
}

.checklist-item.verified .requirement-text {
    color: #047857;
}

.checklist-item.partial .requirement-text {
    color: #b45309;
}

.checklist-item.missing .requirement-text {
    color: #b91c1c;
}

.requirement-category {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-100);
    color: var(--gray-500);
    border-radius: 999px;
    margin-top: 0.25rem;
}

.verified-info {
    font-size: 0.75rem;
    color: #059669;
    font-style: italic;
    margin-top: 0.25rem;
}

/* ====================================
   FILE UPLOAD STYLES
   ==================================== */

.files-section {
    background: #fefefe;
}

.section-intro {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.dropzone-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.dropzone-text {
    font-size: 0.9375rem;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.dropzone-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.file-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 500;
    color: var(--gray-800);
}

.file-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.file-analysis-status {
    font-size: 0.75rem;
    font-weight: 500;
}

.file-analysis-status.pending {
    color: var(--gray-400);
}

.file-analysis-status.analyzing {
    color: #f59e0b;
}

.file-analysis-status.analyzed {
    color: #059669;
}

.file-analysis-status.partial {
    color: #f59e0b;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.no-files-message {
    padding: 2rem;
    text-align: center;
    color: var(--gray-400);
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px dashed var(--gray-200);
}

.no-files-message p {
    margin: 0;
}

.analyze-all-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.analyze-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Toast info style */
.toast-info {
    background: #3b82f6;
    color: white;
}

/* ====================================
   DRAG AND DROP REORDERING
   ==================================== */

.sortable-item {
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.drag-handle {
    cursor: grab;
    padding: 0.5rem;
    color: var(--gray-400);
    font-size: 1rem;
    user-select: none;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: var(--gray-600);
}

.drag-handle:active {
    cursor: grabbing;
}

.file-order-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.reorder-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 0.75rem;
}

.hint-icon {
    font-size: 1rem;
}

.submittal-actions-section {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.btn-ready-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-ready-submit:hover {
    background: linear-gradient(135deg, #047857, #065f46);
}

/* ====================================
   SUBMISSION MODAL
   ==================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.submit-modal {
    max-width: 750px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 12px 12px;
}

/* Submittal Summary */
.submit-summary {
    margin-bottom: 1.5rem;
}

.submit-summary h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.summary-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
}

.summary-value.complete {
    color: #059669;
}

.summary-value.incomplete {
    color: #f59e0b;
}

.warning-icon {
    margin-left: 0.25rem;
}

.submit-warning {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.8125rem;
    color: var(--gray-700);
}

/* Submit Options */
.submit-options {
    margin-bottom: 1.5rem;
}

.submit-options h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.submit-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.submit-option.selected,
.submit-option.recommended:has(input:checked) {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.05);
}

.submit-option input[type="radio"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.submit-option label {
    flex: 1;
    cursor: pointer;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.option-title {
    font-weight: 600;
    color: var(--gray-800);
}

.option-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
}

.option-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* Cover Sheet Preview */
.coversheet-preview {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.coversheet-preview h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.coversheet-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.coversheet-form .form-group:last-child {
    margin-bottom: 0;
}

.coversheet-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.375rem;
}

.coversheet-form .form-input,
.coversheet-form .form-select,
.coversheet-form .form-textarea {
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
}

/* ====================================
   SUBMITTAL EDITOR FORM STYLES
   ==================================== */

.submittal-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

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

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

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

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: all 0.2s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.readonly {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
}

.form-input.readonly.critical {
    background: #fef2f2;
    color: var(--danger);
    font-weight: 600;
}

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

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* Schedule Link Section */
.form-section.schedule-link {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.critical-path-warning {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: #991b1b;
    font-size: 0.875rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    background: var(--gray-800);
    color: white;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

/* ====================================
   AI CHAT WIDGET STYLES
   ==================================== */

.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: inherit;
}

/* Toggle Button */
.chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.chat-toggle.active {
    background: var(--gray-700);
}

.chat-toggle-icon {
    font-size: 1.25rem;
}

/* Chat Panel */
.chat-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--gradient-header);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.chat-header-icon {
    font-size: 1.25rem;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-welcome {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.chat-welcome p {
    margin-bottom: 0.5rem;
}

.chat-welcome p:last-child {
    margin-bottom: 0;
}

/* Suggestions */
.chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion-btn {
    background: white;
    border: 1px solid var(--primary-lighter);
    color: var(--primary);
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8125rem;
    text-align: left;
    transition: all 0.2s;
}

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

/* Messages */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
    background: var(--gray-100);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
}

.chat-message.assistant.error .message-content {
    background: #fef2f2;
    color: #991b1b;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-send {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send:hover {
    background: var(--primary-dark);
}

.chat-send:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .chat-panel {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 56px;
        right: -8px;
    }

    .chat-toggle-text {
        display: none;
    }

    .chat-toggle {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .chat-toggle-icon {
        font-size: 1.5rem;
    }
}

/* ====================================
   MODAL STYLES
   ==================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    margin: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Document Type Options */
.doc-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doc-type-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.doc-type-option:hover {
    border-color: var(--primary-lighter);
}

.doc-type-option input[type="radio"] {
    margin-top: 0.25rem;
}

.doc-type-option input[type="radio"]:checked + .option-content {
    color: var(--primary);
}

.doc-type-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.option-content strong {
    color: var(--gray-800);
}

.option-content span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Small Upload Zone */
.upload-zone-small {
    padding: 1.5rem;
}

.upload-zone-small h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.upload-zone-small p {
    font-size: 0.8125rem;
}

/* ============================================
   Project Navigation Tabs
   ============================================ */
.project-tabs {
    display: flex;
    gap: 0.25rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow-x: auto;
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1360px;
    width: calc(100% - 4rem);
    z-index: 90;
}

.project-tabs-spacer {
    height: 60px;
    margin-bottom: 1rem;
}

.project-tab {
    padding: 0.625rem 1.25rem;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
}

.project-tab:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.project-tab.active {
    background: var(--primary);
    color: white;
}

/* Tab Drag & Drop */
.project-tab[draggable="true"] {
    cursor: grab;
}

.project-tab[draggable="true"]:active {
    cursor: grabbing;
}

.project-tab.dragging {
    opacity: 0.5;
    background: var(--gray-200);
}

.project-tab.drag-over {
    border-left: 3px solid var(--primary);
    padding-left: calc(1.25rem - 3px);
}

.project-tab[data-tab="dashboard"] {
    cursor: default;
}

/* Tab Rearrange Hint */
.tabs-hint {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    color: var(--gray-400);
    font-size: 0.625rem;
    cursor: help;
}

.tabs-hint .hint-icon {
    font-size: 0.875rem;
}

.tabs-hint .hint-text {
    line-height: 1.3;
    text-align: center;
}

.tabs-hint:hover {
    color: var(--gray-500);
}

/* Project Tabs - Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.35rem 0;
    }
    .nav-container {
        padding: 0 0.5rem;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }
    .nav-links {
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
    .nav-link {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    .nav-user, .nav-user-link {
        display: none !important;
    }
    .nav-divider {
        display: none;
    }
    .nav-project-dropdown {
        display: none;
    }
    .nav-admin {
        display: none;
    }
    .logo-img {
        height: 20px;
    }
    .logo-ai {
        font-size: 0.55rem;
        padding: 0.1rem 0.2rem;
    }
    .project-tabs {
        position: fixed;
        top: 44px;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        padding: 0.3rem 0.4rem;
        gap: 0.1rem;
        border-radius: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .project-tabs-spacer {
        height: 44px;
        margin-bottom: 0.5rem;
    }
    .project-tab {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
    }
    .tabs-hint {
        display: none;
    }
    .main-content {
        padding-top: 0.5rem;
    }
}

@media (max-width: 500px) {
    .navbar {
        padding: 0.3rem 0;
    }
    .nav-container {
        padding: 0 0.35rem;
    }
    .nav-links {
        gap: 0.15rem;
    }
    .nav-link {
        font-size: 0.65rem;
        padding: 0.2rem 0.3rem;
    }
    .nav-logout {
        display: none;
    }
    .logo-img {
        height: 18px;
    }
    .logo-ai {
        font-size: 0.5rem;
    }
    .project-tabs {
        top: 38px;
        padding: 0.25rem 0.3rem;
    }
    .project-tabs-spacer {
        height: 38px;
    }
    .project-tab {
        padding: 0.3rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* ============================================
   Project Parties Section
   ============================================ */
.project-parties {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.party-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.party-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

.party-value {
    font-size: 0.9375rem;
    color: var(--gray-800);
    font-weight: 600;
}

/* Editable party styles */
.party-item {
    position: relative;
    gap: 0.5rem;
}

.party-value.editable {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    flex: 1;
    text-align: right;
}

.party-value.editable:hover {
    background: var(--gray-100);
}

/* Party Logo and Value Wrapper */
.party-value-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}

.party-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    background: white;
    border: 1px solid var(--gray-200);
    padding: 2px;
}

.party-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.party-label.editable-label {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.party-label.editable-label:hover {
    background: var(--gray-100);
}

.party-edit-btn,
.party-delete-btn {
    opacity: 0;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.party-item:hover .party-edit-btn,
.party-item:hover .party-delete-btn {
    opacity: 1;
}

.party-edit-btn {
    color: var(--gray-500);
}

.party-edit-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.party-delete-btn {
    color: var(--gray-400);
}

.party-delete-btn:hover {
    background: #fee2e2;
    color: var(--danger);
}

.party-edit-input {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 1px solid var(--primary);
    border-radius: 4px;
    outline: none;
    background: white;
    text-align: right;
}

.party-edit-input.party-label-input {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    text-align: left;
}

.custom-party {
    border-left-color: var(--accent);
}

/* Project Address */
.project-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.address-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.address-text {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.address-text:hover {
    background: var(--gray-100);
}

.address-link {
    color: var(--primary);
    text-decoration: none;
}

.address-link:hover {
    text-decoration: underline;
    background: var(--gray-100);
}

.address-text.placeholder {
    color: var(--gray-400);
    font-style: italic;
}

.address-edit-btn {
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 0.875rem;
    color: var(--gray-500);
    border-radius: 4px;
}

.project-address:hover .address-edit-btn {
    opacity: 1;
}

.address-edit-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.address-edit-input {
    padding: 0.35rem 0.5rem;
    font-size: 0.9375rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    outline: none;
    background: white;
    min-width: 300px;
}


.custom-party .party-label {
    color: var(--gray-600);
}

/* Header actions for project parties */
.card-header .header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    border: 1px dashed var(--gray-300);
    color: var(--gray-500);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--gray-50);
}

/* ============================================
   Key Milestones Section
   ============================================ */
.ntp-input-section {
    margin-bottom: 1rem;
}

.ntp-input-section label {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.ntp-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-800);
}

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

.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.milestone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.milestone-name {
    font-size: 0.8125rem;
    color: var(--gray-700);
    font-weight: 500;
}

.milestone-date {
    font-size: 0.875rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.final-completion-offset {
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.final-completion-offset label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

/* ============================================
   AI Methodology Section
   ============================================ */
.methodology-card .card-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.methodology-card .card-header h2 {
    color: white;
}

.methodology-card .card-header .btn {
    background: white;
    color: var(--primary-dark);
}

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

.methodology-section {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.methodology-section h4 {
    font-size: 0.9375rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.methodology-section p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.methodology-sources h4 {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.methodology-disclaimer {
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-radius: var(--radius);
    border-left: 4px solid var(--warning);
}

.disclaimer-text {
    font-size: 0.8125rem;
    color: var(--gray-700);
    margin: 0 !important;
}

/* ============================================
   Scope of Work Styles
   ============================================ */
.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.scope-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scope-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.scope-card:hover {
    box-shadow: var(--shadow-md);
}

.scope-card.expanded {
    box-shadow: var(--shadow-lg);
}

.scope-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--gray-50), white);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
}

.scope-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scope-csi-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 48px;
    text-align: center;
}

.scope-header-info h3 {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.scope-trade {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.scope-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.scope-cost-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
}

.scope-cost-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #b45309;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.scope-cost {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-500);
    font-style: italic;
}

.scope-expand-icon {
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* AI Cost Disclaimer */
.ai-cost-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.ai-cost-disclaimer .disclaimer-icon {
    font-size: 1.5rem;
    color: #d97706;
    line-height: 1;
    flex-shrink: 0;
}

.ai-cost-disclaimer .disclaimer-content {
    flex: 1;
}

.ai-cost-disclaimer .disclaimer-content strong {
    display: block;
    color: #92400e;
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

.ai-cost-disclaimer .disclaimer-content p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

.scope-card-body {
    padding: 1.5rem;
}

.scope-description {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.scope-description p {
    font-size: 0.9375rem;
    color: var(--gray-700);
    margin: 0;
}

.scope-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.scope-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.scope-section.inclusions h4 {
    color: #059669;
    border-color: #10b981;
}

.scope-section.exclusions h4 {
    color: #dc2626;
    border-color: #ef4444;
}

.scope-section.specifications h4 {
    color: #2563eb;
    border-color: #3b82f6;
}

.scope-section.quality h4 {
    color: #7c3aed;
    border-color: #8b5cf6;
}

.scope-section.coordination h4 {
    color: #d97706;
    border-color: #f59e0b;
}

.scope-section.submittals h4 {
    color: #0891b2;
    border-color: #06b6d4;
}

.scope-section.submittals li::before {
    color: #06b6d4;
}

.scope-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scope-section li {
    font-size: 0.8125rem;
    color: var(--gray-700);
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.scope-section li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--gray-400);
}

.scope-section.inclusions li::before {
    color: #10b981;
}

.scope-section.exclusions li::before {
    color: #ef4444;
}

.scope-section.specifications li::before {
    color: #3b82f6;
}

.scope-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.methodology-note {
    margin-top: 2rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.methodology-note .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.methodology-note .card-header h2 {
    color: var(--primary-dark);
}

.methodology-note .card-body p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.methodology-note .card-body p:last-child {
    margin-bottom: 0;
}

/* Info Color */
.info {
    --tile-bg: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.metric-tile.info {
    background: var(--tile-bg);
}

/* ============================================
   Schedule Comparison Styles
   ============================================ */
.schedule-comparison-card {
    border: 2px solid var(--warning);
}

.schedule-comparison-card .card-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.schedule-comparison-card .card-header h2 {
    color: var(--gray-800);
}

.header-badge.warning {
    background: var(--warning);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.comparison-intro {
    font-size: 0.9375rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.comparison-table {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

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

.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.comparison-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.comparison-table th:first-child {
    text-align: left;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--gray-600);
}

.schedule-option {
    min-width: 180px;
}

.schedule-option.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

.ai-option.selected {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.uploaded-option.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}

.comparison-summary {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.diff-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.diff-badge.longer {
    background: #fef3c7;
    color: #92400e;
}

.diff-badge.shorter {
    background: #d1fae5;
    color: #065f46;
}

.diff-badge.same {
    background: #e0e7ff;
    color: #3730a3;
}

.comparison-summary .recommendation {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0;
    font-style: italic;
}

.schedule-selection {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.schedule-selection .btn {
    min-width: 160px;
}

/* Current Project Status Box */
.current-status-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
}

.current-status-box .status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.current-status-box .status-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.current-status-box .status-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

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

@media (max-width: 1024px) {
    .current-status-box .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.current-status-box .status-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.current-status-box .status-item.ahead {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left: 3px solid var(--success);
}

.current-status-box .status-item.behind {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 3px solid var(--danger);
}

.current-status-box .status-item.on-track {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 3px solid var(--primary);
}

.current-status-box .status-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.current-status-box .status-content {
    flex: 1;
}

.current-status-box .status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.current-status-box .status-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.current-status-box .status-sub {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.current-status-box .status-alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.current-status-box .status-alert.warning {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.current-status-box .status-alert a {
    color: var(--primary);
    font-weight: 500;
}

/* Progress tracking table styles */
.data-table tr.critical td {
    border-left: 3px solid var(--danger);
}

.data-table .badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-item-label {
    padding: 0.5rem 0.75rem;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.gallery-item-label strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-label span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Image Modal Styles */
.image-modal {
    z-index: 2000;
}

.image-modal .modal-backdrop {
    background: rgba(0, 0, 0, 0.9);
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.image-modal-close:hover {
    opacity: 1;
}

.image-modal-caption {
    margin-top: 1rem;
    color: white;
    font-size: 1rem;
    text-align: center;
}

/* Upload Prompt Styles */
.upload-prompt {
    background: var(--gray-100) !important;
    border: 2px dashed var(--gray-300);
}

.upload-prompt:hover {
    border-color: var(--primary);
    background: var(--gray-50) !important;
}

.upload-prompt .metric-value.upload-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.upload-prompt-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.upload-prompt-box:hover {
    border-color: var(--primary);
}

.upload-prompt-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.upload-prompt-box h3 {
    color: var(--gray-700);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-prompt-box p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.metric-tile.accent.upload-prompt {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%) !important;
}

.metric-tile.warning.upload-prompt {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
}

.upload-prompt-box.large {
    padding: 4rem 2rem;
}

.upload-prompt-box.large .upload-prompt-icon {
    font-size: 4rem;
}

.upload-zone-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* ============================================
   Chat Drawing Display Styles
   ============================================ */
.chat-drawings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.chat-drawing-item {
    width: 150px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.chat-drawing-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: #f0f4ff;
    border: 1px solid #bfdbfe;
}

.chat-drawing-pdf .drawing-pdf-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.chat-drawing-pdf .drawing-view-hint {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.chat-drawing-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.chat-drawing-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid var(--gray-200);
}

.drawing-label {
    padding: 0.5rem;
    font-size: 0.6875rem;
    line-height: 1.3;
}

.drawing-label strong {
    display: block;
    color: var(--primary-dark);
    font-size: 0.75rem;
}

.drawing-label span {
    color: var(--gray-500);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Drawing Modal */
.chat-drawing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.chat-drawing-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.chat-drawing-modal .modal-content {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-drawing-modal .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.chat-drawing-modal .modal-close:hover {
    color: var(--danger);
}

.chat-drawing-modal img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.chat-drawing-modal .modal-caption {
    margin-top: 1rem;
    color: white;
    font-size: 1rem;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius);
}

/* Chat Reference Links */
.chat-ref-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.6;
    vertical-align: baseline;
}

.chat-drawing-link {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.chat-drawing-link:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.15);
}

.chat-spec-link {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.chat-spec-link:hover {
    background: #fde68a;
    color: #78350f;
    border-color: #fbbf24;
    box-shadow: 0 1px 3px rgba(146, 64, 14, 0.15);
}

/* Chat Document Viewer Overlay */
.chat-doc-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: none;
    flex-direction: column;
}

.chat-doc-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.chat-doc-viewer-title {
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-doc-viewer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.chat-doc-viewer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-doc-viewer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.chat-doc-viewer-close {
    font-size: 1.5rem;
    padding: 0.2rem 0.6rem;
    line-height: 1;
}

.chat-doc-viewer-body {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    min-height: 0;
}

.chat-doc-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    background: white;
}

.chat-doc-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
    border-radius: 4px;
}

/* ============================================
   Section Upload Modal Styles
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.section-upload-modal {
    max-width: 550px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--gray-400);
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* Existing Files Prompt */
.existing-files-prompt {
    text-align: center;
    padding: 1.5rem;
}

.existing-files-prompt .prompt-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.existing-files-prompt p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.prompt-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.prompt-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Upload Zone */
.section-upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}

.section-upload-zone.dragover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
}

.upload-text {
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 500;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Selected Files List */
.section-files-list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.section-files-list h4 {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.file-icon {
    font-size: 1.25rem;
}

.file-name {
    font-size: 0.875rem;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.file-remove:hover {
    color: var(--danger);
}

.files-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

#section-files-count {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Upload Mode Indicator */
.upload-mode-indicator {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-mode-indicator.mode-revision {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.upload-mode-indicator.mode-additional {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.mode-icon {
    font-size: 1rem;
}

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processing-content {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-content h3 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.processing-content p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.processing-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Section Header Upload Button */
.section-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    color: white;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.section-upload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.section-upload-btn .btn-icon {
    font-size: 0.875rem;
}

/* Card header with upload button */
.card-header-with-upload {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Page Header with Upload Button */
.page-header-with-upload {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

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

.page-header-with-upload .section-upload-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.page-header-with-upload .section-upload-btn:hover {
    background: var(--primary-dark);
}

/* ============================================
   Project Checklist Styles
   ============================================ */
.checklist-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.checklist-card:hover {
    border-color: var(--primary-light);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 1px solid #bbf7d0;
}

.checklist-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.checklist-icon {
    font-size: 1.5rem;
    color: #16a34a;
}

.checklist-title h2 {
    margin: 0;
    font-size: 1.125rem;
    color: #166534;
    font-weight: 600;
}

.checklist-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-add-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.checklist-add-btn span {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Checklist Items */
.checklist-items {
    padding: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s;
}

.checklist-item:hover {
    background: var(--gray-50);
}

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

.checklist-checkbox {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-checkbox:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.checklist-checkbox .checkbox-icon {
    font-size: 1.25rem;
    color: var(--gray-400);
    line-height: 1;
}

.checklist-checkbox:hover .checkbox-icon {
    color: #16a34a;
}

.checklist-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checklist-item-text {
    font-size: 0.9375rem;
    color: var(--gray-800);
    line-height: 1.4;
    word-break: break-word;
}

.checklist-item-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    padding: 0.125rem 0.5rem;
    background: var(--gray-100);
    border-radius: 10px;
    width: fit-content;
}

.checklist-item-date .date-icon {
    font-size: 0.75rem;
}

.checklist-item-date .reminder-icon {
    margin-left: 0.25rem;
    color: #f59e0b;
}

.checklist-item-date.today {
    background: #dbeafe;
    color: #1d4ed8;
}

.checklist-item-date.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.checklist-delete-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--gray-300);
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    opacity: 0;
}

.checklist-item:hover .checklist-delete-btn {
    opacity: 1;
}

.checklist-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Empty State */
.checklist-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.checklist-empty .empty-icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 0.75rem;
}

.checklist-empty p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin: 0;
}

/* Add Item Form */
.checklist-add-form {
    padding: 1rem 1.25rem;
    background: #f0fdf4;
    border-top: 1px solid #bbf7d0;
}

.checklist-form-row {
    margin-bottom: 0.75rem;
}

.checklist-form-row:last-of-type {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checklist-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.checklist-input:focus {
    outline: none;
    border-color: #16a34a;
}

.checklist-input::placeholder {
    color: var(--gray-400);
}

.checklist-date-group,
.checklist-reminder-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-date-group label,
.checklist-reminder-group label {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.checklist-date-input {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.checklist-date-input:focus {
    outline: none;
    border-color: #16a34a;
}

.checklist-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

/* Footer */
.checklist-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.checklist-count {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

.checklist-calendar-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.checklist-calendar-note .calendar-icon {
    font-size: 0.875rem;
}

/* Complete animation */
.checklist-item.completing {
    animation: completeItem 0.4s ease forwards;
}

@keyframes completeItem {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.5;
        transform: translateX(20px);
        background: #d1fae5;
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .checklist-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .checklist-add-btn {
        width: 100%;
        justify-content: center;
    }

    .checklist-form-row:last-of-type {
        flex-direction: column;
        gap: 0.75rem;
    }

    .checklist-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Floating Checklist (Fixed Right Side) */
.checklist-floating {
    position: fixed;
    right: 1.5rem;
    top: 100px;
    z-index: 100;
    width: 280px;
    max-height: calc(100vh - 120px);
    transition: all 0.3s ease;
}

.checklist-card-floating {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gray-200);
}

.checklist-card-floating .checklist-header {
    padding: 0.625rem 0.875rem;
    cursor: move;
}

.checklist-card-floating .checklist-title {
    gap: 0.5rem;
}

.checklist-card-floating .checklist-title h2 {
    font-size: 0.875rem;
}

.checklist-card-floating .checklist-icon {
    font-size: 1rem;
}

.checklist-header-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.checklist-card-floating .checklist-add-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-width: 28px;
    justify-content: center;
}

.checklist-card-floating .checklist-add-btn span {
    font-size: 1rem;
}

.checklist-minimize-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: var(--radius);
    color: #166534;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

.checklist-body {
    transition: all 0.3s ease;
    overflow: hidden;
}

.checklist-floating.minimized .checklist-body {
    max-height: 0;
    opacity: 0;
}

.checklist-floating.minimized .checklist-card-floating {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.checklist-card-floating .checklist-items {
    padding: 0.25rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.checklist-card-floating .checklist-item {
    padding: 0.5rem 0.875rem;
}

.checklist-card-floating .checklist-item-text {
    font-size: 0.8125rem;
    line-height: 1.3;
}

.checklist-card-floating .checklist-checkbox {
    width: 22px;
    height: 22px;
}

.checklist-card-floating .checklist-checkbox .checkbox-icon {
    font-size: 0.875rem;
}

.checklist-card-floating .checklist-delete-btn {
    width: 22px;
    height: 22px;
    font-size: 0.6875rem;
}

.checklist-card-floating .checklist-item-date {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
}

.checklist-card-floating .checklist-empty {
    padding: 1.25rem 0.875rem;
}

.checklist-card-floating .checklist-empty .empty-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.checklist-card-floating .checklist-empty p {
    font-size: 0.75rem;
}

.checklist-card-floating .checklist-add-form {
    padding: 0.625rem 0.875rem;
}

.checklist-card-floating .checklist-input {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
}

.checklist-card-floating .checklist-date-input {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

.checklist-card-floating .checklist-date-group label {
    font-size: 0.75rem;
}

.checklist-card-floating .checklist-footer {
    padding: 0.375rem 0.875rem;
}

.checklist-card-floating .checklist-count {
    font-size: 0.6875rem;
}

/* Completed Toggle */
.checklist-completed-toggle {
    padding: 0.375rem 0.875rem;
    border-top: 1px solid var(--gray-100);
}

.checklist-show-completed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.checklist-show-completed-btn:hover {
    color: var(--gray-700);
}

.completed-count {
    color: var(--gray-400);
    font-size: 0.6875rem;
}

/* Completed Items */
.checklist-completed-items {
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    max-height: 150px;
    overflow-y: auto;
}

.checklist-item.completed {
    opacity: 0.7;
}

.checklist-item.completed .checklist-item-text {
    text-decoration: line-through;
    color: var(--gray-500);
}

.checklist-item.completed .checklist-checkbox.checked {
    background: var(--success);
    color: white;
}

.checklist-item.completed .checklist-checkbox.checked:hover {
    background: #059669;
}

.checklist-completed-date {
    font-size: 0.625rem;
    color: var(--gray-400);
    display: block;
    margin-top: 0.125rem;
}

/* Show More Button */
.checklist-show-more {
    padding: 0 0.875rem 0.375rem;
    text-align: center;
}

.checklist-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.6875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-expand-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.expand-arrow {
    font-size: 0.5rem;
    transition: transform 0.2s;
}

.checklist-expand-btn.expanded .expand-arrow {
    transform: rotate(180deg);
}

/* Hidden items when collapsed */
.checklist-item.hidden-item {
    display: none;
}

.checklist-card-floating.expanded .checklist-item.hidden-item {
    display: flex;
}

/* Responsive for floating checklist */
@media (max-width: 1200px) {
    .checklist-floating {
        width: 260px;
        right: 1rem;
    }
}

@media (max-width: 900px) {
    .checklist-floating {
        width: 240px;
        right: 0.75rem;
        top: 80px;
    }
}

@media (max-width: 768px) {
    .checklist-floating {
        position: fixed;
        right: 0.5rem;
        bottom: 1rem;
        top: auto;
        width: calc(100% - 1rem);
        max-width: 320px;
        max-height: 50vh;
    }

    .checklist-card-floating .checklist-items {
        max-height: 200px;
    }
}

/* ============================================
   SUBMITTAL DETAIL PAGE STYLES
   ============================================ */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--gray-400);
}

/* Status badges for submittal detail */
.status-badge.status-pending { background: var(--gray-200); color: var(--gray-700); }
.status-badge.status-in_progress { background: #dbeafe; color: #1d4ed8; }
.status-badge.status-submitted { background: #fef3c7; color: #b45309; }
.status-badge.status-approved { background: #d1fae5; color: #059669; }
.status-badge.status-rejected { background: #fee2e2; color: #dc2626; }
.status-badge.status-resubmit { background: #f3e8ff; color: #7c3aed; }

.type-badge {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Submittal detail grid layout */
.submittal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .submittal-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Requirements section */
.submittal-requirements-section .card {
    margin-bottom: 1.5rem;
}

.verification-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.summary-bar {
    width: 80px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.summary-bar-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

/* Requirements list */
.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.requirement-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--gray-300);
    transition: all 0.2s;
}

.requirement-item.status-verified {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.requirement-item.status-partial {
    border-left-color: var(--warning);
    background: #fffbeb;
}

.requirement-item.status-missing {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.requirement-status {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.requirement-status:hover {
    background: var(--gray-200);
}

.status-icon {
    font-size: 1rem;
    font-weight: bold;
}

.status-icon.verified { color: var(--success); }
.status-icon.partial { color: var(--warning); }
.status-icon.missing { color: var(--danger); }
.status-icon.pending { color: var(--gray-400); }

.requirement-content {
    flex: 1;
}

.requirement-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.requirement-description {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.requirement-note {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Collapsible sections */
.card-header.collapsible {
    cursor: pointer;
    user-select: none;
}

.card-header.collapsible:hover {
    background: var(--gray-50);
}

.collapse-icon {
    font-size: 0.75rem;
    color: var(--gray-500);
    transition: transform 0.2s;
}

/* Spec text content */
.spec-text-content {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    white-space: pre-wrap;
    color: var(--gray-700);
    max-height: 400px;
    overflow-y: auto;
}

/* Info grid for submittal info */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item input,
.info-item select,
.info-item textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.info-item input:focus,
.info-item select:focus,
.info-item textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.upload-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

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

.upload-zone p {
    color: var(--gray-600);
    margin: 0.5rem 0;
}

.upload-btn {
    display: inline-block;
    cursor: pointer;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Uploaded files list */
.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empty-files {
    text-align: center;
    padding: 1rem;
    color: var(--gray-500);
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    gap: 0.5rem;
}

.file-verification {
    flex-shrink: 0;
}

.verification-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.verification-badge.verified {
    background: #d1fae5;
    color: var(--success);
}

.verification-badge.partial {
    background: #fef3c7;
    color: var(--warning);
}

.verification-badge.missing {
    background: #fee2e2;
    color: var(--danger);
}

.verification-badge.verifying {
    background: var(--gray-100);
    color: var(--gray-500);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.file-actions {
    flex-shrink: 0;
}

/* Verification results card */
.verification-results .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.verification-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.verification-status-badge.status-complete {
    background: #d1fae5;
    color: var(--success);
}

.verification-status-badge.status-incomplete {
    background: #fee2e2;
    color: var(--danger);
}

.verification-status-badge.status-partial {
    background: #fef3c7;
    color: var(--warning);
}

.verification-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    min-width: 70px;
}

.stat-item.verified {
    background: #d1fae5;
}

.stat-item.partial {
    background: #fef3c7;
}

.stat-item.missing {
    background: #fee2e2;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stat-item.verified .stat-value { color: var(--success); }
.stat-item.partial .stat-value { color: var(--warning); }
.stat-item.missing .stat-value { color: var(--danger); }

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.last-verified {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.action-buttons .btn {
    flex: 1;
}

/* FAA Circulars Search */
.faa-search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.faa-search-box .form-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.faa-quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.faa-quick-links .quick-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-right: 0.5rem;
}

.faa-search-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.faa-search-results h4 {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.faa-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
}

.faa-result-item:hover {
    background: white;
    border-color: var(--primary-light);
}

.faa-result-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.faa-result-info strong {
    color: var(--primary);
    font-size: 0.95rem;
    min-width: 120px;
}

.faa-result-title {
    color: var(--gray-700);
    font-size: 0.9rem;
    flex: 1;
}

.faa-result-date {
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* Recommended ACs Section */
.recommended-acs-card {
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.recommended-acs-card .card-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommended-acs-card .card-header h2 {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommended-acs-card .card-header .header-icon {
    font-size: 1.25rem;
}

.recommended-intro {
    color: #1e40af;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--radius);
    border-left: 4px solid #3b82f6;
}

.ac-category-section {
    margin-bottom: 1.5rem;
}

.ac-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #1e3a5f;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.category-icon {
    font-size: 1.1rem;
}

.category-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    margin-left: auto;
}

.category-badge.core {
    background: #fef3c7;
    color: #92400e;
}

.category-badge.specific {
    background: #dbeafe;
    color: #1e40af;
}

.ac-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ac-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.ac-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.ac-item.downloaded {
    background: #f0fdf4;
    border-color: #86efac;
}

.ac-item-main {
    flex: 1;
    min-width: 0;
}

.ac-number {
    font-weight: 700;
    color: #1e40af;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ac-title {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.ac-description {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.ac-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ac-category {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    text-transform: capitalize;
}

.ac-item-actions {
    margin-left: 1rem;
    flex-shrink: 0;
}

.ac-item-actions .btn-success {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.loading-state .loading-spinner {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-type-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

/* Button ghost style */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-ghost:hover {
    background: var(--gray-100);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* ====================================
   SUBMITTAL REVIEW INTERFACE
   ==================================== */

.review-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    height: calc(100vh - 70px);
    gap: 0;
    background: var(--gray-100);
}

/* Left Sidebar - File List */
.review-sidebar {
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.sidebar-header .submittal-number {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    display: inline-block;
    width: fit-content;
}

.submittal-info {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.submittal-info .info-row {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-bottom: 0.625rem;
}

.submittal-info .info-row:last-child {
    margin-bottom: 0;
}

.submittal-info .info-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 500;
}

.submittal-info .info-value {
    font-size: 0.8125rem;
    color: var(--gray-800);
    font-weight: 500;
}

/* File List Section */
.file-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.file-list-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
    margin: 0 1.25rem 0.75rem;
}

.file-list {
    display: flex;
    flex-direction: column;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.file-item:hover {
    background: var(--gray-50);
}

.file-item.active {
    background: rgba(37, 99, 235, 0.08);
    border-left-color: var(--primary);
}

.file-item .file-icon {
    font-size: 1.25rem;
    color: var(--gray-400);
}

.file-item.active .file-icon {
    color: var(--primary);
}

.file-item .file-details {
    flex: 1;
    min-width: 0;
}

.file-item .file-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item .file-type {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

.file-item .annotation-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 50%;
}

/* Requirements Section in Sidebar */
.requirements-section {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.requirements-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
    margin: 0 1.25rem 0.75rem;
}

.requirements-list {
    padding: 0 1rem;
}

.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.requirement-item .req-status-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.requirement-item.verified .req-status-icon {
    color: #059669;
}

.requirement-item.partial .req-status-icon {
    color: #f59e0b;
}

.requirement-item.missing .req-status-icon {
    color: #ef4444;
}

/* Review Button in Submittals List */
.submittal-meta .review-btn {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

/* Main Content - PDF Viewer */
.review-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--gray-200);
}

/* Review Toolbar */
.review-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
    margin: 0 0.25rem;
}

.review-toolbar .tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.875rem;
}

.review-toolbar .tool-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

.review-toolbar .tool-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.zoom-level {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    min-width: 45px;
    text-align: center;
}

.page-info {
    font-size: 0.8125rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.page-info input {
    width: 40px;
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.8125rem;
}

.annotation-tools {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-toolbar input[type="color"] {
    width: 32px;
    height: 32px;
    padding: 2px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
}

.review-toolbar select {
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.75rem;
    background: white;
    cursor: pointer;
}

/* PDF Viewer Container */
.pdf-viewer-container {
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    position: relative;
}

.pdf-viewer {
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
}

#pdf-canvas {
    display: block;
}

#annotation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
    cursor: crosshair;
}

.pdf-viewer[style*="cursor: default"] #annotation-canvas {
    cursor: default;
}

.text-annotations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.text-annotation {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
}

.text-annotation .annotation-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
}

.text-annotation:hover .annotation-marker {
    transform: scale(1.1);
}

.text-annotation .annotation-tooltip {
    position: absolute;
    left: 30px;
    top: 0;
    background: var(--gray-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s;
    white-space: pre-wrap;
    z-index: 100;
}

.text-annotation:hover .annotation-tooltip {
    opacity: 1;
    visibility: visible;
}

.text-annotation-input {
    position: absolute;
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    pointer-events: auto;
    min-width: 200px;
}

.text-annotation-input textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    resize: vertical;
    min-height: 60px;
}

.text-input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

.text-input-actions button {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.text-input-actions button:first-child {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.text-input-actions button:last-child {
    background: white;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Right Sidebar - Review Actions */
.review-actions-sidebar {
    background: white;
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.actions-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.actions-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* Review Options */
.review-options {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.review-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.review-option:last-child {
    margin-bottom: 0;
}

.review-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.review-option input[type="radio"] {
    display: none;
}

.review-option.approved:has(input:checked) {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.08);
}

.review-option.approved-noted:has(input:checked) {
    border-color: #0891b2;
    background: rgba(8, 145, 178, 0.08);
}

.review-option.revise:has(input:checked) {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.review-option.rejected:has(input:checked) {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.review-option .option-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.review-option .option-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.review-option.approved .option-icon {
    color: #059669;
}

.review-option.approved-noted .option-icon {
    color: #0891b2;
}

.review-option.revise .option-icon {
    color: #f59e0b;
}

.review-option.rejected .option-icon {
    color: #ef4444;
}

.review-option .option-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Review Comments */
.review-comments {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.review-comments label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.review-comments textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    resize: vertical;
    min-height: 100px;
}

.review-comments textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-submit-review {
    margin: 1rem;
    width: calc(100% - 2rem);
}

/* Annotations List in Sidebar */
.annotations-list-section {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
}

.annotations-list-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin: 0 0 0.75rem;
}

.annotations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.annotation-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.75rem;
}

.annotation-item .annotation-type {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.annotation-item .annotation-page {
    color: var(--gray-500);
    font-size: 0.6875rem;
}

.annotation-item .annotation-content {
    flex: 1;
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annotation-item .btn-delete-annotation {
    padding: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s;
}

.annotation-item .btn-delete-annotation:hover {
    color: #ef4444;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background: #059669;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

/* Responsive Review Interface */
@media (max-width: 1200px) {
    .review-container {
        grid-template-columns: 240px 1fr 260px;
    }
}

@media (max-width: 992px) {
    .review-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        height: auto;
        min-height: 100vh;
    }

    .review-sidebar {
        display: none;
    }

    .review-actions-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        overflow-y: auto;
        z-index: 100;
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .review-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .toolbar-center {
        order: 2;
        flex: 1 0 100%;
        justify-content: center;
    }
}

/* ==================== Processing Banner ==================== */
.processing-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-bottom: 2px solid #3b82f6;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.processing-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.processing-banner-icon {
    flex-shrink: 0;
}

.processing-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.processing-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.processing-banner-text strong {
    font-size: 0.875rem;
    color: #1e40af;
}

.processing-banner-text span {
    font-size: 0.75rem;
    color: #3b82f6;
}

.processing-banner-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.mini-progress-bar {
    width: 100px;
    height: 6px;
    background: #bfdbfe;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.processing-banner-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    min-width: 35px;
}

.processing-banner-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #3b82f6;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    margin-left: 0.5rem;
}

.processing-banner-close:hover {
    color: #1e40af;
}

/* Completed state */
.processing-banner.completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.processing-banner.completed .processing-spinner {
    border-color: #a7f3d0;
    border-top-color: #10b981;
    animation: none;
    background: #10b981;
    border-radius: 50%;
}

.processing-banner.completed .processing-banner-text strong,
.processing-banner.completed .processing-banner-percent {
    color: #065f46;
}

.processing-banner.completed .processing-banner-text span {
    color: #059669;
}

.processing-banner.completed .mini-progress-fill {
    background: #10b981;
}

.processing-banner.completed .processing-banner-close {
    color: #059669;
}

/* Error state */
.processing-banner.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.processing-banner.error .processing-spinner {
    border-color: #fecaca;
    border-top-color: #ef4444;
    animation: none;
}

.processing-banner.error .processing-banner-text strong,
.processing-banner.error .processing-banner-percent {
    color: #991b1b;
}

.processing-banner.error .processing-banner-text span {
    color: #dc2626;
}

.processing-banner.error .processing-banner-close {
    color: #dc2626;
}

/* Enhanced upload button in empty states */
.empty-state .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-state .btn-lg .btn-icon {
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .processing-banner-content {
        flex-wrap: wrap;
    }

    .processing-banner-progress {
        width: 100%;
        margin-top: 0.5rem;
    }

    .mini-progress-bar {
        flex: 1;
    }
}

/* ==================== Project Stage Indicator ==================== */
.stage-indicator-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stage-progress-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 300px;
}

.stage-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.stage-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s;
}

.stage-step.active .stage-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.stage-step.completed .stage-dot {
    background: var(--success);
}

.stage-step.disabled .stage-dot {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
}

.dot-active {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: stagePulse 2s infinite;
}

@keyframes stagePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.dot-check {
    color: white;
    font-weight: bold;
}

.dot-empty {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
}

.stage-step.disabled .dot-empty {
    background: var(--gray-300);
}

.stage-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
}

.stage-step.active .stage-label {
    color: var(--primary);
}

.stage-step.completed .stage-label {
    color: var(--success);
}

.stage-connector {
    flex: 1;
    height: 3px;
    background: var(--gray-200);
    min-width: 40px;
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

.stage-connector.active {
    background: var(--success);
}

.stage-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stage-actions .btn {
    white-space: nowrap;
}

/* Stage badge colors */
.stage-badge {
    font-weight: 600;
}

.stage-badge.stage-preconstruction {
    background: #dbeafe;
    color: #1e40af;
}

.stage-badge.stage-construction {
    background: #fef3c7;
    color: #92400e;
}

.stage-badge.stage-closeout {
    background: #d1fae5;
    color: #065f46;
}

/* Stage Transition Modal */
.stage-transition-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.stage-from, .stage-to {
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.stage-from {
    background: var(--gray-200);
    color: var(--gray-700);
}

.stage-to {
    background: var(--primary);
    color: white;
}

.stage-arrow {
    font-size: 1.5rem;
    color: var(--gray-400);
}

.readiness-section {
    margin-bottom: 1.25rem;
}

.readiness-section h4 {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1rem;
}

.readiness-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.readiness-list li {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
}

.readiness-list.ready li {
    background: #d1fae5;
    color: #065f46;
}

.readiness-list.missing li {
    background: #fef3c7;
    color: #92400e;
}

.item-check {
    color: var(--success);
    font-weight: bold;
}

.item-warning {
    color: #f59e0b;
}

/* Stage History Modal */
.history-section {
    margin-bottom: 1.5rem;
}

.history-section h4 {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--gray-300);
}

.history-item.current {
    border-left-color: var(--primary);
    background: #eff6ff;
}

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

.history-stage-change {
    font-weight: 600;
    color: var(--gray-800);
}

.history-amount, .history-duration {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.history-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.history-item-meta {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.history-item-meta em {
    color: var(--gray-500);
    font-style: italic;
}

.history-snapshot {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-600);
}

.stage-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--gray-200);
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

.empty-state-small {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    padding: 1rem;
}

/* Stage indicator responsive */
@media (max-width: 768px) {
    .stage-indicator-card {
        flex-direction: column;
        align-items: stretch;
    }

    .stage-progress-container {
        justify-content: center;
    }

    .stage-actions {
        justify-content: center;
    }

    .stage-connector {
        min-width: 20px;
    }

    .stage-label {
        font-size: 0.7rem;
    }
}
