body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.main-frame {
    display: flex;
    width: 100vw;
    height: 100vh;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
}

/* Left Panel - Countries */
.left-panel {
    flex: 0 0 275px;
    border-right: 1px solid #eee;
    padding: 20px 0;
    background-color: #fdfdfd;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.country-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-item:hover {
    background-color: #e6f7ff;
    color: #007bff;
}

.country-item.selected {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.country-item .country-name {
    font-weight: 500;
}

.country-item .country-count {
    font-size: 0.9em;
    color: #888;
}

.country-item.selected .country-count {
    color: #e6f7ff;
}

/* Right Panel - Details */
.right-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-panel-data-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-button {
    padding: 15px 25px;
    cursor: pointer;
    background-color: #f9f9f9;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.05em;
    color: #555;
    transition: all 0.2s;
}

.tab-button:hover {
    background-color: #f0f0f0;
}

.tab-button.active {
    background-color: #fff;
    border-bottom: 3px solid #007bff;
    color: #007bff;
    font-weight: bold;
}

.tab-content {
    flex-grow: 1;
    overflow: hidden;
    flex-direction: column;
    display: none;
}

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

.tab-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.tab-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px dashed #eee;
    font-size: 1.05em;
    color: #444;
}

.tab-list li:last-child {
    border-bottom: none;
}

/*Popup details*/
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.popup-overlay.active {
    display: flex;
}
.popup-overlay.inactive {
    display: none;
}

.popup-frame {
    display: flex;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 50vw;
    height: 50vh;
    overflow: auto;
    max-width: 500px;
    max-height: 150px;
    text-align: center;
    flex-direction: column;
    align-items: center;
}
.popup-frame button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: auto;

}
.popup-frame button:hover {
    background-color: #0056b3;
}

/* New styles for store/warehouse items */
.item-details-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-details-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-name {
    color: #333;
}

.item-count {
    color: #666;
    font-size: 0.9em;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: #28a745;
}

.status-dot.inactive {
    background-color: #dc3545;
}

.play-button {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: background-color 0.2s;
    padding-left: 9px;
    padding-top: 3px
}

.play-button:hover {
    background-color: #218838;
}

.import-button-container {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    background-color: #fdfdfd;
}

.import-button {
    margin-top: 10px;
    padding: 12px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 189px;
}

.import-button:hover {
    background-color: #0056b3;
}

/* Initial hidden state for the right panel */
#rightPanelDataContainer {
    display: none;
}

#rightPanelPlaceholder {
    display: block;
    padding: 20px;
}

.search-bar {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid transparent;
    background-color: #f0f2f5;
    border-radius: 6px;
    font-size: 1em;
    color: #333;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    background-color: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-button {
    margin-left: 10px;
    padding: 10px 5px;
}

.search-button:hover {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.hidden {
    display: none !important;
}

.history-panel {
    padding: 0 !important;
    display: none;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.history-panel.active {
    display: flex !important;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fdfdfd;
    flex-shrink: 0;
}

.refresh-note {
    font-size: 0.8rem;
    color: #999;
}

#jobList {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0 20px 20px 20px;
}

.list-placeholder {
    justify-content: center;
    font-style: italic;
    color: #888;
}

.job-status {
    font-weight: 600;
    font-size: 0.9em;
    margin-right: 15px;
}

.job-status.success { color: #28a745; }
.job-status.failed { color: #dc3545; }
.job-status.processing { color: #007bff; }

.job-date {
    font-size: 0.85em;
    color: #888;
}

.job-name {
    color: #333;
    font-weight: bold;
}

.job-id {
    font-weight: normal;
    font-size: 0.75em;
    margin-right: 10px;
    color: #777;
}