.report-center { min-height: 100%; }
.report-scope { width: 100%; min-height: 50px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 10px; text-align: left; background: var(--surface); }
.report-scope > span { display: flex; align-items: center; gap: 8px; }
.report-scope > span:first-child { min-width: 0; }
.report-scope > span:last-child { flex: 0 0 auto; color: var(--primary); font-size: 8px; font-weight: 700; }
.report-scope .icon { width: 15px; color: var(--muted); }
.report-scope > span:first-child > .icon { width: 28px; height: 28px; padding: 6px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); }
.report-scope small, .report-scope strong { display: block; }
.report-scope small { color: var(--muted); font-size: 7px; }
.report-scope strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-toolbar { margin: 10px 0; display: flex; align-items: center; gap: 7px; }
.report-toolbar > .search-field { min-width: 0; flex: 1; }
.report-toolbar > button { min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.report-toolbar > button.is-active { color: var(--primary); border-color: #93c5fd; background: var(--primary-soft); }
.report-toolbar > button .icon { width: 13px; }
.report-toolbar > button b { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-size: 7px; }
.report-selection-bar { margin-bottom: 10px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #fecaca; border-radius: 9px; background: #fff7f7; }
.report-selection-bar strong { color: var(--danger); font-size: 9px; }
.report-selection-bar > span { display: flex; align-items: center; gap: 6px; }
.report-selection-bar button { min-height: 31px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.report-selection-bar .icon { width: 12px; }
.report-master-detail { min-height: 0; display: grid; }
.report-list-panel, .report-preview-panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.report-list-panel > header { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.report-list-panel > header > span { display: flex; align-items: center; gap: 8px; }
.report-list-panel > header strong { font-size: 10px; }
.report-list-panel > header small { color: var(--muted); font-size: 8px; }
.report-check { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 5px; color: white; background: var(--surface); }
.report-check.is-selected { border-color: var(--primary); background: var(--primary); }
.report-check:disabled { border-color: var(--border); background: var(--surface-subtle); opacity: .55; }
.report-check .icon { width: 12px; }
.report-table-head { display: none; }
.report-row { min-height: 94px; padding: 9px 8px; display: grid; grid-template-columns: 20px minmax(0, 1fr) 28px; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); content-visibility: auto; contain-intrinsic-size: 0 94px; }
.report-row:last-child { border-bottom: 0; }
.report-row:hover, .report-row.is-active { background: var(--surface-subtle); }
.report-row-main { min-width: 0; display: grid; gap: 5px; text-align: left; }
.report-row-main > span, .report-row-main > time { min-width: 0; }
.report-row-title strong, .report-row-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row-title strong { font-size: 10px; }
.report-row-title small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.report-row-params b, .report-row-params small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row-params b { color: var(--text); font-size: 8px; font-weight: 500; }
.report-row-params small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.report-row-source { display: flex; align-items: center; gap: 6px; }
.report-row-source em, .report-preview-card header em { padding: 3px 5px; border-radius: 5px; color: var(--text); background: var(--surface-subtle); font-size: 7px; font-style: normal; }
.report-row-source em.is-automation, .report-preview-card header em.is-automation { color: var(--primary); background: var(--primary-soft); }
.report-row-source small { color: var(--muted); font-size: 7px; }
.report-row-main time { color: var(--muted); font-size: 7px; }
.report-row-more { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); }
.report-row-more:hover { background: var(--surface); }
.report-row-more .icon { width: 15px; }
.report-empty, .report-preview-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); }
.report-empty strong, .report-preview-empty strong { color: var(--text); font-size: 10px; }
.report-empty span { font-size: 8px; }
.report-preview-empty .icon { width: 28px; height: 28px; }
.report-list-footer { min-height: 46px; padding: 7px 9px; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--border); }
.report-phone-more { min-height: 30px; padding: 0 10px; font-size: 8px; }
.report-phone-more:disabled { color: var(--muted); border-color: transparent; }
.report-pagination { display: none; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.report-pagination label { display: flex; align-items: center; gap: 4px; }
.report-pagination select { height: 27px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 8px; }
.report-pagination button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; }
.report-pagination button:disabled { opacity: .35; }
.report-pagination .icon { width: 12px; }
.report-preview-panel { display: none; overflow-y: auto; }
.report-preview-card > header { padding: 13px; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--border); }
.report-preview-card > header > div { min-width: 0; flex: 1; }
.report-preview-card h2 { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
.report-preview-card header p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.report-preview-card header > button { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
.report-preview-meta { padding: 10px 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; border-bottom: 1px solid var(--border); }
.report-preview-meta > span { padding: 8px; border-radius: 7px; background: var(--surface-subtle); }
.report-preview-meta small, .report-preview-meta strong { display: block; }
.report-preview-meta small { color: var(--muted); font-size: 7px; }
.report-preview-meta strong { margin-top: 4px; font-size: 9px; }
.report-preview-content { padding: 12px 13px; }
.report-preview-content h3 { margin: 0 0 9px; font-size: 10px; }
.report-preview-content > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.report-preview-content > div > span { min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 7px; }
.report-preview-content small, .report-preview-content strong, .report-preview-content em { display: block; }
.report-preview-content small { color: var(--muted); font-size: 6px; }
.report-preview-content strong { margin-top: 5px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-preview-content em { margin-top: 4px; color: var(--success); font-size: 7px; font-style: normal; }
.report-preview-content em.is-negative { color: var(--danger); }
.report-preview-content p { margin: 10px 0 0; color: var(--text); font-size: 8px; line-height: 1.6; }
.report-preview-warning { margin: 13px; padding: 12px; border: 1px solid #fed7aa; border-radius: 8px; color: var(--warning); background: #fffaf5; font-size: 9px; }
.report-preview-card > footer { position: sticky; bottom: 0; padding: 9px 12px; display: flex; justify-content: flex-end; gap: 7px; border-top: 1px solid var(--border); background: var(--surface); }
.report-preview-card > footer button { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.report-preview-card > footer .icon { width: 12px; }

.report-sheet-options, .report-action-list, .report-download-list { display: grid; gap: 6px; }
.report-sheet-options > button, .report-action-list > button, .report-download-list > button { width: 100%; min-height: 58px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 9px; text-align: left; }
.report-sheet-options button > span, .report-action-list button > span, .report-download-list button > span { min-width: 0; flex: 1; }
.report-sheet-options strong, .report-sheet-options small, .report-action-list strong, .report-action-list small, .report-download-list strong, .report-download-list small { display: block; }
.report-sheet-options strong, .report-action-list strong, .report-download-list strong { font-size: 11px; }
.report-sheet-options small, .report-action-list small, .report-download-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.report-sheet-options .icon, .report-action-list .icon, .report-download-list .icon { width: 15px; color: var(--muted); }
.report-sheet-options button.is-selected { border-color: #93c5fd; background: var(--primary-soft); }
.report-sheet-options button.is-selected > .icon { color: var(--primary); }
.report-action-list button > .icon:first-child, .report-download-list button > .icon:first-child { width: 30px; height: 30px; padding: 7px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); }
.report-action-list button.is-danger strong, .report-action-list button.is-danger > .icon:last-child { color: var(--danger); }
.report-action-list button.is-danger > .icon:first-child { color: var(--danger); background: #fef2f2; }
.report-filter-form { display: grid; gap: 11px; }
.report-filter-form .field { margin: 0; }
.report-filter-form > div { margin-top: 3px; display: flex; justify-content: flex-end; gap: 7px; }
.report-filter-form > div button { min-height: 34px; padding: 0 12px; font-size: 9px; }
.report-filter-form > div button:first-child { color: var(--muted); }
.report-delete-confirm, .report-delete-result, .report-unsaved { text-align: center; }
.report-delete-confirm > span, .report-delete-result > span, .report-unsaved > span { width: 42px; height: 42px; margin: auto; display: grid; place-items: center; border-radius: 50%; color: var(--danger); background: #fef2f2; }
.report-delete-result > span, .report-unsaved > span { color: var(--primary); background: var(--primary-soft); }
.report-delete-confirm > span .icon, .report-delete-result > span .icon, .report-unsaved > span .icon { width: 20px; }
.report-delete-confirm h3, .report-delete-result h3, .report-unsaved h3 { margin: 11px 0 6px; font-size: 15px; }
.report-delete-confirm p, .report-delete-result p, .report-unsaved p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.report-delete-confirm > div, .report-unsaved > div { margin-top: 15px; display: flex; justify-content: center; gap: 7px; }
.report-delete-confirm button, .report-unsaved button { min-height: 34px; padding: 0 11px; font-size: 8px; }
.report-delete-result > div { max-height: 150px; margin-top: 10px; padding: 8px; display: grid; gap: 5px; overflow-y: auto; border-radius: 8px; background: var(--surface-subtle); text-align: left; }
.report-delete-result > div span { font-size: 8px; }
.report-delete-result > button { width: 100%; min-height: 35px; margin-top: 13px; }

.report-detail-page { min-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.report-detail-toolbar { min-height: 56px; padding: 9px 11px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.report-detail-toolbar > span { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.report-detail-toolbar > div { display: flex; gap: 6px; }
.report-detail-toolbar > div button { min-height: 31px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 8px; }
.report-detail-toolbar > div .icon { width: 12px; }
.report-detail-toolbar button:disabled { opacity: .5; }
.report-detail-scroll { min-height: 0; padding: 12px; overflow-y: auto; background: var(--surface-subtle); }
.report-detail-heading { max-width: 820px; margin: 0 auto 10px; padding: 11px; display: grid; gap: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.report-detail-heading > div small, .report-detail-heading > div strong { display: block; }
.report-detail-heading > div small { color: var(--muted); font-size: 7px; }
.report-detail-heading > div strong { margin-top: 4px; font-size: 9px; }
.report-detail-heading .field { margin: 0; }
.report-document { max-width: 820px; margin: auto; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.report-document > header { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.report-document > header h1 { margin: 0; font-size: 19px; line-height: 1.4; }
.report-document > header > div { margin-top: 8px; display: flex; gap: 7px; flex-wrap: wrap; }
.report-document > header > div > span { padding: 4px 6px; border-radius: 5px; color: var(--muted); background: var(--surface-subtle); font-size: 7px; }
.report-document > header > div > span small, .report-document > header > div > span strong { display: inline; font-size: inherit; }
.report-detail-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.report-detail-section:last-child { border-bottom: 0; }
.report-detail-section > header { min-height: 34px; display: flex; align-items: center; gap: 7px; }
.report-detail-section > header > button:first-child { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.report-detail-section > header > button:first-child .icon { width: 12px; transform: rotate(90deg); transition: transform .15s; }
.report-detail-section.is-collapsed > header > button:first-child .icon { transform: rotate(0); }
.report-detail-section > header h3 { min-width: 0; flex: 1; margin: 0; font-size: 14px; }
.report-detail-section > header > span { color: var(--muted); font-size: 7px; }
.report-detail-section > header > .secondary-button { min-height: 29px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 8px; }
.report-detail-section > header > .secondary-button .icon { width: 11px; }
.report-detail-section > header > div { display: flex; gap: 5px; }
.report-detail-section > header > div button { min-height: 29px; padding: 0 8px; font-size: 8px; }
.report-detail-section.is-collapsed .report-detail-blocks { display: none; }
.report-detail-blocks { padding-left: 31px; }
.report-detail-block { padding: 12px 0; }
.report-detail-block h4 { margin: 0 0 7px; font-size: 10px; }
.report-detail-block p { margin: 0; color: var(--text); font-size: 9px; line-height: 1.75; white-space: pre-wrap; }
.report-detail-block > input, .report-detail-block > textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 9px; }
.report-detail-block > input { margin-bottom: 8px; font-weight: 700; }
.report-detail-block > textarea { resize: vertical; line-height: 1.65; }
.report-detail-block.is-editing { padding: 10px; border-radius: 8px; background: var(--surface-subtle); }
.report-detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.report-detail-metrics > span { min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: 8px; }
.report-detail-metrics small, .report-detail-metrics strong, .report-detail-metrics em { display: block; }
.report-detail-metrics small { color: var(--muted); font-size: 7px; }
.report-detail-metrics strong { margin-top: 5px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-detail-metrics em { margin-top: 4px; color: var(--success); font-size: 7px; font-style: normal; }
.report-detail-metrics em.is-negative { color: var(--danger); }
.report-detail-chart { height: 130px; padding: 15px 10px 0; display: flex; align-items: flex-end; gap: 9px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, transparent 49%, var(--border) 50%, transparent 51%); }
.report-detail-chart i { flex: 1; border-radius: 4px 4px 0 0; background: #93c5fd; }
.report-detail-warning { max-width: 820px; margin: auto; padding: 18px; display: grid; gap: 6px; border: 1px solid #fed7aa; border-radius: 10px; background: #fffaf5; }
.report-detail-warning strong { font-size: 11px; }
.report-detail-warning span { color: var(--muted); font-size: 9px; }

@media (min-width: 768px) {
  .device-pad .report-master-detail { grid-template-columns: minmax(500px, 1.2fr) minmax(300px, .8fr); gap: 12px; }
  .device-pad .report-preview-panel { display: block; }
  .device-pad .report-table-head { min-height: 32px; padding: 0 44px 0 38px; display: grid; grid-template-columns: minmax(145px, 1fr) 145px 90px 85px 28px; align-items: center; gap: 8px; color: var(--muted); background: var(--surface-subtle); font-size: 7px; }
  .device-pad .report-row { min-height: 70px; contain-intrinsic-size: 0 70px; }
  .device-pad .report-row-main { grid-template-columns: minmax(145px, 1fr) 145px 90px 85px; align-items: center; gap: 8px; }
  .device-pad .report-list-footer { justify-content: flex-end; }
  .device-pad .report-phone-more { display: none; }
  .device-pad .report-pagination { display: flex; }
  .device-pad .report-detail-heading { grid-template-columns: 1fr 1.5fr; align-items: end; }
}

@media (max-width: 767px) {
  .device-phone .report-detail-toolbar > span { display: none; }
  .device-phone .report-detail-toolbar > div button { padding: 0 7px; }
  .device-phone .report-document { padding: 14px; }
  .device-phone .report-detail-blocks { padding-left: 0; }
  .device-phone .report-detail-section > header { flex-wrap: wrap; }
  .device-phone .report-detail-section > header > div { width: 100%; justify-content: flex-end; }
  .device-phone .report-unsaved > div { flex-wrap: wrap; }
}
