/* Import System Page Styles */
.import-system-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.import-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}
.import-header h1 {
    margin: 0;
    font-size: 2.5em;
    color: white;
}
.import-subtitle {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}
/* Dashboard Statistics */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    border-left: 4px solid #007cba;
}
.stat-card.success {
    border-left-color: #4caf50;
}
.stat-card.warning {
    border-left-color: #ff9800;
}
.stat-card.info {
    border-left-color: #2196f3;
}
.stat-icon {
    font-size: 2.5em;
    margin-right: 15px;
}
.stat-content h3 {
    margin: 0;
    font-size: 2em;
    color: #333;
}
.stat-content p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9em;
}
/* Upload Section */
.upload-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.import-form {
    max-width: 800px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.1);
}
.form-group small {
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-primary {
    background: #007cba;
    color: white;
}
.btn-secondary {
    background: #6c757d;
    color: white;
}
.btn-info {
    background: #17a2b8;
    color: white;
}
.btn-success {
    background: #28a745;
    color: white;
}
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.btn-xero {
    background-color: #27A5DE;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: 4px;
    cursor: pointer;
}
.btn-xero:hover {
    background-color: #1A78A6;
}
/* Templates Section */
.templates-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.template-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f9f9f9;
    transition: transform 0.2s, box-shadow 0.2s;
}
.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.template-header h3 {
    margin: 0;
    color: #333;
}
.template-type {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}
.template-details p {
    margin: 8px 0;
    color: #666;
    font-size: 0.9em;
}
.template-actions {
    margin-top: 15px;
    display: flex;
    gap: 8px;
}
.no-templates {
    text-align: center;
    padding: 40px;
    color: #666;
}
/* Recent Imports */
.recent-imports {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.table-container {
    overflow-x: auto;
}
.import-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.import-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}
.import-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
}
.import-table tr:hover {
    background: #f8f9fa;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}
.status-success {
    background: #d4edda;
    color: #155724;
}
.status-error {
    background: #f8d7da;
    color: #721c24;
}
.status-processing {
    background: #fff3cd;
    color: #856404;
}
.actions {
    text-align: center;
}
.btn-small {
    padding: 4px 8px;
    margin: 0 2px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2em;
    border-radius: 3px;
    transition: background 0.2s;
}
.btn-small:hover {
    background: #f0f0f0;
}
.no-imports {
    text-align: center;
    padding: 40px;
    color: #666;
}
/* Help Section */
.help-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.help-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}
.help-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}
.help-card ul {
    margin: 0;
    padding-left: 20px;
}
.help-card li {
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9em;
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}
.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}
.close:hover {
    color: black;
}

/* --- Compact Recent Imports Table --- */
.import-table {
    font-size: 13px;
    border-collapse: collapse;
    margin-top: 6px;
}

.import-table th, .import-table td {
    padding: 4px 6px;
    line-height: 1.2;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;
}

.import-table th {
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding-top: 5px;
    padding-bottom: 5px;
}

.import-table td {
    font-size: 13px;
    white-space: nowrap;
    padding-top: 4px;
    padding-bottom: 4px;
}

.import-table tr {
    height: 28px;
}

.import-table .actions {
    min-width: 85px;
}

.btn-small, .btn-small.btn-xero {
    font-size: 11.5px;
    padding: 2px 7px;
    margin: 0 1px;
    height: 20px;
    border-radius: 3px;
}

.status-badge {
    font-size: 11.5px;
    padding: 2px 7px;
    border-radius: 5px;
}

.import-table .notice {
    margin: 2px 0 0 0;
    padding: 2px 6px;
    font-size: 11px;
}

/* Optional: reduce space around the recent imports card */
.recent-imports {
    padding: 15px;
}

@media (max-width: 768px) {
    .import-table th, .import-table td {
        font-size: 12px;
        padding: 3px 4px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .templates-grid {
        grid-template-columns: 1fr;
    }
    .help-grid {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-direction: column;
    }
    .template-actions {
        flex-direction: column;
    }
}

