.auto-transcode-modal { width: 95%; max-width: 1040px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.auto-transcode-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.auto-transcode-header p { margin: 5px 0 0; color: #718096; font-size: 13px; }
.auto-transcode-body { padding: 24px; min-height: 0; overflow: auto; }
.auto-transcode-control { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; background: #f5f7fe; border: 1px solid #dfe5f5; border-radius: 12px; }
.auto-transcode-control strong { color: #27364d; font-size: 15px; }
.auto-transcode-control p { margin: 6px 0 0; color: #718096; font-size: 12px; line-height: 1.65; }
.auto-transcode-switch { flex-shrink: 0; }
.auto-transcode-switch input:checked + .slider { background: #5263c7; }
.auto-transcode-switch input:focus-visible + .slider { outline: 3px solid #5263c750; outline-offset: 3px; }
.transcription-cost-card { margin-top: 20px; padding: 18px 20px; border: 1px solid #dfe5f5; border-radius: 12px; background: linear-gradient(135deg, #f8f9ff, #f4fbff); }
.transcription-cost-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.transcription-cost-heading h4 { margin: 0; color: #27364d; font-size: 15px; }
.transcription-cost-heading p, #transcriptionMonthlyCost > p { margin: 5px 0 0; color: #718096; font-size: 12px; line-height: 1.55; }
.transcription-cost-heading label { display: flex; align-items: center; gap: 8px; color: #667085; font-size: 12px; font-weight: 600; white-space: nowrap; }
.transcription-cost-heading input { min-height: 36px; margin: 0; padding: 6px 9px; border: 1px solid #d6deea; border-radius: 8px; color: #344054; background: #fff; font: inherit; }
.transcription-cost-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.transcription-cost-grid > span { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px #3440540d; }
.transcription-cost-grid small { color: #718096; font-size: 11px; }
.transcription-cost-grid strong { color: #27364d; font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.transcription-cost-grid .transcription-cost-primary strong { color: #5263c7; font-size: 22px; }
.auto-transcode-list-heading { margin: 24px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auto-transcode-list-heading h4 { margin: 0 0 5px; font-size: 15px; }
.auto-transcode-list-heading span, .auto-transcode-pagination { font-size: 12px; color: #718096; }
.auto-transcode-list-heading input { width: 230px; max-width: 100%; min-height: 38px; margin: 0; padding: 8px 12px; border: 1px solid #d6deea; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; appearance: none; }
.auto-transcode-table-wrap { overflow-x: auto; border: 1px solid #e3e8f0; border-radius: 10px; }
.auto-transcode-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.auto-transcode-table th { text-align: left; font-size: 12px; color: #738096; font-weight: 600; padding: 12px 16px; background: #f8fafc; }
.auto-transcode-table th:first-child { width: 58%; }

.auto-transcode-table td { padding: 16px; vertical-align: top; border-top: 1px solid #edf0f5; line-height: 1.6; overflow-wrap: anywhere; }
.auto-transcode-table tbody tr:hover { background: #fcfdff; }
.auto-transcode-folder { display: flex; align-items: flex-start; gap: 8px; color: #27364d; padding-left: calc(var(--folder-depth, 0) * 18px); }
.auto-transcode-folder > .icon { color: #7583b5; flex-shrink: 0; margin-top: 3px; }
.auto-transcode-folder strong { font-weight: 500; }
.auto-transcode-toggle { width: 100%; border: 0; background: transparent; font: inherit; line-height: inherit; text-align: left; padding-top: 0; padding-right: 0; padding-bottom: 0; cursor: pointer; border-radius: 4px; }
.auto-transcode-toggle:hover { color: #5263c7; }
.auto-transcode-toggle:focus-visible { outline: 2px solid #5263c7; outline-offset: 5px; }
.auto-transcode-chevron { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; }
.auto-transcode-branch { background: #fafbfe; }
.auto-transcode-branch strong { font-weight: 600; }
.auto-transcode-counts { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; font-variant-numeric: tabular-nums; color: #65728a; }
.auto-transcode-counts > span { white-space: nowrap; }
.auto-transcode-counts b { font-weight: 600; }
.auto-transcode-counts .count-done { color: #168264; }
.auto-transcode-counts .count-pending { color: #917020; }
.auto-transcode-counts .count-separator { color: #bdc5d3; }
.auto-transcode-table th:last-child { text-align: right; }
.auto-transcode-counting-note { color: #8792a4; font-size: 12px; line-height: 1.6; margin: 0 0 14px; }
.auto-transcode-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.auto-transcode-pagination > div { display: flex; gap: 8px; }
.auto-transcode-error { color: #b73e3e; font-size: 13px; padding: 10px 12px; background: #fff3f3; border-radius: 8px; }
.auto-transcode-table .auto-transcode-empty { text-align: center; color: #8792a4; padding: 40px 16px; }
.processing-manual, .processing-task-section { margin-top: 20px; padding: 18px 20px; border: 1px solid #e3e8f0; border-radius: 12px; background: #fff; transition: opacity .2s, background .2s; }
.processing-manual.is-disabled { opacity: .52; background: #f8fafc; }
.processing-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.processing-section-heading h4, .processing-task-section h4 { margin: 0; color: #27364d; font-size: 15px; }
.processing-section-heading p { margin: 5px 0 0; color: #718096; font-size: 12px; line-height: 1.55; }
.processing-form-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr); gap: 18px; align-items: end; }
.processing-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #475467; font-size: 12px; font-weight: 600; }
.processing-field select { width: 100%; min-height: 42px; margin: 0; }
.processing-category-picker { position: relative; width: 100%; font-weight: 400; }
.processing-category-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d6deea; border-radius: 8px; color: #344054; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.processing-category-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.processing-category-trigger:hover { border-color: #aeb9dc; }
.processing-category-trigger:focus-visible { outline: 3px solid #5263c730; border-color: #5263c7; }
.processing-category-trigger:disabled { color: #98a2b3; background: #f2f4f7; cursor: not-allowed; }
.processing-category-panel { margin-top: 8px; overflow: hidden; border: 1px solid #dfe5f0; border-radius: 10px; background: #fff; box-shadow: 0 10px 28px #3440541c; }
.processing-category-toolbar { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid #edf0f5; background: #f8f9fc; }
.processing-category-toolbar input { flex: 1; min-width: 0; height: 34px; margin: 0; padding: 7px 10px; border: 1px solid #d6deea; border-radius: 7px; font: inherit; }
.processing-category-toolbar button { flex-shrink: 0; padding: 6px 10px; border: 1px solid #d6deea; border-radius: 7px; color: #5263c7; background: #fff; font: inherit; cursor: pointer; }
.processing-category-tree { max-height: 300px; overflow: auto; padding: 7px; overscroll-behavior: contain; }
.processing-category-group + .processing-category-group { margin-top: 7px; padding-top: 7px; border-top: 1px solid #edf0f5; }
.processing-category-group-label { padding: 5px 8px; color: #8792a4; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.processing-category-row { display: flex; align-items: center; padding-left: calc(var(--processing-category-depth, 0) * 18px); border-radius: 7px; }
.processing-category-row:hover { background: #f4f6fb; }
.processing-category-row.is-selected { background: #eef1ff; }
.processing-category-toggle { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 34px; padding: 0; border: 0; color: #7d89a0; background: transparent; cursor: pointer; }
.processing-category-toggle.is-empty { cursor: default; }
.processing-category-choice { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 36px; padding: 6px 8px 6px 2px; border: 0; color: #344054; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.processing-category-choice > .icon { flex-shrink: 0; color: #7583b5; }
.processing-category-choice > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.processing-category-choice > small { flex-shrink: 0; color: #98a2b3; font-size: 11px; font-variant-numeric: tabular-nums; }
.processing-category-row.is-selected .processing-category-choice { color: #4353b6; font-weight: 600; }
.processing-category-empty { padding: 28px 16px; color: #8792a4; text-align: center; font-size: 12px; }
.processing-bitrates { flex-direction: row; align-items: center; flex-wrap: wrap; min-height: 42px; margin: 0; padding: 5px 8px; border: 1px solid #d6deea; border-radius: 8px; }
.processing-bitrates legend { float: left; width: auto; padding: 0 5px; }
.processing-bitrates label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: #344054; border-radius: 6px; background: #f5f7fe; cursor: pointer; font-weight: 500; }
.processing-bitrates input { margin: 0; accent-color: #5263c7; }
.processing-selection-hint { margin: 12px 0 0; color: #718096; font-size: 12px; line-height: 1.55; }
.processing-action-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 15px; border-top: 1px solid #edf0f5; }
.processing-action-row > span { color: #718096; font-size: 12px; line-height: 1.55; }
.processing-action-row .btn { flex-shrink: 0; }
.processing-task-section > h4 { margin-bottom: 14px; }
.processing-empty { padding: 24px 16px; color: #8792a4; border: 1px dashed #d8deea; border-radius: 9px; text-align: center; font-size: 13px; }
.processing-task-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #667085; font-size: 12px; }
.processing-task-heading > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.processing-task-heading strong { color: #27364d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.processing-status { padding: 4px 8px; border-radius: 999px; color: #5263c7; background: #eef1ff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.processing-status.running, .processing-status.scheduled { color: #936819; background: #fff7db; }
.processing-status.completed { color: #157f63; background: #e8faf4; }
.processing-status.failed, .processing-status.partial { color: #b33a3a; background: #fff0f0; }
.processing-progress { height: 7px; margin-top: 15px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.processing-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #667eea, #7c55bd); transition: width .25s; }
.processing-task-counts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: #718096; font-size: 12px; }
.processing-task-counts b { color: #344054; font-variant-numeric: tabular-nums; }
.processing-task-section p, #directoryTranscriptionSummary > p { margin: 12px 0 0; color: #718096; font-size: 12px; line-height: 1.55; }
.processing-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.processing-summary-grid > span { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 9px; background: #f7f8fc; }
.processing-summary-grid small { color: #718096; font-size: 11px; }
.processing-summary-grid strong { color: #27364d; font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .auto-transcode-body { padding: 16px; }
    .auto-transcode-control { padding: 15px; gap: 16px; }
    .auto-transcode-list-heading { align-items: stretch; flex-direction: column; }
    .auto-transcode-list-heading input { width: 100%; }
    .auto-transcode-table thead { display: none; }
    .auto-transcode-table tr, .auto-transcode-table td { display: block; width: 100%; }
    .auto-transcode-table td { padding: 14px 12px; }
    .auto-transcode-table td + td { border-top: none; padding-top: 0; }
    .auto-transcode-folder { padding-left: calc(var(--folder-depth, 0) * 12px); }
    .auto-transcode-counts { justify-content: flex-start; padding-left: calc(24px + var(--folder-depth, 0) * 12px); }
    .processing-form-grid { grid-template-columns: 1fr; }
    .processing-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .transcription-cost-heading { align-items: stretch; flex-direction: column; }
    .transcription-cost-heading label { justify-content: space-between; }
    .transcription-cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .processing-action-row { align-items: stretch; flex-direction: column; }
    .processing-action-row .btn { width: 100%; }
}
