#hub-analysis-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: #f8f9fa;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    border-left: 2px solid #ccc;
    transition: right 0.3s;
    z-index: 100;
}

#hub-analysis-panel.hidden {
    right: -320px;
}

#hub-analysis-panel h2 {
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
}

.ha-mode-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    background: white;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

.ha-mode-tab {
    flex: 1;
    padding: 8px 10px;
    text-align: center;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    background: white;
}

.ha-mode-tab:hover {
    color: #333;
    background: #f8f9fa;
}

.ha-mode-tab.active {
    color: #333;
    border-bottom-color: #333;
    font-weight: bold;
}

.ha-mode-pane {
    display: none;
}

.ha-mode-pane.active {
    display: block;
}

.ha-helper {
    margin-top: 4px;
    font-size: 10px;
    color: #666;
    line-height: 1.4;
}

.ha-file-input {
    width: 100%;
    font-size: 11px;
}

.ha-file-meta {
    margin-top: 6px;
    font-size: 10px;
    color: #666;
    line-height: 1.4;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 6px;
}

.ha-file-meta strong {
    color: #333;
}

.ha-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ha-summary-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
}

.ha-summary-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.ha-summary-label {
    margin-top: 3px;
    font-size: 10px;
    color: #666;
}

.ha-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.ha-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f4fc;
    border: 1px solid #b8d4e8;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
}

.ha-chip-muted {
    background: #f3f4f6;
    border-color: #ddd;
}

.ha-section-note {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.ha-list-item {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 7px 8px;
    font-size: 11px;
}

.ha-list-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-weight: bold;
    color: #333;
}

.ha-list-subtitle {
    margin-top: 4px;
    color: #666;
    font-size: 10px;
    line-height: 1.4;
}

.ha-inline-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.ha-inline-actions .az-btn,
.ha-inline-actions .opt-run-btn {
    margin-top: 0;
}

.ha-empty {
    color: #999;
    font-size: 11px;
    text-align: center;
    padding: 14px 10px;
    font-style: italic;
}

.ha-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.ha-table th,
.ha-table td {
    border-bottom: 1px solid #eee;
    padding: 4px 3px;
    text-align: left;
}

.ha-table th:last-child,
.ha-table td:last-child {
    text-align: right;
}

.ha-table-scroll {
    max-height: 220px;
    overflow: auto;
}

.ha-warning {
    background: #fff3e0;
    border: 1px solid #f0d7a8;
    color: #8a5a00;
    border-radius: 4px;
    padding: 8px;
    font-size: 10px;
    line-height: 1.4;
}

.ha-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    border-radius: 4px;
    padding: 8px;
    font-size: 10px;
    line-height: 1.4;
}

.ha-divider {
    border-top: 1px solid #eee;
    margin: 10px 0;
}

@media (max-width: 900px) {
    #hub-analysis-panel {
        position: fixed;
        top: 0;
        bottom: 50px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border-left: none;
        z-index: 500;
        transform: translateY(0);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #hub-analysis-panel.hidden {
        right: 0;
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    #hub-analysis-panel h2 {
        padding-right: 50px;
    }
}
