/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; background: #f5f7fa; color: #333; line-height: 1.5; }

/* Login Section */
.login-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%); }
.login-container { background: white; padding: 3rem; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 400px; text-align: center; }
.login-container h1 { color: #1a365d; font-size: 1.75rem; margin-bottom: 0.5rem; }
.login-subtitle { color: #718096; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: #4a5568; margin-bottom: 0.5rem; }
.form-group input { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2); }
.login-error { background: #fff5f5; color: #c53030; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.875rem; display: none; }
.login-btn { width: 100%; padding: 0.875rem; background: #4299e1; color: white; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-btn:hover { background: #3182ce; }

/* User display and logout */
.user-display { background: rgba(255,255,255,0.15); padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.875rem; }
.logout-btn { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.3); padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.875rem; transition: all 0.2s; }
.logout-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* Header */
header { background: #1a365d; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex-wrap: wrap; gap: 0.5rem; }
header h1 { font-size: 1.5rem; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-actions span { font-size: 0.875rem; opacity: 0.8; }
.company-selector { background: #2d4a7a; color: white; border: 1px solid #4299e1; padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.875rem; cursor: pointer; }
.company-selector:focus { outline: 2px solid #4299e1; }
#refreshBtn { background: #4299e1; color: white; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.875rem; transition: background 0.2s; }
#refreshBtn:hover { background: #3182ce; }
#refreshBtn:disabled { background: #a0aec0; cursor: not-allowed; }

/* Module Navigation */
.module-nav { display: flex; align-items: stretch; gap: 0; background: #1a365d; padding: 0 2rem; border-bottom: 3px solid #4299e1; }
.nav-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.95rem; font-weight: 500; background: transparent; border: none; border-bottom: 3px solid transparent; margin-bottom: -3px; transition: all 0.2s; cursor: pointer; }
.nav-link:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.05); }
.nav-link.active { color: white; border-bottom-color: white; font-weight: 600; }
.nav-link + .nav-link { margin-left: 0; }

/* Main content */
main { width: 100%; padding: 1rem 2rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align: center; }
.card-label { font-size: 0.875rem; color: #718096; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.card-value { font-size: 2.5rem; font-weight: 700; color: #2d3748; }
.card.has-errors { background: #fff5f5; border-left: 4px solid #e53e3e; }
.card.has-errors .card-value { color: #e53e3e; }
.card.has-warnings { background: #fffff0; border-left: 4px solid #d69e2e; }
.card.has-warnings .card-value { color: #d69e2e; }

/* Tabs */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 2px solid #e2e8f0; padding-bottom: 0; }
.tab-btn { background: none; border: none; padding: 0.75rem 1.5rem; font-size: 1rem; cursor: pointer; color: #718096; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn:hover { color: #4299e1; }
.tab-btn.active { color: #4299e1; border-bottom-color: #4299e1; font-weight: 600; }
.tab-content { display: none; background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 1.5rem; }
.tab-content.active { display: block; }

/* Table controls */
.table-controls { margin-bottom: 1rem; }
.table-controls select { padding: 0.5rem; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 0.875rem; }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; table-layout: auto; }
th, td { padding: 0.25rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
tr { transition: padding 0.15s ease; }
tr:not(:first-child):hover td { padding-top: 0.75rem; padding-bottom: 0.75rem; }
th { background: #f7fafc; font-weight: 600; color: #4a5568; white-space: nowrap; min-width: 60px; position: relative; }
th[data-sort], th[data-user-sort], th[data-js-user-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover, th[data-user-sort]:hover, th[data-js-user-sort]:hover { background: #edf2f7; }
tr:hover { background: #f7fafc; }
.loading { text-align: center; color: #a0aec0; padding: 2rem; }

/* Status badges */
.status-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.status-success .status-badge, .status-badge.status-success { background: #c6f6d5; color: #22543d; }
.status-error .status-badge, .status-badge.status-error { background: #fed7d7; color: #822727; }
.status-stale .status-badge { background: #fefcbf; color: #744210; }
tr.status-error { background: #fff5f5; }
tr.status-stale { background: #fffff0; }
.error-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e53e3e; font-size: 0.8rem; }

/* Charts */
.chart-container { padding: 1rem 0; }
.chart-container h2 { margin-bottom: 1rem; font-size: 1.25rem; color: #2d3748; }
.chart-bar-container { display: flex; align-items: center; margin-bottom: 0.75rem; }
.chart-label { width: 100px; font-size: 0.875rem; color: #4a5568; }
.chart-bar-wrapper { flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.chart-bar { height: 24px; background: linear-gradient(90deg, #4299e1, #667eea); border-radius: 4px; min-width: 4px; transition: width 0.3s; }
.chart-value { font-size: 0.875rem; font-weight: 600; color: #2d3748; }

/* Project Data - Search */
.project-search { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.project-search input { flex: 1; max-width: 400px; padding: 0.625rem 1rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.9rem; transition: border-color 0.2s, box-shadow 0.2s; }
.project-search input:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); }
.search-count { font-size: 0.8rem; color: #a0aec0; white-space: nowrap; }

/* Project Data - Accordion */
.project-list { display: flex; flex-direction: column; gap: 2px; }
.project-row { background: white; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.06); transition: box-shadow 0.2s; }
.project-row.expanded { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.project-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.25rem; cursor: pointer; user-select: none; transition: background 0.15s; }
.project-header:hover { background: #f7fafc; }
.expand-icon { font-size: 0.7rem; color: #a0aec0; width: 1rem; text-align: center; transition: color 0.15s; }
.project-row.expanded .expand-icon { color: #4299e1; }
.project-name { font-weight: 600; color: #2d3748; font-size: 0.95rem; flex: 1; }
.project-meta { display: flex; align-items: center; gap: 0.75rem; }
.project-job { font-size: 0.8rem; color: #718096; background: #edf2f7; padding: 0.125rem 0.5rem; border-radius: 4px; }
.file-count { font-size: 0.8rem; color: #a0aec0; white-space: nowrap; }

/* Project Data - Models */
.project-models { padding: 0 1.25rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; animation: slideDown 0.2s ease-out; }
.no-models { color: #a0aec0; font-size: 0.875rem; padding: 0.5rem 0; }
.model-card { background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.875rem 1rem; transition: border-color 0.15s; }
.model-card:hover { border-color: #cbd5e0; }
.model-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.model-filename { font-weight: 600; font-size: 0.85rem; color: #2d3748; word-break: break-all; }
.model-version { background: #ebf8ff; color: #2b6cb0; font-size: 0.75rem; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: 4px; white-space: nowrap; margin-left: 0.5rem; }
.model-details { display: flex; flex-direction: column; gap: 0.25rem; }
.model-detail { display: flex; gap: 0.5rem; font-size: 0.8rem; line-height: 1.4; }
.detail-label { color: #a0aec0; min-width: 90px; flex-shrink: 0; }
.detail-value { color: #4a5568; word-break: break-all; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* DataTable - Resize handles */
.resize-handle { position: absolute; right: 0; top: 0; bottom: 0; width: 5px; cursor: col-resize; z-index: 4; }
.resize-handle:hover, .resize-handle:active { background: #4299e1; }

/* DataTable - Sort indicators */
th[data-sort].sort-asc::after { content: ''; display: inline-block; margin-left: 4px; width: 0; height: 0; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid #4a5568; }
th[data-sort].sort-desc::after { content: ''; display: inline-block; margin-left: 4px; width: 0; height: 0; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid #4a5568; }
/* Multi-sort priority indicator */
th[data-sort][data-sort-index]::before { content: attr(data-sort-index); font-size: 0.6rem; color: #4299e1; font-weight: 700; vertical-align: super; margin-right: 1px; }

/* DataTable - Filter row */
.filter-row th { background: #edf2f7; padding: 0.375rem 0.5rem; font-weight: 400; }
.filter-row input[type="text"],
.filter-row input[type="date"],
.filter-row select {
    width: 100%; padding: 0.25rem 0.375rem; border: 1px solid #e2e8f0; border-radius: 3px;
    font-size: 0.8rem; background: white; color: #2d3748;
}
.filter-row input[type="text"]:focus,
.filter-row input[type="date"]:focus,
.filter-row select:focus {
    outline: none; border-color: #4299e1; box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.15);
}
.date-filter-range { display: flex; gap: 2px; }
.date-filter-range input { flex: 1; min-width: 0; font-size: 0.75rem; }

/* DataTable - Layout */
.datatable-container table { table-layout: fixed; width: max-content; min-width: 100%; }
.datatable-container td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; transition: background 0.15s; }
.datatable-container td:hover { overflow: visible; white-space: normal; word-break: break-word; }
.datatable-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.8rem; color: #a0aec0; }

/* DataTable - Sticky headers */
.datatable-container .table-container { max-height: 70vh; overflow-y: auto; overflow-x: auto; }
.datatable-container thead tr:first-child th { position: sticky; top: 0; z-index: 3; background: #f7fafc; }
.datatable-container thead tr.filter-row th { position: sticky; z-index: 2; background: #edf2f7; }

/* DataTable - Toolbar (global search + export) */
.datatable-toolbar { display: flex; align-items: center; gap: 0.5rem; }
.datatable-global-search { padding: 0.25rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 0.8rem; width: 200px; color: #2d3748; }
.datatable-global-search:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.15); }
.datatable-export-btn { padding: 0.2rem 0.6rem; background: #edf2f7; color: #4a5568; border: 1px solid #e2e8f0; border-radius: 4px; cursor: pointer; font-size: 0.75rem; white-space: nowrap; transition: background 0.15s; }
.datatable-export-btn:hover { background: #e2e8f0; }

/* DataTable - Cell copy feedback */
.datatable-container td.cell-copied { background: #c6f6d5 !important; transition: background 0s; }

/* Publish badges (table version) */
.publish-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: 4px; white-space: nowrap; text-transform: uppercase; }
.publish-ok { background: #c6f6d5; color: #22543d; }
.publish-failed { background: #fed7d7; color: #822727; }
.publish-unchanged { background: #e0e7ff; color: #3730a3; }
.publish-pending { background: #fefcbf; color: #744210; }
.publish-never { background: #edf2f7; color: #a0aec0; }

/* Error message */
.error-message { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; padding: 1rem; border-radius: 8px; margin: 1rem 2rem; }

/* Exclusions */
.exclusion-form-container { margin-bottom: 1rem; padding: 1rem; background: #f7fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.exclusion-form .form-row { display: flex; gap: 0.75rem; align-items: flex-end; margin-bottom: 0.5rem; flex-wrap: wrap; }
.exclusion-form label { display: flex; flex-direction: column; font-size: 0.85rem; color: #4a5568; }
.exclusion-form label.flex-grow { flex: 1; min-width: 150px; }
.exclusion-form input, .exclusion-form select { padding: 0.4rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 4px; background: white; color: #2d3748; margin-top: 0.25rem; }
.btn-add { padding: 0.4rem 1rem; background: #4299e1; color: white; border: none; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.btn-add:hover { background: #3182ce; }
.btn-delete-exclusion { padding: 0.2rem 0.5rem; background: #e53e3e; color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 0.8rem; }
.btn-delete-exclusion:hover { background: #c53030; }

/* Apply Rules */
.apply-rules-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.btn-apply-rules { padding: 0.5rem 1.25rem; background: #dd6b20; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.875rem; transition: background 0.2s; }
.btn-apply-rules:hover { background: #c05621; }
.btn-apply-rules:disabled { background: #a0aec0; cursor: not-allowed; }
.apply-rules-status { font-size: 0.85rem; color: #718096; }

/* Modal */
.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; animation: fadeIn 0.15s ease-out; }
.modal-content { background: white; border-radius: 12px; width: 90%; max-width: 950px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #e2e8f0; }
.modal-header h3 { font-size: 1.1rem; color: #2d3748; margin: 0; }
.modal-body { padding: 1rem 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 0.75rem; }
.modal-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.modal-table th, .modal-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.modal-table th { background: #f7fafc; font-weight: 600; color: #4a5568; position: sticky; top: 0; }
.modal-table tr:hover { background: #f7fafc; }
.btn-cancel { padding: 0.5rem 1.25rem; background: white; color: #4a5568; border: 1px solid #e2e8f0; border-radius: 4px; cursor: pointer; font-size: 0.875rem; }
.btn-cancel:hover { background: #f7fafc; }
.btn-confirm-delete { padding: 0.5rem 1.25rem; background: #e53e3e; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.btn-confirm-delete:hover { background: #c53030; }
.btn-confirm-delete:disabled { background: #a0aec0; cursor: not-allowed; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Procore Timeline Chart */
.timeline-chart { background: white; border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.timeline-chart-title { font-size: 0.875rem; font-weight: 600; color: #4a5568; margin-bottom: 1rem; }
.timeline-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 0.5rem; }
.timeline-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.timeline-bar { background: linear-gradient(180deg, #4299e1, #667eea); border-radius: 3px 3px 0 0; width: 100%; max-width: 40px; min-height: 4px; position: relative; transition: height 0.3s; }
.timeline-bar:hover { opacity: 0.85; }
.timeline-bar-count { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 0.7rem; font-weight: 600; color: #4a5568; }
.timeline-bar-label { font-size: 0.65rem; color: #a0aec0; margin-top: 4px; white-space: nowrap; }
.filter-count { font-size: 0.8rem; color: #a0aec0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #edf2f7; }

/* Procore Project Selector */
.procore-project-bar { margin-bottom: 1rem; display: flex; align-items: center; gap: 1rem; }
.procore-project-label { font-size: 0.875rem; font-weight: 600; color: #4a5568; display: flex; align-items: center; gap: 0.5rem; }
.procore-project-select { padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 0.875rem; min-width: 320px; background: white; }
.procore-project-select:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2); }
.procore-project-row:hover { background: #ebf8ff; }

/* Elements - Detail/Delta controls */
.detail-controls { background: #fff; border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.control-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.control-row label { font-size: 0.875rem; font-weight: 600; color: #4a5568; display: flex; align-items: center; gap: 0.5rem; }
.control-row select { padding: 0.4rem 0.6rem; border: 1px solid #e2e8f0; border-radius: 4px; font-size: 0.875rem; }
.load-btn { background: #4299e1; color: white; border: none; padding: 0.5rem 1.25rem; border-radius: 4px; cursor: pointer; font-size: 0.875rem; font-weight: 600; }
.load-btn:hover { background: #3182ce; }
.load-btn:disabled { background: #a0aec0; cursor: not-allowed; }
.detail-status { font-size: 0.875rem; color: #718096; margin-top: 0.5rem; }
.delta-cards { display: flex; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.delta-card { padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.875rem; }
.delta-card.added { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.delta-card.removed { background: #fff5f5; color: #9b2c2c; border: 1px solid #fed7d7; }
.delta-card.changed { background: #fffff0; color: #975a16; border: 1px solid #fefcbf; }
.delta-card.unchanged { background: #f7fafc; color: #718096; border: 1px solid #e2e8f0; }
tr.delta-added td { background: #f0fff4 !important; }
tr.delta-removed td { background: #fff5f5 !important; text-decoration: line-through; color: #a0aec0; }
tr.delta-changed td { background: #fffff0 !important; }
td.field-changed { font-weight: 700; position: relative; }
td.field-changed::after { content: attr(data-old); position: absolute; bottom: -2px; left: 4px; font-size: 0.65rem; color: #a0aec0; font-weight: 400; text-decoration: line-through; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 0.75rem; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-top: 0.5rem; }
.page-btn { background: #4299e1; color: white; border: none; padding: 0.4rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.875rem; font-weight: 600; }
.page-btn:hover { background: #3182ce; }
.page-btn:disabled { background: #cbd5e0; cursor: not-allowed; }
.page-info { font-size: 0.875rem; color: #4a5568; font-weight: 600; }

/* Stability expandable detail rows */
.stability-detail-row td {
    background: #f7fafc !important;
    padding: 1rem 1.5rem !important;
    border-bottom: 2px solid #e2e8f0;
    white-space: normal !important;
    overflow: visible !important;
}
.stability-detail-row:hover td { background: #f7fafc !important; }
.stability-detail-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}
.stability-detail-category h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e2e8f0;
}
.stability-detail-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}
.stability-detail-table th {
    background: #edf2f7;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    text-align: left;
    position: static;
}
.stability-detail-table td {
    padding: 0.25rem 0.5rem !important;
    border-bottom: 1px solid #edf2f7;
    white-space: normal !important;
    cursor: default;
}
.stability-detail-no-data {
    font-size: 0.8rem;
    color: #a0aec0;
    font-style: italic;
    margin: 0.25rem 0;
}
#deployerStabilityDataTable tbody tr:not(.stability-detail-row):not(.filter-row) { cursor: pointer; }
#deployerStabilityDataTable tbody tr:not(.stability-detail-row):not(.filter-row):hover { background: #ebf8ff; }
#deployerStabilityDataTable tbody tr.expanded { background: #ebf8ff; border-bottom-color: transparent; }

/* Responsive */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 1rem; text-align: center; }
    main { padding: 1rem; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .card-value { font-size: 2rem; }
    .tabs { overflow-x: auto; }
    th, td { padding: 0.5rem; }
    .module-nav { flex-wrap: wrap; justify-content: center; }
    .filter-row { display: none; }
    .datatable-container td { font-size: 0.8rem; padding: 0.375rem 0.5rem; }
}

/* CINX Module */
.cinx-lookup-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 1rem 0; }
.cinx-upload-section, .cinx-paste-section { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.5rem; }
.cinx-upload-section h3, .cinx-paste-section h3 { margin-bottom: 1rem; color: #2d3748; font-size: 0.95rem; }
.cinx-drop-zone { border: 2px dashed #cbd5e0; border-radius: 8px; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s; }
.cinx-drop-zone:hover, .cinx-drop-active { border-color: #4299e1; background: #ebf8ff; }
.cinx-drop-zone p { color: #718096; margin: 0.25rem 0; }
.cinx-drop-sub { font-size: 0.8rem; }
.cinx-file-btn { display: inline-block; padding: 0.5rem 1.25rem; background: #4299e1; color: white; border-radius: 4px; cursor: pointer; font-size: 0.875rem; margin-top: 0.5rem; }
.cinx-file-btn:hover { background: #3182ce; }
.cinx-file-name { color: #2b6cb0; font-size: 0.85rem; margin-top: 0.5rem; font-weight: 600; }
.cinx-textarea { width: 100%; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 6px; font-family: monospace; font-size: 0.875rem; resize: vertical; }
.cinx-textarea:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,0.2); }
.cinx-actions { grid-column: 1 / -1; display: flex; gap: 0.75rem; }
.cinx-btn { padding: 0.625rem 1.5rem; border: 1px solid #cbd5e0; border-radius: 4px; cursor: pointer; font-size: 0.875rem; background: white; transition: all 0.2s; }
.cinx-btn:hover { background: #f7fafc; }
.cinx-btn-primary { background: #4299e1; color: white; border-color: #4299e1; font-weight: 600; }
.cinx-btn-primary:hover { background: #3182ce; }
.cinx-btn-primary:disabled { background: #a0aec0; border-color: #a0aec0; cursor: not-allowed; }
.cinx-btn-cancel { background: #fc8181; color: white; border-color: #fc8181; }
.cinx-btn-cancel:hover { background: #f56565; }
.cinx-progress { grid-column: 1 / -1; }
.cinx-progress-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.cinx-progress-fill { height: 100%; background: #4299e1; border-radius: 4px; transition: width 0.3s; width: 0; }
.cinx-progress-text { display: block; font-size: 0.8rem; color: #718096; margin-top: 0.25rem; }
.cinx-error { grid-column: 1 / -1; background: #fff5f5; color: #c53030; padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.875rem; }
@media (max-width: 768px) { .cinx-lookup-container { grid-template-columns: 1fr; } }
