.workspace.is-reports .view-switcher,
.workspace.is-reports .control-bar,
.workspace.is-reports .status-jump,
.workspace.is-reports .applied-filters,
.workspace.is-reports #create-task { display: none; }

.reports-view { min-height: 0; padding: 0 28px 24px; overflow-y: auto; }
.reports-shell { min-height: 100%; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 24px rgba(35,52,65,.045); overflow: visible; }
.reports-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.reports-tabs { min-width: 0; display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; background: #edf2f4; overflow-x: auto; scrollbar-width: none; }
.reports-tabs::-webkit-scrollbar { display: none; }
.reports-tabs button { height: 35px; flex: 0 0 auto; border: 0; border-radius: 8px; padding: 0 13px; background: transparent; color: #74818d; cursor: pointer; font-size: 10.5px; font-weight: 780; white-space: nowrap; }
.reports-tabs button:hover { color: #364551; }
.reports-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(37,52,64,.1); }
.reports-export { min-width: 148px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #b9d7d8; border-radius: 9px; padding: 0 12px; background: #edf7f7; color: var(--accent-dark); cursor: pointer; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.reports-export:hover { border-color: #8fc1c3; background: #e4f2f2; }
.reports-export:disabled { opacity: .45; cursor: default; }
.reports-export svg { width: 15px; height: 15px; }

.reports-filters { min-height: 68px; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfc; position: relative; z-index: 20; }
.reports-period { flex: 0 0 auto; display: flex; align-items: stretch; position: relative; }
.reports-period > button { min-height: 43px; border: 1px solid #d8e1e5; background: #fff; color: #667583; cursor: pointer; }
.reports-period > button:first-child { width: 35px; border-radius: 9px 0 0 9px; }
.reports-period > button:last-of-type { width: 35px; margin-left: -1px; border-radius: 0 9px 9px 0; }
.reports-period > button:first-child svg, .reports-period > button:last-of-type svg { width: 14px; height: 14px; }
.reports-period-trigger { min-width: 172px; display: grid; grid-template-columns: 1fr 15px; align-content: center; gap: 1px 8px; margin-left: -1px; padding: 5px 10px !important; text-align: left; }
.reports-period-trigger small, .reports-filter-select button small { display: block; color: #98a2ab; font-size: 8px; line-height: 1.2; font-weight: 780; text-transform: uppercase; letter-spacing: .06em; }
.reports-period-trigger strong, .reports-filter-select button strong { display: block; max-width: 190px; overflow: hidden; color: #344350; font-size: 10.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.reports-period-trigger svg { grid-column: 2; grid-row: 1 / span 2; width: 13px; height: 13px; align-self: center; transform: rotate(90deg); }
.reports-period > button:hover, .reports-filter-select > button:hover { background: #f5f8f9; }
.reports-filter-set { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; }
.reports-filter-select { min-width: 0; flex: 1; position: relative; }
.reports-filter-select > button { width: 100%; min-height: 43px; display: grid; grid-template-columns: minmax(0,1fr) 15px; align-items: center; gap: 8px; border: 1px solid #d8e1e5; border-radius: 9px; padding: 5px 10px; background: #fff; cursor: pointer; text-align: left; }
.reports-filter-select > button > span { min-width: 0; }
.reports-filter-select > button > svg { width: 13px; height: 13px; color: #7d8b96; transform: rotate(90deg); }
.reports-reset { flex: 0 0 auto; height: 39px; border: 0; border-radius: 8px; padding: 0 10px; background: transparent; color: #81909a; cursor: pointer; font-size: 10px; font-weight: 730; }
.reports-reset:hover { background: #eef3f4; color: #52616e; }
.reports-filter-menu { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0; display: none; max-height: 290px; overflow-y: auto; padding: 5px; border: 1px solid #d8e1e5; border-radius: 11px; background: #fff; box-shadow: 0 16px 35px rgba(31,49,61,.16); }
.reports-filter-menu.is-open { display: grid; }
.reports-filter-menu.is-wide { min-width: 280px; }
.reports-period-menu { right: auto; width: 242px; }
.reports-filter-menu button { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 7px; padding: 7px 9px; background: transparent; color: #52616e; cursor: pointer; text-align: left; font-size: 10.5px; }
.reports-filter-menu button:hover { background: #f2f6f7; }
.reports-filter-menu button.is-active { background: #eaf5f5; color: var(--accent-dark); font-weight: 780; }
.reports-filter-menu button svg { width: 14px; height: 14px; color: var(--accent); }
.reports-filter-person, .reports-filter-select strong.has-person { min-width: 0; display: flex; align-items: center; gap: 7px; }
.reports-filter-person > span:last-child, .reports-filter-select strong.has-person > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-avatar.report-filter-avatar { width: 23px; height: 23px; font-size: 7px; }

.reports-state { min-height: 260px; display: grid; place-items: center; color: #84919c; font-size: 12px; }
.reports-state[hidden] { display: none; }
.reports-content { padding: 17px; background: #f7f9fa; border-radius: 0 0 15px 15px; }
.reports-result-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 13px; }
.reports-result-card { min-width: 0; min-height: 238px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: #fff; }
.reports-result-card::after { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #8395a3; }
.reports-result-card.is-fact { border-color: #cde2d8; background: linear-gradient(135deg, #fff 35%, #f2f8f5 100%); }
.reports-result-card.is-fact::after { background: #4c9474; }
.reports-result-card.is-estimate { border-color: #d8e1e7; background: linear-gradient(135deg, #fff 40%, #f3f6f8 100%); }
.reports-result-card header { display: flex; align-items: center; gap: 11px; }
.reports-result-card header > span { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #e8f3ed; color: #428267; }
.reports-result-card.is-estimate header > span { background: #e9eef2; color: #6a8192; }
.reports-result-card header svg { width: 17px; height: 17px; }
.reports-result-card header div { min-width: 0; }
.reports-result-card header p { margin: 0; color: #34444f; font-size: 12px; font-weight: 820; }
.reports-result-card header small { display: block; margin-top: 3px; color: #87939d; font-size: 9.5px; line-height: 1.35; }
.reports-result-value { display: block; margin-top: 23px; font-size: clamp(30px,3.1vw,44px); line-height: 1; letter-spacing: -.055em; }
.reports-result-card.is-fact .reports-result-value { color: #2f7257; }
.reports-result-card.is-estimate .reports-result-value { color: #526879; }
.reports-result-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 21px; }
.reports-result-split > span { min-width: 0; padding: 10px 11px; border: 1px solid rgba(190,207,199,.65); border-radius: 10px; background: rgba(255,255,255,.68); }
.reports-result-card.is-estimate .reports-result-split > span { border-color: #dce3e7; }
.reports-result-split small { display: block; overflow: hidden; color: #85919b; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.reports-result-split b { display: block; margin-top: 4px; color: #34444f; font-size: 12px; }
.reports-caution, .reports-filter-note { margin: 12px 0 0; color: #8a754f; font-size: 9.5px; line-height: 1.4; }
.reports-filter-note { color: #647780; }

.reports-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 11px; }
.reports-metric-card { min-width: 0; min-height: 99px; display: grid; align-content: center; gap: 5px; position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px 13px; background: #fff; text-align: left; }
button.reports-metric-card { width: 100%; cursor: pointer; }
button.reports-metric-card:hover { border-color: #b8d4d6; box-shadow: 0 7px 18px rgba(35,52,65,.07); }
.reports-metric-card::before { content: ""; position: absolute; top: 13px; bottom: 13px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #9aa7af; }
.reports-metric-card.is-green::before { background: #4d936e; }
.reports-metric-card.is-blue::before { background: #5d74bf; }
.reports-metric-card.is-amber::before { background: #b68038; }
.reports-metric-card.is-red::before { background: #bd6565; }
.reports-metric-card > span { color: #778591; font-size: 9px; font-weight: 760; }
.reports-metric-card > strong { overflow: hidden; color: #293844; font-size: 19px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.reports-metric-card > small { overflow: hidden; color: #96a1aa; font-size: 8.8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.reports-insight-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(310px,.85fr); gap: 11px; margin-top: 11px; }
.reports-panel { min-width: 0; border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: #fff; }
.reports-panel > header, .reports-team-preview > header { min-height: 38px; display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.reports-panel h2 { margin: 0; color: #2c3a46; font-size: 13px; letter-spacing: -.015em; }
.reports-panel header p { margin: 4px 0 0; color: #8a96a0; font-size: 9.5px; }
.reports-status-list { display: grid; gap: 13px; }
.reports-status-row > span { display: flex; align-items: center; gap: 7px; color: #5b6a76; font-size: 10px; }
.reports-status-row > span i { width: 7px; height: 7px; border-radius: 50%; background: #8d9aa4; }
.reports-status-row > span i.is-green, .reports-status-row > div i.is-green { background: #4d936e; }
.reports-status-row > span i.is-blue, .reports-status-row > div i.is-blue { background: #5d74bf; }
.reports-status-row > span i.is-gray, .reports-status-row > div i.is-gray { background: #8996a0; }
.reports-status-row > span b { margin-left: auto; color: #2e3d49; }
.reports-status-row > div { height: 5px; margin-top: 6px; border-radius: 6px; background: #edf1f3; overflow: hidden; }
.reports-status-row > div i { display: block; height: 100%; border-radius: inherit; }
.reports-status-row > small { display: block; margin-top: 5px; color: #97a1aa; font-size: 8.8px; }
.reports-drill-list { display: grid; gap: 5px; }
.reports-drill-list button { width: 100%; min-height: 50px; display: grid; grid-template-columns: 31px minmax(0,1fr) 15px; align-items: center; gap: 9px; border: 0; border-radius: 9px; padding: 6px 7px; background: transparent; cursor: pointer; text-align: left; }
.reports-drill-list button:hover { background: #f3f7f8; }
.reports-drill-list button > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #eaf3f3; color: var(--accent); }
.reports-drill-list button > span svg { width: 15px; height: 15px; }
.reports-drill-list button div { min-width: 0; }
.reports-drill-list strong, .reports-drill-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reports-drill-list strong { color: #394954; font-size: 10.5px; }
.reports-drill-list small { margin-top: 3px; color: #919ca5; font-size: 8.8px; }
.reports-drill-list button > svg { width: 13px; height: 13px; color: #96a1a9; }

.reports-trend-panel { margin-top: 11px; }
.reports-metric-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; background: #edf2f4; }
.reports-metric-switch button { height: 28px; border: 0; border-radius: 6px; padding: 0 9px; background: transparent; color: #7d8993; cursor: pointer; font-size: 9px; font-weight: 760; }
.reports-metric-switch button.is-active { background: #fff; color: #34434f; box-shadow: 0 1px 5px rgba(37,52,64,.1); }
.reports-trend { height: 164px; display: flex; align-items: end; justify-content: space-around; gap: 9px; padding: 4px 12px 0; }
.reports-trend-item { min-width: 55px; height: 100%; flex: 1; display: grid; grid-template-rows: 24px minmax(0,1fr) 20px; align-items: end; text-align: center; }
.reports-trend-item > strong { overflow: hidden; color: #596a76; font-size: 8.5px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.reports-trend-item > div { height: 100%; display: flex; align-items: end; justify-content: center; border-bottom: 1px solid #dfe6e9; background: repeating-linear-gradient(to top, transparent 0 31px, #f0f3f5 31px 32px); }
.reports-trend-item > div i { width: min(38px,70%); min-height: 5px; border-radius: 6px 6px 1px 1px; background: #78b6b9; }
.reports-trend-item > span { align-self: end; padding-top: 6px; color: #8a96a0; font-size: 8.5px; }
.reports-team-preview { margin-top: 11px; }
.reports-team-preview > header > button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 9.5px; font-weight: 750; white-space: nowrap; }
.reports-team-preview > header > button svg { width: 12px; height: 12px; }

.reports-table-wrap { width: 100%; overflow-x: auto; }
.reports-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.reports-table th { height: 36px; padding: 0 11px; border-bottom: 1px solid #e3e9ec; color: #8b97a1; text-align: left; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.reports-table td { min-width: 0; height: 58px; padding: 8px 11px; border-bottom: 1px solid #edf1f3; color: #52616d; vertical-align: middle; font-size: 10px; }
.reports-table tbody tr:last-child td { border-bottom: 0; }
.reports-table tbody tr:hover td { background: #f9fbfb; }
.reports-table td > strong, .reports-table td > small { display: block; }
.reports-table td > strong { color: #354550; font-size: 10.5px; }
.reports-table td > small { margin-top: 4px; color: #929da6; font-size: 8.6px; line-height: 1.35; }
.reports-person { min-width: 0; display: flex; align-items: center; gap: 8px; }
.reports-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-avatar { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dce8ed; color: #466275; font-size: 8px; font-weight: 850; }
.report-avatar > img { object-position: center 28%; }
.report-avatar-1 { background: #e9dfe9; color: #765878; }
.report-avatar-2 { background: #dcebe4; color: #47715e; }
.report-avatar-3 { background: #f0e2dc; color: #805b4c; }
.reports-record-link { max-width: 100%; overflow: hidden; border: 0; padding: 0; background: transparent; color: #287d87; cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; font-weight: 760; }
.reports-record-link:hover { text-decoration: underline; }
.reports-sla-badge { display: inline-flex; margin-left: 6px; border-radius: 999px; padding: 3px 6px; background: #edf0fb; color: #5d6eae; font-style: normal; font-size: 7.5px; font-weight: 850; vertical-align: middle; }
.reports-balance { display: inline-flex; border-radius: 999px; padding: 5px 8px; font-size: 9.5px; font-weight: 800; white-space: nowrap; }
.reports-balance.is-positive { background: #edf7f2; color: #438063; }
.reports-balance.is-negative { background: #fff0ee; color: #aa5751; }
.reports-table tr.is-warning td { background: #fff9ef; }
.reports-status-pill { display: inline-flex; border-radius: 999px; padding: 5px 8px; background: #edf2f4; color: #657683; font-size: 8.5px; font-weight: 750; white-space: nowrap; }
.reports-issues { display: flex; flex-wrap: wrap; gap: 4px; }
.reports-issues i { display: inline-flex; border-radius: 999px; padding: 4px 7px; background: #fff3e2; color: #9a6b2f; font-style: normal; font-size: 8px; font-weight: 750; white-space: nowrap; }
.reports-issues i.is-withoutExecutor, .reports-issues i.is-withoutAccount, .reports-issues i.is-withoutAmount { background: #fff0ee; color: #a5534e; }
.reports-empty { min-height: 72px; display: grid; place-items: center; align-content: center; gap: 7px; color: #929da6; text-align: center; font-size: 9.5px; }
.reports-empty svg { width: 17px; height: 17px; }
.reports-method { display: flex; align-items: start; gap: 10px; margin-top: 11px; border: 1px solid #dce5e8; border-radius: 11px; padding: 12px 14px; background: #f8fafb; color: #71808b; }
.reports-method > svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: #668996; }
.reports-method div { display: grid; gap: 3px; }
.reports-method strong { color: #4d5e69; font-size: 9.5px; }
.reports-method span { font-size: 8.8px; line-height: 1.45; }

.reports-detail-section { min-height: 480px; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; }
.reports-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.reports-section-head p { margin: 0 0 5px; color: var(--accent); font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; }
.reports-section-head h2 { margin: 0; color: #293844; font-size: 18px; letter-spacing: -.025em; }
.reports-section-head span { display: block; margin-top: 6px; color: #84919c; font-size: 10px; line-height: 1.4; }
.reports-sla-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 0 14px; }
.reports-quality-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.reports-limit { margin: 10px 0 0; color: #8b97a1; font-size: 9px; }

@media (max-width: 1180px) {
  .reports-filter-set { overflow-x: auto; scrollbar-width: none; }
  .reports-filter-set::-webkit-scrollbar { display: none; }
  .reports-filter-select { min-width: 150px; }
  .reports-insight-grid { grid-template-columns: 1fr; }
  .reports-quality-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .reports-result-grid { grid-template-columns: 1fr; }
  .reports-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reports-filters { flex-wrap: wrap; }
  .reports-filter-set { order: 3; flex-basis: 100%; }
  .reports-reset { margin-left: auto; }
}

@media (max-width: 760px) {
  .workspace.is-reports .topbar { grid-template-columns: auto 1fr auto; }
  .workspace.is-reports .page-head { padding-bottom: 11px; }
  .reports-view { padding: 0 12px 15px; }
  .reports-shell { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .reports-toolbar { min-height: 50px; margin: 0 -12px; padding: 6px 12px; background: #fff; }
  .reports-tabs { flex: 1; }
  .reports-tabs button { height: 36px; padding: 0 11px; font-size: 11px; }
  .reports-export { width: 40px; min-width: 40px; height: 40px; padding: 0; }
  .reports-export span { display: none; }
  .reports-export svg { width: 17px; height: 17px; }
  .reports-filters { min-height: 0; margin: 0 -12px; padding: 8px 12px; background: #fff; }
  .reports-period { width: calc(100% - 63px); }
  .reports-period-trigger { min-width: 0; flex: 1; }
  .reports-reset { width: 54px; padding: 0; }
  .reports-filter-set { margin-right: -12px; padding-right: 12px; }
  .reports-filter-select { min-width: 164px; }
  .reports-filter-select > button { min-height: 45px; }
  .reports-filter-menu { position: fixed; z-index: 140; top: auto; right: 10px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 10px; max-height: 58vh; border-radius: 15px; padding: 7px; }
  .reports-filter-menu button { min-height: 44px; font-size: 12px; }
  .reports-content { margin: 0 -12px; padding: 10px 12px 16px; border-radius: 0; }
  .reports-result-card { min-height: 220px; padding: 17px; }
  .reports-result-value { font-size: 34px; }
  .reports-result-split { gap: 6px; }
  .reports-result-split > span { padding: 9px; }
  .reports-result-split small { white-space: normal; }
  .reports-metric-grid { gap: 8px; }
  .reports-metric-card { min-height: 92px; padding: 12px 13px; }
  .reports-metric-card > strong { font-size: 17px; }
  .reports-panel { padding: 14px; }
  .reports-trend { height: 145px; padding-inline: 0; overflow-x: auto; justify-content: start; }
  .reports-trend-item { min-width: 70px; }
  .reports-table-wrap { overflow: visible; }
  .reports-table { display: block; }
  .reports-table thead { display: none; }
  .reports-table tbody { display: grid; gap: 8px; }
  .reports-table tr { display: grid; border: 1px solid #dfe6e9; border-radius: 11px; padding: 4px 11px; background: #fff; }
  .reports-table td { min-height: 43px; height: auto; display: grid; grid-template-columns: minmax(100px,.85fr) minmax(0,1.15fr); align-items: center; gap: 10px; border-bottom: 1px solid #edf1f3; padding: 8px 0; text-align: right; font-size: 11px; }
  .reports-table td:last-child { border-bottom: 0; }
  .reports-table td::before { content: attr(data-label); color: #8a96a0; text-align: left; font-size: 8px; font-weight: 790; text-transform: uppercase; letter-spacing: .045em; }
  .reports-table td[colspan] { display: block; text-align: center; }
  .reports-table td[colspan]::before { display: none; }
  .reports-table td > strong, .reports-table td > small { text-align: right; }
  .reports-person { justify-content: flex-end; }
  .reports-record-link { justify-self: end; text-align: right; }
  .reports-issues { justify-content: flex-end; }
  .reports-team-preview .reports-table td:first-child { grid-template-columns: 1fr; }
  .reports-team-preview .reports-table td:first-child::before { display: none; }
  .reports-section-head { margin-bottom: 13px; }
  .reports-section-head h2 { font-size: 17px; }
  .reports-detail-section { min-height: 0; border: 0; border-radius: 0; padding: 14px 0 0; background: transparent; }
  .reports-quality-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .reports-sla-metrics { grid-template-columns: 1fr; }
  .reports-method { padding: 12px; }
}

@media (min-width: 761px) {
  body.compact-ui .reports-view { padding-inline: 22px; padding-bottom: 18px; }
  body.compact-ui .reports-toolbar { min-height: 54px; padding-block: 7px; }
  body.compact-ui .reports-filters { min-height: 58px; padding-block: 7px; }
  body.compact-ui .reports-content { padding: 12px; }
  body.compact-ui .reports-result-card { min-height: 208px; padding: 17px; }
  body.compact-ui .reports-result-value { margin-top: 18px; }
  body.compact-ui .reports-result-split { margin-top: 17px; }
  body.compact-ui .reports-metric-card { min-height: 86px; }
}
