/* Hide all tab buttons and tab content by default; JS will show allowed ones */
.tab-button {
    display: none;
}
.tab-content {
    display: none;
}
/* Hide all tab buttons and tab-content by default; show only via JS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide all tab buttons by default, but always show dashboard */
/* Tab visibility is now controlled by JS only. */
/* Tab visibility is now controlled by JS only. */

:root {
    --bix-primary: #E65C00;
    --bix-secondary: #FF8C42;
    --bix-accent: #FFA366;
    --bix-dark: #1F2937;
    --bix-light: #F9FAFB;
    --bix-gray: #6B7280;
    --bix-border: #E5E7EB;
    --bix-muted: #9CA3AF;
    --bix-success: #28a745;
    --bix-warning: #ffc107;
    --bix-danger: #dc3545;
    --bix-white: #ffffff;
}

body {
    font-family: 'Segoe UI', 'Open Sans', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--bix-light);
    min-height: 100vh;
    padding: 20px;
    color: var(--bix-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--bix-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.site-header {
    background: #ffffff;
    color: #0F172A;
    padding: 24px 36px 18px;
    position: relative;
    border-bottom: 1px solid var(--bix-border);
    border-radius: 8px 8px 0 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo svg {
    width: 240px;
    height: auto;
}

.brand-text h1 {
    font-size: 2rem;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #0F172A;
}

.auth-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bix-light);
    color: var(--bix-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--bix-border);
}

.auth-user {
    color: var(--bix-dark);
    font-size: 12px;
    font-weight: 600;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-tagline {
    color: var(--bix-gray);
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
}

.header-slogan {
    margin-top: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bix-primary);
}

.tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid var(--bix-border);
}

.tab-button {
    flex: 1;
    padding: 14px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--bix-gray);
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    background: var(--bix-light);
    color: var(--bix-dark);
}

.tab-button.active {
    color: var(--bix-dark);
    background: #ffffff;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bix-primary);
}

.tab-content {
    display: none;
    padding: 30px;
}

#settings.tab-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section h2 {
    margin-bottom: 24px;
    color: var(--bix-dark);
    font-weight: 700;
    font-size: 1.8em;
    border-bottom: 2px solid var(--bix-border);
    padding-bottom: 12px;
    display: inline-block;
}

.btn {
    padding: 10px 18px;
    border: 1px solid var(--bix-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    background: #ffffff;
    color: var(--bix-dark);
}

.btn-primary {
    background: var(--bix-primary);
    color: #ffffff;
    border-color: var(--bix-primary);
}

.btn-primary:hover {
    background: #cc5200;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: var(--bix-dark);
    border-color: var(--bix-border);
}

.btn-secondary:hover {
    background: var(--bix-light);
    transform: translateY(-1px);
}

.btn-danger {
    background: #ffffff;
    color: #b42318;
    border-color: #f2c7c7;
}

.btn-danger:hover {
    background: #fef3f2;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 20px;
}

.section-actions--placeholder {
    min-height: 40px;
}

.list-container {
    margin-top: 0;
}

.list-item {
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-left: 4px solid #FFA366;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.list-item:hover {
    box-shadow: 0 8px 20px rgba(230, 92, 0, 0.12);
    transform: translateY(-3px);
    border-left-color: #E65C00;
}

.list-item h3 {
    color: #8B3A00;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.2em;
}

.list-item .details {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.list-item .details div {
    margin: 5px 0;
}

.list-item .actions {
    display: flex;
    gap: 10px;
}

.settings-panel {
    margin-top: 0;
}

.settings-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px 20px;
}

.settings-details {
    grid-column: 1 / -1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px 4px;
    background: #fafafa;
}

.settings-details > summary {
    cursor: pointer;
    font-weight: 600;
    color: #444;
    list-style: none;
    outline: none;
}

.settings-details > summary::-webkit-details-marker {
    display: none;
}

.settings-details > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.settings-details[open] > summary::before {
    transform: rotate(90deg);
}

.settings-details .form-group {
    margin-top: 12px;
}

.settings-form .form-group,
.settings-form .form-actions {
    margin-bottom: 0;
}

.settings-form .form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

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

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #28a745;
    color: #ffffff;
}

