body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

/* Form styles */
.form-container {
    margin-bottom: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

textarea.form-input {
    height: 120px;
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results styles */
.results-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-node {
    background-color: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.attribute-row {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
}

.attribute-label {
    font-weight: bold;
    color: #495057;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

.attribute-value {
    color: #212529;
    word-break: break-all;
}

.no-attributes {
    color: #6c757d;
    font-style: italic;
    padding: 10px 0;
    grid-column: 1 / -1;
}

.status-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.status-success {
    color: #28a745;
}

.status-failed {
    color: #dc3545;
}

.status-unknown {
    color: #6c757d;
}

.status-manual_review {
    color: #ffc107;
}

/* Tabs */
.tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    padding: 10px 15px;
    margin-right: 5px;
    border: none;
    background: none;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* History table styles */
.history-filters {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.history-filters .form-group {
    display: inline-block;
    margin-right: 20px;
}

.history-results {
    overflow-x: auto;
    margin: 20px -20px;
    padding: 0 20px;
}

#historyTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

#historyTable th,
#historyTable td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

#historyTable th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 1;
}

#historyTable th:nth-child(1) { width: 120px; }
#historyTable th:nth-child(2) { width: 150px; }
#historyTable th:nth-child(3) { width: 100px; }
#historyTable th:nth-child(4) { width: 250px; }
#historyTable th:nth-child(5) { width: auto; }

#historyTable tbody tr:hover {
    background-color: #f8f9fa;
}

.attribute-list {
    max-height: none;
    overflow-y: visible;
    font-size: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 8px;
}

.attribute-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.attribute-key {
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attribute-value {
    color: #212529;
    word-break: break-word;
    font-family: monospace;
    background-color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.no-data {
    text-align: center;
    color: #6c757d;
    padding: 40px;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Message cell formatting */
.message-cell {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
}

/* Date filter styles */
input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 5px;
}

select#categoryFilter {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}
.bank-node {
    background-color: #e3f2fd;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #1976d2;
    margin-left: 8px;
}

.reasoning-section {
    margin-top: 16px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.reasoning-section h3 {
    color: #495057;
    font-size: 16px;
    margin-bottom: 8px;
}

.reasoning-text {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}