#reporting-view { --report-line: rgba(36, 28, 66, 0.1); --report-ink: var(--ink, #172033); }
.report-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 16px; }
.report-head h2 { margin: 3px 0 0; }
.report-head-actions { display: flex; align-items: center; gap: 12px; }
.report-period { display: flex; align-items: end; gap: 12px; padding: 13px 16px; border: 1px solid var(--report-line); border-radius: 16px; background: #fff; }
.report-period label { margin: 0; }
.report-presets { display: flex; gap: 6px; margin-left: auto; }
.report-presets button { border: 0; border-radius: 999px; padding: 8px 11px; background: #f4f0f8; color: #665d6e; cursor: pointer; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.report-kpis article { position: relative; overflow: hidden; padding: 19px; border: 1px solid var(--report-line); border-radius: 18px; background: #fff; }
.report-kpis article.result { background: linear-gradient(140deg, #322147, #694199); color: #fff; }
.report-kpis article.result::after { content: ""; position: absolute; width: 120px; height: 120px; right: -45px; top: -50px; border-radius: 50%; background: rgba(255,255,255,.12); }
.report-kpis span, .report-kpis small { display: block; color: #817989; font-size: 12px; }
.report-kpis .result span, .report-kpis .result small { color: rgba(255,255,255,.72); }
.report-kpis strong { display: block; margin: 10px 0 8px; color: var(--report-ink); font-size: clamp(20px, 2vw, 27px); }
.report-kpis .result strong { color: #fff; }
.positive { color: #25704f !important; }
.negative { color: #a23f3f !important; }
.report-kpis .result .positive, .report-kpis .result .negative { color: #fff !important; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 14px; margin-bottom: 14px; }
.report-grid.lower { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-panel { padding: 20px; border: 1px solid var(--report-line); border-radius: 19px; background: #fff; box-shadow: 0 16px 40px rgba(29, 19, 49, .05); }
.report-panel-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.report-panel-head h3 { margin: 3px 0 0; }
.report-panel-head > strong { color: #60586a; font-size: 13px; }
.cashflow-chart { display: flex; align-items: stretch; gap: 12px; min-height: 220px; overflow-x: auto; }
.cashflow-month { min-width: 62px; flex: 1; display: grid; grid-template-rows: 150px auto auto; gap: 6px; text-align: center; }
.cashflow-bars { display: flex; align-items: end; justify-content: center; gap: 5px; border-bottom: 1px solid var(--report-line); }
.cashflow-bars i { display: block; width: 13px; min-height: 3px; border-radius: 5px 5px 0 0; }
.cashflow-bars .incoming { background: #4a987c; }
.cashflow-bars .outgoing { background: #dc8c7c; }
.cashflow-month span { color: #827b88; font-size: 11px; }
.cashflow-month strong { font-size: 10px; white-space: nowrap; }
.action-metrics { display: grid; gap: 4px; }
.action-metrics div { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--report-line); }
.action-metrics div:last-child { border: 0; }
.action-metrics span { color: #77707f; font-size: 13px; }
.action-metrics strong { color: var(--report-ink); }
.open-item-list { display: grid; gap: 3px; }
.open-item { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--report-line); }
.open-item:last-child { border: 0; }
.open-item strong, .open-item span { display: block; }
.open-item span { margin-top: 4px; color: #857e8c; font-size: 11px; }
.open-item b { white-space: nowrap; }
.open-item.overdue b, .open-item.overdue span { color: #a0443d; }
.top-customers-panel { margin-bottom: 20px; }
.top-customers { display: grid; gap: 10px; }
.top-customer { display: grid; grid-template-columns: 28px minmax(150px, .7fr) 1fr 110px; align-items: center; gap: 12px; }
.top-customer > span { color: #aaa3ae; font-size: 11px; }
.top-customer i { height: 8px; overflow: hidden; border-radius: 999px; background: #f0ecf3; }
.top-customer i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #694199, #9a78bd); }
.top-customer em { text-align: right; color: #5d5665; font-size: 12px; font-style: normal; font-weight: 700; }
.report-empty { padding: 28px 10px; color: #8a838f; text-align: center; font-size: 13px; }
.group-dialog { width: min(600px, calc(100vw - 32px)); }
.group-result-dialog { width: min(920px, calc(100vw - 32px)); }
.group-note { padding: 13px 15px; border-radius: 13px; background: #f7f3fa; color: #6c6373; font-size: 13px; }
.group-company-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 300px; overflow: auto; }
.group-company-options label { display: flex !important; flex-direction: row !important; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--report-line); border-radius: 12px; }
.group-company-options input { width: auto !important; }
.group-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.group-kpis article { padding: 15px; border-radius: 14px; background: #f8f5fa; }
.group-kpis span, .group-kpis strong { display: block; }
.group-kpis span { margin-bottom: 8px; color: #7d7583; font-size: 11px; }
.group-table { overflow-x: auto; }
.group-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(105px, 1fr)); gap: 12px; min-width: 700px; padding: 11px 5px; border-bottom: 1px solid var(--report-line); }
.group-row.header { color: #847d89; font-size: 11px; }
.group-row:not(.header) span { text-align: right; }
@media (max-width: 900px) {
  .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .report-grid, .report-grid.lower { grid-template-columns: 1fr; }
  .report-period { flex-wrap: wrap; }
  .report-presets { width: 100%; margin-left: 0; }
}
@media (max-width: 620px) {
  .report-head { align-items: flex-start; gap: 15px; }
  .report-head-actions { flex-direction: column; align-items: stretch; }
  .report-kpis, .group-kpis, .group-company-options { grid-template-columns: 1fr; }
  .top-customer { grid-template-columns: 24px 1fr 90px; }
  .top-customer i { display: none; }
}
