:root {
    --gap: 12px;
}

body {
    font-family: var(--vscode-font-family);
    font-size: 13px;
    color: var(--vscode-foreground);
    background: var(--vscode-sideBar-background);
    margin: 0;
    padding: 12px 14px 24px;
}

.hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.hd h1 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* 빌드 버전 배지 — 이 값이 보이면 새 빌드가 로딩된 것(검증 마커). */
.ver {
    font-size: 10px;
    font-weight: 600;
    color: var(--vscode-descriptionForeground);
    border: 1px solid var(--vscode-panel-border);
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 8px;
    vertical-align: middle;
}

.section {
    border: 1px solid var(--vscode-panel-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
    background: var(--vscode-editor-background);
}

.section h2 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.section.stub {
    opacity: 0.7;
}

/* ─── Tabs (카테고리 네비) ─── */
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;          /* 좁은 사이드뷰에서 자동 줄바꿈 */
    margin-bottom: 14px;
}
.tab {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--vscode-panel-border);
    background: transparent;
    color: var(--vscode-descriptionForeground);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.tab:hover {
    color: var(--vscode-foreground);
    background: var(--vscode-list-hoverBackground);
}
.tab.active {
    background: var(--vscode-button-background);
    color: var(--vscode-button-foreground);
    border-color: var(--vscode-button-background);
}
/* 비활성 탭 섹션 숨김 — DOM 에는 그대로 두고 표시만 끈다(JS refs/state 무영향). */
.section[hidden] {
    display: none !important;
}

.hint {
    color: var(--vscode-descriptionForeground);
    font-size: 11px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.row {
    margin-bottom: var(--gap);
}

.row label {
    display: block;
    font-size: 11px;
    color: var(--vscode-descriptionForeground);
    margin-bottom: 4px;
}

.row.toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vscode-foreground);
    font-size: 12px;
}

.input-group {
    display: flex;
    gap: 6px;
}

input[type="password"], input[type="text"] {
    flex: 1;
    padding: 6px 8px;
    background: var(--vscode-input-background);
    color: var(--vscode-input-foreground);
    border: 1px solid var(--vscode-input-border, transparent);
    border-radius: 4px;
    font-size: 12px;
    font-family: var(--vscode-editor-font-family);
}

input[type="checkbox"] {
    accent-color: var(--vscode-button-background);
}

button {
    padding: 6px 10px;
    border: 1px solid var(--vscode-button-border, transparent);
    border-radius: 4px;
    background: var(--vscode-button-background);
    color: var(--vscode-button-foreground);
    cursor: pointer;
    font-size: 12px;
}

button:hover { background: var(--vscode-button-hoverBackground); }

button.ghost {
    background: var(--vscode-button-secondaryBackground);
    color: var(--vscode-button-secondaryForeground);
}
button.ghost:hover { background: var(--vscode-button-secondaryHoverBackground); }

button.link {
    background: transparent;
    color: var(--vscode-textLink-foreground);
    border: none;
    padding: 4px 0;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
}
button.link:hover { color: var(--vscode-textLink-activeForeground); }

.status {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--vscode-descriptionForeground);
}

.status-inline {
    margin-left: 8px;
    font-size: 11px;
    color: var(--vscode-descriptionForeground);
}

.status-inline.ok { color: var(--vscode-charts-green, #4ec9b0); }

.error {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    background: var(--vscode-inputValidation-errorBackground);
    color: var(--vscode-inputValidation-errorForeground);
    border: 1px solid var(--vscode-inputValidation-errorBorder);
    font-size: 11px;
}

.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chips li {
    background: var(--vscode-badge-background);
    color: var(--vscode-badge-foreground);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chips .remove {
    cursor: pointer;
    opacity: 0.6;
}
.chips .remove:hover { opacity: 1; }

.empty {
    color: var(--vscode-descriptionForeground);
    font-size: 11px;
    font-style: italic;
}

.banner {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--vscode-inputValidation-warningBackground, #5a4a14);
    color: var(--vscode-inputValidation-warningForeground, #fff);
    border: 1px solid var(--vscode-inputValidation-warningBorder, transparent);
    font-size: 11px;
    line-height: 1.5;
}

.feedback {
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(78, 201, 176, 0.15);
    color: var(--vscode-charts-green, #4ec9b0);
    border: 1px solid rgba(78, 201, 176, 0.4);
    font-size: 11px;
}

.input-group.narrow input { max-width: 120px; }

.readout {
    padding: 6px 8px;
    background: var(--vscode-textCodeBlock-background);
    border-radius: 4px;
    font-family: var(--vscode-editor-font-family);
    font-size: 12px;
    word-break: break-all;
}

.section.stub {
    /* 5-A had this stub class; 5-B fills the sections so we no longer dim them. */
    opacity: 1;
}