.badge-warning {
    background: #ffc107;
    color: #333;
}

.badge-info {
    background: #FFA366;
    color: #ffffff;
}

.badge-danger {
    background: #dc3545;
    color: #ffffff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(139, 58, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(230, 92, 0, 0.5);
    animation: slideIn 0.3s;
    overflow: hidden;
}

.modal-content.large {
    max-width: 800px;
}

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

.close {
    color: #ffffff;
    float: right;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-header {
    background: linear-gradient(135deg, #E65C00 0%, #FF8C42 100%);
    color: #ffffff;
    padding: 24px 30px;
    border-bottom: 3px solid #FFA366;
    margin: -30px -30px 30px -30px;
}

.modal-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.6em;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #8B3A00;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E65C00;
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.15);
}

.form-group input[type="search"] {
    padding-left: 40px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23E65C00" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .tab-button {
        font-size: 14px;
        padding: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #E65C00;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.info-message {
    background: #FFE5D9;
    color: #8B3A00;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #FFA366;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #f5f8fa;
    color: #6c757d;
    font-size: 0.9em;
    border-top: 1px solid #e0e6ed;
}

footer a {
    color: #E65C00;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    color: #8B3A00;
    text-decoration: underline;
}

/* Table Selector Styles */
.table-selector-container {
    position: relative;
}

.table-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23E65C00" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
}

.table-search-input:focus {
    outline: none;
    border-color: #FFA366;
    box-shadow: 0 0 0 3px rgba(255, 163, 102, 0.1);
}

.table-list {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    background: #ffffff;
}

.table-list-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.table-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.table-item:hover {
    background: rgba(255, 163, 102, 0.08);
    padding-left: 20px;
}

.table-item.selected {
    background: #FF8C42;
    color: #ffffff;
    font-weight: 600;
}

.table-item-icon {
    font-size: 16px;
}

.selected-table {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FF8C42 0%, #E65C00 100%);
    color: #ffffff;
    border-radius: 4px;
    font-weight: 600;
    display: none;
}

