body { 
    font-family: Arial, sans-serif; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
    background-color: #f5f7fa; 
}

.step { 
    margin: 30px 0; 
    padding: 20px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    background-color: #ffffff; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
}

.step h2 { 
    margin-top: 0; 
    color: #333; 
}

.step.disabled { 
    opacity: 0.5; 
    pointer-events: none; 
}

select, input { 
    padding: 8px; 
    margin: 5px; 
    border: 1px solid #ccc; 
    border-radius: 3px; 
}

button { 
    padding: 10px 20px; 
    background: #f37021; 
    color: white; 
    border: none; 
    border-radius: 3px; 
    cursor: pointer; 
}

button:hover { 
    background: #d15a0a; 
}

/* Override hover for tab buttons */
.tab-nav button:hover,
.sub-tab-nav button:hover {
    background: #e9ecef;
}

.tab-nav button.active:hover {
    background: #fff;
}

.sub-tab-nav button:hover {
    background: #ffe0b3;
}

.sub-tab-nav button.active:hover {
    background: #fff;
}

button:disabled { 
    background: #ccc; 
    cursor: not-allowed; 
}

.btn-primary { 
    background: #007cba !important; 
}

.btn-primary:hover { 
    background: #005a87 !important; 
}

.inverter-list { 
    max-height: 200px; 
    overflow-y: scroll; 
    border: 1px solid #ddd; 
    padding: 10px; 
    background-color: #ffffff; 
}

.inverter-item { 
    margin: 5px 0; 
}

.results { 
    margin-top: 20px; 
}

.result-item { 
    padding: 10px; 
    margin: 5px 0; 
    border: 1px solid #ddd; 
    border-radius: 3px; 
}

.loading { 
    display: none; 
    color: #666; 
}

.error { 
    color: red; 
}

.success { 
    color: green; 
}

sub { 
    font-size: 0.6em; 
}

.tooltip { 
    position: relative; 
    display: inline-block; 
    cursor: help; 
    color: #007cba; 
    margin-left: 5px; 
    font-weight: bold; 
    font-size: 1.2em; 
}

.tooltip .tooltiptext { 
    visibility: hidden; 
    width: 400px; 
    background-color: #f0f8ff; 
    color: #333; 
    text-align: left; 
    border-radius: 6px; 
    padding: 12px; 
    position: absolute; 
    z-index: 1; 
    bottom: 125%; 
    left: 50%; 
    margin-left: -200px; 
    border: 1px solid #007cba; 
    font-size: 13px; 
    line-height: 1.5; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
    font-weight: normal; 
}

.tooltip .tooltiptext::after { 
    content: ""; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    margin-left: -5px; 
    border-width: 5px; 
    border-style: solid; 
    border-color: #007cba transparent transparent transparent; 
}

.tooltip:hover .tooltiptext { 
    visibility: visible; 
}

.step-info { 
    background: #ffe5cc; 
    padding: 12px 15px; 
    margin: 10px 0 20px 0; 
    border-radius: 3px; 
    border-left: 3px solid #ff8c00; 
    cursor: pointer; 
}

.step-info-content { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease; 
}

.step-info-content.expanded { 
    max-height: 1000px; 
}

.step-info-toggle { 
    font-weight: bold; 
    color: #ff8c00; 
    user-select: none; 
}

.step-info-toggle::before { 
    content: "▶ "; 
    display: inline-block; 
    transition: transform 0.3s ease; 
}

.step-info-toggle.expanded::before { 
    transform: rotate(90deg); 
}

.step2-grid { 
    display: flex; 
    gap: 30px; 
    flex-wrap: wrap; 
}

.step2-grid > div { 
    flex: 1; 
    min-width: 400px; 
}

.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin: 20px 0 0 0;
}

.tab {
    padding: 10px 20px;
    background: #fff3cd;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    margin-right: 2px;
    border-radius: 5px 5px 0 0;
}

.tab.active {
    background: #fff3cd;
    border-bottom: 2px solid #fff3cd;
    margin-bottom: -2px;
}

/* Light blue for specific tabs */
.tab:first-child {
    background: #e6f3ff;
}

.tab:first-child.active {
    background: #e6f3ff;
    border-bottom: 2px solid #e6f3ff;
}

.tab-content {
    display: none;
    padding: 0;
    background: #fff3cd;
}

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

/* Light blue background for first tab content */
#compatibilityTab {
    background: #e6f3ff;
}

/* Yellow background for other tab contents */
#temperatureTab {
    background: #fff3cd;
}

/* Step 2 Results Tab System */
.tab-container {
    margin: 20px 0;
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin: 0 0 0 0;
}

.tab-nav button {
    padding: 10px 20px;
    background: #fff3cd;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    margin-right: 2px;
    border-radius: 5px 5px 0 0;
    color: #333;
}

.tab-nav button.active {
    background: #fff3cd;
    border-bottom: 2px solid #fff3cd;
    margin-bottom: -2px;
    z-index: 1;
    position: relative;
}

/* Light blue for Compatible Combinations tab (first button) */
.tab-nav button:first-child {
    background: #e6f3ff;
}

.tab-nav button:first-child.active {
    background: #e6f3ff;
    border-bottom: 2px solid #e6f3ff;
}

/* Yellow for KPI descriptions tab (second button) */
.tab-nav button:nth-child(2) {
    background: #fff3cd;
}

.tab-nav button:nth-child(2).active {
    background: #fff3cd;
    border-bottom: 2px solid #fff3cd;
}

.tab-nav button:hover {
    background: #e9ecef;
}

.tab-nav button.active:hover {
    background: #fff;
}

.tab-pane {
    display: none;
    padding: 0;
    background: #fff3cd;
}

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

/* Light blue background for first tab pane (Compatible Combinations) */
#tab-combinations {
    background: #e6f3ff;
}

/* Yellow background for KPI descriptions tab */
#tab-kpi {
    background: #fff3cd;
}

/* Yellow background for other tab panes */
#tab-overview,
#tab-weather,
#tab-config {
    background: #fff3cd;
}

/* Sub-tabs for plots */
.sub-tab-container {
    margin: 20px 0;
}

.sub-tab-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin: 0 0 0 0;
}

.sub-tab-nav button {
    padding: 8px 16px;
    background: #e6e6fa;
    border: 1px solid #9370db;
    border-bottom: none;
    cursor: pointer;
    margin-right: 2px;
    border-radius: 5px 5px 0 0;
    color: #000;
    font-size: 14px;
}

.sub-tab-nav button.active {
    background: #e6e6fa;
    border-bottom: 2px solid #e6e6fa;
    margin-bottom: -2px;
    z-index: 1;
    position: relative;
    color: #000;
    font-weight: bold;
}

.sub-tab-nav button:hover {
    background: #dda0dd;
}

.sub-tab-nav button.active:hover {
    background: #e6e6fa;
}

.sub-tab-pane {
    display: none;
    padding: 20px;
    background: #e6e6fa;
    border-radius: 0 0 5px 5px;
    text-align: center;
}

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

/* Center Plotly charts */
#sankeyPlotDiv {
    display: flex;
    justify-content: center;
    align-items: center;
}