/* 聚焦文件面板 */
.sidebar.right-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--theme-surface-soft);
    transition:
        width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        min-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease,
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.right-sidebar .sidebar-header {
    padding: 16px 20px 8px;
    border-bottom: none;
    background: transparent;
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar.right-sidebar .sidebar-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--claude-text);
    margin: 0;
}

.focused-files {
    flex: 1 1 auto;
    padding: 10px 20px 20px;
    overflow-y: auto;
}

.approval-panel-body {
    flex: 1 1 auto;
    padding: 10px 20px 20px;
    overflow-y: auto;
}

.focus-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--claude-text);
    font-size: 20px;
    cursor: pointer;
}

.approval-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--claude-text);
    font-size: 20px;
    cursor: pointer;
}

.no-files {
    text-align: center;
    color: var(--claude-text-secondary);
    padding: 60px 20px;
    font-size: 14px;
}

.file-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-tab {
    border: 1px solid var(--claude-border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 28px rgba(61, 57, 41, 0.08);
}

.tab-header {
    background: var(--theme-chip-bg);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-bottom: 1px solid var(--claude-border);
}

.file-name {
    font-weight: 500;
    color: var(--claude-text);
}

.file-size {
    color: var(--claude-text-secondary);
    font-size: 12px;
}

.file-content {
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
}

.file-content pre {
    margin: 0;
    padding: 16px;
}

.file-content code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #1f2227;
}

.tool-approval-panel .approval-panel-body {
    padding-top: 14px;
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.approval-card {
    border: 1px solid var(--claude-border);
    border-radius: 12px;
    background: var(--theme-surface-soft);
    box-shadow: var(--theme-shadow-soft);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.approval-card__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--claude-text);
}

.approval-card__summary {
    font-size: 12px;
    color: var(--claude-text-secondary);
}

.approval-path {
    font-size: 12px;
    color: var(--claude-text-secondary);
    word-break: break-all;
}

.approval-lines {
    margin: 0;
    padding: 8px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.45;
    overflow: auto;
    max-height: 200px;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--theme-surface-muted);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.approval-lines::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.approval-diff {
    margin-top: 12px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.01);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.approval-diff::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.approval-kv {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--claude-text-secondary);
    background: var(--theme-surface-muted);
    border: 1px solid var(--theme-control-border);
    border-radius: 8px;
    padding: 8px;
}

.approval-kv strong {
    white-space: nowrap;
}

.approval-value {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.approval-note {
    padding: 6px 8px;
    font-size: 11px;
    color: var(--claude-text-secondary);
}

.approval-lines--old {
    background: color-mix(in srgb, var(--claude-warning) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--claude-warning) 50%, transparent);
}

.approval-lines--new {
    background: color-mix(in srgb, var(--claude-success) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--claude-success) 50%, transparent);
}

.approval-lines--cmd,
.approval-lines--generic {
    background: var(--theme-surface-muted);
}

.tool-approval-panel .diff-line {
    padding: 2px 4px;
    margin: 1px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tool-approval-panel .diff-remove {
    background: rgba(255, 0, 0, 0.1);
    color: #c00;
}

.tool-approval-panel .diff-add {
    background: rgba(0, 255, 0, 0.1);
    color: #0a0;
}

.approval-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.approval-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.approval-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.approval-btn--approve {
    color: var(--theme-surface-strong);
    background: var(--claude-success);
}

.approval-btn--switch {
    color: #fff;
    background: #dc2626;
}

.approval-btn--reject {
    color: var(--theme-surface-strong);
    background: var(--claude-accent-strong);
}
