/* ============================================
    style.css
   VARIABLES
   ============================================ */
:root {
    --primary-color: #5cb85c;
    --dark-bg: #2c3e50;
    --light-gray: #f8f9fa;
}
/* ============================================
   BASE STYLES
   ============================================ */
body {
    background-color: var(--light-gray);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
/* ============================================
   SEARCH & FILTERS
   ============================================ */
.search-filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}
.search-box {
    position: relative;
}
.search-box input {
    padding-left: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
/* ============================================
   BUTTONS
   ============================================ */
.btn-filters {
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
}
.btn-upload {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}
.btn-upload:hover {
    background-color: #4cae4c;
    color: white;
}
/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.data-table {
    margin-bottom: 0;
    table-layout: fixed;
    width: 100%;
}
.data-table thead {
    background-color: var(--dark-bg);
    color: white;
}
.data-table thead th {
    padding: 1rem;
    font-weight: 600;
    text-align: justify;
    border: none;
}
.data-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    text-align: justify;
}
.data-table tbody tr:hover {
    background-color: #f8f9fa;
}
/* Column widths for reports table */
.data-table thead th:nth-child(1),
.data-table tbody td:nth-child(1) { width: 30%; }
.data-table thead th:nth-child(2),
.data-table tbody td:nth-child(2) { width: 20%; }
.data-table thead th:nth-child(3),
.data-table tbody td:nth-child(3) { width: 20%; }
.data-table thead th:nth-child(4),
.data-table tbody td:nth-child(4) { width: 20%; }
.data-table thead th:nth-child(5),
.data-table tbody td:nth-child(5) { width: 10%; }
/* Ellipsis for File Name */
.data-table tbody td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Error table */
.error-table {
    table-layout: fixed;
    width: 100%;
}
.error-table thead th:nth-child(1),
.error-table tbody td:nth-child(1) { width: 15%; }
.error-table thead th:nth-child(2),
.error-table tbody td:nth-child(2) { width: 10%; }
.error-table thead th:nth-child(3),
.error-table tbody td:nth-child(3) { width: 15%; }
.error-table thead th:nth-child(4),
.error-table tbody td:nth-child(4) { width: 20%; }
.error-table thead th:nth-child(5),
.error-table tbody td:nth-child(5) { width: 40%; }
/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background-color: #d4edda;
    color: #155724;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}
.status-badge.error {
    background-color: #f8d7da;
    color: #721c24;
}
.status-badge.warning {
    background-color: #fff3cd;
    color: #856404;
}
/* ============================================
   ERROR TYPE BADGES
   ============================================ */
.error-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}
.error-type-critical {
    background-color: #f8d7da;
    color: #721c24;
}
.error-type-warning {
    background-color: #fff3cd;
    color: #856404;
}
.error-type-info {
    background-color: #d1ecf1;
    color: #0c5460;
}
/* ============================================
   LINKS
   ============================================ */
.link-download {
    color: #5cb85c;
    text-decoration: none;
    font-weight: 500;
}
.link-download:hover {
    text-decoration: underline;
}
/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}
/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border-radius: 12px;
    border: none;
}
.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}
.modal-body {
    padding: 2.5rem;
}
/* ============================================
   UPLOAD ZONE
   ============================================ */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #f8fff8;
}
.upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: #f0f9f0;
}
.upload-icon {
    font-size: 3rem;
    color: #999;
    margin-bottom: 1rem;
}
/* ============================================
   VALIDATION MODAL
   ============================================ */
.validation-modal .modal-body {
    text-align: center;
    padding: 3rem 2rem;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Base: used by success modal ("Validation Completed" — green) */
.validation-complete {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
}
/* XSD failed — red */
.validation-complete.failed-xsd {
    color: #dc3545;
}
/* Business rule failed — orange */
.validation-complete.failed-br {
    color: #e67e22;
}
/* ============================================
   ERROR LIST
   ============================================ */
.error-list {
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
}
.error-item {
    padding: 0.75rem;
    border-left: 3px solid #dc3545;
    background: #fff5f5;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}
.no-errors {
    text-align: center;
    padding: 2rem;
    color: #999;
}
/* ============================================
   LIST STYLES
   ============================================ */
ul.small li {
    color: black;
}
ul.small li.critical::marker {
    color: red;
}
ul.small li.warning::marker {
    color: orange;
}
/* ============================================
   DELETE MODAL
   ============================================ */
#deleteConfirmModal .modal-header,
#deleteConfirmModal .modal-body,
#deleteConfirmModal .modal-footer {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
#deleteConfirmModal .modal-body p {
    margin-bottom: 0.2rem;
}
#deleteConfirmModal .modal-footer {
    border-top: none;
}
#deleteConfirmModal .modal-dialog {
    max-width: 380px;
    margin: 1.75rem auto;
}
/* ============================================
   ALERTS
   ============================================ */
.alert {
    margin-top: -30px;
}
/* ============================================
   DROPDOWN
   ============================================ */
.dropdown-menu {
    min-width: 200px;
}
.dropdown-item {
    padding: 10px 20px;
    transition: background-color 0.2s;
}
.dropdown-item:hover {
    background-color: #f8f9fa;
}
.dropdown-item i {
    color: #6c757d;
}