:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --warning-color: #e74c3c;
    --warning-dark: #c0392b;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --white: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background-color: white;
    color: #3498db;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

header h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 600;
    color: #3498db;
    letter-spacing: -0.5px;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
}

header h1 strong {
    font-weight: 700;
}

header i {
    color: #3498db;
    margin-right: 10px;
    font-size: 24px;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

@media (min-width: 992px) {
    .content {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 0;
    margin-bottom: 20px;
    position: relative;
}

.card h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--medium-gray);
    padding: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
}

.card-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.supplier-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
}

.supplier-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.supplier-option:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.supplier-option.selected {
    background-color: var(--primary-color);
    color: var(--white);
}

.supplier-option i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.test-options {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.test-options h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: center;
}

.test-supplier-selection {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.test-supplier-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-supplier-option:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.test-supplier-option.selected {
    background-color: var(--primary-color);
    color: var(--white);
}

.test-supplier-option i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.actions {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.btn i {
    margin-right: 5px;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn.primary:hover {
    background-color: var(--primary-dark);
}

.btn.primary:disabled {
    background-color: var(--medium-gray);
    cursor: not-allowed;
}

.btn.danger {
    background-color: var(--warning-color);
    color: var(--white);
    margin-left: 0;
}

.btn.danger:hover {
    background-color: var(--warning-dark);
}

.btn.danger:disabled {
    background-color: var(--medium-gray);
    cursor: not-allowed;
}

.btn.small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.output-card {
    height: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 0;
    box-shadow: none;
}

.output-card .card-header {
    background-color: #252526;
    color: #ffffff;
    border-bottom: 1px solid #1e1e1e;
    margin-bottom: 0;
}

.output-card .card-header h2 {
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
    padding: 0;
}

.output-container {
    flex-grow: 1;
    background-color: #1e1e1e;
    color: #cccccc;
    padding: 12px 15px;
    border-radius: 0;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    min-height: 300px;
    max-height: 500px;
}

.output-container pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-right: 70px !important;
}

.status-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-light.idle {
    background-color: #888888;
}

.status-light.running {
    background-color: #89d185;
    animation: pulse 1.5s infinite;
}

.status-light.error {
    background-color: #f14c4c;
}

.status-text {
    font-size: 12px;
    color: #cccccc;
}

/* Terminal actions */
.terminal-actions {
    display: flex;
    gap: 5px;
    margin-right: 10%;
}

.icon-btn {
    background-color: transparent;
    color: #cccccc;
    border: none;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    min-width: auto;
    font-size: 14px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.icon-btn:hover {
    background-color: #3c3c3c;
    color: #ffffff;
}

.icon-btn i {
    margin-right: 0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #252526;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #252526;
    border-bottom: 1px solid #1e1e1e;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    color: #ffffff;
    font-size: 16px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-header .close-button {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.modal-header .close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-actions .icon-btn {
    background-color: rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
}

.modal-actions .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex: 1;
    overflow: auto;
    background-color: #1e1e1e;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.modal-body pre {
    padding: 16px 20px;
    margin: 0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #cccccc;
    background-color: #1e1e1e;
    white-space: pre-wrap;
    word-wrap: break-word;
    height: 100%;
    flex: 1;
    overflow-y: auto;
}

.status-light.done {
    background-color: #89d185;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.tabs {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.tab-header {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--medium-gray);
    flex-wrap: wrap;
    padding-bottom: 5px;
}

.tab-button {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
}

.tab-button.active {
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block !important; /* Force display with !important to override any conflicts */
}

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

.tab-pane {
    padding: 15px;
    display: none;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
}

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

.tab-pane pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    height: 100%;
    overflow-y: auto;
}

/* Add responsive adjustments to prevent horizontal scrolling */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }
    
    .output-card {
        width: 100%;
    }
    
    .tab-button {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .supplier-selection,
    .test-supplier-selection {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .tab-header {
        justify-content: flex-start;
    }
    
    .date-item {
        padding: 10px 8px 10px 56px;
    }
}

/* VS Code-style Log Tree View */
.logs-panel .card {
    height: auto;
    min-height: 500px;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background-color: #252526;
}

.logs-panel .card-header {
    padding: 10px 15px;
    background-color: #252526;
    color: #ffffff;
    border-bottom: 1px solid #1e1e1e;
    margin-bottom: 0;
}

.logs-panel .card-header h2 {
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    font-weight: 400;
}

.logs-panel .card-header .btn {
    background-color: #2d2d2d;
    color: #cccccc;
    min-width: auto;
    font-size: 12px;
    padding: 4px 8px;
}

.logs-panel .card-header .btn:hover {
    background-color: #3c3c3c;
}

.log-tree-container {
    width: 30%;
    overflow-y: auto;
    border-right: 1px solid #1e1e1e;
    padding-right: 10px;
    background-color: #252526;
    color: #cccccc;
}

.supplier-tree-item {
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
    background-color: #252526;
}

.supplier-header, .status-header {
    padding: 6px 8px 6px 16px;
    background-color: transparent;
    color: #cccccc;
    font-size: 13px;
    transition: background-color 0.1s;
    cursor: pointer;
}

.supplier-header:hover, .status-header:hover {
    background-color: #2a2d2e;
}

.supplier-header i, .status-header i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-size: 12px;
}

.supplier-header i:last-child, .status-header i:last-child {
    margin-right: 0;
    margin-left: auto;
    font-size: 10px;
    color: #6c6c6c;
}

.supplier-content {
    padding: 0;
}

.status-tree-item {
    margin: 0;
    border: none;
    border-radius: 0;
    background-color: #252526;
}

.status-header {
    padding-left: 36px;
}

.dates-container {
    padding: 0;
}

/* Base styles for date-item */
.date-item {
    padding: 4px 8px 4px 56px;
    margin-bottom: 0;
    color: #cccccc;
    font-size: 13px;
    border-radius: 0;
    cursor: pointer;
    background-color: #252526;
    position: relative;
    border-left: 2px solid transparent;
}

.date-item:hover {
    background-color: #2a2d2e;
}

.date-item i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-size: 12px;
    color: #c5c5c5;
}

/* Highlight active date */
.date-item.active {
    background-color: #37373d;
    font-weight: 500;
    border-left: 2px solid var(--primary-color);
}

/* Mobile styles - will override the base styles */
@media (max-width: 768px) {
    .date-item {
        padding: 10px 8px 10px 56px;
    }
}

@media (max-width: 480px) {
    .date-item {
        padding: 8px 8px 8px 56px;
    }
}

.success-icon {
    color: #2ecc71;
}

.error-icon {
    color: #e74c3c;
}

.already-icon {
    color: #3498db;
}

.flagged-icon {
    color: #f1c40f;
}

/* Log Content View */
.log-content-view {
    width: 70%;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
    flex: 1;
}

.log-content-header {
    padding: 8px 12px;
    background-color: #252526;
    border-bottom: 1px solid #1e1e1e;
    color: #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-content-header h3 {
    font-size: 13px;
    font-weight: 400;
    color: #cccccc;
    margin: 0;
}

.log-content-container {
    flex: 1;
    background-color: #1e1e1e;
    padding: 0;
    overflow: auto;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.log-content-container pre {
    padding: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #cccccc;
    background-color: #1e1e1e;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

.empty-message {
    padding: 4px 8px 4px 56px;
    color: #6c6c6c;
    font-style: italic;
    font-size: 13px;
}

/* Split view layout */
.logs-panel-content {
    display: flex;
    height: auto;
    min-height: 450px;
    max-height: 600px;
    overflow-y: auto;
    background-color: #252526;
}

/* Button styles for download */
#download-log {
    background-color: #2d2d2d;
    color: #cccccc;
    min-width: auto;
    font-size: 12px;
    padding: 4px 8px;
}

#download-log:hover {
    background-color: #3c3c3c;
}

#download-log:disabled {
    opacity: 0.5;
    background-color: #2d2d2d;
    cursor: not-allowed;
}