.selected-table.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selected-table .remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.selected-table .remove-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.table-count {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

/* Path Builder Styles */
.path-builder {
    background: #f5f8fa;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #e0e6ed;
}

.path-templates {
    margin-bottom: 16px;
}

.btn-template {
    display: inline-block;
    padding: 8px 14px;
    margin: 4px 6px 4px 0;
    background: #ffffff;
    border: 2px solid #E65C00;
    color: #E65C00;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-template:hover {
    background: #E65C00;
    color: #ffffff;
    transform: translateY(-1px);
}

.variable-buttons {
    margin-top: 16px;
}

.btn-variable {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px 4px 4px 0;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    color: #8B3A00;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.2s ease;
}

.btn-variable:hover {
    background: #FFA366;
    color: #ffffff;
    border-color: #FFA366;
    transform: scale(1.05);
}

.path-preview {
    margin-top: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #FFA366;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #8B3A00;
    min-height: 20px;
}

.path-preview::before {
    content: '📁 Vorschau: ';
    font-family: 'Segoe UI', sans-serif;
    color: #6c757d;
    font-size: 11px;
    display: block;
    margin-bottom: 6px;
}

.path-preview:empty::after {
    content: 'Pfad wird hier angezeigt...';
    color: #6c757d;
    font-style: italic;
    font-family: 'Segoe UI', sans-serif;
}

/* Target Type Selector */
.target-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.target-type-option {
    cursor: pointer;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
}

.target-type-option:hover {
    border-color: #FFA366;
    box-shadow: 0 4px 12px rgba(255, 163, 102, 0.15);
    transform: translateY(-2px);
}

.target-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.target-type-option input[type="radio"]:checked + label {
    color: #E65C00;
}

.target-type-option input[type="radio"]:checked ~ label::before,
.target-type-option:has(input:checked) {
    border-color: #E65C00;
    background: linear-gradient(135deg, #FFF5EE 0%, #FFE5D9 100%);
}

.target-type-option label {
    cursor: pointer;
    display: block;
    text-align: center;
}

.target-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.target-title {
    font-size: 16px;
    font-weight: 700;
    color: #8B3A00;
    margin-bottom: 8px;
}

.target-desc {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* Network Path Builder */
.network-path-builder {
    background: #f5f8fa;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #e0e6ed;
}

.network-type-selector {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

.network-path-builder input[type="text"] {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.network-path-builder input[type="text"]:focus {
    outline: none;
    border-color: #E65C00;
    box-shadow: 0 0 0 3px rgba(230, 92, 0, 0.15);
}

#network-preview::before {
    content: '🌐 Netzwerkpfad: ';
}

/* Column Selection Styles */
.column-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.column-mode-option {
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.column-mode-option:hover {
    border-color: #FFA366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.column-mode-option input[type="radio"] {
    display: none;
}

.column-mode-option input[type="radio"]:checked + label {
    color: #E65C00;
}

.column-mode-option input[type="radio"]:checked ~ label .target-icon {
    background: linear-gradient(135deg, #E65C00 0%, #FFA366 100%);
}

.column-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    background: white;
    padding: 10px;
}

.column-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-item {
    padding: 10px 15px;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.column-item:hover {
    background: #e9ecef;
    border-color: #FFA366;
}

.column-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.column-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.column-name {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.column-type {
    font-size: 12px;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
}

.column-list-loading,
.column-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.column-count {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Export Format Selector */
.format-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.format-option {
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
}

.format-option:hover {
    border-color: #FFA366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.format-option input[type="radio"]:checked + label {
    color: #E65C00;
}

.format-option input[type="radio"]:checked ~ label .target-icon {
    background: linear-gradient(135deg, #E65C00 0%, #FFA366 100%);
    transform: scale(1.1);
}

.format-option label {
    cursor: pointer;
    display: block;
}

@media (max-width: 768px) {
    .format-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #FFF5EE 100%);
    border: 2px solid #e0e6ed;
    border-left: 4px solid #E65C00;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(230, 92, 0, 0.08) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(230, 92, 0, 0.15);
    border-left-color: #FF8C42;
}

.stat-card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.stat-card-title {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #8B3A00;
    margin-bottom: 4px;
}

.stat-card-subtitle {
    font-size: 12px;
    color: #6c757d;
}

.dashboard-history {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e0e6ed;
}

.history-chart {
    width: 100%;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.history-item {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px;
}

.history-date {
    font-weight: 600;
    margin-bottom: 6px;
    color: #8B3A00;
}

.history-metric {
    font-size: 12px;
    color: #6c757d;
}

/* --- Exports Tree --- */
.exports-tree {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}
.exports-tree .export-folder {
    margin: 2px 0 2px 0;
}
.exports-tree .export-folder-label {
    font-weight: 600;
    color: #E65C00;
    cursor: pointer;
    display: inline-block;
    padding: 2px 0;
}
.exports-tree .export-file {
    margin-left: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}
.exports-tree .export-filename {
    font-family: 'Segoe UI', 'Open Sans', monospace;
    font-size: 15px;
    color: #333;
    margin-right: 8px;
}
.exports-tree .export-meta {
    font-size: 12px;
    color: #888;
    margin-right: 8px;
}
.exports-tree .export-actions button {
    margin-left: 4px;
}
.exports-tree-children {
    margin-left: 18px;
}

/* Highlight selected export file */
.exports-tree .export-file.selected {
    background: #FFF5EE;
    border-left: 4px solid #E65C00;
    border-radius: 4px;
    font-weight: 600;
}

.exports-action-bar {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}