/* Helper classes for chevron rotation */
.fa-chevron-down {
    transition: transform 0.2s ease;
}

.fa-chevron-up {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

/* Adjust content layout and remove left padding */
.registration-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
}

.registration-panel .card {
    border-radius: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

/* Add cursor pointer to supplier header */
.supplier-header {
    cursor: pointer;
}

/* Log content header with close button */
.log-content-header {
    padding: 8px 12px;
    background-color: #252526;
    border-bottom: 1px solid #1e1e1e;
    color: #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Close button for log content */
.close-button {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #cccccc;
    background-color: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    margin-left: 8px;
    padding: 0;
}

.close-button:hover {
    background-color: #3c3c3c;
}

/* Group title and actions in header */
.log-content-title-group {
    display: flex;
    align-items: center;
}

/* File tab styles like VS Code */
.file-tab {
    display: flex;
    align-items: center;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Log title styles */
.log-content-header h3 {
    font-size: 13px;
    font-weight: 400;
    color: #cccccc;
    margin: 0;
}

/* Dropdown Selection */
.dropdown-selection {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.supplier-dropdown-container {
    width: 100%;
    position: relative;
}

.supplier-dropdown {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Custom dropdown arrow */
.supplier-dropdown-container::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    color: #555;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.supplier-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Testing dropdown */
#test-options {
    border-top: 1px solid var(--medium-gray);
    padding-top: 20px;
}

/* Adjust padding for test options dropdown */
#test-options .supplier-dropdown {
    margin-top: 10px;
}

/* VS Code dark theme for dropdowns - if needed */
.dark-theme .supplier-dropdown {
    background-color: #252526;
    color: #cccccc;
    border-color: #1e1e1e;
}

.dark-theme .supplier-dropdown-container::after {
    color: #cccccc;
}

.dark-theme .supplier-dropdown:focus {
    border-color: #0e639c;
    box-shadow: 0 0 0 2px rgba(14, 99, 156, 0.2);
}

/* Download icon for folders */
.folder-download {
    font-size: 11px;
    color: #75beff;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    margin-right: 0;
    margin-left: auto;
}

.supplier-header:hover .folder-download,
.status-header:hover .folder-download {
    opacity: 1;
}

.folder-download:hover {
    color: #ffffff;
}

/* Adjust first card margins */
.registration-panel .card:first-child {
    margin-bottom: 10px;
}

/* Top panel with 4:8 grid layout */
.top-panel {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Make supplier panel more focused */
.supplier-panel {
    width: 300px !important;
}

.supplier-panel .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* Terminal panel styling */
.terminal-panel {
    width: 946px !important;

}

.terminal-panel .card {
    height: 100%;
    margin-bottom: 0;
}

/* Improve supplier selection UX */
.supplier-dropdown {
    height: 46px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #f8f8f8;
}

.supplier-dropdown:hover {
    border-color: #3498db;
}

.supplier-dropdown option {
    padding: 10px;
}

/* Highlight selected option with icon */
.supplier-dropdown-container {
    position: relative;
}

/* Enhance buttons for better UX */
.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.actions .btn {
    width: 100%;
    height: 42px;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin: 0;
}

.actions .btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* Adjust output container */
.output-container {
    min-height: 350px;
    max-height: 500px;
}

/* Logs panel adjustments */
/* Make the logs panel full height on mobile */
@media (max-width: 768px) {
    .top-panel {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .actions {
        flex-direction: row;
    }
    
    .logs-panel .card {
        min-height: 500px;
        height: auto;
    }
}

/* Dropdown icon styling */
.dropdown-icon {
    position: absolute;
    left: 16px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    color: #3498db;
    width: 20px;
    text-align: center;
}

.dropdown-icon i {
    width: 100%;
    text-align: center;
}

.supplier-dropdown {
    padding-left: 42px;
}

/* Create a better focus state for dropdown */
.supplier-dropdown:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
    outline: none;
}

/* JavaScript will add this class to update the icon */
.dropdown-icon.selected-delta i::before {
    content: "\f5af"; /* fa-plane-departure */
}

.dropdown-icon.selected-vexpress i::before {
    content: "\f5ca"; /* fa-umbrella-beach */
}

.dropdown-icon.selected-vax i::before {
    content: "\f5ab"; /* fa-passport */
}

.dropdown-icon.selected-test i::before {
    content: "\f492"; /* fa-vial */
}

/* Specific fix for test supplier dropdown icon */
#test-options .dropdown-icon {
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 46px;
}

#test-options .dropdown-icon i {
    line-height: 1;
}

/* Add the following styles for header and logout button */
.user-actions {
    display: flex;
    align-items: center;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #4b6584;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #3d5674;
}

.logout-btn i {
    margin-right: 6px;
    color: white;
}

/* Navigation tabs */
.navigation-tabs {
    display: flex;
    margin-right: 20px;
}

.nav-tab,
.nav-link {
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 4px;
    color: #333;
    background-color: #f5f5f5;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-tab i,
.nav-link i {
    margin-right: 8px;
    color: inherit; /* Ensure icon color matches text color */
}

.nav-tab:hover,
.nav-link:hover {
    background-color: #e0e0e0;
}

.nav-tab.active {
    background-color: #3498db;
    color: white;
}

.nav-tab.active i {
    color: white; /* Explicitly set icon color for active tabs */
    visibility: visible; /* Ensure visibility */
    opacity: 1; /* Ensure opacity */
}

/* Statistics Container */
.statistics-container {
    margin: 20px;
}

.row {
    display: flex;
    margin-bottom: 20px;
    gap: 20px;
}

/* Metrics Panel */
.metrics-panel {
    display: flex;
    width: 100%;
    gap: 20px;
}

.metric-card {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    min-width: 60px;
}

.metric-icon i {
    font-size: 28px;
    color: white;
}

.metric-icon.success {
    background-color: #2ecc71;
}

.metric-icon.failed {
    background-color: #e74c3c;
}

.metric-icon.flagged {
    background-color: #f39c12;
}

.metric-icon.tickets {
    background-color: #9b59b6;
}

.metric-icon.already {
    background-color: #3498db;
}

.metric-icon.already i {
    color: white;
    font-size: 28px;
}

.metric-content h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #7f8c8d;
}

.metric-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

/* Chart Cards */
.chart-card {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chart-card.full-width {
    width: 100%;
}

.chart-card .card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-card .card-header h2 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.chart-container {
    padding: 20px;
    height: 300px;
}

/* Time Filter */
.time-filter select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* Media queries for responsive design */
@media (max-width: 1024px) {
    .row {
        flex-direction: column;
    }
    
    .metrics-panel {
        flex-direction: column;
    }
    
    .metric-card {
        margin-bottom: 15px;
    }
    
    .logs-panel-content {
        flex-direction: column;
        height: auto;
        min-height: 450px;
        max-height: none;
        background-color: #252526;
    }
    
    .log-tree-container,
    .log-content-view {
        width: 100%;
        height: 50%;
    }
    
    .log-tree-container {
        border-right: none;
        border-bottom: 1px solid #1e1e1e;
        padding-right: 0;
        padding-bottom: 10px;
        margin-bottom: 10px;
        max-height: 300px;
        background-color: #252526;
    }
    
    .log-content-view {
        padding-left: 0;
        padding-top: 10px;
        background-color: #1e1e1e;
    }
}

/* Mobile Menu Icon - hidden by default */
.mobile-menu-toggle {
    display: none;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    transition: background-color 0.3s;
}

.mobile-menu-toggle i {
    color: white !important;
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-dark);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    flex-direction: column;
    padding: 60px 0;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 0 20px;
}

.mobile-menu-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.mobile-menu-header p {
    font-size: 14px;
    color: #cccccc;
    margin: 0;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-menu-item {
    color: white;
    font-size: 18px;
    padding: 15px 20px;
    text-decoration: none;
    margin: 5px 0;
    display: flex;
    align-items: center;
    width: 80%;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-item:hover, .mobile-menu-item:active {
    background-color: rgba(52, 152, 219, 0.2);
}

.mobile-menu-item i {
    margin-right: 15px;
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.mobile-menu-close:hover {
    color: var(--primary-color);
}

/* Enhanced Responsive Styles */
@media (max-width: 1024px) {
    .logs-panel-content {
        flex-direction: column;
    }
    
    .log-tree-container,
    .log-content-view {
        width: 100%;
    }
    
    .supplier-header, .status-header {
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    header h1 .header-text {
        display: none;
    }
    
    .navigation-tabs {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .user-actions {
        display: flex;
        align-items: center;
    }
    
    .logout-btn {
        display: none;
    }
    
    .top-panel {
        grid-template-columns: 1fr;
    }
    
    .supplier-panel, .terminal-panel {
        width: 100%;
    }
    
    .logs-panel .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logs-panel .card-header h2 {
        margin-bottom: 10px;
    }
    
    .log-content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .log-content-title-group {
        margin-bottom: 10px;
        width: 100%;
    }
    
    #download-log {
        width: 100%;
    }
    
    .date-item {
        padding: 10px 8px 10px 56px;
    }
    
    .logs-panel-content {
        max-height: 600px;
    }
    
    .log-tree-container {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
        border-radius: 0;
    }
    
    header {
        padding: 10px 15px;
    }
    
    header h1 i {
        font-size: 20px;
        margin-right: 5px;
    }
    
    .mobile-menu-toggle {
        padding: 5px 8px;
    }
    
    .mobile-menu-header h2 {
        font-size: 20px;
    }
    
    .mobile-menu-item {
        width: 90%;
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .mobile-menu-item i {
        font-size: 18px;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
    
    .log-content-container {
        max-height: 300px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .metric-card {
        padding: 15px;
    }
    
    .metric-icon {
        width: 40px;
        height: 40px;
    }
    
    .metric-icon i {
        font-size: 20px;
    }
    
    .chart-card {
        margin-bottom: 15px;
    }
    
    .supplier-header {
        padding: 10px 8px 10px 16px;
    }
    
    .status-header {
        padding: 10px 8px 10px 36px;
    }
    
    .date-item {
        padding: 8px 8px 8px 56px;
    }
}

/* Visual indicators for the hierarchy */
.supplier-header::before,
.status-header::before,
.date-item::before {
    display: none;
}

@media (max-width: 768px) {
    /* Tree-style visual indicators for hierarchy on mobile */
    .supplier-header {
        position: relative;
        border-left: none;
        padding: 10px 8px 10px 10px;
    }
    
    /* Status level styling */
    .status-header {
        position: relative;
        margin-left: 10px;
        padding: 10px 8px 10px 24px;
        border-left: none;
    }
    
    .status-header::before {
        content: "├─";
        display: inline-block;
        color: #a0a0a0;
        position: absolute;
        left: 0px;
        font-family: monospace;
        font-weight: bold;
        font-size: 16px;
    }
    
    /* Last status item in a group */
    .status-tree-item:last-child .status-header::before {
        content: "└─";
    }
    
    /* Date level styling */
    .date-item {
        position: relative;
        margin-left: 24px;
        padding: 8px 8px 8px 24px;
        border-left: none;
    }
    
    .date-item::before {
        content: "├─";
        display: inline-block;
        color: #a0a0a0;
        position: absolute;
        left: 0px;
        font-family: monospace;
        font-weight: bold;
        font-size: 16px;
    }
    
    /* Last date item in a dates container */
    .dates-container .date-item:last-child::before {
        content: "└─";
    }
    
    /* Active item styling */
    .date-item.active {
        background-color: #37373d;
        border-left: none;
    }
    
    .date-item.active::after {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background-color: var(--primary-color);
    }
}

@media (max-width: 1024px) {
    .log-content-view {
        height: auto;
        min-height: 300px;
    }
    
    .log-content-container {
        height: auto;
        min-height: 250px;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .log-content-view {
        min-height: 300px;
        max-height: none;
        width: 100%;
        padding-left: 0;
    }
    
    .log-content-header {
        width: 100%;
        flex-direction: row;
        padding: 8px;
    }
    
    .log-content-title-group {
        width: auto;
        margin-bottom: 0;
    }
    
    #download-log {
        width: auto;
    }
    
    .log-content-container {
        width: 100%;
        padding: 0;
        overflow-x: hidden;
        min-height: 250px;
        max-height: none;
    }
    
    .log-content-container pre {
        font-size: 12px;
        padding: 10px;
        width: 100%;
        overflow-x: hidden;
    }
    
    .logs-panel-content {
        max-height: none;
    }
}

@media (max-width: 480px) {
    .log-content-container {
        min-height: 350px;
        max-height: none;
    }
    
    .output-container {
        min-height: 200px;
    }
}

.page-size-container {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.page-size-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

/* Loader Styles */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
    backdrop-filter: blur(3px);
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--medium-gray);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-text {
    margin-top: 15px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* When in dark mode */
.dark-theme .loader-overlay {
    background-color: rgba(30, 30, 30, 0.8);
}

.dark-theme .loader-text {
    color: #fff;
}

/* ===== NCL Export Status Panel ===== */
.ncl-export-panel {
    width: 100%;
    margin-bottom: 20px;
}

.ncl-export-content {
    padding: 20px;
}

.ncl-status-message {
    text-align: center;
    padding: 30px;
    color: var(--medium-gray);
    font-size: 16px;
}

.ncl-status-message.error-message {
    color: var(--warning-color);
}

.ncl-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ncl-status-item {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.ncl-status-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.ncl-status-value {
    font-size: 20px;
    color: var(--dark-gray);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.unknown {
    background-color: var(--medium-gray);
    color: var(--dark-gray);
}

.ncl-export-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--medium-gray);
}

.ncl-export-message {
    font-size: 14px;
    color: #666;
    text-align: center;
    max-width: 600px;
}

#download-ncl-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .ncl-status-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .ncl-status-item {
        padding: 12px;
    }
    
    .ncl-status-value {
        font-size: 18px;
    }
}

/* ===== NCL Info Panel ===== */
.ncl-info-panel {
    width: 100%;
    margin-top: 20px;
}

.ncl-info-content {
    padding: 20px;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medium-gray);
}

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

.info-section h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section h3 i {
    font-size: 20px;
}

.info-section p {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 10px;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section ul li {
    color: var(--dark-gray);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.info-section ul li::before {
    content: "•";
    position: absolute;
    left: 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.info-note {
    background-color: #e7f3ff;
    border-left: 4px solid var(--primary-color);
    padding: 12px 15px;
    margin-top: 10px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-note i {
    color: var(--primary-color);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .info-section h3 {
        font-size: 16px;
    }
    
    .ncl-info-content {
        padding: 15px;
    }
}